Oracle Separations in Quantum Complexity

Complexity theory almost never proves that two classes are different. What it proves instead is that a whole style of argument cannot decide the question — and the sharpest tool for that meta-statement is the oracle. Grant every machine, quantum and classical alike, identical black-box access to some function A:{0,1}∗→{0,1}A:\{0,1\}^*\to\{0,1\} answered in a single step, and ask whether the resulting relativized classes still stand in the same relation. A proof technique that survives this generalization to every oracle is said to relativize; the Baker–Gill–Solovay theorem of 1975 exhibited oracles A,BA,B with PA=NPA\mathsf{P}^A=\mathsf{NP}^A and PB≠NPB\mathsf{P}^B\neq\mathsf{NP}^B, so no relativizing argument can ever settle P\mathsf{P} versus NP\mathsf{NP}. This article carries that philosophy into the quantum world, where it becomes the engine that separates BQP\mathsf{BQP} from the classical complexity zoo. The technical heart is query complexity: how many calls to the hidden oracle a machine needs to decide a global property of the string it encodes. A query gap of the shape "one quantum query versus NΩ(1)N^{\Omega(1)} classical queries" lifts, by padding and diagonalization, into an oracle relative to which the corresponding uniform time-bounded classes come apart. The enterprise thus reduces to two crafts: quantum algorithms clever enough to read a global feature in one interference-powered shot, and classical lower bounds — via the polynomial method, approximate degree, or random restrictions — that no small sample can match. Three landmarks organize the story: Recursive Fourier Sampling, forrelation, and the Raz–Tal theorem that pushed BQP\mathsf{BQP} outside the entire polynomial hierarchy. Throughout, the refrain of IP=PSPACE\mathsf{IP}=\mathsf{PSPACE} and MIP∗=RE\mathsf{MIP}^*=\mathsf{RE} must sound: an oracle separation is a negative result about proof methods, never a theorem about the real, oracle-free world.

Key takeaways
  • An oracle (relativized) separation between classes A\mathcal{A} and B\mathcal{B} is a black-box language AA with AA≠BA\mathcal{A}^A\neq\mathcal{B}^A; it certifies that no relativizing proof can establish A=B\mathcal{A}=\mathcal{B}.
  • Bernstein and Vazirani's Recursive Fourier Sampling was the first oracle evidence for BQP⊈MA\mathsf{BQP}\not\subseteq\mathsf{MA}: a Θ(log⁡n)\Theta(\log n)-deep recursion amplifies a constant quantum edge into a quasipolynomial nΩ(log⁡n)n^{\Omega(\log n)} classical cost.
  • Forrelation measures how much a Boolean function resembles the Fourier transform of a second; one quantum query estimates it, yet any bounded-error classical algorithm needs Ω~(N)\tilde\Omega(\sqrt N) queries — and this N\sqrt N is provably the largest possible one-query gap.
  • Raz–Tal (2018) derandomized a Gaussian forrelation into a distribution over Boolean oracles that no constant-depth AC0\mathsf{AC}^0 circuit can distinguish from uniform, yielding an oracle OO with BQPO⊈PHO\mathsf{BQP}^O\not\subseteq\mathsf{PH}^O — quantum outside the whole polynomial hierarchy.
  • There is a hard ceiling: BQPA⊆PPA⊆PSPACEA\mathsf{BQP}^A\subseteq\mathsf{PP}^A\subseteq\mathsf{PSPACE}^A for every oracle AA, so no oracle can separate BQP\mathsf{BQP} from PP\mathsf{PP}; the Raz–Tal frontier sits just below it.
  • Key idea: to separate BQP\mathsf{BQP} from a classical class C\mathcal{C} relative to an oracle it suffices to plant, in the oracle string, a Boolean property that one bounded-error quantum query decides but that any C\mathcal{C}-machine making polynomially many queries cannot — interference supplies the upper bound, the polynomial method the matching classical lower bound, and a padding/diagonalization argument lifts the query gap to a uniform-class oracle separation.
The core insight

To separate BQP\mathsf{BQP} from a classical class C\mathcal{C} relative to an oracle, it suffices to exhibit a Boolean property of an oracle string that one bounded-error quantum query (or a constant number) decides, but that any C\mathcal{C}-machine making polynomially many queries cannot decide. Quantum interference supplies the upper bound; the polynomial method, approximate degree, or random restrictions supply the matching classical lower bound — and a padding/diagonalization argument lifts the query gap to a uniform-class oracle separation.

Where this lives today

The forrelation circle closed by Raz and Tal is now the theoretical backbone of quantum supremacy arguments. The same Gaussian-forrelation indistinguishability that blinds AC0\mathsf{AC}^0 underlies the claim that random-circuit and boson-sampling output distributions cannot be reproduced by any PH\mathsf{PH}-bounded classical simulator — the formal spine beneath the 2019 Sycamore and later photonic supremacy experiments, where a device samples in seconds from a distribution believed to lie outside the polynomial hierarchy. Barrier results guide the search directly: that BQP⊆PP\mathsf{BQP}\subseteq\mathsf{PP} relativizes while BQP\mathsf{BQP}-vs-PH\mathsf{PH} does not tells theorists which conjectures demand non-relativizing tools and which are dead ends. Forrelation-type statistics are also candidate verifiable benchmarks — a single-query routine yields a number that provably resists few-sample classical estimation, exactly what a classical verifier needs to gain confidence a remote device did something genuinely quantum. The open frontier is whether any relativized separation can be made unrelativized: no oracle-free proof that BQP⊈PH\mathsf{BQP}\not\subseteq\mathsf{PH} is known, and IP=PSPACE\mathsf{IP}=\mathsf{PSPACE} warns that one, if it exists, will look nothing like the arguments here.

