Simple Algorithm
Quantum Computing · Excited State · 22 min

The Mach–Zehnder Interferometer

Beam splitters as Hadamards, and which-path information.

Two beam splitters, two mirrors and a phase shifter make the cleanest interference experiment there is, and a single photon running through it is a qubit running through the circuit H P(φ) HH\,P(\varphi)\,H. In this lesson you derive its behavior exactly, find where the crucial minus sign comes from, and compute how much interference survives a partial record of the path.

What you’ll learn

  • Model beam splitters and phase shifters as 2×22\times2 unitaries in the dual-rail (path) encoding.
  • Derive U(φ)=H P(φ) H=eiφ/2RX(φ)U(\varphi) = H\,P(\varphi)\,H = e^{i\varphi/2}R_X(\varphi) and P(D0)=cos⁡2(φ/2)P(\text{D0}) = \cos^2(\varphi/2).
  • Prove that every lossless 50:50 beam splitter satisfies rr′=−tt′rr' = -tt', and reconcile different conventions.
  • Derive the fringe visibility V=∣⟨e0∣e1⟩∣V = \abs{\braket{e_0|e_1}} for a which-path marker, and the duality D2+V2=1D^2 + V^2 = 1 for pure markers.
  • Interpret single-photon and delayed-choice experiments correctly.

The interferometer as a one-qubit circuit

Encode a single photon by its path: ∣0⟩\ket{0} = lower arm, ∣1⟩\ket{1} = upper arm (the dual-rail encoding). A 50:50 beam splitter is a unitary on this two-dimensional space, which we take to be the Hadamard HH. A phase shifter on the upper arm is P(φ)=diag⁡(1,eiφ)P(\varphi) = \diag(1, e^{i\varphi}). The photon enters in ∣0⟩\ket{0}, so the interferometer applies

DerivationThe Mach–Zehnder unitary
  1. U(φ)=H P(φ) H=12(111−1)(100eiφ)(111−1)U(\varphi) = H\,P(\varphi)\,H = \frac12\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}1&0\\0&e^{i\varphi}\end{pmatrix}\begin{pmatrix}1&1\\1&-1\end{pmatrix}

    Read right to left: BS₁, then the phase, then BS₂.

  2. =12(1+eiφ1−eiφ1−eiφ1+eiφ)= \frac12\begin{pmatrix}1+e^{i\varphi} & 1-e^{i\varphi}\\ 1-e^{i\varphi} & 1+e^{i\varphi}\end{pmatrix}

    Each entry is a sum of two path amplitudes, one per arm.

  3. 1+eiφ=2eiφ/2cos⁡φ2,1−eiφ=−2i eiφ/2sin⁡φ21 + e^{i\varphi} = 2e^{i\varphi/2}\cos\tfrac{\varphi}{2}, \qquad 1 - e^{i\varphi} = -2i\,e^{i\varphi/2}\sin\tfrac{\varphi}{2}

    Factor out the half-angle phase.

  4. U(φ)=eiφ/2(cos⁡φ2−isin⁡φ2−isin⁡φ2cos⁡φ2)=eiφ/2 RX(φ)U(\varphi) = e^{i\varphi/2}\begin{pmatrix}\cos\frac{\varphi}{2} & -i\sin\frac{\varphi}{2}\\ -i\sin\frac{\varphi}{2} & \cos\frac{\varphi}{2}\end{pmatrix} = e^{i\varphi/2}\,R_X(\varphi)

    Up to a global phase, the interferometer is an XX-rotation by φ\varphi: a ZZ-rotation conjugated by HH.

  5. P(D0)=∣⟨0∣U∣0⟩∣2=cos⁡2φ2,P(D1)=sin⁡2φ2P(\text{D0}) = \abs{\bra{0}U\ket{0}}^2 = \cos^2\tfrac{\varphi}{2}, \qquad P(\text{D1}) = \sin^2\tfrac{\varphi}{2}

    The fringe. At φ=0\varphi = 0 the arms reinforce at D0; at φ=π\varphi=\pi they cancel there.

Predict before you look

At φ=π/3\varphi = \pi/3 (60°), what fraction of photons reaches D0, in percent?

Show the answer

75 %

