Symplectics¶
The symplectic matrix of a controlled X gate. |
|
The symplectic matrix of a controlled Z gate. |
|
The symplectic matrix of an N-mode interferometer parametrized by an NxN unitary matrix. |
|
The symplectic matrix of a Mach-Zehnder gate. |
|
The symplectic matrix of a quadratic phase gate. |
|
The symplectic matrix of an N-mode interferometer parametrized by an NxN orthogonal matrix. |
cxgate_symplectic¶
czgate_symplectic¶
interferometer_symplectic¶
mzgate_symplectic¶
- mrmustard.physics.symplectics.mzgate_symplectic(phi_a, phi_b, internal)[source]¶
The symplectic matrix of a Mach-Zehnder gate.
- It supports two conventions:
if
internal=True, both phases act inside the interferometer:phi_aon the upper arm,phi_bon the lower arm;if
internal = False, both phases act on the upper arm:phi_abefore the first BS,phi_bafter the first BS.
- Parameters:
phi_a (float | Sequence[float]) – The phase in the upper arm of the MZ interferometer
phi_b (float | Sequence[float]) – The phase in the lower arm or external of the MZ interferometer
internal (bool) – Whether phases are both in the internal arms.
- Returns:
The symplectic matrix of a Mach-Zehnder gate.
- Return type: