Skip to main content
KetQat

Appearance

Proof · intermediate

Proof that BPP ⊆ BQP ⊆ PP ⊆ PSPACE

Classical randomness is simulated by Hadamards on fresh qubits and reversible logic; a Toffoli–Hadamard circuit's acceptance bias is a signed count of pairs of computational paths, which a nondeterministic machine can turn into a majority vote; majority votes are counted in polynomial space.

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

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. Leonard M. Adleman, Jonathan DeMarrais, Ming-Deh A. Huang (1997). Quantum computability. SIAM Journal on Computing 26(5), 1524-1540. doi:10.1137/S0097539795293639
  2. Ethan Bernstein, Umesh Vazirani (1997). Quantum complexity theory. SIAM Journal on Computing 26(5), 1411-1473. doi:10.1137/S0097539796300921
  3. Yaoyun Shi (2003). Both Toffoli and Controlled-NOT need little help to do universal quantum computation. Quantum Information and Computation 3, 84-92. doi:10.26421/QIC3.1-7arXiv:quant-ph/0205115
  4. Dorit Aharonov (2003). A Simple Proof that Toffoli and Hadamard are Quantum Universal. arXiv:quant-ph/0301040
  5. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press. doi:10.1017/CBO9780511976667

Contributors

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

Review history

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

    Each step re-derived: BPP in BQP via reversible Toffoli/NOT circuits (Nielsen-Chuang 3.2.5 Energy and computation confirmed in the publisher's table of contents); Toffoli-Hadamard path-sum formula verified numerically against a state-vector simulation on 5 random 4-qubit circuits; the majority-machine count (accept minus reject equals 2^(h+1)(P1-P0)) and the PP in PSPACE counter re-derived. Toffoli+H universality compared with the abstracts of Shi (quant-ph/0205115) and Aharonov (quant-ph/0301040). Attribution compared with Watrous arXiv:0804.3401 Section IV.5 and Fortnow-Rogers arXiv:cs/9811023.

    The record called its pairs-of-paths majority machine 'the argument of Adleman, DeMarrais and Huang'; Watrous notes ADH proved BQP in PP by a different method. Reworded to say the record proves the ADH containment by a path-counting argument and that the original proof is set up differently.

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 97a16e864b63ee4a. Source file knowledge/records/proof/bqp-containments.md in the content repository (readable there once it is public).