Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Lab 4 · Interference: add amplitudes, then square

Level: Levels 1–5 · Prerequisites: L1-07 (track a wave), L1-08 (combine waves, then square), L2-09 (use vectors for two outcomes)

What you’ll learn:

  • How a Mach–Zehnder interferometer turns a phase difference into detection probabilities.

  • Why adding amplitudes and then squaring differs from adding probabilities of the two paths.

  • How dephasing (noise) and which-path information reduce fringe visibility, and why full which-path information removes the fringes.

  • Why this matters later for causal models. When paths are not recorded, the law of total probability over “which path” does not describe the detector.

Open in Colab

1 · Predict → Run → Explain: the interferometer as matrices

A photon (or any single quantum system) enters port 0. A beam splitter acts like the Hadamard matrix HH. One arm adds a phase φ\varphi. A second beam splitter HH recombines the arms:

∣out⟩=H R(φ) H ∣0⟩,R(φ)=(100eiφ).|\text{out}\rangle = H\,R(\varphi)\,H\,|0\rangle,\qquad R(\varphi)=\begin{pmatrix}1&0\\0&e^{i\varphi}\end{pmatrix}.

Predict. Each arm is taken with probability one half. With φ=0\varphi=0, what is the probability of detector 0? With φ=π\varphi=\pi?

phi=0.00: path amplitudes [0.5+0.j 0.5+0.j], total (1+0j), P(detector 0) = 1.000, engine = 1.000
phi=1.57: path amplitudes [0.5+0.j  0. +0.5j], total (0.5+0.5j), P(detector 0) = 0.500, engine = 0.500
phi=3.14: path amplitudes [ 0.5+0.j -0.5+0.j], total 0j, P(detector 0) = 0.000, engine = 0.000
Matrix, engine, and closed-form checks passed.

Explain. Each path contributes an amplitude to detector 0: 12\tfrac12 through the first arm and 12eiφ\tfrac12e^{i\varphi} through the second. Quantum rules add the amplitudes first and then take the squared magnitude Feynman, 1966:

P(0)=∣12+12eiφ∣2=1+cos⁡φ2.P(0)=\Big|\tfrac12+\tfrac12e^{i\varphi}\Big|^2=\frac{1+\cos\varphi}{2}.

At φ=0\varphi=0 the amplitudes line up and detector 0 always clicks. At φ=π\varphi=\pi they cancel and it never clicks. Now reason classically instead. The photon took one path or the other, each with probability 12\tfrac12, and then went to detector 0 with probability 12\tfrac12. That gives 12\tfrac12 for every phase. The check cell confirms both numbers for 73 phases. Probabilities never become negative. It is the complex amplitudes that cancel.

Drag the phase slider. The left panel draws the two path amplitudes head to tail in the complex plane, with their sum. The right panel shows the resulting probability.

Loading...

2 · Predict → Run → Explain: noise washes out the fringes

Between the beam splitters, let the arm superposition suffer dephasing with strength pp. This is the channel ρ↦(1−p2)ρ+p2ZρZ\rho\mapsto(1-\tfrac p2)\rho+\tfrac p2 Z\rho Z from s.dephasing_kraus(p) Preskill, n.d.. It leaves the path probabilities alone. It shrinks the off-diagonal (coherence) terms of the density matrix.

Predict. With p=1p=1, what does the fringe look like?

visibility by dephasing strength: {0.0: 1.0, 0.1: 0.9, 0.2: 0.8, 0.3: 0.7, 0.4: 0.6, 0.5: 0.5, 0.6: 0.4, 0.7: 0.3, 0.8: 0.2, 0.9: 0.1, 1.0: 0.0}
Dephasing checks passed: visibility = 1 - p, coherence |rho_01| = (1 - p)/2.
Loading...

Explain. The fringe keeps its shape, but its contrast falls. That contrast is the visibility V=(Pmax⁡−Pmin⁡)/(Pmax⁡+Pmin⁡)V=(P_{\max}-P_{\min})/(P_{\max}+P_{\min}), and it falls to 1−p1-p. This matches the engine’s interference(phi, visibility). At p=1p=1 the off-diagonal terms are gone, and the output is 12\tfrac12 for every phase. That is exactly the classical “one path or the other” prediction.

3 · Predict → Run → Explain: which-path information

Instead of noise, attach a tag qubit that records the path. If the photon takes arm 2, the tag is rotated by RY(θ)R_Y(\theta). If it takes arm 1, the tag is left in ∣0⟩|0\rangle. Nobody ever looks at the tag. We only trace it out with s.partial_trace.

Predict. Does the tag need to be read to destroy the fringes?

theta=0.000: visibility 1.000, distinguishability 0.000
theta=1.047: visibility 0.866, distinguishability 0.500
theta=3.142: visibility 0.000, distinguishability 1.000
Which-path checks passed.
Loading...

Explain. The tag does not need to be read. What matters is whether the joint state makes it possible to tell the paths apart. The visibility equals the overlap of the two tag states, ∣⟨t0∣t1⟩∣=cos⁡(θ/2)|\langle t_0|t_1\rangle|=\cos(\theta/2). The distinguishability (trace distance) is sin⁡(θ/2)\sin(\theta/2). So V2+D2=1V^2+D^2=1 for these pure tags. With a perfect record (θ=π\theta=\pi) the fringes vanish. This is the same output as full dephasing. From the path’s point of view, recording the path in an environment is dephasing.

The static summary figure:

<Figure size 1300x494 with 2 Axes>

