Interference at Work
Quantum parallelism, honestly
All inputs in one shot, then the measurement wall
Here is the trick every headline leans on: load a superposition of every possible input, run your function once, and the machine works on all inputs at the same time. That part is true, and we are going to build the exact state that does it. Then we are going to hit the wall that the headlines never mention - and see why the wall, not the trick, is the whole reason quantum algorithms are hard to design.
The belief we are about to test
Play with the trap first
The widget below has two input qubits holding a number and one output qubit holding . Pick a function , then walk the four stages: load the registers, superpose the input, fire a single query of the oracle, and measure. Watch the third stage carefully - one query really does write next to all four values of at once. Then press Measure, and press it again.
- 1. Load the registers
- 2. Superpose the input
- 3. One query of U_f
- 4. Measure
Walk the stages, then measure and watch the wall.
Every measurement hands you a single pair , chosen at random, and vaporizes the other three. Run it four times and, on average, you have paid four queries to see all four pairs - exactly what a classical computer does by calling four times. The superposition was real. The payoff was not.
The state one query actually builds
A quantum gate has to be reversible, so a function is fed in through an that keeps a copy of the input around. It acts on an input register and an output register like this:
where is XOR. Start the output at and the map simplifies to - it writes the answer into the second register. Nothing surprising yet; that is just a reversible way to evaluate .
The move is what you feed it. Instead of one value of , put the input register into an equal superposition of all inputs first (that is what a Hadamard on each input wire does), and then apply the single query[2]:
This state is what people mean by . It genuinely contains all input-output pairs, with equal weight . One query, every answer, present at the same time. Everything up to here is true and is what the demo showed at stage three.
The measurement wall
Now recall the Born rule from the measurement lesson: a measurement returns one basis state, with probability equal to that state's amplitude squared, and destroys the rest. Every pair here carries the same probability:
So a measurement of the parallelism state gives you one uniformly random together with its , and nothing else. That is identical to picking a random input and evaluating once on a classical machine. The exponential pile of evaluations sat right there in the amplitudes, and the readout let you keep exactly one of them. Storing an answer where you cannot read it is not the same as computing it.[1]
Where the speedup has to come from
This reframes the whole job of quantum algorithm design. You do not get credit for the superposition; every algorithm has that for free after a layer of Hadamards. You get credit for engineering the interference that follows, and only a few problems are known to have the right structure for it. The very next lesson builds the first one from scratch.
from qiskit import QuantumCircuit
# 2 input qubits (x) + 1 output qubit (y)
qc = QuantumCircuit(3)
qc.h(0) # superpose the input register:
qc.h(1) # x is now an equal mix of 0, 1, 2, 3
apply_oracle(qc) # one query of U_f writes f(x) onto qubit 2 for every x at once
qc.measure_all() # but this returns ONE random (x, f(x)) pair - the wallLock it in
- The oracle U_f is reversible: it maps |x>|y> to |x>|y XOR f(x)>, so with y = 0 it writes f(x) beside x without erasing x.
- Applied to an equal superposition of all N inputs, one query builds the real state (1/sqrt N) sum_x |x>|f(x)> holding every pair at once.
- Measuring that state returns a single uniformly random (x, f(x)) pair, probability 1/N each - no better than evaluating f once classically.
- The speedup is not the parallelism; it is the interference you run after the query to fold a global property of f onto one measurable outcome.
Check yourself
You apply one U_f query to an equal superposition of all N inputs and immediately measure. What do you get?
Given that the parallelism state really does hold all the evaluations, why is it not yet a speedup?
Recall: what does one U_f query on a superposed input produce, and why does that not, by itself, beat a classical computer?
The honest content of quantum parallelism. Try to state it, then check.
Match each piece of the parallelism story to what it actually does.
writes f(x) beside every x, in superposition, with one query
returns one random (x, f(x)) pair and discards the rest
what a well-designed interference step can reveal
gives no speedup on its own
Primary source
Scott Aaronson, Why Is Quantum Computing So Hard to Explain? (Quanta, 2021)Aaronson makes exactly this correction the heart of the essay: the popular "tries every possibility in parallel" picture is not wrong so much as useless, because a measurement collapses the parallel work to one random branch. The skill is choreographing amplitudes so the wrong answers cancel.
Next: the first real speedup - Deutsch-Jozsa and phase kickback, where one query settles a yes/no question about that classically needs exponentially many.
Sources