Skip to main content
KetQat

Appearance

Theorem · intermediate

BPP ⊆ BQP ⊆ PP ⊆ PSPACE

Bounded-error quantum polynomial time contains classical randomised polynomial time and is contained in PP, hence in PSPACE. In particular an unconditional proof that BQP differs from BPP would separate P from PSPACE.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

BPP⊆BQP⊆PP⊆PSPACE.\mathrm{BPP} \subseteq \mathrm{BQP} \subseteq \mathrm{PP} \subseteq \mathrm{PSPACE}.

Here PP (Gill) is the class of languages LL for which a nondeterministic polynomial-time machine, all of whose computation paths have the same length, accepts on more than half of its paths exactly when x∈Lx \in L.

BQP⊆PSPACE\mathrm{BQP} \subseteq \mathrm{PSPACE} is due to Bernstein and Vazirani, and the sharper BQP⊆PP\mathrm{BQP} \subseteq \mathrm{PP} to Adleman, DeMarrais and Huang. Fortnow and Rogers strengthened the latter to PPBQP=PP\mathrm{PP}^{\mathrm{BQP}} = \mathrm{PP}.

Consequence. If P=PSPACE\mathrm{P} = \mathrm{PSPACE} then BQP⊆PSPACE=P⊆BPP\mathrm{BQP} \subseteq \mathrm{PSPACE} = \mathrm{P} \subseteq \mathrm{BPP}. So a proof that BQP≠BPP\mathrm{BQP} \neq \mathrm{BPP} would prove P≠PSPACE\mathrm{P} \neq \mathrm{PSPACE}, a major open problem of classical complexity theory; this is why every known quantum speedup for a decision problem is either relative to an oracle or conditional on an unproven assumption such as the classical hardness of factoring.

Holds when

  • BQP is defined with a gate set whose amplitudes are efficiently computable; the proof uses Toffoli and Hadamard, which is computationally universal.

Proof

Proof that BPP ⊆ BQP ⊆ PP ⊆ PSPACEMachine-checked

BPP ⊆ BQP. A BPP algorithm is a deterministic polynomial-time computation A(x,r)A(x, r) on the input xx and a uniformly random string r∈{0,1}sr \in \{0,1\}^{s}. Every deterministic computation can be made reversible with polynomial overhead and written as a circuit of Toffoli and NOT gates acting on ∣x⟩∣r⟩∣0⋯0⟩\ket{x}\ket{r}\ket{0\cdots0} (section 3.2.5 of Nielsen and Chuang). Prepare rr by applying HH to ss fresh qubits in ∣0⟩\ket{0}, giving 2−s/2∑r∣r⟩2^{-s/2}\sum_r \ket{r}, and run the reversible circuit. Since the circuit permutes basis states, measuring the output bit gives outcome 1 with probability 2−s #{r:A(x,r)=1}2^{-s}\,\#\{r : A(x,r) = 1\}, exactly the classical acceptance probability.

BQP ⊆ PP. By the results of Shi (with a short proof by Aharonov), every language in BQP is decided, with the same acceptance probabilities up to an arbitrarily small change that preserves the 23\tfrac23 versus 13\tfrac13 gap after amplification, by a uniform family of polynomial-size circuits whose gates are Toffoli and HH and whose amplitudes are therefore real. Fix the input xx and such a circuit GL⋯G1G_L \cdots G_1 on basis input z0=x 0⋯0z_0 = x\,0\cdots0, and let hh be the number of Hadamards.

Paths. For b∈{0,1}hb \in \{0,1\}^h define basis strings z0,z1,…,zLz_0, z_1, \dots, z_L and a sign s(b)s(b): if GjG_j is a Toffoli, zj=Gj(zj−1)z_j = G_j(z_{j-1}); if GjG_j is the ii-th Hadamard, acting on qubit qq, then zjz_j equals zj−1z_{j-1} with bit qq replaced by bib_i, and the sign picks up a factor (−1)zj−1[q] bi(-1)^{z_{j-1}[q]\, b_i}. Write end(b)=zL\mathrm{end}(b) = z_L. Since H∣a⟩=2−1/2∑c∈{0,1}(−1)ac∣c⟩H\ket{a} = 2^{-1/2}\sum_{c \in \{0,1\}} (-1)^{ac}\ket{c} and Toffoli permutes basis states, induction on jj and linearity give

GL⋯G1∣z0⟩=2−h/2∑b∈{0,1}hs(b) ∣end(b)⟩,⟨y∣GL⋯G1∣z0⟩=2−h/2∑b: end(b)=ys(b).G_L \cdots G_1 \ket{z_0} = 2^{-h/2} \sum_{b \in \{0,1\}^h} s(b)\, \ket{\mathrm{end}(b)} , \qquad \bra{y} G_L \cdots G_1 \ket{z_0} = 2^{-h/2} \sum_{b :\, \mathrm{end}(b) = y} s(b).

