BQP is Contained in PP and PSPACE
The class — bounded-error quantum polynomial time — is the formal home of "what a quantum computer can do efficiently": decision problems solved by uniform families of polynomial-size quantum circuits that answer correctly with probability bounded away from . The structural question that organizes the field is where this quantum class sits inside the classical universe of complexity. The oldest and most durable answer is a pair of containments, , established in essence by Bernstein and Vazirani in 1993 and sharpened by Adleman, DeMarrais and Huang in 1997: anything a quantum computer computes quickly, a classical machine can also compute — using only polynomial memory, though generally at the cost of exponential time. The engine of both proofs is a single idea borrowed from physics: the Feynman path sum. The amplitude for a circuit to carry one basis state to another is a sum, over every intermediate sequence of basis strings, of the product of the gates' matrix elements. Each gate touches qubits, so each factor is a small exact number and a whole path is one string of snapshots; the paths are exponentially many, but each costs only polynomial time and space. The acceptance probability therefore becomes a signed sum of exponentially many efficiently-computable terms — precisely the shape the counting classes and were built to handle. This reframing turns a quantum question into a bookkeeping one, and bookkeeping is what a classical machine with a counter and a small work-tape does best.
- Every language is decided by a polynomial-size quantum circuit whose acceptance probability is a Feynman path sum — an exponential sum over computational paths of products of gate amplitudes.
- Over the universal Hadamard+Toffoli gate set every amplitude is a real dyadic rational , so is an exact integer ; deciding its sign is exactly the question, giving .
- The exponentially many paths can be enumerated one at a time with a polynomial-size counter, so , hence .
- The simulation needs only polynomial space but generally exponential time — it bounds the memory of quantum computing, not its speed, so conjectured speedups like Shor's are untouched, and no -hard (or -hard) problem is solved efficiently unless the hierarchy collapses.
- The result anchors in the chain .
- Key idea: Write the quantum acceptance probability as a Feynman path sum — an exponential sum of efficiently computable signed amplitudes. Counting such signed contributions is exactly what does, and enumerating them one path at a time costs only polynomial space, giving .
Where this lives today
The containment is the working ceiling against which claims of quantum advantage are measured. When Google announced in 2019 that its 53-qubit Sycamore processor sampled random circuits in 200 seconds — a task it projected would take a supercomputer millennia — the counterattack came from the side of this result: classical teams built Schrödinger–Feynman simulators looping over Feynman paths (trading memory for time exactly as does), and later tensor-network methods that reproduced the sampling in days, then hours. The dispute over "how supreme" a demonstration is is the dispute over how far up the exponential-time-but-polynomial-space curve a classical machine can be pushed. On the theory side, is the entry point to the modern map: it extends to , underpins the celebrated , and frames open questions like whether — which the 2019 Raz–Tal oracle separation suggests may fail — while the containment holds firm.
The physical picture
Picture a quantum computation as light threading a maze of beam splitters. Every route the light could take is a computational path, and the brightness at the detector — the acceptance probability — is the squared magnitude of the sum of complex amplitudes over all routes. A classical machine cannot ride all routes at once, but it can add them one at a time, and that patient summation is the whole content of both containments. The first figure fixes where lives: pinned between randomised below and the counting class above, with and enclosing all.
The hardness a classical simulator faces is not the number of paths — a machine cheerfully loops over of them — but the delicate cancellation among them. Interference can collapse a sum of exponentially many large terms to almost nothing, and it is this sign structure that forces a counting class like rather than an existential class like : asking "does an accepting path exist?" is the wrong question, because a single path means nothing — only the signed total does. The second figure makes it concrete on the smallest circuit: two Hadamards in a row, where two equal-magnitude paths meet with opposite signs and annihilate.
Universality lets us assume such well-behaved numbers. Over the Hadamard+Toffoli gate set — universal for — every gate entry lies in , so a path with Hadamards contributes times an integer and the squared amplitude is dyadic. The decision "is ?" then sharpens into "is a signed integer count positive?" — the canonical question.
The core equations
A computation is a fixed sequence of local unitaries applied to an input register padded with clean ancillas. Writing it out fixes the objects the argument manipulates — the gates, input, workspace, and circuit size.
where: — the -th gate, acting nontrivially on qubits, ; — the -qubit input basis state; — ancillas initialized to zero; — the circuit size, . Reading it: the machine is a product of poly-many local unitaries, so all its complexity lives in how those pieces interfere. Inserting a complete set of basis states between every pair of adjacent gates turns the matrix product into a sum over intermediate strings — the Feynman path sum, the single identity on which everything downstream rests.
where: — the intermediate basis string after gate , summed over all values; — a single-gate amplitude, nonzero only when agree off the gate's support; — the measured output string. Reading it: one amplitude is an exponential sum whose every summand is a product of tiny, locally-computable factors. The machine accepts when the measured output lands in the accepting set, so the acceptance probability is the total weight on those outputs — a sum of squared amplitudes, each itself a path sum against its conjugate.
where: — the accepting output strings (e.g. first qubit ); — the full unitary; — the acceptance probability on input . Reading it: squaring pairs each path with a second , so is a double sum over path-pairs — still exponential, still term-by-term efficient. Membership in a language is defined by a bounded gap around , not exact probabilities; any constant gap works, since majority-vote amplification drives it to .
where: — the language; and — the completeness and soundness thresholds. Reading it: the gap is bounded away from zero on both sides, so its sign is a robust bit — the one a machine will extract. Choosing the universal Hadamard+Toffoli gate set makes every amplitude real and dyadic, so squaring and clearing the fixed power of two turns the acceptance probability into a signed integer count — the exact object compares against a threshold.
where: — the fixed number of Hadamard gates; — the sign of a path's amplitude product; — the two paths produced by squaring; — the path-pairs contributing resp. . Reading it: each path is , the two copies give , and the prefactor cancels it, leaving a plain integer. Assembling the two containments places inside the classical hierarchy, above the randomised classes and below the space-bounded ones.
where: — bounded-error randomised polynomial time; — probabilistic polynomial time (accept iff , unbounded gap); — polynomial work-tape, unbounded time; — deterministic exponential time. Reading it: is sandwiched — at least as strong as classical randomness, no stronger than polynomial space.
The goal is to show that a single quantum amplitude — an inner product against a product of poly-many unitaries — is literally an exponential sum whose every term is a product of locally-computable numbers, so the exponential cost lives entirely in the number of terms, never in any one term. This identity is what lets a classical machine touch a quantum amplitude at all, and is the common root of both arguments below.
Step 1. Between every adjacent pair of gates and insert the resolution of identity ; there are such insertions in . Why: the identity is exact — nothing is approximated, the product is only rewritten in a basis a classical machine can name string by string.
Step 2. This turns the operator product into with boundary conditions , . Why: distributing sums over the product exposes the sum-over-paths structure — each choice of is one "history" of the computation.
Step 3. Each factor depends only on the qubits in 's support; off-support the two strings must match or the factor vanishes, so a nonzero factor is one lookup into a constant-size matrix. Why: locality keeps each factor cheap — the gate is a small fixed matrix, not an exponential object.
Step 4. A single path therefore contributes a product of such factors in time and space; only the number of paths, , is exponential. Why: cheap terms, exponentially many of them — exactly the profile a counting class or a space-bounded loop can exploit.
Go deeper · Derivation B · 1 minBQP inside PP by signed integer counting
The goal is to convert the bounded-error acceptance probability into an integer difference of two counts , then exhibit a probabilistic polynomial-time machine whose own acceptance probability exceeds precisely when that difference is positive — the definition of . The Hadamard+Toffoli gate set makes the arithmetic come out in integers, and the constant gap makes the sign unambiguous.
Step 1. By the path-sum derivation, , and with gate entries in each path value is , the fixed Hadamard count shared by all paths. Why: the only irrational a gate introduces is the Hadamard's , and every path meets the same of them — a single global constant, not a per-path nuisance.
Step 2. Square and scale: , with the sign of a path product. The two factors multiply to , killed by the prefactor , so the right side is a sum of terms — an integer. Why: squaring removes the root of two, ; this is why one works with the probability, not the amplitude.
Step 3. Define the gap , with the path-pairs of product and those of . The promise gives for and for . Why: the – promise becomes a gap of at least , so the sign is never a coin toss.
Step 4. A machine guesses a uniform tuple in polynomial time, computes from local lookups, and accepts or rejects with auxiliary coins engineered so its acceptance probability exceeds exactly when , i.e. . Why: this is the standard trick letting an unbounded-error machine read the sign of a signed sum — it needs only the sign, not the magnitude.
Step 5. Hence is decided by a machine, so ; as was arbitrary, . Why: nothing used beyond the promise and gate set, both generic to .
Go deeper · Derivation C · 1 minPP inside PSPACE by one path at a time
The goal is to show that a count over exponentially many branches costs only polynomial space, because the branches can be visited sequentially and each discarded before the next begins — the running total, not the list of branches, is all that must be held. Composed with the previous derivation this delivers , and explains why a quantum simulation can be memory-cheap even when time-expensive.
Step 1. Let be a machine tossing random bits per branch; the accept count is . Loop , simulating each deterministic branch in turn. Why: fixing the coin string makes the machine deterministic, so each branch is an ordinary poly-time, poly-space computation run in isolation.
Step 2. Keep a single counter , update after each branch, then erase that branch's work-tape before starting . Why: only the total matters for the threshold, so scratch space is overwritten — reuse of space, not storage, is the whole point.
Step 3. The counter has bits, the index has bits, and one branch uses space, so total space is and the machine accepts iff . Why: three poly-size objects — index, counter, one live branch — are all that ever coexist, so the exponential branch count never touches the space bill.
Step 4. Composing with gives ; equivalently one loops over Feynman paths directly, accumulating in a poly-size register, never forming the state vector. Why: the exponential resource is traded from space into time — the loop is exponentially long but its footprint polynomial.
Limiting cases
The containment chain, its lower frame, and its known sharpenings:
| Case | Result | Meaning |
|---|---|---|
| Lower frame | Quantum at least matches classical randomised polynomial time; inclusions believed proper but unproven. | |
| Counting frame | The central result: bounded-error quantum power is captured by unbounded-error counting. | |
| Space frame | Enumerate paths one at a time in polynomial space; by configuration-graph reachability. | |
| Sharpening | Fortnow–Rogers: sits in the low subclass , so the plain bound is not tight. | |
| Oracle vs | relative to an oracle | Raz–Tal (2019): quantumness can escape the polynomial hierarchy yet stays inside . |
Worked examples
1 · A path sum you can add by hand (confidence builder)
Take the smallest interfering circuit: one qubit initialized to , hit by two Hadamards, then measured. Use the path sum to compute the amplitude to land in , and read off what the sign structure does.
Step 1. There is one intermediate time, so — exactly two paths from to , and .
Step 2. Insert the Hadamard entries and . The upper path () gives . The lower path () gives .
Step 3. Sum the paths: , agreeing with , . Two equal-magnitude paths exist, yet the amplitude vanishes — an -style "does a path exist?" test says yes and is useless; only the signed total carries the physics. The amplitude is 0 by exact cancellation of a and a path; sign-tracking is mandatory, which is why the right class is PP.
2 · Resource accounting for a real-scale circuit (fully worked)
A circuit runs on qubits with gates, of them Hadamards. Estimate (a) the number of Feynman paths, (b) the size of the integer , and (c) the space and time a simulation uses, and contrast the two costs.
Step 1. Count the paths. Each of the intermediate times carries a full string in , so there are paths, and squaring pairs them into path-pairs. The sum has about terms.
Step 2. Size the integer. By equation (5), is a nonnegative integer no larger than , fitting in bits. It is compared against , and the promise forces the two sides apart by at least — a gap of thousands of bits, never a photo finish.
Step 3. Bill the space. The loop holds one path index ( bits), one counter ( bits), and one live path: on the order of bits , a few kilobytes.
Step 4. Bill the time, and contrast. The loop must still visit all path-pairs one by one, so the time is exponential and infeasible. Space is polynomial ( bits) while time is exponential ( steps): the containment trades state-vector memory for prohibitive time — exactly why forbids nothing about quantum speed.
Physics of the portrait
The containment sits at the crossroads of physics and computer science: a physicist's sum-over-histories, pressed into service to bound a class of machines that did not exist when the sum was invented. The sharp form belongs to a cryptographer who had already reshaped two other fields.
Origins · 1 minLeonard Adleman and how this was discovered
Leonard Adleman is best known as the "A" in RSA — with Ron Rivest and Adi Shamir he built, in 1977, the public-key cryptosystem that still secures much of the internet, work honoured with the 2002 Turing Award. He has a habit of founding fields: in 1994 he solved a small Hamiltonian-path instance in a test tube using strands of DNA, launching molecular computing overnight. His entry into quantum complexity came in 1997, with Jonathan DeMarrais and Ming-Deh Huang, in "Quantum Computability" (SIAM J. Comput. 26(5):1524). Where Bernstein and Vazirani had placed inside and built the field's foundations, Adleman, DeMarrais and Huang pinned down the sharper ceiling and analysed how the amplitudes' number-theoretic character affects what a quantum computer can compute. Their proof is the signed-integer-counting argument of this article — cast the acceptance probability as a difference of two exact counts and hand the sign to a probabilistic machine, a characteristically Adleman move showing an exotic model is, underneath, a counting problem in disguise.
Going further
Texts. Nielsen & Chuang, Quantum Computation and Quantum Information, §4.5 and Ch. 4 · Watrous, Quantum Computational Complexity (survey) and The Theory of Quantum Information · Kitaev, Shen & Vyalyi, Classical and Quantum Computation, AMS (2002) · Preskill, Lecture Notes, Ch. 6 · Arora & Barak, Computational Complexity, Ch. 10 and 17 · Papadimitriou, Computational Complexity. Key facts underlying the arguments: the Feynman path-sum identity follows from inserting complete basis resolutions between gates; the Hadamard+Toffoli gate set is universal for with amplitude entries in ; the signed-count reduction establishing is due to Adleman, DeMarrais & Huang (SIAM J. Comput. 26(5):1524, 1997) and Bernstein & Vazirani (SIAM J. Comput. 26(5):1411, 1997); follows from one-branch-at-a-time enumeration with a polynomial counter; is proved in Fortnow & Rogers (J. Comput. Syst. Sci. 59, 1999); the oracle separation appears in Raz & Tal (STOC 2019). The example and the – promise are standard.
Prerequisites. The Complexity Class BQP · BQP versus P, NP, and PSPACE. Leads to. QIP = PSPACE · Quantum Merlin–Arthur (QMA) · The Local Hamiltonian Problem.
Ask the tutor: Want the signed path-count worked out for a three-gate circuit, or to see how the same trick upgrades to and ?
Does BQP ⊆ PP ⊆ PSPACE mean a quantum computer is useless?
Not at all. The containment bounds the space a classical machine needs, not the time: the simulation loops over exponentially many Feynman paths, so it generally runs in exponential time — hopeless for a large circuit. What it rules out is a quantum computer efficiently solving problems that need more than polynomial memory (-hard ones); any speedup must come from interference, not brute-force search. Conjectured speedups like Shor's factoring live inside while (plausibly) outside and , with no contradiction.
What exactly is the class PP?
, probabilistic polynomial time, is the set of languages decided by a poly-time randomised machine that accepts with probability strictly greater than exactly when the input is in the language. The crucial word is strictly: the gap may be exponentially small, so is "unbounded-error" — unlike , which demands a constant gap. That razor-thin threshold is its power: it asks whether a signed count of accepting versus rejecting paths is positive, which is why it, not , is the natural home for the quantum path sum.
Why does interference force a counting class rather than NP?
asks an existential question: is there at least one accepting path? For a quantum computation that is meaningless — a lone path carries no observable weight, only the signed sum of amplitudes is a probability. Interference can make exponentially many nonzero paths add to exactly zero (as in ), so the existence of accepting paths tells you nothing. What matters is whether positive contributions outweigh negative — a threshold on a signed count, precisely the (and ) question. So the counting classes, not , capture quantum computation.
Is the PP bound on BQP believed to be tight?
No. Fortnow and Rogers (1999) proved the sharper , placing in a "low" subclass of that behaves almost like relative to itself. The broad belief is that is much smaller than and incomparable to . So the containments here are upper bounds, not equalities: they give a ceiling on quantum power, while the true extent of — even whether — remains open, tied to versus questions we cannot yet resolve.
Who proved these containments, and when?
The framework and the containment come from Ethan Bernstein and Umesh Vazirani, whose 1993 STOC paper (journal version SIAM J. Comput. 1997) defined , built the universal quantum Turing machine, and showed . The sharper is due to Adleman, DeMarrais and Huang (1997, "Quantum Computability"); the elementary is counting-complexity folklore (Papadimitriou), and Fortnow–Rogers refined the bound to in 1999. Together they give the chain that anchors quantum complexity theory.
Can we actually run the PSPACE simulation to validate a real quantum computer?
For small circuits, yes — routinely. Path-sum and Schrödinger–Feynman simulators reproduce the output of tens of qubits by summing amplitudes, and were central to the classical rebuttals of the 2019 Sycamore claim, cutting the projected time from millennia to days. But the cost is exponential in depth and qubit count, so for a large fault-tolerant machine it is a purely theoretical bound — the useful tension: guarantees a simulation exists in modest memory, while its exponential time is exactly what leaves room for a real quantum advantage.
How does this relate to QIP = PSPACE and the rest of the quantum hierarchy?
The signed-amplitude-summation toolkit generalises. Add a quantum witness and you get , the quantum analogue of . Add an interactive prover and the same argument, with semidefinite-programming machinery, yields — quantum interactive proofs reach exactly polynomial space. So this result is the first node in a web of containments folding quantum models into classical counting and space classes.