This simulator plays out the BB84 quantum key distribution protocol photon by photon, exactly as the quantum mechanics dictates it. Each photon streams left-to-right from Alice to Bob carrying a genuinely random bit encoded in a genuinely random basis; Bob independently guesses a basis to measure in, and when his guess matches Alice's the outcome is deterministically correct, while a mismatched guess collapses the photon into a truly random 50/50 result exactly as real quantum measurement statistics require — nothing here is faked or pre-scripted per photon. Toggle the eavesdropper to insert a real intercept-resend attack: Eve is bound by the same rules, so her own basis guesses miss half the time, and each miss disturbs the photon before it reaches Bob. Watch the live QBER readout jump from near zero to the textbook ~25% the moment Eve starts listening — the same statistical fingerprint that lets Alice and Bob detect an eavesdropper on a real quantum channel.