⚛️

Quantum Optics and Photon Detection Statistics

Three separate experiments, each computed from an explicit quantum state and a stated detector model: single-photon Mach–Zehnder interference with which-path marking and a quantum eraser, photon-number statistics of coherent, thermal, Fock and squeezed light behind a lossy, noisy detector, and a Hanbury Brown–Twiss g²(τ) coincidence experiment. Detection events are Born-rule samples drawn one at a time with a seeded random-number generator.

P4 specialist extension Prerequisites: interferometers and coherence, polarization (Jones vectors), radiometry and photon counting, and basic probability (Poisson, binomial).

Every slider has a number box: type a value and press Enter • Each experiment has its own presets • Settings are kept in the URL
N
D₁
D₂
V
D

What is simulated. Each experiment evaluates Born-rule probabilities from a stated few-mode quantum model (a density matrix) and a stated detector model, then draws individual detection events from those probabilities with a seeded generator. This is not a quantum-field simulation of propagation in space, and it is unrelated to the double-slit page, which solves classical scalar diffraction.

① Single-photon Mach–Zehnder with which-path marking

Interferometer state: path ⊗ polarization, 4 × 4 ρ

One heralded photon at a time enters BS1 horizontally polarised (H). A half-wave plate in arm b rotates its polarization by θ, which marks the path. The optional polarizer in front of both detectors reads the marker in a rotated basis (the quantum eraser). The last detector to click flashes; the numbers are the running click totals. The geometry is schematic.

Fringes built from single clicks per heralded photon

Photons are sent in turn to 24 settings of φ. Dots show clicks per photon at each setting, with ±1σ binomial error bars. Lines show the Born-rule click probabilities, including efficiency and dark clicks. The white line marks the φ slider.

Complementarity V² + D² ≤ 1

Distinguishability D against visibility V. Pure marker states lie on the unit circle (dashed curve: θ from 0° to 90° at the current R₁). Unobserved dephasing moves the point inside the circle. V here is the visibility with the marker unread (no eraser). The cross is the visibility fitted to the sampled clicks, shown only without an eraser and with ideal detectors.

Detection record (last 90 heralded photons)

Each column is one heralded photon. A filled square is a photon detected in D₁ or D₂, and a hollow square is a dark click. An empty column means the photon was lost: absorbed by the polarizer or missed by the detector. Individual clicks are random, and only their frequencies follow the fringe.

P(D₁), P(D₂), P(blocked) at φ
Click probabilities at φ (η, pd)
Visibility V, marker unread (theory)
V with eraser, among photons passing the polarizer
Distinguishability D / predictability P
V² + D²
Best which-path guess (1 + D)/2
Marker overlap |⟨ma|mb⟩|
Purity Tr ρ²
Sampled V (fit) ± 1σ
Photons sent / per setting
Clicks D₁ / D₂ / dark
💡 How to use

Learn with this tool

Learning objectives

  • Explain single-photon interference in terms of probability amplitudes, and use the complementarity relation V² + D² ≤ 1 to predict how which-path marking and its erasure change the fringe visibility.
  • Tell coherent, thermal, Fock and squeezed light apart by their photon-number variance, Mandel Q and g²(0), and predict how detector efficiency and dark counts change each measure.
  • Interpret a Hanbury Brown–Twiss coincidence histogram, including bunching, antibunching, coherence time, and the effect of timing jitter and background counts.

Prerequisites P4 extension

  • Interferometers and coherence: beam-splitter matrices, visibility, g¹(τ) and coherence time
  • Polarization: Jones vectors, projections by a polarizer
  • Radiometry and detection: photon flux, quantum efficiency, Poisson shot noise
  • Linear algebra with complex vectors (kets, inner products, density matrices) and basic probability

Model

Scope. The solver models what the equations below state: one optical mode, or one photon in two paths with a polarization marker, together with idealised linear optics and detectors described by efficiency, dark counts and timing jitter. Random events are Born-rule samples from these probabilities. The solver does not simulate quantized fields in space and time, spatial modes, detector dead time or afterpulsing. The double-slit tool is a classical scalar-diffraction calculation and makes no statement about photons.

① Mach–Zehnder with a which-path marker. Both beam splitters use the matrix S = [[t, i r], [i r, t]]. After BS1 and the marker the state is

|ψ⟩ = t |a⟩|H⟩ + i r e |b⟩(cos θ |H⟩ + sin θ |V⟩),   ρ = |ψ⟩⟨ψ| with path coherences × (1 − γ)

