mm.physics.gaussian.mz_symplectic¶
- mrmustard.physics.gaussian.mz_symplectic(phi_a, phi_b, internal=False)[source]¶
Symplectic matrix of a Mach-Zehnder gate.
It supports two conventions:
- if
internal=True
, both phases act inside the interferometer: phi_a
on the upper arm,phi_b
on the lower arm;
- if
- if internal = False (default), both phases act on the upper arm:
phi_a
before the first BS,phi_b
after the first BS.
- Parameters:
phi_a (float) – first phase
phi_b (float) – second phase
internal (bool) – whether phases are in the internal arms (default is False)
- Returns:
symplectic (orthogonal) matrix of a Mach-Zehnder interferometer
- Return type:
Matrix
code/api/mrmustard.physics.gaussian.mz_symplectic
Download Python script
Download Notebook
View on GitHub