Free course · 7 lessons · no signup

Quantum computing,
one visual at a time.

Every simulation on this page is real — a state-vector simulator runs in your browser and the pictures are drawn from its actual amplitudes. Drag the spheres. Break things. The fastest way to understand a qubit is to push one around.

Lesson 1

The qubit is an arrow, not a coin

A classical bit is 0 or 1. A qubit's state is a point on the surface of a sphere — the Bloch sphere. The north pole is |0⟩, the south pole is |1⟩, and every other point is a valid state that is neither.

Two angles fix that point. θ tilts the arrow away from the north pole and controls how much |0⟩ versus |1⟩ you have. φ spins it around the vertical axis — that is the phase, and Lesson 3 is entirely about why it matters.

Interactive · drag the sphere to rotate
drag to look around
Notice that the arrow always has length 1. It can point anywhere on the surface, but it can never be shorter — for a single isolated qubit. Lesson 5 shows the one thing that shrinks it.

Common mistake: "A qubit is 0 and 1 at the same time." Closer: a qubit has an amplitude for 0 and an amplitude for 1, and those amplitudes are complex numbers that can cancel each other out. Nothing about a coin does that.

Lesson 2

Superposition, and the Hadamard gate

The Hadamard gate (H) is the workhorse of quantum computing. Applied to |0⟩ it produces |+⟩ — an equal superposition where measuring gives 0 half the time and 1 half the time.

But look at what happens when you apply H twice. If H just randomised the qubit, two H's would leave you randomised. Instead you get |0⟩ back, every single time. Randomness does not undo itself; superposition does.

Interactive · one qubit circuit: (empty)
measurement probabilities
Apply a gate
Measure repeatedly
Try: H then H. Then try H, measure ×1000, and watch it land near 50/50. Then H Z H — and see Lesson 4.

The key point: superposition is not "the computer secretly picked one". The two branches are both present and can interfere with each other later. That is the entire resource quantum computing runs on.

Lesson 3

Phase: the half you cannot measure

Amplitudes are complex numbers. Each has a magnitude (which sets the probability) and an angle — the phase. Measurement throws the phase away completely, which is why it feels like it should not matter.

Drag the phase slider below. The probability bars do not move. At all. The Bloch arrow meanwhile is spinning around the equator, so the state is genuinely changing — you just cannot see it in a measurement.

Interactive · phase has no effect on probability
the state is moving
the probabilities are not
Bar colour encodes phase, so you can see the amplitude changing even while its height stays fixed. This is the one thing a classical probability distribution cannot do.

Hold this thought: phase is invisible to measurement but not invisible to later gates. Lesson 4 converts phase into something you can actually see.

Lesson 4

Interference is where the speedup comes from

Here is the circuit that makes phase real: H → phase(φ) → H. The first H splits into two paths. The phase gate shifts one path relative to the other. The second H brings them back together — and where the phases are opposed, the amplitudes cancel.

Sweep φ below. At 0° you get |0⟩ with certainty. At 180° you get |1⟩ with certainty. Same circuit, same starting state, opposite outcome — from a parameter that was invisible one lesson ago.

Interactive · H → phase(φ) → H
outcome probabilities
P(measure 0)100%
P(measure 1)0%
Every quantum algorithm with a real speedup is doing a version of this: arranging for the wrong answers to cancel and the right answer to survive.

Common mistake: "Quantum computers try every answer in parallel." They do explore many branches — but you only get one measurement, and a random branch is useless. The work is in the interference pattern that makes the useful branch likely.

Lesson 5

Entanglement: the arrows disappear

Two qubits. Apply H to the first, then a CNOT (flip the second if the first is 1). The result is a Bell pair: 50% |00⟩, 50% |11⟩, and nothing else.

Now watch the Bloch spheres as you build it. They shrink to nothing. That is not a rendering bug — it is the definition of entanglement. Neither qubit has a state of its own any more. All the information lives in the correlation between them.

Interactive · two qubits circuit: (empty)
qubit 0
qubit 1
entanglement between the two qubitsnone
Build the Bell pair
joint probabilities
Measure both qubits
After building the Bell pair, run 200 shots. You will see |00⟩ and |11⟩ only — never |01⟩ or |10⟩. The two qubits always agree, even though each one alone is completely random.

Why the sphere shrinks: the arrow's length measures how much of a definite state a qubit has on its own. For a Bell pair it is exactly zero. Maximum entanglement means maximum local ignorance.

Lesson 6

Measurement is destructive, and that is the whole problem

Measuring collapses the state. Not "reveals what it secretly was" — collapses. Before measurement the qubit genuinely had no definite value; after measurement it is pinned, and the superposition is gone for good.

Set up a superposition below and measure it. Then measure again. And again. The first measurement is random; every one after that returns the same answer, because there is nothing left to be random about.

Interactive · collapse
superposition intact
This is why quantum algorithms cannot simply "read the answer out of the superposition". You get one shot, and you must have arranged beforehand for it to be worth taking.

On Schrödinger's cat: the thought experiment was an objection. Schrödinger was arguing the interpretation must be wrong because a half-dead cat is absurd. It has since been widely repurposed as an explanation of the very thing it was written to criticise.

Lesson 7

Putting it together: Grover's search

Eight boxes, one prize. Classically you open boxes until you find it — about four tries on average, eight worst case. Grover's algorithm finds it in two iterations — ⌊(π/4)√8⌋ — and the mechanism is exactly what the last six lessons built up.

Start with an equal superposition over all eight (Lesson 2). The oracle flips the phase of the marked item — invisible to measurement (Lesson 3). Then diffusion reflects every amplitude about their mean, converting that phase difference into a height difference (Lesson 4). Repeat.

Interactive · Grover on 3 qubits step 0 · initialise
amplitude of each of the 8 items · colour shows phase
probability of finding the marked item12.5%
Marked item
Run the algorithm
Run "full iteration" twice: the marked item goes 12.5% → 78% → 94.5%. Now run it a third time and watch it crash back to 33%. Grover overshoots — the amplitude rotates past the target and keeps going, so knowing when to stop is part of the algorithm, not an afterthought.

The honest caveat: this is a quadratic speedup — √N instead of N. Real and provable, but not the exponential kind. Once error-correction overhead is included, the crossover point where this beats a classical search is a long way off.

Where to go next

You now have the core concepts: superposition, phase, interference, entanglement, measurement, and how an algorithm chains them. Go break something in the playground, or read how these ideas map onto real industrial problems in the algorithms section.