4 · Why interference matters for causal models

A classical causal model handles a hidden intermediate variable by summing over its values. Let KK be “which path” and DD the detector. Then

P(D=d)=∑kP(K=k) P(D=d∣K=k).P(D=d)=\sum_k P(K=k)\,P(D=d\mid K=k).

Section 1 read P(K=k)=12P(K=k)=\tfrac12 and P(D=0∣K=k)=12P(D=0\mid K=k)=\tfrac12 off the beam splitters. With these, the sum gives 12\tfrac12, while the interferometer gives (1+cos⁡φ)/2(1+\cos\varphi)/2. So the path cannot be treated as a classical variable with those probabilities sitting between source and detector. Once the path is recorded (Section 3) or dephased (Section 2), the sum becomes correct again.

Frameworks for quantum causal models describe mechanisms with quantum states and channels instead of conditional probability tables Allen et al., 2017 Barrett et al., 2019 Costa & Shrapnel, 2016. Their own motivation is Bell-type correlations. The failure of the path sum above is a simpler way to see why a classical table with the naive path probabilities is not enough. Two cautions:

  • Interference by itself does not rule out every classical explanation, because classical waves also interfere Feynman, 1966. Stronger separations between quantum and classical causal explanations, with explicit assumptions, come from Bell-type experiments Bell, 1964 Clauser et al., 1969. A later lab treats them.

  • Nothing here shows a computational or learning advantage. The lab only shows that the bookkeeping rule changes.

Going deeper

Interferometer unitary

U(φ)=HR(φ)H=eiφ/2(cos⁡φ2−isin⁡φ2−isin⁡φ2cos⁡φ2),P(0)=cos⁡2φ2=1+cos⁡φ2.U(\varphi)=H R(\varphi) H=e^{i\varphi/2}\begin{pmatrix}\cos\frac\varphi2 & -i\sin\frac\varphi2\\ -i\sin\frac\varphi2 & \cos\frac\varphi2\end{pmatrix},\qquad P(0)=\cos^2\frac\varphi2=\frac{1+\cos\varphi}2 .

Density matrix and dephasing

After the first beam splitter and the phase, ρ=12(1e−iφeiφ1)\rho=\frac12\begin{pmatrix}1&e^{-i\varphi}\\e^{i\varphi}&1\end{pmatrix}. Dephasing multiplies the off-diagonal entries by 1−p1-p, and

P(0)=⟨0∣HρH∣0⟩=12(1+(1−p)cos⁡φ),V=1−p.P(0)=\langle0|H\rho H|0\rangle=\tfrac12\big(1+(1-p)\cos\varphi\big),\qquad V=1-p .

Which-path tag

Take the path–tag state 12(∣0⟩∣t0⟩+eiφ∣1⟩∣t1⟩)\frac1{\sqrt2}\big(|0\rangle|t_0\rangle+e^{i\varphi}|1\rangle|t_1\rangle\big). Tracing out the tag gives ρ01=12e−iφ⟨t1∣t0⟩\rho_{01}=\tfrac12 e^{-i\varphi}\langle t_1|t_0\rangle. Hence V=∣⟨t0∣t1⟩∣V=|\langle t_0|t_1\rangle|. For pure tags the trace distance is D=1−∣⟨t0∣t1⟩∣2D=\sqrt{1-|\langle t_0|t_1\rangle|^2}, so V2+D2=1V^2+D^2=1.

Exercises

Solution

Always detector 1: P(0)=(1+cos⁡π)/2=0P(0)=(1+\cos\pi)/2=0. The two amplitudes to detector 0 are equal and opposite.

Solution

P(0)=(1+0.5cos⁡φ)/2P(0)=(1+0.5\cos\varphi)/2 ranges from 0.25 (at φ=π\varphi=\pi) to 0.75 (at φ=0\varphi=0).

Solution

θ=2arccos⁡(0.6)\theta=2\arccos(0.6), V=0.6V=0.6, D=1−0.36=0.8D=\sqrt{1-0.36}=0.8, and V2+D2=1V^2+D^2=1.

Check yourself

All checks passed.
References
  1. Feynman, R. P. (1966). The Feynman Lectures on Physics. Volume III. https://www.feynmanlectures.caltech.edu/III_toc.html
  2. Preskill, J. (n.d.). Course Information for Physics 219/Computer Science 219 Quantum Computation (Formerly Physics 229). California Institute of Technology course page with lecture notes. https://www.preskill.caltech.edu/ph219/
  3. Allen, J.-M. A., Barrett, J., Horsman, D. C., Lee, C. M., & Spekkens, R. W. (2017). Quantum common causes and quantum causal models. Physical Review X, 7(3). 10.1103/PhysRevX.7.031021
  4. Barrett, J., Lorenz, R., & Oreshkov, O. (2019). Quantum Causal Models. https://arxiv.org/abs/1906.10726
  5. Costa, F., & Shrapnel, S. (2016). Quantum causal modelling. New Journal of Physics, 18(6), 063032. 10.1088/1367-2630/18/6/063032
  6. Bell, J. S. (1964). On the Einstein Podolsky Rosen paradox. Physics Physique Fizika, 1(3), 195–200. 10.1103/physicsphysiquefizika.1.195
  7. Clauser, J. F., Horne, M. A., Shimony, A., & Holt, R. A. (1969). Proposed Experiment to Test Local Hidden-Variable Theories. Physical Review Letters, 23(15), 880–884. 10.1103/physrevlett.23.880