Interactive tutorials · Simulated in your browser
Quantum computing, by hand
Quantum computing from the amplitudes up: short tutorials, each with something to drag, run and break. Vectors and matrices are enough; the rest is introduced as a length and an angle. Everything is simulated live in your browser, so you can watch the numbers a quantum computer is built to steer.
The idea the series argues: a quantum computer is not a machine that tries every answer at once. It is a machine that steers amplitudes so the wrong answers cancel. The tutorial on interference is where that is shown on screen, and every algorithm after it leans on it.
Drag the arrow. Height is chance; colour is phase.
The learning map
Arrows mean “builds on”. Interference is the hinge: it is the one idea every algorithm after it uses, so it is the page to read if you read only one.
Foundations
- 1 · Bits and qubitscoming
- 2 · The Bloch sphereopen · needs 1
- 3 · Measurementopen · needs 2
Two qubits and up
- 4 · Many qubitscoming · needs 2, 3
- 5 · Entanglementcoming · needs 4
- 6 · Gates and circuitscoming · needs 4
- 7 · Interferenceopen · the hinge: start here if you read one · needs 4, 6
Algorithms
- 8 · Deutsch–Jozsacoming · needs 7
- 9 · Grover’s searchopen · needs 7
- 10 · The Fourier transform and Shorcoming · needs 7
Reality
- 11 · Noise and correctioncoming · needs 5, 8, 9, 10
- 12 · Real versus hypecoming · needs 11
- Centres on the bloch sphere
- Centres on the amplitude bars
- Centres on the circuit
- Centres on the shots
- Dashed: coming
The tutorials
1 · Coming
Bits and qubits
A qubit’s state is two complex numbers, not a hidden 0 or 1.
- Amplitude bars
2 · Open
The Bloch sphere
Every single-qubit state is a point on a sphere. Drag one, and read what a measurement can and cannot see.
- Bloch sphere
- Shots
3 · Open
Measurement
Measuring gives one outcome at random and leaves the state in it.
- Shots
- Bloch sphere
4 · Coming
Many qubits
n qubits have 2ⁿ amplitudes, and you still read out only n bits.
- Amplitude bars
5 · Coming
Entanglement
Some two-qubit states are not two single-qubit states side by side.
- Circuit
- Bloch sphere
6 · Coming
Gates and circuits
A gate is a unitary matrix; a circuit is those matrices in order.
- Circuit
- Amplitude bars
7 · Open
Interference
Why a quantum computer is not parallel randomness: amplitudes add before they are squared, so paths can cancel.
- Circuit
- Amplitude bars
8 · Coming
Deutsch–Jozsa
The first problem where a quantum circuit needs fewer questions than any certain classical method.
- Circuit
9 · Open
Grover’s search
Find a marked item among N by steering amplitude towards it, in about √N steps. Step through the iterations and watch the answer grow.
- Amplitude bars
- Shots
10 · Coming
The Fourier transform and Shor
Factoring reduces to finding a period, and the Fourier transform turns a period into sharp peaks.
- Amplitude bars
11 · Coming
Noise and correction
Real qubits leak; error correction spreads one logical qubit over several physical ones.
- Bloch sphere
12 · Coming
Real versus hype
How to read a quantum headline: which qubits, which task, and who checked the classical side. A dated, sourced page.
What this is not
- It is not a quantum computer. Every number on these pages comes from a simulator running on your own processor, in ordinary double-precision arithmetic.
- It does not reach past ten qubits, which is 1,024 amplitudes. That is enough to see every idea, and it is also why a simulator stops being a good way to learn what large machines do.
- It makes no claim about what any real machine can or cannot do today. A later tutorial will read hardware headlines against dated, primary sources; this release has none.
- It is a first pass for developers, not a course. The books and courses below are the real thing.
Prior art and further reading
None of this is copied from them; they are where to go next.
- Quirk — A drag-and-drop circuit simulator with live displays. The best place to build a circuit of your own once you know what the pieces do.
- Quantum Country — An essay with built-in spaced-repetition review. The search essay in the same series gives a clear rotation picture of Grover’s algorithm.
- IBM, Basics of Quantum Information — A free course on quantum information, with a companion on algorithms.
- Preskill, Ph219 — Lecture notes from a Caltech course, from states and measurement through algorithms and error correction.
- Nielsen and Chuang — The standard textbook.
- Aaronson, lecture notes — Lecture notes that go from the Bloch sphere to Shor, with a sceptic’s eye on what is claimed.
The phase colours here are the ones on the hydrogen orbitals page: green for phase 0, magenta for half a turn.
Sources
Shtetl-Optimized Shtetl-Optimized (the blog’s banner line). Scott Aaronson. Live page.
- The point that a quantum computer does not try every answer at once
Quirk Quirk, a drag-and-drop quantum circuit simulator. Craig Gidney, v2.3, 2016. Apache-2.0. Prior art; nothing is copied from it.
- Further reading
Quantum Country Quantum computing for the very curious. Andy Matuschak and Michael Nielsen. Live essay; no date shown on the page.
- Further reading
IBM, Basics of Quantum Information Basics of Quantum Information (IBM Quantum Learning). IBM. Live course: single systems, multiple systems, circuits, entanglement in action.
- Further reading
Preskill, Ph219 Ph219/CS219 Quantum Computation (course page and lecture notes). John Preskill, Caltech. Live page.
- Further reading
Nielsen and Chuang Quantum Computation and Quantum Information (10th anniversary edition). Michael A. Nielsen and Isaac L. Chuang, Cambridge University Press, 2010. Paywalled.
- Further reading
Aaronson, lecture notes Introduction to Quantum Information Science, lecture notes. Scott Aaronson. PDF; the outline lists the Bloch sphere, Grover and Shor lectures.
- Further reading
Paraphrased, not quoted. The further-reading entries are listed so you can find them; this page makes no claim about their content beyond the one-line notes above.