cos⁡2(π/6)=(32)2=34\cos^2(\pi/6) = \left(\tfrac{\sqrt3}{2}\right)^2 = \tfrac34. On the Bloch sphere, RX(π/3)R_X(\pi/3) tilts ∣0⟩\ket{0} by 60° toward −y-y, leaving P(0)=cos⁡2(30°)P(0) = \cos^2(30°).

Where the minus sign comes from

A real beam splitter has transmission and reflection amplitudes for each input port. Write it as

B=(tr′rt′),B = \begin{pmatrix} t & r' \\ r & t' \end{pmatrix},

where the columns are input ports and the rows output ports. Energy conservation (losslessness) means BB is unitary.

DerivationUnitarity forces a relative sign
  1. ∣t∣=∣r∣=∣r′∣=∣t′∣=12\abs{t} = \abs{r} = \abs{r'} = \abs{t'} = \tfrac{1}{\sqrt2}

    A 50:50 splitter: each route has probability 12\tfrac12.

  2. B†B=I  ⇒  t∗r′+r∗t′=0B^\dagger B = \id \;\Rightarrow\; t^{*}r' + r^{*}t' = 0

    The two columns must be orthogonal.

  3. r′t′=−r∗t∗  ⇒  r r′=−∣r∣2∣t∣2 t t′=− t t′\frac{r'}{t'} = -\frac{r^{*}}{t^{*}} \;\Rightarrow\; r\,r' = -\frac{\abs{r}^2}{\abs{t}^2}\, t\,t' = -\,t\,t'

    Multiply through by r/t′r/t' and use ∣r∣=∣t∣\abs{r}=\abs{t}.

  4. So in every lossless 50:50 beam splitter, "reflect twice" and "transmit twice" carry opposite signs. This is the minus sign that makes the two routes to the dark port cancel. It is not an extra assumption; it is conservation of probability.

ConventionMatrixTwo in a row (equal arms)
HadamardH=12(111−1)H = \tfrac{1}{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}H2=IH^2 = \id: exits the port it entered
SymmetricB=12(1ii1)B = \tfrac{1}{\sqrt2}\begin{pmatrix}1&i\\i&1\end{pmatrix}B2=iXB^2 = iX: exits the other port
Both satisfy rr′=−tt′rr' = -tt' (for BB: i⋅i=−1⋅1i\cdot i = -1\cdot1). They differ only by phase shifts on the ports: B=diag⁡(1,i) H diag⁡(1,i)B = \diag(1,i)\,H\,\diag(1,i). Which detector is bright at φ=0\varphi = 0 is a matter of labeling and arm lengths.

Which-path information and visibility

Now let the photon disturb a second system, a marker, differently in the two arms: an atom that is excited, a polarization that is rotated, a mirror that recoils. The marker starts in ∣e⟩\ket{e} and ends in ∣e0⟩\ket{e_0} or ∣e1⟩\ket{e_1} depending on the arm.

DerivationThe visibility formula
  1. 12(∣0⟩∣e0⟩+eiφ∣1⟩∣e1⟩)\tfrac{1}{\sqrt2}\big(\ket{0}\ket{e_0} + e^{i\varphi}\ket{1}\ket{e_1}\big)

    After BS₁, the marking interaction and the phase shifter.

  2. →  H⊗I   12∣0⟩(∣e0⟩+eiφ∣e1⟩)+12∣1⟩(∣e0⟩−eiφ∣e1⟩)\xrightarrow{\;H\otimes\id\;}\ \tfrac12\ket{0}\big(\ket{e_0} + e^{i\varphi}\ket{e_1}\big) + \tfrac12\ket{1}\big(\ket{e_0} - e^{i\varphi}\ket{e_1}\big)

    BS₂ acts on the path only.

  3. P(D0)=14∥∣e0⟩+eiφ∣e1⟩∥2=12(1+Re(eiφ⟨e0∣e1⟩))P(\text{D0}) = \tfrac14\big\lVert \ket{e_0} + e^{i\varphi}\ket{e_1}\big\rVert^2 = \tfrac12\Big(1 + \mathrm{Re}\big(e^{i\varphi}\braket{e_0|e_1}\big)\Big)

    Sum over the marker's states: the joint amplitude is a vector, and its squared norm is the probability.

  4. ⟨e0∣e1⟩=γ=∣γ∣eiα  ⇒  P(D0)=12(1+∣γ∣cos⁡(φ+α))\braket{e_0|e_1} = \gamma = \abs{\gamma}e^{i\alpha} \;\Rightarrow\; P(\text{D0}) = \tfrac12\big(1 + \abs{\gamma}\cos(\varphi + \alpha)\big)

    The fringe is shifted by α\alpha and scaled by ∣γ∣\abs{\gamma}.

  5. V=Pmax⁡−Pmin⁡Pmax⁡+Pmin⁡=∣⟨e0∣e1⟩∣V = \frac{P_{\max} - P_{\min}}{P_{\max} + P_{\min}} = \abs{\braket{e_0|e_1}}

    Fringe visibility equals the overlap of the which-path records. A perfect record (γ=0\gamma = 0) leaves no fringe at all.

