A photon hits the first beamsplitter (BS1) and enters a superposition of taking arm A and arm B at once. A phase shifter in arm A adds a tunable phase φ before the two paths recombine at the second beamsplitter (BS2), which routes the photon to one of two detectors, D0 (bright port) or D1 (dark port).
P(D0) = cos²(φ/2)
P(D1) = sin²(φ/2)
- No which-path detector — each photon still takes a coherent superposition of both arms. Fire many photons at a fixed φ and the fraction landing at D0 traces the cos²(φ/2) fringe, even though each photon arrives alone.
- Which-path detector on — a sensor in arm A tags every photon with the arm it actually took, destroying the coherence between the arms. The photon becomes a classical either/or particle, and D0/D1 clicks split 50/50 no matter what φ is set — the fringe curve goes flat.
- Auto-sweep φ — slowly rotates the phase over time so photons accumulate across the whole curve instead of only one bin, filling in the fringe (or the flat line) automatically.
This is complementarity in action: you can extract which-path information, or you can see interference — never both from the same run.