BS2 is a 50:50 splitter. The detection probabilities are Pk = Tr[(Πk ⊗ Πpol) U ρ U†], where Πpol is the identity or a polarizer projector |χ⟩⟨χ|. The port-1 probability is a sinusoid in φ. Its visibility, its distinguishability and its predictability are

V = 2√(wawb) |⟨ma|mb⟩| (1 − γ),   D = ‖waρa − wbρb‖₁,   P = |wa − wb|,   V² + D² ≤ 1

Detector: each detector clicks when the photon arrives and is detected, with probability η, or on a dark count, with probability pd per gate. So P(click k) = 1 − (1 − ηPk)(1 − pd).

② Photon-number statistics. States are built in the truncated basis |0⟩…|N⟩ and renormalised. The discarded probability P(n > N) is reported. The detector applies the loss channel and then adds Poisson dark counts of mean d:

ρ' = Σk Ek ρ Ek†,  Ek = Σn √C(n,k) η(n−k)/2(1 − η)k/2 |n − k⟩⟨n|;   P(m) = Σj ρ'jj Pois(m − j; d)

Q = Var(n)/⟨n⟩ − 1,   g²(0) = ⟨n(n − 1)⟩/⟨n⟩² = 1 + Q/⟨n⟩

③ HBT. Light is split 50:50 onto two time-tagging detectors. For a stationary source,

g²(τ) = ⟨:I(t)I(t + τ):⟩/⟨I⟩²:  coherent 1;  thermal 1 + |g¹(τ)|²;  single emitter 1 − e−|τ|/τ₀

The event streams are generated as follows. Coherent light gives independent Poisson processes. Chaotic light uses a complex Gaussian field whose intensity sets the rate of an inhomogeneous Poisson process at each detector. The emitter is a renewal process in which each emission is followed by an exponential pump wait and an exponential decay wait, and each photon is routed at random. Each detector adds Poisson dark counts at rate rd and Gaussian timing jitter σ. The prediction is

meas(τ) = 1 + ρ₁ρ₂ [(g² − 1) ⊛ 𝒩(0, 2σ²)](τ), averaged over the bin Δt,   ρ = S/(S + rd)

wa, wb
probabilities of arm a (1 − R₁) and arm b (R₁)
ρa, ρb
marker (polarization) states attached to each arm: |H⟩ and cos θ|H⟩ + sin θ|V⟩
γ
unobserved path dephasing: the environment gains information that no one reads
χ
transmission axis of the eraser polarizer, measured from H
η
detection efficiency, modelled as a beam splitter of transmission η into a perfect detector
d, pd, rd
dark counts: mean per gate (②), probability per gate (①), rate in counts/s (③)
N
Fock-basis cutoff. The truncation error is the exact P(n > N) of the untruncated state
τc, τ₀
coherence time τc = ∫|g¹(τ)|²dτ for thermal light, and antibunching time τ₀ = 1/(Γpump + Γdecay) for the emitter
σ
rms timing jitter of each detector. The two jitters add in quadrature, so the correlation is smeared by √2σ
Derivation: complementarity, loss channel and g² of chaotic light

Visibility and distinguishability. Take γ = 0. Behind BS2, port 1 carries (1/√2)(t|ma⟩ − r e|mb⟩), so P₁ = ½[1 − 2tr Re(e⟨ma|mb⟩)]. This oscillates with visibility V = 2√(wawb)|⟨ma|mb⟩|. The best measurement on the marker identifies the path with success probability (1 + D)/2 (Helstrom), where D = ‖waρa − wbρb‖₁. For pure markers, the 2 × 2 matrix wa|ma⟩⟨ma| − wb|mb⟩⟨mb| has trace wa − wb and determinant −wawb(1 − |⟨ma|mb⟩|²). Its eigenvalues therefore have opposite signs, and D² = (λ₁ − λ₂)² = 1 − 4wawb|⟨ma|mb⟩|² = 1 − V². Dephasing multiplies V by (1 − γ) but leaves D unchanged, which gives the strict inequality.

Eraser. A polarizer at χ projects the marker onto |χ⟩. The amplitudes become t cos χ and r e cos(θ − χ), so for θ = 90° and χ = ±45° the conditional fringes have V = 1. The +45° and −45° subsets are shifted by π, and their sum reproduces the fringe-free total. Choosing a polarizer after the photon has passed BS2 therefore changes no probability of the whole ensemble. Erasure is a selection of a subensemble; it does not act back on the photon.

