Project 01 · Ladder 1 · Beginner
Quantum Coin Flip: your first quantum computing project
How it works
- A Hadamard gate puts one qubit in superposition: heads and tails at once.
- Measuring forces a choice. Every toss lands heads or tails, 50/50.
- Toss after toss the bars even out, and a chi-square test proves the coin fair.
Your first qubit. Your first circuit. Your first quantum repo on GitHub, this week.
- Level
- Beginner
- Hours
- 2 to 4
- Automated tests
- 18
- Ships to
- GitHub
What you build
Quantum Coin Flip in Python and Qiskit
You're about to write real quantum code. You'll put a qubit into superposition, measure it a thousand times, prove with statistics that your coin is fair, catch a rigged coin red-handed, and ship the whole thing as a tested GitHub repo an employer can open.
In October 2025 the Nobel Prize in Physics went to John Clarke, Michel Devoret and John Martinis for showing that an electric circuit on a chip can behave like a single quantum object. That discovery grew into the superconducting qubits inside IBM's and Google's quantum computers today. Tonight you write your first program for one, and on Day 30 you run this same coin on a real 156-qubit IBM quantum computer, on IBM's free plan.
It's small on purpose: the workflow you learn here (build a circuit, run it, read the results, test them) is the one every bigger quantum project uses, all the way up the ladder.
The quantum ideas inside
- Qubits
- Superposition
- The Hadamard gate
- Measurement
- Chi-square tests
- Qiskit Aer
New to Qiskit? Run your first circuit free, or warm up with the free Qiskit tutorials.
Real output · Project 01Qiskit Aer simulator
python quantum_coin.py --flips 1000 --seed 7
Your quantum coin circuit:
┌───┐┌─┐
q: ┤ H ├┤M├
└───┘└╥┘
c: 1/══════╩═
0
First 20 quantum flips: TTHTTTTHTTHTTTHTHHTT
Quantum : heads=486 tails=514 heads_fraction=0.486
Classical: heads=537 tails=463 heads_fraction=0.537
Chi-square vs fair coin: 0.784 (consistent with fair)
By the end
What you walk away with
- a working quantum coin on IBM's open-source Qiskit Aer simulator, fair or biased to any probability you choose
- a classical coin to compare it against
- a chart showing both coins settling towards 50/50
- 18 automated tests that check fairness with real statistics
- one extension that is yours alone
- a public GitHub repo, a portfolio paragraph and a LinkedIn post
Where it sits
Ladder 1: Beginner
BeginnerLadder 1
Quantum Coin Flip
One qubit, proven fair with real statistics.
Quantum Dice Roller
Catch a loaded die red-handed.
Quantum Random Number Generator
Build it, then try to break it.
Quantum Password Generator
Its strength, measured in bits.
Your first circuit is 10 minutes away
Stop watching quantum. Start shipping it.
$0 today. 7 days free, then $7.99 a week or $190 a year. Cancel any time.