Bias. Let χ(y)=+1\chi(y) = +1 if the output bit of yy is 1 and −1-1 otherwise. With P1P_1 and P0P_0 the probabilities of outputs 1 and 0, and real amplitudes,

P1−P0=∑yχ(y) ⟨y∣GL⋯G1∣z0⟩2=2−h∑b,b′∈{0,1}hend(b)=end(b′)s(b) s(b′) χ(end(b)).P_1 - P_0 = \sum_y \chi(y)\, \bra{y} G_L \cdots G_1 \ket{z_0}^2 = 2^{-h} \sum_{\substack{b, b' \in \{0,1\}^h \\ \mathrm{end}(b) = \mathrm{end}(b')}} s(b)\, s(b')\, \chi(\mathrm{end}(b)).

A majority machine. Let MM be the nondeterministic machine that, on input xx, computes the circuit (possible in polynomial time by uniformity), guesses b,b′∈{0,1}hb, b' \in \{0,1\}^h and one further bit cc, and simulates both paths, computing end(b)\mathrm{end}(b), end(b′)\mathrm{end}(b'), s(b)s(b) and s(b′)s(b') in polynomial time. If end(b)≠end(b′)\mathrm{end}(b) \ne \mathrm{end}(b') it accepts if and only if c=0c = 0. Otherwise it accepts if and only if σ=s(b)s(b′)χ(end(b))=+1\sigma = s(b) s(b') \chi(\mathrm{end}(b)) = +1, whatever cc is. All computation paths have the same length. Pairs with different endpoints contribute one accepting and one rejecting path; pairs with equal endpoints contribute two accepting paths if σ=+1\sigma = +1 and two rejecting paths if σ=−1\sigma = -1. Hence

#accept(x)−#reject(x)=2∑end(b)=end(b′)σ=2h+1(P1−P0).\#\mathrm{accept}(x) - \#\mathrm{reject}(x) = 2 \sum_{\mathrm{end}(b) = \mathrm{end}(b')} \sigma = 2^{h+1} (P_1 - P_0).

If x∈Lx \in L then P1−P0≥13>0P_1 - P_0 \ge \tfrac13 > 0, so more than half of the paths of MM accept; if x∉Lx \notin L then P1−P0≤−13<0P_1 - P_0 \le -\tfrac13 < 0, so fewer than half do. Thus L∈PPL \in \mathrm{PP}. This proves the containment of Adleman, DeMarrais and Huang by a path-counting argument written with the Toffoli–Hadamard gate set; their original proof is set up differently.

PP ⊆ PSPACE. Given a PP machine with paths of length p(n)p(n), enumerate the strings of nondeterministic choices in lexicographic order, simulating each path in polynomial space and reusing that space, and keep a p(n)+1p(n)+1-bit counter of accepting paths. At the end compare the counter with 2p(n)−12^{p(n)-1}. Combined with the previous step this gives BQP⊆PSPACE\mathrm{BQP} \subseteq \mathrm{PSPACE}, which was first proved by Bernstein and Vazirani.

Mentioned in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Ethan Bernstein, Umesh Vazirani (1997). Quantum complexity theory. SIAM Journal on Computing 26(5), 1411-1473. doi:10.1137/S0097539796300921
  2. Leonard M. Adleman, Jonathan DeMarrais, Ming-Deh A. Huang (1997). Quantum computability. SIAM Journal on Computing 26(5), 1524-1540. doi:10.1137/S0097539795293639
  3. Lance Fortnow, John Rogers (1999). Complexity Limitations on Quantum Computation. Journal of Computer and System Sciences 59, 240-252. doi:10.1006/jcss.1999.1651arXiv:cs/9811023
  4. John Gill (1977). Computational Complexity of Probabilistic Turing Machines. SIAM Journal on Computing 6, 675-695. doi:10.1137/0206049

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Compared with Watrous, arXiv:0804.3401, Section IV.5 (BQP in PP first proved by Adleman-DeMarrais-Huang; Theorem 6 PP^BQP = PP from Fortnow-Rogers); Fortnow-Rogers arXiv:cs/9811023 abstract and Corollary 3.5 (BQP in PP in PSPACE); the Bernstein-Vazirani 1997 abstract (BQP in P^#P, hence PSPACE) as indexed; consequence P = PSPACE implies BQP = BPP derived directly. Crossref metadata of ADH 1997, BV 1997 and Gill 1977 matched the entries.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision c4e24563ece7fc14. Source file knowledge/records/theorem/bqp-containments.md in the content repository (readable there once it is public).