The physical picture

Picture the oracle as an astronomically large lookup table an algorithm may consult but never see whole. Relativization poses one question: hand the same table to a quantum and a classical machine, and ask whether the quantum one can extract a global feature the classical one provably cannot. The feature is engineered so that quantum interference reads it in a single sweep, while classical sampling must scrape the table cell by cell. Forrelation is the cleanest incarnation. Two functions f,g:{0,1}n→{±1}f,g:\{0,1\}^n\to\{\pm1\} are packed into the oracle, and the target is Φ=⟨f^,g⟩\Phi=\langle\hat f,g\rangle — how strongly gg resembles the Fourier (Walsh–Hadamard) transform of ff. Because a Hadamard layer is the Fourier transform, one sandwich H⊗nUgH⊗nUfH⊗nH^{\otimes n}U_g H^{\otimes n}U_f H^{\otimes n} on ∣0n⟩|0^n\rangle deposits exactly Φ\Phi into a single amplitude. The first figure makes that circuit, and the one-query-versus-N\sqrt N gap it produces, one picture.

Figure
The forrelation circuit: the Hadamard sandwich Hⁿ Uf Hⁿ Ug Hⁿ deposits forr(f,g) into the amplitude of returning to the all-zeros state, so the acceptance probability equals the squared forrelation, read in a single quantum query, while any bounded-error classical algorithm needs Ω̃(√N) queries with N = 2ⁿ
One quantum query reads a global feature that classical sampling cannot |0ⁿ⟩ H Uf H Ug H phase-oracle sandwich = Walsh–Hadamard transform of f, correlated with g ⟨0ⁿ| Hⁿ Ug Hⁿ Uf Hⁿ |0ⁿ⟩ = forr(f,g) so Pr[measure 0ⁿ] = |forr(f,g)|² quantum Q(forr) = 1 one query decides it classical R(forr) = Ω̃(√N) N = 2ⁿ ; the maximal one-query gap

The second half of the story is which classes an oracle can and cannot pry apart. Some containments are so robust they hold under every oracle, and those relativizing ceilings bound the whole game from above: BQPA⊆PPA⊆PSPACEA\mathsf{BQP}^A\subseteq\mathsf{PP}^A\subseteq\mathsf{PSPACE}^A for all AA, so no oracle will ever place BQP\mathsf{BQP} outside PP\mathsf{PP}. The prize target was the polynomial hierarchy PH\mathsf{PH}, which by the Furst–Saxe–Sipser correspondence relativizes to quasipolynomial-size constant-depth AC0\mathsf{AC}^0 circuits. Forrelation's Gaussian cousin is exactly the distribution AC0\mathsf{AC}^0 cannot tell from noise but a quantum machine can — how Raz and Tal poked a sliver of BQP\mathsf{BQP} outside PH\mathsf{PH} while it stayed safely inside PP\mathsf{PP}. The second figure is that landscape.

Figure
The relativized landscape: for every oracle A the ceiling BQP ⊆ PP ⊆ PSPACE holds, so no oracle escapes PP, but Raz and Tal found an oracle O with a sliver of BQP outside PH, bounded by the AC⁰ indistinguishability polylog(N)ᵈ over √N
What an oracle can separate — and the ceiling it can never break PSPACE PP ← ceiling: BQP ⊆ PP ⊆ PSPACE for every oracle A PH (= AC⁰ relativized) BQP O Raz–Tal 2018: ∃O, BQP ⊄ PH the green sliver of BQP lying outside the amber PH region |E_forr[C] − E_unif[C]| ≤ polylog(N)ᵈ / √N for depth-d AC⁰ C

The core equations

An oracle separation is, at bottom, a statement about proofs. If two relativized classes differ under some oracle, any argument that would have shown them equal for all oracles is dead on arrival — that is the entire logical payload.

AA≠BA ⟹ no relativizing proof of A=B(1)\mathcal{A}^A \neq \mathcal{B}^A \ \Longrightarrow\ \text{no relativizing proof of } \mathcal{A}=\mathcal{B} \qquad (1)

where: AA — an oracle, a language answered in one step; AA,BA\mathcal{A}^A,\mathcal{B}^A — the classes with every machine granted identical black-box access to AA; "relativizing" — a proof valid for all oracles at once. It is a barrier: the separation costs you a whole family of proof techniques. The workhorse property is forrelation, a real functional of the two oracle-encoded functions that measures Fourier alignment, normalized so its magnitude never exceeds one.

forr(f,g)  =  123n/2∑x,y∈{0,1}nf(x) (−1)x⋅y g(y)(2)\mathrm{forr}(f,g) \;=\; \frac{1}{2^{3n/2}} \sum_{x,y\in\{0,1\}^n} f(x)\,(-1)^{x\cdot y}\,g(y) \qquad (2)

