Skip to content

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

"A quantum computer evaluates f on all inputs at once, so it just reads off all the answers - that is the speedup." The first half is genuinely correct. The second half is where it collapses, and pinning down exactly where is the point of this lesson. We already met the slogan in the opening lesson; now we have the machinery to say precisely why it fails.

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.

The parallelism trap: superpose the input, fire one oracle query, then try to read the answer out.
  1. 1. Load the registers
  2. 2. Superpose the input
  3. 3. One query of U_f
  4. 4. Measure
Both registers start in |0>. Nothing is superposed yet.

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

The evaluations are not useless - they are just in the wrong shape. The way forward is never "measure and hope". It is to run more gates after the query so the amplitudes of the wrong answers cancel and the amplitude of the answer you want reinforces, concentrating a global property of f (is it constant? does it have a hidden period?) onto a single outcome you are almost certain to measure. That cancel-and-reinforce step is interference, and it is the actual engine. Quantum parallelism just sets the table.

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 wall
One oracle query on a superposed input, in Qiskit-style code

Lock 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.

drop here

writes f(x) beside every x, in superposition, with one query

drop here

returns one random (x, f(x)) pair and discards the rest

drop here

what a well-designed interference step can reveal

drop here

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

  1. 1.Scott Aaronson, Why Is Quantum Computing So Hard to Explain? (Quanta Magazine, 2021)
  2. 2.Nielsen and Chuang, Quantum Computation and Quantum Information, section 1.4.2 (quantum parallelism)