0
0
0
0
0
Probability:
Errors:
Key bits:
Total pairs:
Ntot
Ntot
Nkey
Nkey
Nkey
Nerr
Nerr
=
=
=
=
Theoretical
Errors (all measurements)
Most recent key bits (same bases)
More measurements needed for error checking
Alice
Bob
Let Eve intercept and resend particles
Send entangled spin ½ particle pairs
Main controls
Eve chose the wrong basis!
Key
Alice and Bob
Bob
Eve
Alice
Basis
Outcome
Outcome
Outcome
Basis
Basis
Same bases?
Bob inverts value
You can see that the nature of quantum entanglement implies that Alice and Bob have perfectly anticorrelated measurement outcomes (if Alice measures 1, Bob measures 0 and vice versa) whenever the two SGAs are oriented along the same axis. The perfect anticorrelation holds both along X and along Z, in contrast to a classical correlation. You can also see that if Alice and Bob use different bases (their SGAs are oriented at 90° relative to one another), then their outcomes are completely uncorrelated, with the outcomes (0,0),(0,1),(1,0),(1,1) all equally likely.
You can let Alice and Bob randomly orient their SGAs along X or Z and take measurements independent of one another. They note 0 or 1 for each measurement outcome depending on the direction of deflection, independent of their SGA orientation. After all their measurements have been performed (a total of Ntot pairs), Alice and Bob communicate over a public channel and reveal the bases used for each measurement (but NOT the sequence of zeros and ones from the measured deflections). They only keep the zeros and ones for those pairs where both used the same basis; these form the secure key (a total of Nkey bits). Due to the anticorrelations, Bob needs to invert his key (replace every 0 by a 1 and every 1 by a 0) to end up with the same key as Alice.
You can let an eavesdropper Eve intercept the particle sent to Bob. Eve measures the particle’s spin component in the same way as Bob. She then sends a particle on to Bob with the spin state she measured. Eve does not know which bases Alice and Bob are using, so chooses random bases for her measurements. Note that the states |↑〉 and |↓〉 are spin states with outcomes of 1 and 0 respectively in the Z-direction, and |+〉 and |–〉 are spin states with outcomes of 1 and 0 respectively in the X-direction.
Assume that Alice and Bob have used the same basis, but Eve a different one. As Alice and Eve have used different bases, their outcomes are completely uncorrelated. Eve’s measurement changes the spin state of the particle. Eve then passes on a particle to Bob that has equal probabilities for outcomes 0 and 1 in his basis.
Can you determine how often on average Eve chooses the wrong basis, and what fraction of the time this leads to an error in Bob’s measurement? Due to statistical fluctuations, your measured error probability is only approximately equal to the theoretical one. In general, the more measurements you take, the less your measured error probability will deviate from the theoretical one.
Note however that in real experiments there will always be some errors due to imperfections in the source, SGAs and detectors.
Source of
particle pairs
Bob
Alice
Quantum key distribution with entangled spin ½ particles
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.