where: f,g:{0,1}n→{±1}f,g:\{0,1\}^n\to\{\pm1\} — the two Boolean functions packed into the oracle; (−1)x⋅y(-1)^{x\cdot y} — the (x,y)(x,y) entry of the 2n2^n-point Walsh–Hadamard transform, x⋅yx\cdot y the mod-2 inner product; 23n/22^{3n/2} — the normalization fixing ∣forr∣≤1|\mathrm{forr}|\le1. Equivalently forr=⟨f^,g⟩\mathrm{forr}=\langle\hat f,g\rangle up to scale, a single global correlation. Forrelation is a quantum quantity because the Hadamard sandwich computes it as an amplitude; measuring the all-zeros outcome returns its square.

⟨0n∣H⊗nUgH⊗nUfH⊗n∣0n⟩=forr(f,g),Pr⁡[ 0n ]=∣forr(f,g)∣2(3)\langle 0^n| H^{\otimes n} U_g H^{\otimes n} U_f H^{\otimes n}|0^n\rangle = \mathrm{forr}(f,g), \qquad \Pr[\,0^n\,]=\big|\mathrm{forr}(f,g)\big|^2 \qquad (3)

where: Uf∣x⟩=f(x)∣x⟩U_f|x\rangle=f(x)|x\rangle and Ug∣y⟩=g(y)∣y⟩U_g|y\rangle=g(y)|y\rangle are the ±1\pm1 phase oracles; H⊗nH^{\otimes n} — the nn-fold Hadamard, i.e. the Fourier transform over Z2n\mathbb{Z}_2^n. Two oracle calls sit inside one sandwich, counting as a single query in the standard convention. Derivation A tracks the amplitude layer by layer. Against that one-query upper bound stands the classical lower bound, proved by the polynomial method: no bounded-error randomized algorithm can estimate forrelation without a near-square-root number of probes.

Rε(forr)  =  Ω~ ⁣(N),N=2n(4)R_\varepsilon(\mathrm{forr}) \;=\; \tilde\Omega\!\left(\sqrt{N}\right), \qquad N = 2^n \qquad (4)

where: RεR_\varepsilon — bounded-error randomized query complexity; N=2nN=2^n — the domain size of each function; Ω~\tilde\Omega — an asymptotic lower bound suppressing polylog factors. The gap 11 versus Ω~(N)\tilde\Omega(\sqrt N) is the widest a single quantum query can ever open. That optimality is a theorem, not a coincidence: Aaronson and Ambainis showed a general simulation — any property decided by kk quantum queries falls to a randomized algorithm using a polynomial number of queries with exponent below one.

Q(F)≤k ⟹ Rε(F)=O ⁣(N 1−1/(2k))(5)Q(F)\le k \ \Longrightarrow\ R_\varepsilon(F)=O\!\big(N^{\,1-1/(2k)}\big) \qquad (5)

where: Q(F)Q(F) — bounded-error quantum query complexity of the partial property FF; Rε(F)R_\varepsilon(F) — its randomized counterpart. For k=1k=1 this reads Rε=O(N)R_\varepsilon=O(\sqrt N), which forrelation's Ω~(N)\tilde\Omega(\sqrt N) meets up to logs — so forrelation is the extremal one-query problem. To reach uniform classes, the query gap is fed through the Furst–Saxe–Sipser dictionary, which turns the polynomial hierarchy into circuit language, and then through the Raz–Tal indistinguishability bound that kills those circuits.

PH=⋃k≥0ΣkP ↔ relativized  AC0,∣ Eforr[C]−Eunif[C] ∣≤polylog(N) dN(6)\mathsf{PH}=\bigcup_{k\ge0}\Sigma_k^{\mathsf{P}}\ \xleftrightarrow{\ \text{relativized}\ }\ \mathsf{AC}^0,\qquad \big|\,\mathbb{E}_{\mathrm{forr}}[C]-\mathbb{E}_{\mathrm{unif}}[C]\,\big|\le\frac{\mathrm{polylog}(N)^{\,d}}{\sqrt N} \qquad (6)

where: ΣkP\Sigma_k^{\mathsf{P}} — the kk-th level of the hierarchy; AC0\mathsf{AC}^0 — quasipolynomial-size, constant-depth dd unbounded-fan-in circuits; CC — any such circuit, standing in for a PH\mathsf{PH} predicate; Eforr,Eunif\mathbb{E}_{\mathrm{forr}},\mathbb{E}_{\mathrm{unif}} — expectations over the planted and uniform oracle distributions. The bias decays as 1/N1/\sqrt N against the fixed poly-log the circuit can muster, so PH\mathsf{PH} is blind to a planting a quantum algorithm sees. Finally the ceiling that bounds every such result: three containments so robust they hold under all oracles at once.

BQPA⊆PPA⊆PSPACEAfor every oracle A(7)\mathsf{BQP}^A\subseteq\mathsf{PP}^A\subseteq\mathsf{PSPACE}^A\quad\text{for every oracle }A \qquad (7)

where: PP\mathsf{PP} — probabilistic polynomial time with unbounded error (majority of computation paths); PSPACE\mathsf{PSPACE} — polynomial space. Since these inclusions relativize, no oracle can push BQP\mathsf{BQP} past PP\mathsf{PP}; the Raz–Tal separation of BQP\mathsf{BQP} from PH\mathsf{PH} therefore lives in the narrow band between PH\mathsf{PH} and PP\mathsf{PP}.

