This runs the exact same Monte-Carlo Hanbury Brown–Twiss statistics as the 3D lab — each trigger pulse independently decides one vs. two emitted photons, routes each 50/50 to detector A or B with the gate's efficiency loss, and adds an independent dark-count chance to each detector at the gate's reduced rate. Instead of animating photons flying through 3D space, it renders the data the way a real time-tagged single-photon counting board actually reports it:
g²(τ) = ⟨n̂A(t) n̂B(t+τ)⟩ / (⟨n̂A⟩⟨n̂B⟩)
The main strip chart is a scrolling two-lane click trace — one lane per detector — with every simulated pulse drawn as its own column. A genuine photon click is a yellow tick, a dark count a red tick, and any column where both lanes click in the same pulse (a same-pulse coincidence) is washed with an orange band: that band is literally the event that a perfect single-photon source could never produce, since one photon cannot trigger both detectors. The inset bar chart accumulates the live g²(τ) histogram across ±4 pulse-period lags from the running sums, exactly as a real correlator display would.
- Multi-photon probability — re-excitation during one pulse occasionally emits two photons; if they split to different arms they create a fake same-pulse coincidence band.
- Dark counts — uncorrelated background clicks that occasionally land on both lanes in the same column by chance.
- Heralding gate — "Narrow"/"Tight" cut the effective dark-count rate by ×0.4 / ×0.12 at the cost of ×0.92 / ×0.78 collection efficiency, visibly thinning out red ticks faster than yellow ones.
Single-photon purity is reported as P = 1 − g²(0); a perfect source shows no orange coincidence bands at all and g²(0) → 0.