Check your understanding

A marker ends in states with ∣⟨e0∣e1⟩∣=0.8\abs{\braket{e_0|e_1}} = 0.8. What fringe visibility do you see, and how well can the marker reveal the path?

  1. V=0.2V = 0.2; the path can be guessed with probability 0.90.9
  2. V=0.8V = 0.8; the path can be guessed with probability 0.80.8
  3. V=0.8V = 0.8; the path can be guessed with probability 0.60.6
  4. V=0.64V = 0.64; the path can be guessed with probability 0.680.68
Show the answer

B. V=0.8V = 0.8; the path can be guessed with probability 0.80.8

V=∣γ∣=0.8V = \abs{\gamma} = 0.8. The distinguishability is D=1−0.82=0.6D = \sqrt{1 - 0.8^2} = 0.6, and the optimal (Helstrom) guess succeeds with probability 12(1+D)=0.8\tfrac12(1 + D) = 0.8. Strong fringes and a decent path guess can coexist, but only as allowed by D2+V2=1D^2 + V^2 = 1.

Single photons and delayed choice

Is the fringe really single-photon interference, or a collective effect of many photons? Grangier, Roger and Aspect (1986) answered this with heralded single photons. At a single beam splitter, coincidences between the two outputs were far below the minimum any classical wave model allows: each photon is detected whole, on one side. The same photons, sent through a Mach–Zehnder interferometer, built up the full fringe one click at a time.

Wheeler then asked: what if BS₂ is inserted or removed only after the photon has passed BS₁? Jacques et al. (2007) made the choice with a fast random switch, space-like separated from the photon's entry. The statistics followed the final configuration every time: fringes with BS₂, 50/50 path statistics without it.

ConfigurationD0D1Absorbed
both arms open, BS₂ incos⁡2φ2\cos^2\frac{\varphi}{2}sin⁡2φ2\sin^2\frac{\varphi}{2}00
BS₂ removed12\tfrac12 (upper arm)12\tfrac12 (lower arm)00
one arm blocked, BS₂ in14\tfrac1414\tfrac1412\tfrac12
Check your understanding

What is the correct lesson of the delayed-choice experiment?

  1. The photon's past is changed by the later choice
  2. The photon is a particle until BS₂ is inserted, then becomes a wave
  3. The statistics depend only on the final setup; the photon need not have had a definite "wave" or "particle" character beforehand, and no signal travels backward
  4. The choice must be made before the photon enters, or the experiment fails
Show the answer

C. The statistics depend only on the final setup; the photon need not have had a definite "wave" or "particle" character beforehand, and no signal travels backward

Quantum mechanics predicts the detection statistics from the whole experimental arrangement. Assigning the photon a definite path (or not) before the choice is an unnecessary extra story, and the outcomes at earlier times are never altered, so nothing can be signaled.

Going deeper

Everything above follows from three facts: beam splitters are unitaries, amplitudes add before squaring, and records weight the interference term by their overlap. The Rydberg-level lessons push each fact to its limit.