Loss. A photon-number state |n⟩ that meets a beam splitter of transmission η leaves k photons with binomial probability C(n,k)ηk(1 − η)n−k, because each photon is transmitted independently. The probability generating function transforms as G(s) → G(1 − η + ηs). A coherent state has G = en̄(s−1), which becomes eηn̄(s−1), a coherent state again. A thermal state has G = 1/(1 + n̄ − n̄s), which becomes thermal with ηn̄. The factorial moments scale as ⟨n(n−1)⟩ → η²⟨n(n−1)⟩, so g²(0) is unchanged by loss while Q → ηQ.

Chaotic light. The field is a complex Gaussian random process, so ⟨E*(t)E*(t+τ)E(t+τ)E(t)⟩ = ⟨|E|²⟩² + |⟨E*(t)E(t+τ)⟩|² (Isserlis/Wick). This gives the Siegert relation g² = 1 + |g¹|². Photodetection of such a field is a doubly stochastic (Cox) Poisson process. This is exactly the quantum prediction for thermal light, whose Glauber–Sudarshan P-function is a positive Gaussian. A single emitter cannot emit two photons at once. After a click it is in its ground state and must be re-excited, so g²(0) = 0. No positive P-function, and hence no classical intensity, can give g²(0) < 1.

Exercise 1 — Partial which-path marking

  1. In a balanced interferometer the marker is rotated by θ = 60°. Predict V, D and the best probability of guessing the path correctly.
  2. In experiment ①, load Partial (60°) and press +1000 photons five times.
  3. Read the sampled V ± 1σ and compare it with the theory. Check where the point sits in the V–D plane.
  4. Why does each single photon still land in only one detector, while only the statistics change?
Show answer

V = |cos θ| = 0.500, D = sin θ = 0.866 and V² + D² = 1. The best path guess is right with probability (1 + D)/2 = 0.933. With 5000 photons spread over 24 settings (about 208 each), the fitted visibility has σ ≈ 0.02, so values from roughly 0.46 to 0.54 are consistent. Each photon gives exactly one click because the measurement projects onto one detector. The marker changes only the interference term of the probability.

Exercise 2 — Quantum eraser

  1. With full marking (θ = 90°), what happens to (a) the total click pattern and (b) the pattern among photons that pass a +45° polarizer? What fraction of photons passes?
  2. Load Which-path, then Eraser +45°, then Eraser −45°, adding 2000 photons each time.
  3. Read V with the marker unread, V with the eraser among the photons that pass, and P(blocked).
  4. Add the +45° and −45° fringes point by point. What do you get, and why does that rule out any signalling?
Show answer

(a) V = 0 and D = 1. (b) Conditioned on passing the polarizer, V = 1, and exactly half the photons pass (P(blocked) = 0.5). The −45° subset shows complementary anti-fringes. Their sum is flat and equals the which-path result. The eraser picks out subensembles with opposite fringe phases, so the total detection pattern never depends on the choice of polarizer.

Exercise 3 — Loss turns sub-Poissonian light Poissonian (limiting case)

  1. A Fock state |3⟩ is detected with efficiency η. Give the detected mean, variance, Q and g²(0) for η = 1, 0.5 and in the limit η → 0. Do the same for thermal light.
  2. In experiment ②, load Fock |3⟩ and then Fock + loss. Then drag η towards 0, and repeat with Thermal + loss.
  3. Read the detected Q and g²(0) from the theory and from the samples, and follow the dot along the Q(η) plot.
  4. Why does g²(0) survive loss while Q does not? Which quantity would you quote for a lossy single-photon source?
Show answer

For the Fock state: at η = 1, ⟨m⟩ = 3, Var = 0, Q = −1 and g²(0) = 2/3. At η = 0.5 the counts are binomial(3, ½): ⟨m⟩ = 1.5, Var = 0.75, Q = −0.5, and g²(0) is still 2/3. As η → 0, Q = −η → 0, and the counts look Poissonian, yet g²(0) stays 1 − 1/n. For thermal light Qdet = ηn̄ → 0, while g²(0) = 2 at every η. Loss rescales the factorial moments ⟨n(n−1)⟩ by η² and ⟨n⟩ by η, so the ratio g²(0) is unchanged. This is why single-photon sources are characterised by g²(0) rather than by Q.

Exercise 4 — Bunching washed out by timing jitter

  1. Pseudo-thermal light has a Lorentzian line with τc = 5 ns. Each detector has jitter σ = 5 ns. Estimate the measured g²(0), and the area under g² − 1.
  2. In experiment ③, load Jitter smearing. Then set σ to 0.01 ns and compare.
  3. Read the measured and predicted g²(0), and estimate the peak width.
  4. Why did Hanbury Brown and Twiss's first stellar measurement see only a tiny excess of correlation?
Show answer

