What It Can and Cannot Do
What quantum computers cannot do
The hype filter, quantified
You have watched a quantum computer factor numbers in polynomial time and search a haystack in a square root of the usual steps. It is tempting to extrapolate: throw any hard problem at it and it melts. This lesson is the hype filter. It draws the ceiling in numbers, and the ceiling is a lot lower than the headlines suggest.
The claim to kill
Put a number on it
Before the algebra, feel the sizes. The ledger below compares the best known classical and quantum operation counts for three problems, on a log scale. Slide the problem size up and watch which quantum bars shrink to nothing and which stay stubbornly tall. Only one of the three collapses.
Unstructured search
n = qubits, so N = 2^n items to search
Quadratic speedup: the exponent is halved, still exponential.
Factoring an n-bit number
n = bits of the number to factor
Exponential speedup: quantum wins decisively (this is Shor).
NP-complete brute force
n = variables, so 2^n assignments to try
Quadratic at best (Grover): 2^(n/2), still intractable.
Run times assume a fast machine at 10^12 operations per second, and ignore the extra cost of error correction on real quantum hardware. The pattern, not the exact figure, is the point.
Why halving the exponent is not enough
Grover's algorithm gives a : it turns queries into about . For an unstructured search over candidates that means
so a 100-bit search drops from to . That is an enormous factor - and is still about a thousand trillion operations, for the small case. Double the problem to 200 bits and the quantum cost is , back where the classical version started. An exponential with a halved exponent grows just as relentlessly; it only buys you a constant factor in the exponent, never a change of kind.[1] And this is not a matter of finding a cleverer quantum algorithm later: for genuinely unstructured search, is provably the best any quantum computer can do.[3]
Where the exponential wins actually come from
So the NP-complete problems, the ones that would reshape logistics, cryptography, and biology overnight, stay hard. Grover shaves their brute force from to , and no general-purpose exponential quantum speedup for them is known or expected - consistent with the conjecture that NP-complete problems lie outside BQP. The classical picture of that wall is in the P versus NP lesson.
import math
def costs(n_bits):
classical = 2 ** n_bits # brute force over 2^n candidates
grover = 2 ** (n_bits / 2) # quantum: square root of that
return classical, grover
for n in (50, 100, 200):
c, g = costs(n)
print(f"n={n}: classical 2^{n} = {c:.0e}, quantum 2^{n//2} = {g:.0e}")
# n=200 quantum cost 2^100 is where the n=200 classical run STARTED at n=100.
# Halving the exponent is a discount, not an escape from exponential growth.Lock it in
- Grover's quadratic speedup turns an unstructured search of size into , which is still exponential - the exponent is halved, not removed.
- For truly unstructured search, is provably optimal, so no future quantum algorithm rescues NP-complete brute force.
- Exponential speedups require special hidden structure, like the period Shor exploits; the real line is structured versus unstructured, not quantum versus classical.
- NP-complete problems are expected to stay intractable on quantum hardware, consistent with NP lying outside BQP.
Check yourself
Run Grover on an NP-complete brute force over 2^n possibilities. The quantum cost is:
An exponential quantum speedup, like Shor's, requires:
Recall: which of factoring, unstructured search, and NP-complete brute force gets an exponential speedup, which gets quadratic, and what is Grover's cost on a space of size 2^n?
The three-way sort that separates hype from reality. Try to state it, then check.
Match each problem to the speedup a quantum computer actually gives it.
exponential speedup (Shor exploits a hidden period)
quadratic speedup, and provably no better
no efficient quantum algorithm known, only Grover's quadratic discount
costs about 2^(n/2), still exponential
Primary source
Scott Aaronson, Introduction to Quantum Information ScienceThe lecture notes are unusually blunt about the limits: what quantum buys, what it does not, and why the popular parallel-universe story gets the speedup exactly backwards. Read the sections on Grover and on the structured-versus-unstructured divide.
Sources