Level 2 · Core Principles
Superposition
About 5,664 words · roughly 26 minute read · sources checked December 2, 2026
Superposition is the first of the two ideas, along with entanglement, that separate quantum computing from classical computing. It is also the most abused word in popular science. This lesson gives the exact meaning, shows it in a physical experiment you can follow with arithmetic, and then uses it to run a small search algorithm by hand.
The main message is that a superposition is a definite state with a definite list of amplitudes. It is not ignorance about which of two things is true, and it is not ‘being in two places at once’ in any sense that lets you read both. What makes it powerful is that the amplitudes can interfere.
You should have read the Level 0 math lessons and the Level 1 lessons on qubits first. The calculations use only two-by-two matrices and simple fractions.
What you will learn
- The definition of superposition as a weighted sum of basis states, with complex weights.
- Why a state can be a superposition in one basis and a basis state in another.
- How a superposition differs from a classical mixture, and how to test the difference.
- How a Mach–Zehnder interferometer realises H, a phase shift, and H again.
- What measurement does to a superposition, and what the Born rule says.
- How n Hadamard gates create a uniform superposition over 2ⁿ strings, and what that does and does not give you.
- A complete Grover search on four items, worked by hand.
Helpful first: What is a Qubit?, Bit vs Qubit.
What superposition actually says
In quantum mechanics, if a system can be in state |a⟩ and can be in state |b⟩, then it can also be in any state of the form
|ψ⟩ = α|a⟩ + β|b⟩, with α, β complex and |α|² + |β|² = 1
This is the superposition principle. The numbers α and β are amplitudes. The squared size of an amplitude gives the probability of finding that component if you test for it, and the phase of an amplitude, its direction in the complex plane, controls how it combines with other amplitudes. A qubit in a superposition of |0⟩ and |1⟩ is simply a qubit whose state vector has both components non-zero.
Three clarifications prevent most confusion.
- A superposition is a state, not a statement about what we know. The state α|0⟩ + β|1⟩ is as definite and complete as |0⟩ is. There is nothing hidden behind it that would settle ‘really 0 or really 1’.
- A superposition is not a list of two answers. You cannot ask the qubit for both. A measurement in the {|0⟩, |1⟩} basis returns one bit.
- ‘Both at once’ is shorthand for ‘not definitely one or the other’. It is acceptable as a mnemonic and misleading as an explanation, because it suggests that both branches are separately processed and read, which is not what happens.
The one-line version
A superposition is a vector with more than one non-zero component. The components are complex numbers, so they can cancel as well as add.
Worked example
A superposition with unequal weights and a phase
- Take |ψ⟩ = (1/√3)|0⟩ + √(2/3)·e^(iπ/3)|1⟩.
- Normalisation: |1/√3|² + |√(2/3)|² = 1/3 + 2/3 = 1. The phase factor has size 1 so it does not change this.
- Probabilities: P(0) = 1/3 ≈ 33.3%, P(1) = 2/3 ≈ 66.7%. The phase e^(iπ/3) does not appear here at all.
- Bloch angles: cos(θ/2) = 1/√3, so θ/2 ≈ 54.74° and θ ≈ 109.47°. The azimuth is φ = π/3 = 60°.
- Two states with the same probabilities but a different φ (say φ = 0) are physically different and would behave differently in an interference experiment.
Run this circuit
One Hadamard: a fair quantum coin
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Superposition depends on the basis
Whether a state counts as a superposition depends on which basis you use to describe it. The state |+⟩ = (|0⟩ + |1⟩)/√2 is a superposition of |0⟩ and |1⟩. But in the basis {|+⟩, |−⟩} it is simply the first basis vector, with no superposition at all. Conversely, |0⟩ is a basis state in the Z basis and a superposition (|+⟩ + |−⟩)/√2 in the X basis.
This matters because it shows that superposition is not an intrinsic property of a lone state, the way mass is. It is a statement about the relationship between the state and a chosen measurement. A physical device usually has one preferred measurement, the one it was built for, and that fixes what ‘computational basis’ means. Relative to that basis, superposition is a resource. Relative to a different one, it is not.
| State | In the Z basis | In the X basis | In the Y basis |
|---|---|---|---|
| |0⟩ | basis state | (|+⟩ + |−⟩)/√2 | (|+i⟩ + |−i⟩)/√2 |
| |1⟩ | basis state | (|+⟩ − |−⟩)/√2 | i(|−i⟩ − |+i⟩)/√2 up to a global phase |
| |+⟩ | (|0⟩ + |1⟩)/√2 | basis state | ((1 − i)|+i⟩ + (1 + i)|−i⟩)/2 |
| |+i⟩ | (|0⟩ + i|1⟩)/√2 | ((1 + i)|+⟩ + (1 − i)|−⟩)/2 | basis state |
The same four states written in three bases.
Worked example
Change of basis by hand
- Write |0⟩ in the X basis. Since |+⟩ = (|0⟩ + |1⟩)/√2 and |−⟩ = (|0⟩ − |1⟩)/√2, adding them gives |+⟩ + |−⟩ = √2 |0⟩, so |0⟩ = (|+⟩ + |−⟩)/√2.
- The amplitudes on |+⟩ and |−⟩ are each 1/√2, so an X-basis measurement of |0⟩ returns + or − with probability ½ each.
- The same amplitudes can be computed as inner products: ⟨+|0⟩ = 1/√2 and ⟨−|0⟩ = 1/√2.
- This is why a Hadamard gate followed by a Z measurement is the same as an X measurement. The gate changes the basis in which the final standard measurement looks.
A physical picture: the Mach–Zehnder interferometer
The cleanest demonstration of superposition uses a single photon in a Mach–Zehnder interferometer. A photon meets a beam splitter, travels along one of two paths, meets a second beam splitter, and is detected at one of two detectors. Treating the two paths as the qubit states |0⟩ and |1⟩, the beam splitters play the role of Hadamard-like gates and the path-length difference plays the role of a phase gate.
Follow the amplitude. The first beam splitter turns |0⟩ into an equal superposition of the two paths. The phase element multiplies the amplitude on the lower path by e^(iφ). The second beam splitter recombines them, and the amplitude at each detector is the sum of the contributions from both paths.
P(detector 0) = cos²(φ/2), P(detector 1) = sin²(φ/2)
Worked example
Reading the interferometer
- With φ = 0 the paths are equal. P(detector 0) = cos²(0) = 1, so the photon always lands at detector 0. This is the H then H experiment from earlier: the two routes to detector 1 cancel.
- With φ = π, one arm is half a wavelength longer. P(detector 0) = cos²(π/2) = 0 and P(detector 1) = 1. The detectors have swapped roles, which is the same as applying a Z gate between two Hadamards (HZH = X).
- With φ = π/2: both probabilities are cos²(π/4) = ½. The detector is a fair coin, but the photon is certainly not just ‘randomly taking one path’.
- To see that, block one arm. Now there is no interference, and each detector fires with probability ¼ (the photon survives with ½, and then splits ½–½). The detector statistics with both arms open differ from the statistics with either arm alone, and that difference is the evidence for superposition.
The second detection pattern is the heart of the matter. If the photon had really taken one definite path and we did not know which, blocking an arm would only remove the photon in half the runs. It would not change the odds at the detectors for the runs that survive. In the experiment it does. The photon behaves as if both paths contributed, and the contributions add as amplitudes.
Run this circuit
H then H: interference undoes the superposition
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Phase: the half of a superposition you cannot see directly
The two probabilities |α|² and |β|² are only part of a superposition. The relative phase between α and β is the other part, and it never shows in a measurement made directly in the computational basis. It shows only after a gate has turned phase differences into size differences. This hidden half is what interference uses.
The cleanest way to see this is a three-step experiment, sometimes called a Ramsey sequence. Apply H to |0⟩, let the qubit pick up a phase φ (a Z-rotation, whether by a deliberate gate or by the qubit frequency drifting against the reference), apply H again, and measure. The first H writes the phase into the superposition, and the second reads it out.
H · Rz(φ) · H |0⟩ → P(0) = cos²(φ/2), P(1) = sin²(φ/2)
Worked example
Reading out a phase
- Take φ = 1.0 radian. Then P(0) = cos²(0.5) = 0.770 and P(1) = 0.230. I verified this with the 2 × 2 matrices.
- Run 2,000 shots and observe 1,531 zeros. The estimate P(0) ≈ 0.7655 has a standard error of √(0.77 × 0.23 / 2000) ≈ 0.0094.
- Invert the formula: cos²(φ/2) = 0.7655 → φ/2 = arccos(√0.7655) ≈ 0.5105 rad, so φ ≈ 1.021 rad. The statistical uncertainty on φ is about 0.04 rad (a bit over 2°).
- This is how frequency and phase drifts are measured on real devices: the unknown phase is turned into a population that can be counted.
- The precision improves as 1/√(shots), the usual statistical rate.
The same arrangement explains why a qubit that sits idle in a superposition slowly ‘rotates’ about the z axis of the Bloch sphere. A qubit of frequency f picks up phase 2πf·t, and in a frame that rotates at the control frequency, only the small difference between the two frequencies is left. That difference is the detuning, and measuring it is a basic calibration.
Why global phase is different
If you multiply the whole state by e^(iγ), both amplitudes rotate together and the relative phase is unchanged, so no experiment can see γ. Only relative phase carries information. In a controlled gate, however, a ‘global’ phase on the target becomes a relative phase on the control, which is the phase-kickback effect described in the gates lesson.
Run this circuit
H, Z, H: a phase becomes a bit
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Run this circuit
H, T, H: a partial phase
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Superposition versus a classical mixture
Suppose a source emits |0⟩ half the time and |1⟩ half the time, at random, and you do not know which. That is a classical mixture, also called a statistical ensemble. Now compare it with a source that always emits |+⟩ = (|0⟩ + |1⟩)/√2. If you measure in the Z basis, both sources give 0 and 1 with probability ½ each. They look identical. They are not.
The difference appears as soon as you measure in another basis. Measured in the X basis, |+⟩ gives + with certainty. The mixture, in contrast, gives + with probability ½ and − with probability ½, because each |0⟩ or |1⟩ it emits is itself an equal superposition of |+⟩ and |−⟩. So a superposition is not the same as ‘one or the other, randomly’.
Worked example
The density-matrix view
- Write each source as a density matrix ρ, a table that records everything measurable about it. For the pure state |+⟩, ρ = |+⟩⟨+| = ½ [[1, 1], [1, 1]].
- For the 50/50 mixture, ρ = ½|0⟩⟨0| + ½|1⟩⟨1| = ½ [[1, 0], [0, 1]] = I/2.
- Both have diagonal entries ½, ½, which is why the Z statistics agree. The off-diagonal entries, called coherences, are ½ for the superposition and 0 for the mixture. Coherences are exactly what interference uses.
- A quick numerical test is the purity Tr(ρ²). For |+⟩ it is 1. For the mixture it is ½. A pure state has purity 1, and the maximally mixed qubit has the minimum, ½.
This also explains decoherence in one sentence. Noise from the environment gradually erases the off-diagonal entries of ρ while leaving the diagonal alone. The state slides from the pure superposition toward the classical mixture. When the coherences are gone, the qubit has lost its quantum advantage even though a Z measurement still returns the same statistics as before.
A test you can always use
If a claim about superposition cannot be distinguished from ‘it is randomly one or the other’ by any measurement, it is not describing a superposition. The distinguishing measurement is always in a different basis, where interference shows up.
Measurement: the Born rule and what happens afterwards
To extract information from a superposition you measure. The rule, due to Max Born, says that if the state is |ψ⟩ = α|0⟩ + β|1⟩ and you measure in the {|0⟩, |1⟩} basis, then you get 0 with probability |α|² and 1 with probability |β|². After the measurement the state is |0⟩ or |1⟩ respectively, so a repeat of the same measurement gives the same answer. That second step is the collapse, or projection.
Equivalently, the probability of outcome k is |⟨k|ψ⟩|², the squared overlap between the state and the basis vector. Measuring in a different basis {|u⟩, |v⟩} gives probabilities |⟨u|ψ⟩|² and |⟨v|ψ⟩|².
Worked example
Measure twice
- Start with |ψ⟩ = cos(π/8)|0⟩ + sin(π/8)|1⟩ (θ = π/4 on the Bloch sphere). The Z probabilities are cos²(π/8) ≈ 0.854 and sin²(π/8) ≈ 0.146.
- Measure Z and get 0. The state is now |0⟩. A second Z measurement returns 0 with probability 1.
- Instead, measure in the X basis after the first outcome. From |0⟩ the X probabilities are ½ and ½, so the Z outcome gave you no information about the X outcome.
- Now start over and measure X first on |ψ⟩. The X probabilities are |⟨+|ψ⟩|² = ½(cos(π/8) + sin(π/8))² = ½(1 + sin(π/4)) ≈ 0.854 and 0.146.
- The symmetric numbers are not a coincidence: |ψ⟩ was chosen halfway between |0⟩ and |+⟩ on the sphere, so it is equally close to both.
Is collapse a physical process?
The Born rule is not in dispute. What is disputed is the interpretation of collapse. Different interpretations of quantum mechanics (Copenhagen-style, many-worlds, pilot-wave, and others) all reproduce the same measurement statistics, and no experiment so far has decided between them. For computing, none of that matters. What matters is the operational rule: unitary evolution between measurements, probabilistic outcomes from the Born rule, and an update of the state afterwards.
There is one practical point worth stressing. Because measurement destroys the superposition, it is the last step of a quantum algorithm, or in error correction a carefully chosen partial measurement that reveals only parity information and leaves the encoded superposition intact. Measuring too early or too much spoils the computation.
Superposition of many qubits: the uniform state
Applying a Hadamard gate to each of n qubits that start in |0…0⟩ gives the uniform superposition over all 2ⁿ bit strings.
H^⊗n |0…0⟩ = (1/√2ⁿ) Σₓ |x⟩, x ranges over all n-bit strings
Each of the 2ⁿ strings has the same amplitude 1/√2ⁿ, and so each would be found with probability 1/2ⁿ. This state is the usual starting point of quantum algorithms. It is easy to make, using only n gates, which is notable given how large the state is.
Worked example
n = 3
- Start with |000⟩ and apply H to each qubit. The amplitude of each of the 8 strings is 1/√8 ≈ 0.354.
- Each string has probability (1/√8)² = 1/8 = 12.5%. The probabilities sum to 8 × 1/8 = 1.
- Applying one more gate, say Z on the first qubit, flips the sign of all four amplitudes where the first bit is 1. The probabilities do not change, but the state does. A later Hadamard on that qubit would turn it from |0⟩-like to |1⟩-like, as in the interferometer.
- So the information that the next stages of an algorithm use lives in the signs and phases of the amplitudes, not in their sizes.
What the uniform state is not
It is not a list of all inputs that has been evaluated. If you apply a function to it, you get a state that carries information about every input, but a measurement returns just one input’s result, picked at random. Gaining an advantage requires further interference, as in the next section.
Why n Hadamards are cheap but the state is huge
The state has 2ⁿ amplitudes, but is built by n independent single-qubit gates. This is possible because the state is a product state: it has the structure |+⟩ ⊗ |+⟩ ⊗ … ⊗ |+⟩, with no entanglement. Describing a product state takes only 2n numbers, so it is easy to simulate classically. A product of single-qubit superpositions on its own has no computing power. The advantage arrives when gates entangle the qubits and make the amplitudes depend on each other, which is the subject of the next lesson.
Run this circuit
H on three qubits: 8 equal outcomes
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Using superposition: Grover’s search on four items, by hand
The best way to see superposition do real work is to run a complete small algorithm. Grover’s algorithm searches an unstructured list. We use the smallest interesting case: four items, labelled 00, 01, 10 and 11, with a single marked item. The search needs 2 qubits.
Suppose the marked item is 11. The three steps are as follows.
- Prepare the uniform superposition: all four amplitudes equal ½.
- Oracle: flip the sign of the marked item’s amplitude. The amplitudes become (½, ½, ½, −½).
- Inversion about the mean: replace each amplitude a by 2·m − a, where m is the mean of all amplitudes.
Worked example
The arithmetic
- After step 1: amplitudes (½, ½, ½, ½). Each item has probability ¼.
- After step 2: (½, ½, ½, −½). The probabilities are still ¼ each, since signs do not affect squared sizes. The only change is hidden in the sign.
- The mean m = (½ + ½ + ½ − ½)/4 = ¼.
- Step 3: new amplitude = 2·¼ − a = ½ − a. For the first three items, ½ − ½ = 0. For the marked item, ½ − (−½) = 1.
- The final amplitudes are (0, 0, 0, 1). Measuring gives 11 with probability 1. I verified this by matrix multiplication.
- A classical search of four items needs up to 3 lookups to be sure, and about 2.25 on average if the marked item is uniformly placed. The quantum circuit used the oracle once.
Look at what actually happened. The oracle did not find the answer. It only marked it, and marking changes nothing you could measure directly. The inversion step converted a hidden sign difference into a visible size difference, because averaging mixes the amplitudes and the sign difference turns into destructive and constructive interference. This is the whole pattern of quantum algorithms in miniature.
The four-item case is special because exactly one round gives certainty. For N items the best number of rounds is about (π/4)√N, and for N = 1,000,000 that is about 785, compared with an average of about 500,000 classical lookups. Doing more rounds than the optimum overshoots and lowers the success probability, which is another reminder that the amplitudes are being steered, not exhaustively checked.
Worked example
Grover rounds for larger lists
- The number of rounds is about (π/4)√N for one marked item.
- N = 1,024: (π/4) × 32 ≈ 25 rounds, versus about 512 classical lookups on average.
- N = 1,048,576 (2²⁰): (π/4) × 1,024 ≈ 804 rounds, versus about 524,000 on average.
- The speed-up is √N, a quadratic gain. It is useful but nowhere near the exponential gains sometimes claimed in the press.
Run this circuit
Grover, 3 qubits, one iteration
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Run this circuit
Grover, 3 qubits, two iterations
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Run this circuit
Grover, 3 qubits, three iterations (overshoot)
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
A second algorithm: Deutsch’s problem
Grover’s four-item search used superposition and interference. A simpler and older example, due to David Deutsch in 1985, shows the same ideas with even less machinery and a clean separation in the number of queries.
The problem: a black box computes a function f from one bit to one bit. There are exactly four possible functions. Two are constant (f(0) = f(1), either always 0 or always 1) and two are balanced (f(0) ≠ f(1): f(x) = x or f(x) = 1 − x). You are told that f is one of these four, and you must say whether it is constant or balanced. Classically you must evaluate f twice, once for each input. A quantum circuit needs one query.
| Function | f(0) | f(1) | Type | Qubit 1 final outcome |
|---|---|---|---|---|
| f = 0 | 0 | 0 | constant | 0 |
| f = 1 | 1 | 1 | constant | 0 |
| f = x | 0 | 1 | balanced | 1 |
| f = 1 − x | 1 | 0 | balanced | 1 |
The four functions and the result of the quantum circuit. Qubit 1 reads 0 for constant and 1 for balanced.
The circuit uses two qubits. Prepare qubit 1 in |0⟩ and qubit 2 in |1⟩, and apply H to both. Qubit 2 is now |−⟩. Apply the oracle U_f, which maps |x⟩|y⟩ to |x⟩|y ⊕ f(x)⟩. Then apply H to qubit 1 and measure it.
Worked example
Why it works: phase kickback in two lines
- After the first Hadamards the state is |+⟩|−⟩ = ½(|0⟩ + |1⟩)(|0⟩ − |1⟩).
- The oracle acts on a target in the state |−⟩ as a sign: U_f |x⟩|−⟩ = (−1)^f(x) |x⟩|−⟩. This is the kickback effect, because |−⟩ is an eigenstate of the bit-flip with eigenvalue −1. So qubit 1 becomes (1/√2)((−1)^f(0)|0⟩ + (−1)^f(1)|1⟩).
- If f is constant the two signs are equal, so qubit 1 is ±|+⟩. If f is balanced the signs differ, so qubit 1 is ±|−⟩.
- The final Hadamard maps |+⟩ → |0⟩ and |−⟩ → |1⟩. So qubit 1 reads 0 for constant and 1 for balanced, with certainty. I confirmed all four functions numerically.
- A single call to the oracle revealed a property that depends on both f(0) and f(1). Superposition evaluated both inputs in one query, and interference made the global property readable.
Be careful about what was gained
Deutsch’s problem is a toy. The gain is one query instead of two, and it counts oracle calls, not total cost. It is valuable as the smallest complete example of a quantum algorithm. Larger relatives, Deutsch–Jozsa, Bernstein–Vazirani (seen in the previous level) and Simon’s problem, show bigger query separations, and Simon’s algorithm directly inspired Shor’s.
Run this circuit
Deutsch–Jozsa, constant f(x) = 0
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Run this circuit
Deutsch–Jozsa, balanced f(x) = x₀ ⊕ x₁
Bit order: q0 is the rightmost digit of each result, as in Qiskit. All qubits start in |0⟩ unless marked. This is an ideal simulator with no hardware noise.
Press Run to simulate. Results appear here with a short explanation.
Expectation values: the average of a ±1 measurement
A measurement in a basis with two outcomes can be assigned the numbers +1 and −1, and the average of many results is the expectation value. For the Z measurement, 0 ↔ +1 and 1 ↔ −1, so ⟨Z⟩ = P(0) − P(1). For a state with Bloch angles θ and φ the three Pauli expectation values are the coordinates of the Bloch vector:
⟨X⟩ = sin θ cos φ, ⟨Y⟩ = sin θ sin φ, ⟨Z⟩ = cos θ
Expectation values matter because many quantum algorithms, particularly in chemistry and in variational methods, do not need the full state. They need averages of a few measured quantities. Google’s 2025 ‘Quantum Echoes’ result, for example, was reported in terms of expectation values of an observable, which the team described as verifiable because another quantum computer should reproduce the same average.
Worked example
From counts to a Bloch vector
- A qubit is prepared repeatedly and measured in Z, X and Y with 1,000 shots each. The counts of outcome ‘0’ (or ‘+’) are 750, 500 and 933 respectively.
- ⟨Z⟩ = (750 − 250)/1000 = 0.50. ⟨X⟩ = (500 − 500)/1000 = 0.00. ⟨Y⟩ = (933 − 67)/1000 = 0.866.
- The Bloch vector (0, 0.866, 0.5) has length √(0.75 + 0.25) = 1.0, so the state is pure (within statistical noise).
- The angles are cos θ = 0.5 so θ = 60°, and φ = 90° because the x-component is zero and the y-component positive. The state is cos(30°)|0⟩ + i·sin(30°)|1⟩.
- This three-basis measurement is the simplest form of quantum state tomography. If the vector length were visibly below 1, the state would be mixed.
How a physical superposition is made
It is worth seeing that making a superposition is an ordinary engineering step, a short pulse, and not an exotic event.
- Superconducting qubit: a microwave pulse at the qubit frequency, with a duration set so the rotation angle is π/2. This rotates |0⟩ to the equator of the Bloch sphere, giving an equal superposition.
- Trapped ion or neutral atom: a laser or microwave pulse resonant with the qubit transition, again a π/2 rotation. The Rabi oscillation described in the previous level is the calibration for this.
- Photon: a beam splitter or a polarisation rotator. A 50/50 beam splitter turns a photon in one path into a superposition of two paths, as in the interferometer above.
- Spin in a semiconductor: an oscillating magnetic or electric field applied at the spin resonance frequency.
In every case the control field is classical, a well-behaved electromagnetic pulse, and the pulse’s amplitude and duration choose the rotation angle. The quantum state does what the Schrödinger equation says. Nothing in the process requires the experimenter to ‘know’ the final amplitudes beyond having calibrated the pulse.
Worked example
Calibrating a π/2 pulse
- From a Rabi experiment, a π pulse takes 25 ns on some qubit. A π/2 pulse takes half as long, 12.5 ns.
- Test: after a π/2 pulse the Z outcome should be 50/50. Seeing 50.4% zeros over 10,000 shots is consistent, since the standard error is 0.5%.
- A stricter test applies two π/2 pulses in a row. The result should be a full π pulse, so the outcome should be 1 with near certainty. Seeing 97% ones points to a small calibration error or decoherence.
- These simple pulse sequences are run on real devices regularly, in automatic calibration routines.
An application you can use today: random numbers
Measuring |+⟩ in the Z basis yields a bit whose value is, according to quantum mechanics, fundamentally unpredictable, in contrast to a pseudorandom generator whose output is determined by a seed. Quantum random number generators built on photon detection are sold commercially. A caution applies: the randomness is only as good as the device, and real devices have biases and noise, so practical generators post-process the raw bits. Certifying randomness without trusting the device is a research topic that uses Bell inequality violations, the subject of the next lesson.
Why superpositions are fragile
Everyday objects do not seem to be in superpositions, even though they are made of quantum particles. The standard explanation is decoherence. A superposition of two states persists only as long as nothing in the surroundings carries away information about which state is which. A single stray photon scattering off a dust grain can distinguish ‘here’ from ‘there’. Once the environment holds that record, the coherences of the object’s density matrix vanish, and the interference pattern disappears.
For a qubit this is exactly the dephasing process measured by the time T2. A qubit prepared in |+⟩ drifts towards the mixture I/2 over a time of order T2, and a qubit prepared in |1⟩ relaxes towards |0⟩ on a time T1, with T2 at most 2·T1.
Worked example
How fast does the superposition fade?
- Suppose the coherence of a |+⟩ state decays as e^(−t/T2) with T2 = 100 µs. (The value is illustrative.)
- After a 10 µs wait the coherence is e^(−0.1) ≈ 0.905, so an interference experiment shows 90.5% of its full contrast.
- After 100 µs it is e^(−1) ≈ 0.37. After 300 µs it is e^(−3) ≈ 0.05, and the qubit behaves almost like a classical coin.
- A gate sequence that takes 20 µs is therefore affordable, but one that takes 300 µs is not.
Protecting superpositions is the central difficulty of building quantum computers. Hardware engineers lengthen T2 by isolating qubits, cooling them, and choosing better materials. Pulse sequences such as the Hahn echo cancel slow noise. Quantum error correction goes further, spreading a superposition over many qubits so that errors can be detected without learning the amplitudes.
Large superpositions
How large a physical object can be placed in a superposition is an active research question, and there is no sharp known limit. Experiments have prepared superpositions in photons, atoms, ions, superconducting circuits and, in interference experiments, increasingly heavy molecules. For computing, the relevant measure is not size but coherence: how long the superposition lasts compared with the operation time.
Common misunderstandings
| Misunderstanding | Correction |
|---|---|
| A qubit in superposition is secretly 0 or 1 | No hidden value exists. A mixture would give different statistics in a different basis. |
| Superposition lets a computer try all answers | It lets you hold amplitudes for all answers. Only interference converts them into a useful outcome. |
| Superposition is a property of the particle alone | It is relative to a basis. |+⟩ is a superposition of |0⟩ and |1⟩ and a basis state of the X basis. |
| Measurement reveals the amplitudes | It returns one outcome. Amplitudes are inferred statistically from many identical preparations. |
| The phase of a superposition does not matter | Relative phase controls interference. Only the global phase is irrelevant. |
| Putting qubits in superposition is the hard part | A Hadamard does it in one step. Keeping it and using it is the hard part. |
Practice problems
Check yourself
Find P(0), P(1) and the Bloch angles of (1/2)|0⟩ + (√3/2)e^(iπ/2)|1⟩.
P(0) = 1/4, P(1) = 3/4. cos(θ/2) = 1/2, so θ = 120°. φ = π/2 = 90°.
Write |1⟩ in the X basis.
|1⟩ = (|+⟩ − |−⟩)/√2, since |+⟩ − |−⟩ = √2|1⟩.
A Mach–Zehnder interferometer has phase shift φ = π/3. Give the detector probabilities.
P(0) = cos²(π/6) = 3/4 and P(1) = sin²(π/6) = 1/4.
With one arm blocked, what are the detector probabilities, and why do they differ from the open-arm case at φ = 0?
Each detector fires with probability 1/4 (the photon is lost half the time). With both arms open at φ = 0 the photon always reaches detector 0, because the two routes to detector 1 cancel.
What is the purity of the maximally mixed qubit, and of |+⟩?
Tr(ρ²) = 1/2 for I/2 and 1 for |+⟩.
After H on each of 4 qubits starting from |0000⟩, what is the probability of each string and of the string 0101?
Each string has probability 1/16 = 6.25%, including 0101.
Run Grover’s four-item search with marked item 01. What are the amplitudes after the oracle and after inversion about the mean?
After the oracle (½, −½, ½, ½). Mean = ¼. Inversion gives (0, 1, 0, 0), so the answer is 01.
About how many Grover rounds for N = 10⁶ items and one marked item?
(π/4)√N = (π/4)·1000 ≈ 785.
Why is a uniform superposition of n qubits easy to simulate classically, even though it has 2ⁿ amplitudes?
It is a product state of n single-qubit states, so it can be described with 2n numbers.
References and further reading
The explanations and calculations are written for this site, and every numerical example was checked by direct computation. I opened the Aaronson/Quanta column and the Stanford Encyclopedia entry on EPR; the Grover and Nielsen–Chuang entries were checked for title and authorship only, and I did not re-read their full texts. Interpretations of quantum mechanics are mentioned but not argued, because experiments do not currently decide between them.
- What Makes Quantum Computing So Hard to Explain? (Quanta Magazine, Scott Aaronson, June 8, 2021) Amplitudes are not probabilities; interference is the resource.
- The Einstein-Podolsky-Rosen Argument in Quantum Theory (Stanford Encyclopedia of Philosophy) Background on entanglement and measurement; opened for the EPR citation details.
- A fast quantum mechanical algorithm for database search (arXiv, L. K. Grover) The algorithm used in the worked example. Title and author checked; full text not re-read.
- Physics 219 Quantum Computation: lecture notes (John Preskill, Caltech) Free notes covering states, measurement and the density matrix.
- Meet Willow, our state-of-the-art quantum chip (Google, December 2024) Context on keeping superpositions coherent in hardware.
Key terms in the dictionary
Continue learning