Key takeaways

  • In the dual-rail encoding a lossless 50:50 beam splitter is a 2×22\times2 unitary, and unitarity forces rr′=−tt′rr' = -tt': the minus sign behind every dark port.
  • The Mach–Zehnder interferometer is H P(φ) H=eiφ/2RX(φ)H\,P(\varphi)\,H = e^{i\varphi/2}R_X(\varphi), so P(D0)=cos⁡2(φ/2)P(\text{D0}) = \cos^2(\varphi/2).
  • A which-path marker multiplies the interference term by ⟨e0∣e1⟩\braket{e_0|e_1}: visibility V=∣⟨e0∣e1⟩∣V = \abs{\braket{e_0|e_1}}, and D2+V2=1D^2 + V^2 = 1 for pure markers.
  • Uncomputing the record before recombination restores interference; reading it in a conjugate basis restores fringes only in sorted subsets.
  • Single-photon and delayed-choice experiments show the fringe is a property of each photon's amplitudes and of the final setup, with no signaling in time.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

Up to a global phase, which single-qubit rotation is the Mach–Zehnder unitary H P(φ) HH\,P(\varphi)\,H?

  1. RZ(φ)R_Z(\varphi)
  2. RX(φ)R_X(\varphi)
  3. RY(φ)R_Y(\varphi)
  4. RX(φ/2)R_X(\varphi/2)
Show the answer

B. RX(φ)R_X(\varphi)

H P(φ) H=eiφ/2RX(φ)H\,P(\varphi)\,H = e^{i\varphi/2}R_X(\varphi). Conjugating by HH swaps the xx and zz axes, so a ZZ-rotation (the phase) becomes an XX-rotation.

Question 2

Two symmetric beam splitters B=12(1ii1)B = \tfrac{1}{\sqrt2}\begin{pmatrix}1&i\\i&1\end{pmatrix} are used with perfectly equal arms. A photon enters port 0. Where does it leave?

  1. Port 0 with certainty
  2. 50/50 between the ports
  3. It depends on the photon's wavelength
  4. Port 1 with certainty
Show the answer

D. Port 1 with certainty

B2=12(02i2i0)=iXB^2 = \tfrac12\begin{pmatrix}0&2i\\2i&0\end{pmatrix} = iX, so ∣0⟩↦i∣1⟩\ket{0}\mapsto i\ket{1}. Which port is bright is convention-dependent; that one port is completely dark is not.

Question 3

A which-path marker ends in pure states with ⟨e0∣e1⟩=0.6\braket{e_0|e_1} = 0.6. What is the fringe visibility?

  1. 0.60.6
  2. 0.360.36
  3. 0.80.8
  4. 0.40.4
Show the answer

A. 0.60.6

V=∣⟨e0∣e1⟩∣=0.6V = \abs{\braket{e_0|e_1}} = 0.6. The distinguishability is D=1−0.36=0.8D = \sqrt{1 - 0.36} = 0.8, and D2+V2=1D^2 + V^2 = 1.

Question 4

In the circuit HH, CNOT, HH (path on qubit 0, marker on qubit 1), which modification restores qubit 0 to ∣0⟩\ket{0} with certainty?

  1. Measure the marker qubit after the final HH
  2. Apply HH to the marker after the final HH
  3. Apply a second CNOT before the final HH, uncomputing the marker
  4. Apply XX to the marker after the final HH
Show the answer

C. Apply a second CNOT before the final HH, uncomputing the marker

The second CNOT returns the marker to ∣0⟩\ket{0} while the paths are still separate, so the paths again end in the same marker state and interfere fully. Operations on the marker after recombination cannot change qubit 0's statistics.

Go deeper

Further reading

  • M. A. Nielsen & I. L. Chuang, Quantum Computation and Quantum Information, §7.4 (Cambridge, 10th anniv. ed., 2010).
  • P. Grangier, G. Roger & A. Aspect, "Experimental evidence for a photon anticorrelation effect on a beam splitter: a new light on single-photon interferences", Europhys. Lett. 1, 173 (1986).
  • V. Jacques, E. Wu, F. Grosshans, F. Treussart, P. Grangier, A. Aspect & J.-F. Roch, "Experimental realization of Wheeler's delayed-choice gedanken experiment", Science 315, 966 (2007).
  • B.-G. Englert, "Fringe visibility and which-way information: an inequality", Phys. Rev. Lett. 77, 2154 (1996).