Alice → channel → Bob
Z-basis photon X-basis photon Sifted, correct Sifted, ERROR Discarded / lost
Rolling QBER & sift efficiency
Polarization states

SARG04 Quantum Key Distribution: 2D Photon-by-Photon Simulator

SARG04 is a variant of quantum key distribution built on the same four polarization states as BB84 — but it changes the sifting rule that turns raw photon measurements into a shared secret key. Rather than revealing which basis she used, Alice reveals a pair of non-orthogonal states that includes the one she actually sent, and Bob can only extract a bit when his own measurement rules out one member of that pair by elimination. This 2D simulator streams polarized photons across a channel panel, runs the exact SARG04 sifting logic every round in a corrected form that lets errors genuinely occur (see the "How it works" fix note), and plots the resulting key rate and error rate live on a rolling chart alongside a polarization-state diagram — including what happens the moment an intercept-resend eavesdropper joins the line.