Identical beam splitters in a two-path interferometer (source code)

= Identical beam splitters in a two-path interferometer
{title2=$P_0=1-\sin^2\beta\cos^2(\phi/2)$}

For two identical mixers $U=R_x(\beta)$ with a lower-arm phase shifter $P(\phi)=\operatorname{diag}(1,e^{i\phi})$, the upper-input state evolves as
$$
UP(\phi)U|0\rangle=(c^2-e^{i\phi}s^2)|0\rangle-ics(1+e^{i\phi})|1\rangle,
\quad c=\cos(\beta/2),\ s=\sin(\beta/2).
$$
The upper-output <interferometric visibility> is $\sin^2\beta/(1+\cos^2\beta)$ and reaches one exactly at $\beta=\pi/2\pmod\pi$. Replacing the second mixer by its inverse changes the port convention and phase dependence; it is a different specified network.