Simulation
Step-by-step Explanation
1
0
0
1
1
0
0
1
Source of
particle pairs
Bob
Alice
Quantum key distribution with entangled spin ½ particles
Controls
Alice and Bob need to share a secret perfectly random sequence of zeros and ones (a so-called secure key), but cannot meet in person. Classically this is impossible, as they can never be certain that the key was not intercepted during transmission. Quantum mechanics makes secure key generation possible!

In this simulation, you can help Alice and Bob generate a secure key using a source that emits entangled spin ½ particle pairs. The two particles in a pair are emitted back-to-back each with opposite spin components. The pair is described by a single wavefunction
|Ψ〉ab = 1/√2(|↑a〉|↓b〉 - |↓a〉|↑b〉).
You can send each particle of the pair through a Stern-Gerlach apparatus (SGA), which consists of a region of non-uniform magnetic field aligned along a given axis. For spin ½ particles, the particles separate into two discrete streams, one deflected in the positive direction (outcome 1), one deflected in the negative direction (outcome 0). You can orient each SGA along two orthogonal axes, denoted X and Z.
Alice and Bob take measurements independently, and note the basis (X or Z) and measurement outcome (0 or 1) for each pair. Due to entanglement, they know that their outcomes are perfectly anticorrelated (if Alice measures 1, Bob measures 0 and vice versa) when both SGAs happened to be oriented along the same axis. After completing their measurements, they publicly share the bases used for each measurement (but not the measurement outcomes!), and keep only those outcomes for which their bases were the same. Alice and Bob then exchange a small number of measurement outcomes (which they then discard) to check for errors.

Your goal is to help Alice and Bob decide whether or not they have generated a secure key. How can they tell that an eavesdropper Eve has infiltrated their experiment?
Press the Controls button to send particle pairs to Alice and Bob and to eavesdrop by intercepting and resending particles.