SQL 1/√N Heisenberg 1/N (ideal) With dephasing (theory) Monte Carlo result

Monte Carlo Verification: Decoherence-Limited Heisenberg Precision

This simulator is the 2D counterpart to the 3D GHZ-decoherence sim, and it establishes the same physics by an independent route: real simulation instead of a plotted formula. Every frame it draws simulated projective-measurement outcomes from the true Ramsey/parity probability distributions — N independent Bernoulli draws per shot for an unentangled ensemble, one collective parity draw per shot for a GHZ "cat" state whose contrast decays as e^(−NΓt) under individual dephasing — pools them into one continuously-running experiment exactly as a real interferometry lab accumulates an integration run, and inverts the running click average to a phase estimate. Its standard error is propagated analytically from the measured click statistics and compared live against the closed-form Cramér-Rao bound Δφ = e^(NΓt)/N, so you can watch the Heisenberg-limited advantage — and its erosion by decoherence into an optimal particle number N* = 1/(Γt) — emerge directly from simulated shot noise, converging onto the theoretical curve as more shots accumulate, rather than being assumed.