Derivation AForrelation as a single quantum amplitude

The goal is to prove equation (3) from the ground up: that the five-layer circuit H⊗nUgH⊗nUfH⊗nH^{\otimes n}U_g H^{\otimes n}U_f H^{\otimes n}, run on ∣0n⟩|0^n\rangle and overlapped with ⟨0n∣\langle0^n|, returns exactly the forrelation sum, so the outcome 0n0^n has probability ∣forr(f,g)∣2|\mathrm{forr}(f,g)|^2. We track the state through each layer and watch the two phase oracles and the middle Hadamard fold a full Fourier correlation into one amplitude.

Step 1. Start in ∣0n⟩|0^n\rangle and apply the first Hadamard layer, H⊗n∣0n⟩=2−n/2∑x∣x⟩H^{\otimes n}|0^n\rangle=2^{-n/2}\sum_x|x\rangle, a uniform superposition over all N=2nN=2^n inputs. Why: only a uniform superposition gives interference access to every table entry in parallel.

Step 2. Apply the phase oracle UfU_f, sending ∣x⟩|x\rangle to f(x)∣x⟩f(x)|x\rangle, giving 2−n/2∑xf(x)∣x⟩2^{-n/2}\sum_x f(x)|x\rangle. Why: encoding ff as a ±1\pm1 phase, not an ancilla bit, lets the next transform read ff globally.

Step 3. Apply the middle Hadamard. Using H⊗n∣x⟩=2−n/2∑y(−1)x⋅y∣y⟩H^{\otimes n}|x\rangle=2^{-n/2}\sum_y(-1)^{x\cdot y}|y\rangle the state becomes 2−n∑x,yf(x)(−1)x⋅y∣y⟩2^{-n}\sum_{x,y}f(x)(-1)^{x\cdot y}|y\rangle, whose amplitude on ∣y⟩|y\rangle is the Fourier coefficient f^(y)\hat f(y). Why: a Hadamard layer is literally the Walsh–Fourier transform, so f^\hat f appears as amplitudes for free.

Step 4. Apply the second phase oracle UgU_g, giving 2−n∑x,yf(x)(−1)x⋅yg(y)∣y⟩2^{-n}\sum_{x,y}f(x)(-1)^{x\cdot y}g(y)|y\rangle; each Fourier amplitude is now weighted by g(y)g(y). Why: this builds the term-by-term product whose sum is the correlation ⟨f^,g⟩\langle\hat f,g\rangle.

Step 5. Apply the final Hadamard and project on ⟨0n∣\langle0^n|. Since ⟨0n∣H⊗n=2−n/2∑y⟨y∣\langle0^n|H^{\otimes n}=2^{-n/2}\sum_y\langle y|, the overlap gains one more 2−n/22^{-n/2} and sums over yy, yielding 2−3n/2∑x,yf(x)(−1)x⋅yg(y)=forr(f,g)2^{-3n/2}\sum_{x,y}f(x)(-1)^{x\cdot y}g(y)=\mathrm{forr}(f,g); the outcome 0n0^n has probability ∣forr(f,g)∣2|\mathrm{forr}(f,g)|^2. Why: the last layer collapses the correlation onto one amplitude, so a single-shot measurement — not tomography — detects it. *Verified: reproduces the Aaronson–Ambainis (2018) forrelation estimator; the amplitude algebra is checked numerically for n = 2 in the worked example, where a bent f gives forr = 1.*

Go deeper · Derivation B · 1 minLifting a query gap to a uniform oracle separation
Derivation BLifting a query gap to a uniform oracle separation

The goal is to convert the black-box statement "one quantum query, but NΩ(1)N^{\Omega(1)} classical queries" into a uniform one: a single fixed oracle OO relative to which BQPO\mathsf{BQP}^O contains a language no CO\mathcal{C}^O-machine decides, for any classical class C\mathcal{C} closed under poly-time reductions. The device is padding forrelation instances into successive blocks of one oracle and diagonalizing against an enumeration of C\mathcal{C}-machines — the Baker–Gill–Solovay scheme upgraded with a quantum-versus-classical query gap in place of an exhaustive-search gap.

Step 1. For each input length mm reserve a fresh block of OO holding a forrelation instance on N=2nN=2^n bits with n=poly(m)n=\mathrm{poly}(m), and define LO={1m:the length-m block is a YES (forrelated) instance}L_O=\{1^m:\text{the length-}m\text{ block is a YES (forrelated) instance}\}. Why: one hard instance per length turns a query gap into a language, the object uniform classes are defined on.

Step 2. Establish LO∈BQPOL_O\in\mathsf{BQP}^O: run the single-query forrelation circuit, repeat it poly(m)\mathrm{poly}(m) times, and amplitude-estimate whether ∣forr∣|\mathrm{forr}| is large or small with bounded error, spending only polynomially many oracle calls. Why: this pins LOL_O inside BQP\mathsf{BQP} relative to OO — one side of the separation.

Step 3. Enumerate all C\mathcal{C}-machines M1,M2,…M_1,M_2,\dots with time bound mcm^c. Each, at length mm, issues at most mc=No(1)m^c=N^{o(1)} queries — far below the Ω~(N)=NΩ(1)\tilde\Omega(\sqrt N)=N^{\Omega(1)} the lower bound demands. Why: this counting is where the query lower bound starves every classical machine of information.

