This is a modified double-slit experiment. Normally, photons build up an interference pattern on the screen because each one, in a sense, passes through both slits at once. If you attach a "which-path marker" — for example by entangling each photon's polarisation with the slit it went through — the interference pattern disappears, even if nobody ever looks at the marker. Which-path information merely being available in principle is enough to destroy the fringes. A "quantum eraser" can scramble that marker information again, and fringes reappear — but only inside the subset of detections that are correctly correlated with a matching outcome at the marker detector. This is the same logic used in real delayed-choice quantum eraser experiments, and it always respects relativity: the raw, unsorted pattern on the screen never shows fringes, so no signal can be sent faster than light.
envelope(x)·cos²(kx).
Marker off: P(x) ∝ E(x)·cos²(kx)
Marker on, no eraser: P(x) ∝ ½E(x−x₀) + ½E(x+x₀)
Eraser on, "+" outcome: P₊(x) ∝ E(x)·cos²(kx)
Eraser on, "−" outcome: P₋(x) ∝ E(x)·sin²(kx)
Unconditional sum: P₊(x) + P₋(x) = E(x) (flat — no
signalling)
Visibility: V = (I_max − I_min) / (I_max + I_min)
In 1999, Yoon-Ho Kim and colleagues performed a real delayed-choice quantum eraser experiment using entangled photon pairs. They showed that whether interference appears depends only on whether which-path information is available anywhere in principle — and that erasing it after the "which-path" photon was already detected still restores fringes in the correlated coincidence counts, without ever violating causality.
The quantum eraser is a modified double-slit experiment that probes the deep link between information and interference. Ordinarily a photon passing through two slits behaves like a wave, and many photons build up a striped interference pattern on the screen. If a "which-path marker" tags each photon with the slit it used — commonly by entangling its polarisation with the path — the interference pattern vanishes and only two overlapping blobs remain, even though nobody has actually read the marker. The mere existence of which-path information, in principle, is enough to destroy the fringes.
A quantum eraser measures the marker in a different, non-orthogonal basis, mixing the path information back together so that it can no longer distinguish which slit was used. Fringes can then reappear, but only within the subset of detections that are correctly correlated with a matching outcome at the marker-measuring detector; the raw, unsorted data on the screen always stays fringe-free, preserving causality. This simulation lets you toggle the marker, the eraser and the correlated-subset view to explore all three regimes with real single-photon statistics.
Why does adding a which-path marker destroy the interference pattern?
Interference requires that the two paths remain indistinguishable, so their probability amplitudes can add and cancel. A which-path marker entangles the photon with information about which slit it used. Once that information exists anywhere, even unread, the two paths become distinguishable in principle, the amplitudes no longer interfere, and the screen shows a simple sum of two single-slit patterns instead of fringes.
How can a quantum eraser bring interference back?
The eraser measures the marker in a rotated basis that mixes the "which-path" states together, so a given outcome no longer reveals which slit the photon used. This restores the possibility of interference, but only for the photons whose eraser-detector outcome you actually look at and correlate with the screen. Sort the data by that outcome and fringes reappear in each correlated subset.
Does the quantum eraser allow faster-than-light communication?
No. The pattern you see on the screen without sorting by the eraser outcome is always the flat, fringe-free sum of both correlated subsets, because the two complementary fringe patterns exactly cancel each other's modulation when added together. You only see fringes after comparing screen data with the eraser-detector results, and that comparison requires an ordinary, light-speed-limited exchange of information.
What do the "Fringe density" and "Detection rate" sliders control?
Fringe density sets the wavenumber used in the interference formula, controlling how many bright and dark bands fit across the screen — roughly analogous to the slit separation divided by the wavelength in a real setup. Detection rate simply controls how many simulated photons arrive per animation frame, letting you speed up or slow down the build-up of the pattern.
Each simulated photon is drawn from the correct probability density for the current regime using rejection sampling: a candidate screen position and a random threshold are generated, and the position is accepted only if it falls under the target probability curve. Over many photons this reproduces the exact shape of the interference, blob, or complementary-fringe distributions.
They correspond to projecting the marker state onto two orthogonal combinations of the original which-path states. Mathematically one subset follows a cos² fringe pattern and the other a sin² pattern in the same coordinate, which are identical in shape but offset by half a fringe period, so their bright and dark bands are exactly interleaved.
Because cos²(kx) + sin²(kx) = 1 for every x, adding the two complementary probability distributions exactly cancels their oscillating parts, leaving only the smooth diffraction envelope. This is precisely why looking at all detections together, without sorting by eraser outcome, never reveals interference.
Yes, in spirit. Real quantum eraser and delayed-choice quantum eraser experiments have been performed with entangled photon pairs since the 1990s, most famously by Kim, Yu, Kulik, Shih and Scully in 1999. This simulation reproduces the statistical predictions of those experiments using classical random sampling rather than an actual quantum optics setup.
Visibility is computed as (I_max − I_min) / (I_max + I_min), using the tallest and shortest bins of the accumulated histogram within the central, well-populated region of the screen. A value near 1 indicates strong, clean fringes; a value near 0 indicates a flat, structureless pattern.
With the marker on and the eraser off, each photon still passes through a physical slit with its own diffraction envelope, so the total pattern is the sum of two Gaussian-like blobs centred on each slit's image. It has no interference fringes, but it is not perfectly uniform either — that broad, unstructured double-hump shape is exactly what a real which-path-marked double slit produces.