Orientation guide
Quantum Algorithms and Speedups
A quantum algorithm is a bet that a problem's hidden structure can be turned into interference. This guide shows the bet being placed — phase kickback, Bernstein-Vazirani, Grover computed amplitude by amplitude, Shor as period finding — and then asks the question that decides whether any of it matters: what does the best classical method do?
In this chapter 7 sections
Reader question. What must be proved before a quantum algorithm's mathematical speedup becomes a credible performance claim?
A credible claim identifies the problem promise, shows how phase and interference expose its structure, separates query complexity from gate and data costs, gives success probability and classical post-processing, and compares the total workflow with the best relevant classical method.
- This guide does not teach full proofs of every named algorithm or forecast commercial advantage.
- It does not treat oracle access, state preparation, or error correction as free.
The contract hidden inside a speedup
Identify input promises, oracle access, output, and success probability.
Superposition alone does not make a quantum algorithm powerful. Power comes when a problem has structure that a circuit can expose through interference, phase, and measurement. Superposition is the stage; interference is the actor; the problem's structure is the script.
So the serious question is always the same pair: what structure is being exploited, and what is the best classical baseline? A speedup claim that cannot answer both is not yet a claim; it is a mood.
Most introductory quantum algorithms follow one pattern:
- Prepare a simple initial state.
- Create superposition over candidate inputs.
- Query an oracle or simulate a structured operation.
- Use interference to push amplitude toward useful outcomes.
- Measure.
- Interpret the result classically.
The circuit is only half the story. The other half is the promise: what you are allowed to assume about the problem. Algorithms that look identical on paper diverge completely once you ask what the oracle costs to build.
Many textbook results are stated in query complexity; how many times the algorithm calls a black-box oracle. That is a clean way to prove separation between models. It is not the same as time on hardware.
End-to-end runtime also includes:
- state preparation
- oracle construction
- compilation to a native gate set
- circuit depth against coherence time
- error correction overhead
- measurement shots and repetitions
- classical pre- and post-processing
- data loading
- verification of the answer
The rule for builders and investors: a query speedup is not a product until the full workflow beats the best classical alternative. Part V's resource-estimation chapters exist to put numbers on every line of this list.
Evidence boundary. Quantum query complexity can differ from total runtime because an oracle call hides implementation cost. [Ethan Bernstein] [Michael A. Nielsen]
Phase kickback as information routing
Trace a one-bit oracle into relative phase.
Phase kickback is the first idea that makes quantum algorithms feel genuinely different from classical ones. An oracle computes ; it writes the function value into a target qubit. Prepare that target in and something subtle happens:
The target comes out unchanged, and the function value lands in the phase of the input register instead. The information you asked for has been kicked back into a sign; and a sign can interfere, which a classical bit sitting in a register never does. Nearly every algorithm in this guide is phase kickback plus a clever way to read the sign.
Grover's algorithm searches an unstructured space of items with marked ones using about oracle queries, against for the best classical worst case. It is one of the most robust results in the field; and it is quadratic, not exponential. It also assumes an oracle that recognizes a marked item efficiently, and building that oracle is often where practical advantage goes to die.
Evidence boundary. Amplitude amplification gives a quadratic query improvement for unstructured search under its oracle model. [Lov K. Grover] [Michael A. Nielsen]
A quadratic rotation and an exponential separation
Contrast Grover's geometry with period/hidden-structure algorithms.
The QFT is the discrete Fourier transform applied to amplitudes rather than to a classical data vector. Its importance is not that it "does Fourier faster"; you cannot read out the coefficients. Its importance is that it exposes periodic structure encoded in a quantum state, converting hidden periodicity into measurable peaks.
It sits at the center of phase estimation, period finding, Shor's factoring algorithm, and the hidden-subgroup family. When a quantum algorithm seems to pull structure out of nowhere, the QFT is usually the mechanism doing the pulling.
Given a unitary with , phase estimation extracts the eigenphase as classical bits. It converts phase; the thing measurement normally hides; into output you can keep.
It is a foundation of Shor's algorithm and of most fault-tolerant simulation methods. The caveat is cost: useful phase estimation typically needs deep, coherent circuits, which pushes it firmly toward fault-tolerant hardware rather than today's devices.
Shor's algorithm (1994) factors an integer by reducing factoring to finding a period:
- Choose an integer with .
- Consider the periodic function .
- Use quantum period finding; phase estimation plus the QFT; to estimate the period .
- Use classical number theory to recover factors from when conditions are favorable.
The quantum part never tries factors. It extracts periodic structure that no known classical algorithm can extract efficiently. The strategic consequences are real: a large fault-tolerant quantum computer running Shor breaks RSA and elliptic-curve cryptography, which is why post-quantum cryptography migration is already prudent; while the hardware to threaten production keys remains far beyond current general-purpose systems. Both halves of that sentence deserve equal emphasis.
Evidence boundary. Period-finding and hidden-structure algorithms derive stronger separations from problem promises and Fourier sampling. [Peter W. Shor] [Daniel R. Simon] [John Preskill]
Notation contract: Use N for search-space size, M for marked items, Q for oracle queries, G for compiled gate cost, and p_success for success probability.
Four ledgers behind one asymptotic symbol
Separate queries, gates, data movement, and classical work.
Hamiltonian simulation asks how a quantum system evolves over time; and since nature is quantum, this is the most native workload a quantum computer can have. The application areas are chemistry, materials, catalysis, superconductivity, magnetic systems, and energy-related materials.
The serious questions are concrete: which Hamiltonian, at what precision, in what encoding, needing how many logical qubits and how many reliable operations; and what classical approximation method is the baseline? That last question is the one most often skipped, because classical simulation methods are formidable competitors.
Variational algorithms pair a parameterized quantum circuit with a classical optimizer: choose parameters, run the circuit, measure an objective, update, repeat. VQE targets chemistry-style objectives, QAOA targets optimization-style ones, and quantum machine-learning circuits follow the same loop.
The appeal is real: these algorithms tolerate shallow circuits, which makes them the friendliest option for noisy near-term hardware, and they slot naturally into hybrid workflows. The caution is equally real:
- The optimization surface can be hard to train; barren plateaus flatten gradients.
- Noise can dominate the measured objective.
- Classical heuristics are strong and constantly improving.
- Data loading can erase any advantage.
- A good demo does not automatically become product value.
Part IV and Part VIII return to these algorithms with the benchmark discipline they require.
From theorem to workload claim
Apply a baseline and evidence checklist to one proposed use.
For any algorithm claim, nine questions:
- What is the exact problem statement?
- What promise or structure does it exploit?
- What is the quantum subroutine?
- What is the classical baseline?
- Is the speedup in query complexity or in full runtime?
- What data must be loaded, and at what cost?
- How is the answer verified?
- What hardware assumptions are required?
- How many logical qubits and reliable operations does it need?
A claim that answers all nine is rare; and instantly more credible than a headline.
- Explain phase kickback in your own words, without the word "spooky".
- Derive the Bernstein-Vazirani result for .
- Redo the four-item Grover calculation with marked item .
- Explain why Grover is quadratic rather than exponential, in one paragraph.
- Explain Shor's algorithm as period finding to a colleague who knows RSA but no quantum mechanics.
- Pick one application paper and identify whether it relies on phase estimation, Hamiltonian simulation, variational circuits, or another primitive.
- Write a one-page diligence note on a claimed quantum optimization application, using the nine-question checklist.
Speedup claim ledger
| Field | Reader-visible record |
|---|---|
| Format | Machine-readable worksheet plus two populated algorithm cases |
| Verification | Schema test rejects claims missing promise, oracle cost, success probability, end-to-end resources, or named classical baseline. |
| Availability | Source-embedded acceptance record; no separate download is claimed |
{
"artifact": "Speedup claim ledger",
"format": "Machine-readable worksheet plus two populated algorithm cases",
"acceptance_test": "Schema test rejects claims missing promise, oracle cost, success probability, end-to-end resources, or named classical baseline.",
"publication_state": "source-embedded contract and worked fixture"
}
Scope boundary
- This guide does not teach full proofs of every named algorithm or forecast commercial advantage.
- It does not treat oracle access, state preparation, or error correction as free.
Depth commitment. One oracle trace, one Grover resource case, one hidden-structure comparison, and a reusable ledger.
Practice problem
Audit a claim that Grover provides a quadratic application speedup when state preparation costs Θ(N) and verification costs vary.
Classical search: C(N)=N/2 expected oracle calls.
Claimed Grover component: Q(N)=ceil(pi*sqrt(N)/4).
State preparation: P(N)=N operations per prepared instance.
Regime A: one search per preparation. Regime B: R searches amortize one preparation.
Verification: V=1 for a direct predicate; V=N for a full output audit.
- Deliverable
- A completed four-ledger worksheet and a conditional conclusion.
- Pass condition
- The model answer computes at least two end-to-end regimes and changes its conclusion when preparation is or is not amortized.
Verification record
Expected solution form. Two-case resource table with algebraic break-even conditions.
Model answer. With one preparation, even when verification is constant, so the application has no asymptotic quadratic advantage. With reused searches, preparation contributes per search; it falls below the Grover term only when grows faster than . An verification removes the advantage in either regime.
Model result and check. A symbolic fixture evaluates the stated cost functions and verifies the conclusion in both regimes.
Acceptance test. The model answer computes at least two end-to-end regimes and changes its conclusion when preparation is or is not amortized.
Provenance
Sources and review
- Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing. 1997primary paper
- Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010textbook
- Lov K. Grover. A fast quantum mechanical algorithm for database search. Proceedings of STOC. 1996primary paper
- Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing. 1997primary paper
- Daniel R. Simon. On the power of quantum computation. SIAM Journal on Computing. 1997primary paper
- John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018graduate lecture notes
The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.