Jitter convolves g² − 1 = e−2|τ|/τc with a Gaussian of rms √2σ = 7.1 ns. The peak drops to about 1.26 (model value 1.255 before bin averaging), but the area ∫(g² − 1)dτ = τc = 5 ns is conserved. Without jitter, g²(0) = 2. Starlight filtered to a few nm has τc ~ ps, while the 1956 photomultipliers and electronics resolved ~10 ns, so the excess correlation was reduced by about 10⁻³ and had to be integrated for hours.

Worked example — how good is a single-photon source?

A quantum-dot source has antibunching time τ₀ = 1 ns. Each HBT detector records 180 kcps of signal and 20 kcps of uncorrelated background, which includes dark counts, and has jitter σ = 0.3 ns. Uncorrelated counts add a flat pedestal. With ρ = 180/200 = 0.9 at each detector, the pedestal alone limits the dip to g²(0) = 1 − ρ² = 0.19. Jitter then fills the dip. For g² − 1 = −e−|τ|/τ₀, averaging over a Gaussian of rms s = √2σ = 0.424 ns gives

⟨e−|u|/τ₀⟩ = es²/2τ₀² erfc(s/(√2τ₀)) = e0.090 erfc(0.300) = 1.094 × 0.671 = 0.735

So g²meas(0) = 1 − 0.81 × 0.735 = 0.405. The emitter itself is perfect: g²(0) = 0. Background subtraction corrects the factor ρ², and deconvolving the jitter recovers the 0.735 factor. A value below 0.5 is the usual criterion for a single emitter, because two independent emitters give g²(0) ≥ 0.5. Load Emitter, real detectors. It uses a detected rate of 1 Mcps and 111 kcps of dark counts, which gives the same ρ = 0.9, and the measured centre bins agree with 0.405 within the error, apart from a small bin-averaging correction.

When the model fails

  • Few-mode idealisation: each experiment keeps one mode, or one photon in two paths. Real beams are multimode in space, time and frequency. A detector that integrates over M modes of chaotic light sees g²(0) = 1 + 1/M, not 2.
  • Detectors: the detectors in ② resolve photon number. Real single-photon avalanche diodes are click/no-click detectors with dead time (tens of ns), afterpulsing and count-rate saturation, none of which is included. Above about 10 Mcps the simulated rates would not be achievable with real detectors.
  • Chaotic light: the streams are generated semiclassically. This is exact for thermal and coherent light (positive P-function) but cannot produce antibunching, so the emitter uses a separate renewal model. That model assumes incoherent pumping; a coherently driven two-level atom shows Rabi oscillations in g²(τ).
  • Truncation: the truncated Fock state is renormalised. When P(n > N) is not small, the moments are biased, and the page warns when P(n > N) > 10⁻⁶.
  • Interferometer: the splitters are ideal and the marker is a perfect polarization rotation. Mode mismatch, partial coherence of the source and imperfect heralding would reduce V further in ways this model does not describe.
  • Sampling: the random numbers are pseudo-random (mulberry32). They reproduce Born-rule frequencies within statistical error, but they are not a model of quantum randomness.

References

  • R. Loudon, The Quantum Theory of Light, 3rd ed. (OUP, 2000): ch. 3 (beam splitters, g²), ch. 5–6 (photon statistics, loss).
  • M. Fox, Quantum Optics: An Introduction (OUP, 2006): ch. 5–6 (photon statistics, antibunching, HBT).
  • C. C. Gerry and P. L. Knight, Introductory Quantum Optics (CUP, 2005): ch. 5–7 (coherent, squeezed and thermal states; single-photon interference).
  • B.-G. Englert, "Fringe visibility and which-way information: an inequality", Phys. Rev. Lett. 77, 2154 (1996).
  • P. Grangier, G. Roger and A. Aspect, "Experimental evidence for a photon anticorrelation effect on a beam splitter", Europhys. Lett. 1, 173 (1986).
  • S. P. Walborn, M. O. Terra Cunha, S. Pádua and C. H. Monken, "Double-slit quantum eraser", Phys. Rev. A 65, 033818 (2002).
  • R. Hanbury Brown and R. Q. Twiss, "Correlation between photons in two coherent beams of light", Nature 177, 27 (1956). F. T. Arecchi, Phys. Rev. Lett. 15, 912 (1965) (pseudo-thermal light).
  • H. J. Kimble, M. Dagenais and L. Mandel, "Photon antibunching in resonance fluorescence", Phys. Rev. Lett. 39, 691 (1977).
  • L. Mandel and E. Wolf, Optical Coherence and Quantum Optics (CUP, 1995): §9 (photoelectric counting), §12–14 (quantum states and correlations).