sf.decompositions.mach_zehnder¶
-
mach_zehnder
(m, n, internal_phase, external_phase, nmax)[source]¶ A two-mode Mach-Zehnder interferometer section.
This section is constructed by an external phase shifter on the input mode m, a symmetric beamsplitter combining modes m and n, an internal phase shifter on mode m, and another symmetric beamsplitter combining modes m and n.
The resulting matrix is
\[\begin{split}M = i e^{i \phi_{i}/2} \left[\begin{matrix}\sin \left( \phi_{i}/2 \right) e^{i \phi_{e}} & \cos \left( \phi_{i}/2 \right) \\ \cos \left( \phi_{i}/2 \right) e^{i \phi_{e}} & - \sin \left( \phi_{i}/2 \right) \end{matrix}\right]\end{split}\]- Parameters
m (int) – mode number on which the phase shifters act
n (int) – mode number which is combined with mode m by the beamsplitters
internal_phase (float) – phase in between the symmetric beamsplitters
external_phase (float) – phase acting before the first beamsplitter
nmax (int) – maximum number of modes in the circuit
- Returns
unitary matrix of the effective transformation the series of phaseshifters and beamsplitters.
- Return type
array
code/api/strawberryfields.decompositions.mach_zehnder
Download Python script
Download Notebook
View on GitHub