🪙 Quantum Coin Game
Beat a quantum computer at coin flipping — and find out why you never had a chance.
Ask about the game
Questions about this round, the rules or the physics behind it — for example “Why did I lose?”
Your questions and the game state are sent to Anthropic (Claude) to answer, and stored for 30 days to improve Ket. Please don’t enter personal data. Privacy
The real Qiskit code
The same game as an interactive Jupyter notebook — the quantum circuit runs on Qiskit, and you can change it.
Opens a free Jupyter session on mybinder.org (via QuBins) — starting it can take a few minutes
git clone the repository, create the conda environment from environment.yml, and open Quantum-Coin-Game.ipynb.You and a quantum computer take turns flipping a coin — without looking at it. If it shows heads at the end, the quantum computer wins. Play a few rounds and you’ll notice something unsettling: you lose. Every time.
Show the solution
The trick is that the quantum computer doesn’t flip the coin, it puts it into superposition — heads and tails at once. Whatever you do on your turn, its second move uses interference to steer the coin back to heads with certainty. The game is a gentle introduction to superposition and interference, two effects that quantum algorithms rely on.
In the notebook, two players make the moves: first with ordinary coin moves only, then player A gets the quantum H move. You see the circuit for the moves, run it on a simulator, try your own gate sequences, and follow the short calculation that shows why A wins every time with two H moves.