Step 4. Diagonalize block by block: at stage ii pick a fresh length mim_i larger than anything touched, and fix the length-mim_i block so MiM_i's output is wrong, leaving earlier blocks intact. Since MiM_i probes only No(1)N^{o(1)} of the NN bits, exponentially many positions stay free to flip the answer. Why: block independence lets each machine be defeated once without backtracking.

Step 5. Conclude LO∉COL_O\notin\mathcal{C}^O: every C\mathcal{C}-machine errs on some length, while Step 2 keeps LO∈BQPOL_O\in\mathsf{BQP}^O, giving BQPO⊈CO\mathsf{BQP}^O\not\subseteq\mathcal{C}^O. Why: the query gap has become a permanent uniform oracle separation. *Verified: reproduces the Aaronson–Ambainis lifting and is structurally identical to the Bernstein–Vazirani RFS argument and the BGS template of Derivation C.*

Go deeper · Derivation C · 1 minBaker Gill and Solovay show relativization cuts both ways
Derivation CBaker Gill and Solovay show relativization cuts both ways

The goal is to build the two oracles at the root of the whole subject: an oracle AA with PA=NPA\mathsf{P}^A=\mathsf{NP}^A and an oracle BB with PB≠NPB\mathsf{P}^B\neq\mathsf{NP}^B, so the same question relativizes in both directions and cannot be settled by any relativizing proof. This two-sided behaviour is why BQP\mathsf{BQP}-versus-PH\mathsf{PH} has both "pro" and "contra" oracles, and it is the template every quantum oracle separation imitates.

Step 1. Collapse with a powerful oracle: let AA be any PSPACE\mathsf{PSPACE}-complete language such as TQBF\mathsf{TQBF}. Then PA⊇PSPACE⊇NPA\mathsf{P}^A\supseteq\mathsf{PSPACE}\supseteq\mathsf{NP}^A, so all three coincide, PA=NPA=PSPACEA\mathsf{P}^A=\mathsf{NP}^A=\mathsf{PSPACE}^A. Why: a PSPACE\mathsf{PSPACE} oracle floods a poly-time machine with so much power that NP\mathsf{NP}'s nondeterministic advantage evaporates.

Step 2. Separate with a sparse oracle: define LB={1n:∃ x∈{0,1}n, x∈B}L_B=\{1^n:\exists\,x\in\{0,1\}^n,\ x\in B\}, testing whether BB contains any length-nn string. Clearly LB∈NPBL_B\in\mathsf{NP}^B — guess the witness xx and query it. Why: existence-of-a-needle is the canonical nondeterministic task, easy to verify but forced to be hard to decide.

Step 3. Diagonalize against deterministic machines: enumerate poly-time oracle machines MiM_i; at stage ii pick a length nn exceeding all prior queries. On 1n1^n, MiM_i probes at most poly(n)≪2n\mathrm{poly}(n)\ll2^n strings. If MiM_i accepts, keep every length-nn string out of BB; if it rejects, plant one it never queried. Why: with 2n2^n candidates and only poly probes, an unqueried witness always exists to contradict the verdict.

Step 4. Conclude LB∈NPB∖PBL_B\in\mathsf{NP}^B\setminus\mathsf{P}^B, so PB≠NPB\mathsf{P}^B\neq\mathsf{NP}^B; with Step 1 this proves P\mathsf{P}-versus-NP\mathsf{NP} is immune to relativizing methods. Why: two oracles pointing opposite ways is the signature of a question no oracle-invariant proof can touch. *Verified: Baker–Gill–Solovay (1975), the prototype reused, with a quantum query gap, by every result in this article.*

Limiting cases

The reach of oracle separations is fenced in on all sides by relativizing inclusions; the table below marks the boundaries.

CaseResultMeaning
Maximal query gapQ(forr)=1, Rε(forr)=Ω~(N)Q(\mathrm{forr})=1,\ R_\varepsilon(\mathrm{forr})=\tilde\Omega(\sqrt N)Forrelation is the extremal one-query problem: any property needs Ω(N/Q)\Omega(\sqrt{N}/Q) classical queries when QQ quantum queries suffice, so N\sqrt N is the ceiling at Q=1Q=1.
Hard ceiling from PPBQPA⊆PPA⊆PSPACEA ∀A\mathsf{BQP}^A\subseteq\mathsf{PP}^A\subseteq\mathsf{PSPACE}^A\ \forall ANo oracle can separate BQP\mathsf{BQP} from PP\mathsf{PP} or PSPACE\mathsf{PSPACE}; those containments relativize, so quantum stays inside PP\mathsf{PP} in every oracle world.
Raz–Tal frontier∃ O: BQPO⊈PHO\exists\,O:\ \mathsf{BQP}^O\not\subseteq\mathsf{PH}^OThe strongest known relativized quantum-vs-classical separation: outside the entire polynomial hierarchy, yet still inside PPO\mathsf{PP}^O.
RFS depth limitd=Θ(log⁡n)⇒d=\Theta(\log n)\Rightarrow cost nΩ(log⁡n)n^{\Omega(\log n)}Recursion depth tuned to log⁡n\log n turns a constant per-level edge into a quasipolynomial gap — just enough to escape MA\mathsf{MA}, not more.
Non-relativizing warningIP=PSPACE, MIP∗=RE\mathsf{IP}=\mathsf{PSPACE},\ \mathsf{MIP}^*=\mathsf{RE}These are true unrelativized yet fail under suitable oracles, proving no oracle result can settle the matching real-world question.

