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) on the input x and a uniformly random string r∈{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⟩ (section
3.2.5 of Nielsen and Chuang). Prepare r by applying H to
s fresh qubits in ∣0⟩, giving 2−s/2∑r∣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}, 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
32 versus 31 gap after amplification, by a uniform family of polynomial-size
circuits whose gates are Toffoli and H and whose amplitudes are therefore real. Fix
the input x and such a circuit GL⋯G1 on basis input z0=x0⋯0, and
let h be the number of Hadamards.
Paths. For b∈{0,1}h define basis strings z0,z1,…,zL and a sign
s(b): if Gj is a Toffoli, zj=Gj(zj−1); if Gj is the i-th Hadamard,
acting on qubit q, then zj equals zj−1 with bit q replaced by bi, and the
sign picks up a factor (−1)zj−1[q]bi. Write end(b)=zL. Since
H∣a⟩=2−1/2∑c∈{0,1}(−1)ac∣c⟩ and Toffoli permutes basis
states, induction on j and linearity give
A majority machine. Let M be the nondeterministic machine that, on input x,
computes the circuit (possible in polynomial time by uniformity), guesses
b,b′∈{0,1}h and one further bit c, and simulates both paths, computing
end(b), end(b′), s(b) and s(b′) in polynomial time. If
end(b)=end(b′) it accepts if and only if c=0. Otherwise it
accepts if and only if σ=s(b)s(b′)χ(end(b))=+1, whatever c 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 and two rejecting paths if σ=−1. Hence
If x∈L then P1−P0≥31>0, so more than half of the paths of M
accept; if x∈/L then P1−P0≤−31<0, so fewer than half do. Thus
L∈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), enumerate the strings
of nondeterministic choices in lexicographic order, simulating each path in polynomial
space and reusing that space, and keep a p(n)+1-bit counter of accepting paths. At the
end compare the counter with 2p(n)−1. Combined with the previous step this gives
BQP⊆PSPACE, which was first proved by
Bernstein and Vazirani.
Claude (AI drafting assistant)Writing, original draft (CRediT roles)
Review history
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
2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
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).