symop.polynomial.channels.unitaries.mzi

Mach–Zehnder interferometer utilities.

Constructs the 2x2 unitary matrix of a Mach–Zehnder interferometer (MZI) from beamsplitters and phase shifters under the package Heisenberg operator convention.

Functions

mzi_u(*, theta1, theta2, phi_internal[, ...])

Return a 2x2 Mach-Zehnder interferometer (MZI) unitary.

mzi_u(*, theta1: float, theta2: float, phi_internal: float, phi_in0: float = 0.0, phi_in1: float = 0.0, phi_out0: float = 0.0, phi_out1: float = 0.0, check_unitary: bool = False, atol: float = 1e-10) ndarray[tuple[Any, ...], dtype[complex128]]

Return a 2x2 Mach-Zehnder interferometer (MZI) unitary.

This composes two couplers with input/output phase shifters and one internal differential phase between the arms.

Construction

Define two 2x2 couplers U1, U2 (directional-coupler family via beamsplitter_u), and diagonal phase matrices:

\[\begin{split}P_\mathrm{in} = \mathrm{diag}(e^{i\phi_{in,0}}, e^{i\phi_{in,1}}), \\ P_\mathrm{int} = \mathrm{diag}(e^{i\phi_{internal}}, 1), \\ P_\mathrm{out} = \mathrm{diag}(e^{i\phi_{out,0}}, e^{i\phi_{out,1}}).\end{split}\]

Then:

\[U = P_\mathrm{out} \, U_2 \, P_\mathrm{int} \, U_1 \, P_\mathrm{in}.\]
type theta1:

float

param theta1:

Coupler angles that define splitting ratios. We use t=cos(theta), r=sin(theta) with the beamsplitter_u convention.

type theta2:

float

param theta2:

Coupler angles that define splitting ratios. We use t=cos(theta), r=sin(theta) with the beamsplitter_u convention.

type phi_internal:

float

param phi_internal:

Internal phase on arm 0 relative to arm 1.

type phi_in0:

float

param phi_in0:

Input port phases.

type phi_in1:

float

param phi_in1:

Input port phases.

type phi_out0:

float

param phi_out0:

Output port phases.

type phi_out1:

float

param phi_out1:

Output port phases.

type check_unitary:

bool

param check_unitary:

If True, validate unitarity.

type atol:

float

param atol:

Tolerance for optional unitary check.

returns:

Complex matrix of shape (2, 2).

rtype:

numpy.ndarray

Notes

This is a “photonic circuit” convenience constructor. If you prefer a different internal phase placement (arm 1 instead of arm 0), swap the diagonal of P_int.

Parameters:
Return type:

ndarray[tuple[Any, …], dtype[complex128]]