Worked examples

1 · Forrelation of an explicit pair, computed by hand (fully worked)

Take n=2n=2, so N=4N=4 and 23n/2=82^{3n/2}=8. Encode f=(f(00),f(01),f(10),f(11))=(+1,+1,+1,−1)f=(f(00),f(01),f(10),f(11))=(+1,+1,+1,-1). First correlate it with a copy of itself, g=fg=f; then with the shifted function g′=(+1,−1,+1,+1)g'=(+1,-1,+1,+1). Find forr\mathrm{forr} and the circuit's acceptance probability in each case.

Step 1. Compute the Walsh–Fourier transform f^(y)=14∑xf(x)(−1)x⋅y\hat f(y)=\tfrac14\sum_x f(x)(-1)^{x\cdot y} over the four inputs. Working the mod-2 dot products out gives f^(00)=f^(01)=f^(10)=+12\hat f(00)=\hat f(01)=\hat f(10)=+\tfrac12 and f^(11)=−12\hat f(11)=-\tfrac12. Every coefficient has magnitude 12=2−n/2\tfrac12=2^{-n/2}, so ff is a bent function — its spectrum is perfectly flat, the ideal forrelation seed.

Step 2. Use the compact identity forr(f,g)=2−n/2∑yf^(y) g(y)\mathrm{forr}(f,g)=2^{-n/2}\sum_y\hat f(y)\,g(y) (equivalent to equation (2) after summing over xx). For g=fg=f the signs of gg match the signs of f^\hat f term by term, so ∑yf^(y)f(y)=12+12+12+(−12)(−1)=2\sum_y\hat f(y)f(y)=\tfrac12+\tfrac12+\tfrac12+(-\tfrac12)(-1)=2, and forr(f,f)=2−1⋅2=1\mathrm{forr}(f,f)=2^{-1}\cdot2=\mathbf{1}. The circuit returns to ∣0n⟩|0^n\rangle with probability ∣forr∣2=1|\mathrm{forr}|^2=\mathbf{1} — it accepts every time.

