CHAPTER 1Not both at once
A classical bit you know nothing about is described by two numbers: the probability of 0 and the probability of 1. Neither is ever negative, and together they add up to 1. A qubit is also described by two numbers — but those are amplitudes, and a different rule applies to them: it is not the numbers themselves that must sum to one, it is their squares.
The distinction sounds like bookkeeping and is the entire point. Because only the square counts, an amplitude may be negative without anything breaking: (−0.707)² is the same as (+0.707)². And once negative numbers are allowed, a sum can add up to zero. No probability can do that.
The quickest way to see it is to run the same operation twice. On the classical side there is a fair shuffle: whatever goes in, 50/50 comes out — and shuffling twice changes nothing. On the quantum side there is the Hadamard gate, which produces the same 50/50. Applied twice, however, the state lands exactly where it started.
- Applications
- 0
- Coin: P(0)
- 100 %
- Qubit: P(0)
- 100 %
- Qubit: amplitudes
- 1,000 / 0,000
positive amplitudenegative amplitudeprobability
On the left a probability distribution runs under the matrix ½·[[1,1],[1,1]], on the right an amplitude vector under the Hadamard gate ¹⁄√2·[[1,1],[1,−1]]. The only difference is the minus sign in the bottom right — and it turns the whole story around.
After the first application both sides look identical: 50 to 50. After the second they part ways. The reason is in the second row: the route via |0⟩ contributes +½, the route via |1⟩ contributes −½, so together zero. The probability of |1⟩ does not vanish because something was “selected”, but because two contributions cancel exactly. Classically there is no counterpart: ½ + ½ is never zero.
That is exactly what the term interferencemeans, and it is the only resource a quantum computer has that a classical one does not. Every known quantum algorithm does the same thing at its core: it makes the amplitudes of the wrong answers cancel each other out and leaves those of the right ones standing.
“A qubit is 0 and 1 at the same time, so a quantum computer tries every possibility in parallel.” The second half is the wrong one. Every possibility is indeed in the state, but a measurement returns exactly one — and you do not get to choose which. Without interference to cancel the wrong answers first, all you have is an extremely expensive random number generator.
CHAPTER 2The state is a point on a sphere
Two amplitudes subject to the constraint |α|² + |β|² = 1 can be described completely by two angles. That turns the state of a single qubit into a point on the surface of a sphere — the Bloch sphere. The north pole is |0⟩, the south pole |1⟩, and everything in between is a superposition.
The angle θ to the axis sets the probability that the measurement returns 0 or 1. The angle φ around the axis changes nothing at all — it is the relative phase between the two amplitudes. On the equator the measurement is always 50/50, wherever you stand.
That is why the sphere is needed at all: the phase is invisible as long as you measure, but it decides what the next gate does. It is stored information that only interference makes visible.
- Amplitude α
- 1,000
- Amplitude β
- 0,000
- P(0)
- 100 %
- Phase φ
- 0 °
The amplitudes follow from the angles: α = cos(θ/2) and β = eiφ · sin(θ/2). The readout shows the magnitude of β; how it splits into real and imaginary part is shown by the small phasor below the sphere. The gates rotate the point: X by 180° about the x axis, Z by 180° about the z axis, S by 90° and T by 45° about the same one.
Try the φ slider at θ = 90°: the point travels once around the equator, P(0) stays stubbornly at 50 %. That is exactly why the phase cannot be measured — it can only be converted into a probability by another gate. After rotating, press H and see what comes out.
CHAPTER 3Amplitudes can cancel out
The classic setup for interference is a Mach-Zehnder interferometer: a beam splitter sends the particle down two paths, a phase shifter delays one of them, a second beam splitter brings them back together. Two detectors sit behind it.
Classically the case is clear: the particle takes path A or path B, each with 50 %, and then lands in either detector with 50 %. What is measured is something else. At zero phase difference all particles land in a single detector. The other stays dark.
- P(D₀)
- 100 %
- P(D₁)
- 0 %
- Phasor sum
- 1,000
- Visibility
- 100 %
The computation uses two complex phasors, one per path. The second one rotates by φ. At the detector they are added and only then squared: P(D₀) = cos²(φ/2), P(D₁) = sin²(φ/2). At 180° the phasors point in opposite directions, their sum is zero — and the detector stays dark even though something arrives along each individual path.
“Watch the path” changes nothing about the setup except the information. Once it is settled which path the particle took, there are no longer two contributions to add — only two separate cases that are added after squaring. The result is a stubborn 50/50 for every phase, and the visibility drops to zero. Interference does not disappear through a disturbance, but through the presence of the information.
This is also the practical reason why quantum computers are so hard to build. It is enough for anything in the environment to pick up the which-path information — an air molecule, a photon, a lattice vibration. Nobody has to look. Once the information has reached the environment, the interference is gone. More on that at the end.
CHAPTER 4Measuring means deciding
As long as you do not measure, a quantum state evolves entirely deterministically: gates are rotations, and rotations are reversible. Randomness only enters the stage at the measurement — and then for good. The result is 0 or 1, with probabilities |α|² and |β|², and afterwards the state sits on exactly that value.
A single measurement result therefore says almost nothing. Only many repetitions of the same experiment reveal the distribution — and with it, indirectly, the amplitudes. That is not a blemish; it is the reason every measurement on real hardware runs in thousands of shots .
- Shots
- 0
- Expected P(0)
- 75,0 %
- Measured P(0)
- — %
- Deviation
- —
Every shot is a genuine random decision against cos²(θ/2). The grey line marks the expected value, the bars show the frequencies counted so far. The deviation below is given in standard errors: σ = √(p(1−p)/N). Four times the number of shots halves the uncertainty — so more precision costs quadratically many repetitions.
That explains a practical limit which rarely comes up in talks: knowing a probability to within one percent takes roughly ten thousand shots. On real hardware every shot also carries preparation and readout time — which is why even short circuits are seldom measured in under a second.
CHAPTER 5Two qubits that are more than two
With two qubits, two pairs of numbers are no longer enough. The state needs four amplitudes — one each for |00⟩, |01⟩, |10⟩ and |11⟩. With three qubits it is eight, with n Qubits 2ⁿ. This doubling is why quantum systems are so hard to simulate classically: 50 qubits need more than a quadrillion numbers.
It gets interesting when the state can no longer be split into “this qubit is like this, that one like that”. A Hadamard on the first qubit, then a CNOT on the second, and you arrive at (|00⟩ + |11⟩)/√2: both qubits are individually completely undetermined, but they are guaranteed to agree. That is entanglement.
- Entanglement
- 0,00
- Last measurement
- —
- Same / different
- 0 / 0
- Separable
- ✓
positive amplitudenegative amplitudeprobability
The figure on the left is the entanglement entropy of the first qubit: zero for a separable state, one for a maximally entangled one. It is computed from the eigenvalues of the reduced density matrix, not set by hand. The “Separable” row checks directly whether the four amplitudes can be written as a product of two single-qubit states — for a Bell state they cannot.
The route there is H on q₀, then CNOT. After that “Same / different” shows the same picture on every measurement: both qubits always agree, even though each one on its own is 50/50. An X on q₁ before or after flips this — then they always disagree.
Up to here everything could still be rebuilt classically: two notes carrying the same random number in two envelopes produce exactly the same perfect correlation. The difference only shows up when both sides measure in different directions. In 1964 John Bell showed that there is an upper bound for this which every explanation using pre-written notes must respect. Quantum mechanics violates it.
- S (quantum)
- 2,598
- S (classical max)
- 2,000
- Violation
- +29,9 %
- Bound exceeded
- ✓
The computation uses the CHSH quantity S = |E(a,b) − E(a,b′) + E(a′,b) + E(a′,b′)| from the correlations E = cos(2Δ) for the Bell state. Every theory in which the results are fixed before the measurement stays at S ≤ 2. Quantum mechanics reaches its maximum at 22.5° angular spacing, 2√2 ≈ 2,828 — which is at the same time its own upper bound (Tsirelson).
The curve is not an illustration, it is the reason for the 2022 Nobel Prize in Physics. Aspect, Clauser and Zeilinger measured exactly this violation in the lab, in ever more tightly sealed setups. Today it has a practical use in quantum key distribution: exceeding the bound proves that nobody was listening in.
CHAPTER 6Grover redistributes the amplitudes
Up to here interference has been an effect. Now it becomes a tool. Grover’s algorithm searches an unsorted set of N entries for the one that satisfies a condition — classically that takes N/2 attempts on average, with Grover roughly √N.
The procedure consists of two steps repeated in turn. The oracle flips the sign of the sought amplitude — it marks it without making it any larger. The diffusion then reflects all amplitudes about the mean. Because the marked one now sits below the mean, the reflection throws it upwards while all the others lose a little.
- Entries N
- 16
- Iterations
- 0
- P(target)
- 6,3 %
- Optimum at
- 3
positive amplitudenegative amplitudemean
All amplitudes are computed exactly, there is no animation curve behind them. The dashed line is the mean about which the diffusion reflects. At the start everything sits at 1/√N; after the oracle one bar lies below zero, and the reflection levers it upwards.
The most interesting part comes when you keep clicking. Beyond the optimum of ⌊π/4·√N⌋ iterations the hit probability drops again — the procedure overshoots and keeps running periodically. So you have to know when to stop; this is not a search you simply “let run longer”. And the gain is quadratic, not exponential: for a million entries it is around 785 iterations instead of half a million attempts — impressive, but a long way from what Shor’s algorithm does for factoring.
CHAPTER 7Why it is still hard
Everything shown so far assumes the amplitudes stay undisturbed. That is exactly the problem. A qubit is coupled to its environment, and every coupling carries information outwards — the same information that destroyed the interference in Figure 3. Two time constants are distinguished: T₁ describes how quickly an excited qubit falls back to the ground state, T₂how quickly the phase is lost. On the Bloch sphere the state vector shrinks from the surface into the interior: what remains is a classical probability mixture with no usable phase.
In superconducting qubits both times are currently in the range of a few hundred microseconds, while a single gate takes a few tens of nanoseconds. That sounds like plenty of room, but it only covers a few thousand operations in sequence — and Shor's algorithm on cryptographically relevant numbers would need billions. Error correction closes the gap: many physical qubits together form one logical qubit that survives longer than any single one. The price, depending on the scheme, is hundreds to thousands of physical qubits per logical one.
On top of that comes a hurdle that has nothing to do with hardware: to compute with existing data, you first have to load it into a quantum state. For N values that costs N steps in the general case — which uses up an advantage of √N before the algorithm even starts. That is why the convincing applications remain the ones where the input is small and the computation is large: factoring, simulation of molecules and materials, and certain optimisation problems.
So what is left of a qubit? No magical parallel computer. A store for amplitudes that you can run against each other until the wrong answers cancel themselves out. That is less than the headlines promise — and considerably stranger.
Sources and further reading
- John Preskill: Quantum Computing in the NISQ era and beyond (arXiv:1801.00862)
- Lov Grover: A fast quantum mechanical algorithm for database search (arXiv:quant-ph/9605043)
- Nobel Prize in Physics 2022: Bell inequalities and entangled photons — scientific background
- Wojciech Zurek: Decoherence and the transition from quantum to classical (arXiv:quant-ph/0306072)
- Scott Aaronson: The Limits of Quantum Computers (Scientific American)
- IBM Quantum Learning: courses on states, gates and algorithms