This is the BB84 quantum key distribution protocol. Alice encodes each random bit in one of two randomly chosen conjugate polarization bases — rectilinear (0°/90°) or diagonal (45°/135°) — and sends the photon to Bob, who measures each one in his own randomly chosen basis. Measuring in the wrong basis returns a uniformly random result (the no-cloning theorem forbids copying an unknown quantum state without disturbing it), so afterwards Alice and Bob publicly compare only their basis choices (never the bits) and keep the sifted key: the roughly half of bits where the bases happened to match.
sifted keep if: basis_Alice == basis_Bob
QBER = errors_in_sample / bits_sampled
h(x) = -x·log2(x) - (1-x)·log2(1-x) (binary entropy)
secure key rate ≈ sifted_rate · (1 - 2·h(QBER)), aborted if QBER > 11%
If Eve intercepts a photon she must also guess a basis to measure it, then resend a freshly prepared photon in that basis. When her guess is wrong (50% of intercepted photons), the state she resends disagrees with Alice's original encoding, and even when Bob's basis matches Alice's, he now gets the wrong bit half the time. That leaks into the sifted key as an elevated QBER — each intercepted photon contributes roughly a 25% error rate to the sifted bits, so Eve's interception probability directly raises the measured QBER. Above the classic BB84 security threshold of ~11%, no amount of classical post-processing (error correction + privacy amplification) can extract a secure key, and the exchange must be aborted — exactly what the "Channel status" readout flags.
- Square icon — rectilinear basis (0°/90° polarization).
- Diamond icon — diagonal basis (45°/135° polarization).
- Red ring — Eve intercepted and re-sent this photon.
- Green / amber / grey trail — sifted-correct, sifted-error, or basis-mismatch (discarded).