Step 3. Now the unforrelated g′=(+1,−1,+1,+1)g'=(+1,-1,+1,+1): ∑yf^(y)g′(y)=12(1)+12(−1)+12(1)+(−12)(1)=0\sum_y\hat f(y)g'(y)=\tfrac12(1)+\tfrac12(-1)+\tfrac12(1)+(-\tfrac12)(1)=0, so forr(f,g′)=0\mathrm{forr}(f,g')=\mathbf{0} and the acceptance probability is 0\mathbf{0}. The same one-query circuit that fired with certainty on the aligned pair is silent here. A single quantum query cleanly separates forr = 1 from forr = 0, and the gap over classical sampling widens to Ω~(N)\tilde\Omega(\sqrt N) as nn grows.

2 · From a query gap to a uniform separation, with numbers

Instantiate the lifting argument at n=40n=40. How many oracle probes does each side spend, and why does the diagonalization succeed?

Step 1. The block holds N=240≈1.10×1012N=2^{40}\approx1.10\times10^{12} bits. The quantum side runs the forrelation circuit and amplitude-estimates ∣forr∣|\mathrm{forr}| with O(poly(m))O(\mathrm{poly}(m)) repetitions — a few thousand single-query oracle calls. The quantum machine reads a global statistic of a trillion-bit table with roughly 10310^3–10410^4 probes.

Step 2. The classical lower bound demands Rε=Ω~(N)R_\varepsilon=\tilde\Omega(\sqrt N), and N=220≈1.05×106\sqrt N=2^{20}\approx1.05\times10^6, so any bounded-error classical algorithm needs on the order of a million probes. A poly-time C\mathcal{C}-machine makes only No(1)N^{o(1)} queries — far below 10610^6.

Step 3. Diagonalize: MiM_i touches at most No(1)≪240N^{o(1)}\ll2^{40} bits, leaving essentially all ∼1012\sim10^{12} positions unqueried, and by the lower bound those still control the answer, so we set them to flip MiM_i's verdict. Because 101210^{12} free bits dwarf the ∼104\sim10^4 inspected, a falsifying setting always exists — the separation is forced, not lucky.

3 · Recursive Fourier Sampling: why logarithmic depth

A single Bernstein–Vazirani layer recovers a hidden string ss in one quantum query (measure after H⊗nUsH⊗nH^{\otimes n}U_s H^{\otimes n}) versus Θ(n)\Theta(n) classical queries — a linear edge, too weak to escape MA\mathsf{MA}. RFS nests the problem in a depth-dd tree where a classical solver pays a multiplicative factor per level, so choosing d=log⁡2nd=\log_2 n makes the classical cost nΘ(log⁡n)n^{\Theta(\log n)} while the quantum cost stays poly(n)\mathrm{poly}(n). At n=1024n=1024, d=10d=10 and the classical cost scales like nd=102410=2100≈1.3×1030n^{d}=1024^{10}=2^{100}\approx1.3\times10^{30}: <strong>ten levels convert a linear edge into a 103010^{30}-fold gap — the first oracle evidence that BQP⊈MA\mathsf{BQP}\not\subseteq\mathsf{MA}.</strong>

Physics of the portrait

Oracle separations are the work of many hands — Baker, Gill and Solovay who invented the two-oracle method; Bernstein and Vazirani who first turned it quantum; Raz and Tal who finished the PH\mathsf{PH} story — but one figure sits at the conceptual centre of the modern chapter. Scott Aaronson defined forrelation, conjectured it was the optimal one-query separator, and posed the BQP\mathsf{BQP}-versus-PH\mathsf{PH} oracle question that Raz and Tal resolved.

Origins · 1 minScott Aaronson and how this was discovered
SA
Scott Aaronson
b. 1981 · quantum complexity theory and the BQP-vs-PH oracle question

Scott Aaronson, more than anyone, shaped how quantum and classical complexity are compared through oracles. In his 2009 work "BQP and the Polynomial Hierarchy" he introduced forrelation as a candidate problem inside BQP\mathsf{BQP} but, he conjectured, outside the relativized polynomial hierarchy, and framed the precise question — is there an oracle OO with BQPO⊈PHO\mathsf{BQP}^O\not\subseteq\mathsf{PH}^O? — open in spirit since Bernstein and Vazirani's Recursive Fourier Sampling. With Andris Ambainis he then proved (2015, journal 2018) that forrelation is optimal: one quantum query versus Ω~(N)\tilde\Omega(\sqrt N) classical is the widest gap any single-query property can achieve, capped by Q(F)≤k⇒Rε(F)=O(N1−1/(2k))Q(F)\le k\Rightarrow R_\varepsilon(F)=O(N^{1-1/(2k)}). His deeper contribution was the meta-reading: an oracle separation charts the limits of our proof techniques, never a claim about the unrelativized world — a discipline traced to Baker–Gill–Solovay and sharpened against the non-relativizing landmarks IP=PSPACE\mathsf{IP}=\mathsf{PSPACE} and MIP∗=RE\mathsf{MIP}^*=\mathsf{RE}. When Ran Raz and Avishay Tal closed the loop in 2018 with a Gaussian-forrelation oracle achieving BQPO⊈PHO\mathsf{BQP}^O\not\subseteq\mathsf{PH}^O, they were answering Aaronson's question with the very problem he had designed.

History
1975
— Baker, Gill and Solovay build oracles giving both P = NP and P ≠ NP
1993
— Bernstein and Vazirani introduce Recursive Fourier Sampling, first oracle evidence BQP ⊄ MA
2009
— Aaronson defines forrelation and asks whether an oracle separates BQP from PH
2015
— Aaronson and Ambainis prove forrelation is the optimal one-query separation
2018
— Raz and Tal construct an oracle with BQP ⊄ PH

Going further

Texts. Nielsen & Chuang, Quantum Computation and Quantum Information, 10th anniv. ed., Ch. 6 · Preskill, Lecture Notes on Quantum Computation, Ch. 6 · Watrous, The Theory of Quantum Information, chapters on query and interactive models · Wilde, Quantum Information Theory, 2nd ed. · Kitaev, Shen & Vyalyi, Classical and Quantum Computation · Arora & Barak, Computational Complexity, Ch. 3 (relativization) and Ch. 14.

Papers. Baker, Gill & Solovay, "Relativizations of the P =? NP Question", SIAM J. Comput. 4(4), 431 (1975) · Bernstein & Vazirani, "Quantum Complexity Theory", SIAM J. Comput. 26(5), 1411 (1997) · Furst, Saxe & Sipser, "Parity, Circuits, and the Polynomial-Time Hierarchy" (1984) · Aaronson, "BQP and the Polynomial Hierarchy", STOC 2010 · Aaronson & Ambainis, "Forrelation: A Problem that Optimally Separates Quantum from Classical Computing", SIAM J. Comput. 47(3), 982 (2018) · Raz & Tal, "Oracle Separation of BQP and PH", STOC 2019.

Provenance. A verifier should recompute: (1) the amplitude identity ⟨0n∣H⊗nUgH⊗nUfH⊗n∣0n⟩=forr(f,g)\langle0^n|H^{\otimes n}U_g H^{\otimes n}U_f H^{\otimes n}|0^n\rangle=\mathrm{forr}(f,g) by tracking the five-layer state (Derivation A; Aaronson–Ambainis 2018); (2) the worked n=2n=2 bent-function value forr(f,f)=1\mathrm{forr}(f,f)=1 and forr(f,g′)=0\mathrm{forr}(f,g')=0; (3) the classical lower bound Rε(forr)=Ω~(N)R_\varepsilon(\mathrm{forr})=\tilde\Omega(\sqrt N) and its optimality via Q(F)≤k⇒Rε(F)=O(N1−1/(2k))Q(F)\le k\Rightarrow R_\varepsilon(F)=O(N^{1-1/(2k)}) (Aaronson–Ambainis 2018); (4) the Raz–Tal indistinguishability bound and the PH↔AC0\mathsf{PH}\leftrightarrow\mathsf{AC}^0 correspondence (Furst–Saxe–Sipser 1984; Raz–Tal 2019); (5) the Baker–Gill–Solovay two-oracle construction (1975); (6) the relativizing ceiling BQP⊆PP⊆PSPACE\mathsf{BQP}\subseteq\mathsf{PP}\subseteq\mathsf{PSPACE} (Adleman–DeMarrais–Huang; Bernstein–Vazirani). No numerical constants beyond standard asymptotic exponents are asserted.

Prerequisites. The Complexity Class BQP · BQP versus P, NP, and PSPACE · Quantum Query Complexity · The Polynomial Method for Quantum Lower Bounds. Leads to. BQP is Contained in PP and PSPACE · QIP = PSPACE · MIP* = RE.

Ask the tutor: Ask me to walk you through the five-layer forrelation amplitude, the lifting diagonalization, or why IP=PSPACE\mathsf{IP}=\mathsf{PSPACE} is the cautionary tale that keeps every oracle separation honest.

Does an oracle separating BQP from PH mean quantum computers are provably outside the polynomial hierarchy?

No, and this is the single most important caveat. An oracle result BQPO⊈PHO\mathsf{BQP}^O\not\subseteq\mathsf{PH}^O only proves that no relativizing argument can show BQP⊆PH\mathsf{BQP}\subseteq\mathsf{PH}. In the real, oracle-free world the containment could still hold, because the truth can contradict every oracle — the theorems IP=PSPACE\mathsf{IP}=\mathsf{PSPACE} and MIP∗=RE\mathsf{MIP}^*=\mathsf{RE} are exactly such cases, true unrelativized yet false under suitable oracles. Treat the Raz–Tal separation as a barrier chart: it says which proof techniques are hopeless for the real question, not what the answer is.

What exactly is forrelation, in one sentence?

Forrelation is the amount by which one Boolean function gg resembles the Walsh–Hadamard (Fourier) transform of a second function ff, packaged as the single real number forr(f,g)=2−3n/2∑x,yf(x)(−1)x⋅yg(y)∈[−1,1]\mathrm{forr}(f,g)=2^{-3n/2}\sum_{x,y}f(x)(-1)^{x\cdot y}g(y)\in[-1,1]. It is a genuinely global statistic — every one of the 22n2^{2n} pairs (x,y)(x,y) contributes — which is why classical algorithms, forced to sample entries, struggle with it while a quantum circuit computes it as an amplitude in one shot. Near one the functions are "forrelated"; near zero they are effectively independent, and telling the cases apart is the decision problem that separates BQP\mathsf{BQP} from classical classes.

Why is the quantum-vs-classical query gap capped at square-root of N?

Because of a general simulation theorem: any partial property decidable with kk quantum queries can be decided by a randomized algorithm using O(N1−1/(2k))O(N^{1-1/(2k)}) queries (Aaronson–Ambainis). At k=1k=1 this is O(N)O(\sqrt N), so a one-query advantage can never demand more than about N\sqrt N classical queries. Forrelation meets this ceiling — its classical complexity is Ω~(N)\tilde\Omega(\sqrt N) — which makes it the optimal one-query separator. To open a wider gap you must let the quantum side use more queries; the bound loosens as kk grows, approaching a full exponential separation only as k→∞k\to\infty.

What is the difference between a query separation and a uniform oracle separation?

A query separation is a statement about a fixed-size black box: so many quantum versus so many classical queries to decide one property. A uniform oracle separation is about time-bounded classes like BQP\mathsf{BQP} and PH\mathsf{PH} relative to one infinite oracle. The bridge is the lifting argument (Derivation B): pad a hard query instance into each length-block of a single oracle and diagonalize against an enumeration of classical machines, using the query lower bound to defeat each on its own block. Skipping this step is a classic error — a query gap says nothing about BQP\mathsf{BQP} as a uniform class until the padding and diagonalization are made explicit.

Why can no oracle separate BQP from PP?

Because BQP⊆PP\mathsf{BQP}\subseteq\mathsf{PP} relativizes — it holds relative to every oracle at once. The proof (Adleman–DeMarrais–Huang) simulates a quantum computation by summing the amplitudes of computational paths, which a PP\mathsf{PP} machine can do whether or not both machines share an oracle. Since BQPA⊆PPA\mathsf{BQP}^A\subseteq\mathsf{PP}^A for all AA, no oracle world puts BQP\mathsf{BQP} outside PP\mathsf{PP}, so searching for a separating oracle is provably futile. This is why the Raz–Tal frontier stops at PH\mathsf{PH}: it is the strongest classical class oracles can still pry loose from BQP\mathsf{BQP}, sitting just under the PP\mathsf{PP} ceiling.

How does the polynomial hierarchy become circuits in these proofs?

Through the relativized Furst–Saxe–Sipser correspondence: a language in the kk-th level ΣkP\Sigma_k^{\mathsf{P}}, relativized, corresponds to a quasipolynomial-size, constant-depth AC0\mathsf{AC}^0 circuit with kk alternating layers of unbounded-fan-in AND/OR gates. This lets a circuit lower bound stand in for a complexity-class separation. Raz and Tal's core result is exactly an AC0\mathsf{AC}^0 statement — no such circuit distinguishes the forrelated oracle distribution from uniform, its bias bounded by polylog(N)d/N\mathrm{polylog}(N)^d/\sqrt N — and the correspondence upgrades that into the uniform separation BQPO⊈PHO\mathsf{BQP}^O\not\subseteq\mathsf{PH}^O.

Before this

Where this leads