You are reading without signing in. Sign in or continue as guest to take quizzes and climb the ranks.
Quantum Coin Game & Interference
Why two Hadamards are not two coin flips: amplitudes add and cancel like waves.
- 01Explain why flipping a fair coin twice is still 50/50.
- 02Predict the result of H then H, and of H, Z, H, by following amplitudes along every path.
- 03Tell constructive interference from destructive interference.
Start with an ordinary coin. Flip it and you get heads or tails with even odds. Flip it again without looking and the odds are still even: the second flip forgets the first. Probabilities are never negative, so adding up all the ways to reach heads can only raise its chance, never remove it.
01The quantum coin
Now let H play the flip. One H on |0⟩ gives |+⟩, and reading it is 50/50, just like the coin. By coin logic a second H should leave it at 50/50. Instead the qubit comes back to |0⟩ in every shot. The difference: a qubit carries amplitudes, and amplitudes can be negative.
| Path through H, H | Amplitude along the path | Ends at |
|---|---|---|
| 0 → 0 → 0 | (1/√2)·(1/√2) = +1/2 | |0⟩ |
| 0 → 1 → 0 | (1/√2)·(1/√2) = +1/2 | |0⟩ |
| 0 → 0 → 1 | (1/√2)·(1/√2) = +1/2 | |1⟩ |
| 0 → 1 → 1 | (1/√2)·(−1/√2) = −1/2 | |1⟩ |
02Constructive and destructive
Picture two water waves meeting. Crest on crest makes a higher crest; crest on trough leaves flat water. Amplitudes behave the same way. A classical coin can only pile probabilities up; a qubit can make a wrong answer vanish. A quantum algorithm is a plan that sends the paths to wrong answers out of step and the paths to the right answer in step.
Two flips that undo each other
Simulate: every shot reads 0, never 1. Two classical coin flips would give 50/50 here.
OPENQASM 3.0;
include "stdgates.inc";
qubit[1] q;
bit[1] c;
h q[0];
h q[0];
c[0] = measure q[0];
Flip the sign in the middle
The Z between the Hadamards only changes the sign of the |1⟩ path. Simulate: now every shot reads 1, because the paths to 0 cancel and the paths to 1 add. Replace z with s (a quarter turn of phase) and the result is 50/50: the paths neither fully add nor fully cancel.
OPENQASM 3.0;
include "stdgates.inc";
qubit[1] q;
bit[1] c;
h q[0];
z q[0];
h q[0];
c[0] = measure q[0];
2 questions · one try each counts
A qubit starts in |0⟩ and goes through H, Z, H. What do 1000 shots show?
Sign in to answer and climb the ranks; you will come back to this lesson.
What makes destructive interference possible for qubits but not for coins?
Sign in to answer and climb the ranks; you will come back to this lesson.