---
title: 'Forrelation: Quantum Query Benchmark'
url: https://www.emergentmind.com/topics/forrelation-problem
type: topic
---

# Forrelation: Quantum Query Benchmark

Forrelation is a promise problem and correlation quantity on Boolean functions over the hypercube that measures how strongly one function aligns with the Fourier, or Walsh–Hadamard, transform of another. In its original two-function form, it was introduced by Aaronson and Ambainis as a query-complexity benchmark that yields an essentially maximal separation between quantum and classical randomized query complexity; in higher-fold form, it also serves as an explicit complete problem for quantum computation in the PromiseBQP sense [1411.5729].

## 1. Definition and formal variants

Let \(f,g:\{0,1\}^n\to\{-1,1\}\), and write \(N=2^n\). The standard 2-fold Forrelation quantity is
\[
\Phi_{f,g}
=
\frac{1}{2^{3n/2}}
\sum_{x,y\in\{0,1\}^n}
f(x)(-1)^{x\cdot y}g(y)
=
\frac{1}{N^{3/2}}
\sum_{x,y\in\{0,1\}^n}
f(x)(-1)^{x\cdot y}g(y).
\]
Equivalently, if
\[
\widehat f(y)=\frac{1}{\sqrt N}\sum_{x\in\{0,1\}^n}(-1)^{x\cdot y}f(x),
\]
then
\[
\Phi_{f,g}=\frac1N\sum_{y\in\{0,1\}^n}\widehat f(y)\,g(y).
\]
Accordingly, 2-fold Forrelation is “simply the inner product between a Boolean function and Fourier transformation of another Boolean function” [1411.5729; 1612.01652].

The standard promise version asks one to distinguish
\[
|\Phi_{f,g}|\le \frac{1}{100}
\qquad\text{from}\qquad
\Phi_{f,g}\ge \frac35,
\]
promised that one of the two holds. The asymmetry is important: the YES case is large positive Forrelation, not merely large absolute value [1411.5729].

The \(k\)-fold generalization is
\[
\Phi_{f_1,\ldots,f_k}
=
\frac{1}{2^{(k+1)n/2}}
\sum_{x_1,\ldots,x_k\in\{0,1\}^n}
\left(\prod_{j=1}^{k-1}(-1)^{x_j\cdot x_{j+1}}\right)
\left(\prod_{j=1}^k f_j(x_j)\right),
\]
for Boolean functions \(f_1,\dots,f_k:\{0,1\}^n\to\{-1,1\}\). The corresponding promise problem uses the same thresholds,
\[
|\Phi_{f_1,\ldots,f_k}|\le \frac{1}{100}
\qquad\text{or}\qquad
\Phi_{f_1,\ldots,f_k}\ge \frac35,
\]
and for \(k=3\) the chained phase pattern is exactly the same, with factors \((-1)^{x\cdot y}(-1)^{y\cdot z}\) [1612.01652].

A closely related notation in later work writes
\[
forr(f,g)=2^{-n/2}\sum_x \widehat f(x)g(x),
\]
which is the same Fourier-correlation quantity in normalized Fourier form. In that convention the extremal promise becomes \(forr(f,g)=1\) versus \(forr(f,g)=-1\) [2602.07503].

## 2. Quantum query complexity and extremal separations

The importance of Forrelation in query complexity comes from the fact that its defining correlation is itself a quantum circuit amplitude. For 2-fold Forrelation,
\[
\Phi_{f,g}
=
\langle 0^n|H^{\otimes n}U_gH^{\otimes n}U_fH^{\otimes n}|0^n\rangle,
\]
where the phase oracles satisfy
\[
U_f|x\rangle=f(x)|x\rangle,\qquad U_g|x\rangle=g(x)|x\rangle.
\]
This yields a 1-query quantum algorithm for 2-fold Forrelation, while any randomized classical algorithm requires
\[
\Omega\!\left(\frac{\sqrt N}{\log N}\right)
\]
queries. Aaronson and Ambainis also proved the converse simulation theorem that any \(t\)-query quantum algorithm can be simulated by a randomized algorithm using
\[
O\!\left(N^{1-\frac{1}{2t}}\right)
\]
queries, so the 1-versus-\(\widetilde\Omega(\sqrt N)\) gap is essentially optimal for partial Boolean decision problems [1411.5729].

For the \(k\)-fold problem, the same interference pattern gives a quantum algorithm with
\[
Q(k\text{-fold Forrelation})\le \left\lceil \frac{k}{2}\right\rceil.
\]
In the explicit-input setting, where the \(f_i\) are given by circuits rather than as black-box oracles, \(k\)-fold Forrelation with \(k=\mathrm{poly}(n)\) is PromiseBQP-complete, and the original paper further emphasized that this yields “what’s arguably the simplest BQP-complete problem yet known” [1411.5729].

Forrelation also separates rounds of quantum adaptivity. For \(k=2r\), the \(2r\)-fold problem can be solved by an \(r\)-round quantum algorithm with one query per round, but any \((r-1)\)-round quantum algorithm requires \(\Omega(n^{1/r^2})\) parallel queries per round; more generally, the paper gives \(r\) versus \(r'\) round separations derived from new Fourier-growth bounds for low-round quantum query algorithms [2311.16057].

## 3. Classical algorithms, simulations, and stronger classical lower bounds

The classical side of Forrelation has two distinct strands: nearly optimal black-box algorithms, and lower bounds that remain valid in stronger classical models. For the standard additive-approximation task
\[
|\mu-\Phi(f,g)|\le \epsilon,
\]
there is a classical randomized algorithm with query complexity
\[
O(\epsilon^{-1}2^{n/2})
\]
and runtime
\[
O(n\epsilon^{-1}2^{n/2}),
\]
which is a nearly quadratic runtime improvement over the naive \(O(2^n)\)-scale estimator. The same paper also repaired a gap in the literature by proving that the acceptance probability of any \(t\)-query quantum algorithm can be approximated to additive error \(\epsilon\) with
\[
O\!\left(t\epsilon^{-1/t}2^{n(1-1/2t)}\right)
\]
classical queries, matching known lower bounds up to polynomial factors. In a structured graph-based variant, however, hardness can disappear: graph-based Forrelation can be estimated in runtime
\[
O(n4^w\epsilon^{-2})
\]
when the graph can be partitioned into two induced subgraphs of treewidth at most \(w\), which specializes to
\[
O(n\epsilon^{-2})
\]
for bipartite and planar graphs; that tractability was then used to simulate level-2 RQAOA on planar graphs up to \(225\) qubits [2102.06963].

On the lower-bound side, Forrelation remains hard even if classical algorithms are strengthened from ordinary decision trees to parity decision trees. Using new Fourier bounds for randomized parity decision trees together with a theorem of Bansal and Sinha, one obtains
\[
\mathrm{RPDT}(k\text{-fold Forrelation})
\ge
\gamma^2\cdot
\frac{n^{1-1/k}}{\operatorname{poly}(k)\log^2 n},
\]
while quantum query complexity remains
\[
\left\lceil \frac{k}{2}\right\rceil.
\]
For constant \(k\), this is the familiar
\[
\left\lceil \frac{k}{2}\right\rceil
\text{ versus }
\tilde{\Omega}(n^{1-1/k})
\]
separation, now against a strictly stronger classical query model in which nodes may query arbitrary parities of the input bits [2103.11604].

## 4. Extremal, XOR, and random-orthogonal variants

A particularly rigid version is the extremal promise
\[
forr(f,g)=1
\qquad\text{versus}\qquad
forr(f,g)=-1.
\]
In this regime the quantum algorithm becomes exact: one quantum query suffices with success probability \(1\). The structural reason is that equality in \(|forr(f,g)|\le 1\) forces \(f\) to be a bent function and \(g\) to be its rescaled Fourier transform. One paper established a classical randomized lower bound of
\[
\tilde{\Omega}(2^{n/4})
\]
for this extremal problem and analyzed it through a linear-algebraic characterization of bent functions [2508.02514]. A later paper improved the classical lower bound to
\[
\Omega(2^{0.4999n}),
\]
equivalently
\[
\Omega\!\left(2^{\frac n2(1-o(1))}\right),
\]
using a different construction based on partial spread bent functions and high-order collision arguments [2602.07503].

Beyond ordinary \(k\)-fold Forrelation, Tal introduced \(k\)-fold Rorrelation by replacing the Hadamard matrix with a random orthogonal matrix \(U\). The resulting promise problem still has a quantum algorithm using \(2^{O(k)}\) queries, but for most \(U\) any randomized algorithm requires
\[
\tilde{\Omega}\!\left(N^{2(k-1)/(3k-1)}\right)
\]
queries, yielding \(O(1)\) versus \(N^{2/3-\varepsilon}\) for constant \(k\). Tal further showed that stronger Fourier bounds for classical decision trees would imply \(O(1)\) versus \(N^{1-\varepsilon}\) separations for partial Boolean functions [1912.12561].

The XOR of many independent Forrelation copies provides another route below the usual \(1/\sqrt N\) classical-advantage barrier. For the XOR of \(k\) independent copies, any family of Boolean functions closed under restrictions and with bounded level-\(2k\) Fourier mass has advantage at most
\[
O\!\left(\frac{\alpha^k}{N^{k/2}}\right),
\]
and a later note rederived the analytic core of this result by representing the relevant Forrelation distribution as stopped Brownian motion and applying Dynkin’s formula to obtain an \((\epsilon\gamma)^kL\) bound in terms of restricted level-\(2k\) Fourier mass [2007.03631; 2109.02732].

## 5. Restricted quantum models and physical realizations

Forrelation is not confined to the full BQP model. A three-qubit liquid-state NMR experiment implemented 2-fold and 3-fold Forrelation on \(^{13}\)C-labeled diethyl-fluoromalonate, with \(^{13}\)C as ancilla and \(^{1}\)H and \(^{19}\)F as work qubits. The circuit was compiled into \(15\) ms GRAPE pulses, the ancilla observable satisfied
\[
\langle \sigma_z^1\rangle=\Phi_k,
\]
and the measured values tracked the targets \(1,0.5,0,-0.5,-1\) closely enough to distinguish the promise thresholds \(1/100\) and \(3/5\). The authors explicitly did not interpret the three-qubit NMR demonstration as a literal quantum-supremacy result; rather, they presented it as a small-scale validation that the relevant interference patterns and threshold accuracies are experimentally accessible [1612.01652].

The problem also persists in computational models weaker than BQP. In the \(\tfrac12\)BQP model, where the computation acts on one half of an EPR state and learns the random input basis string only after measurement, 2-Forrelation can be solved with \(O(1)\) quantum queries by defining
\[
R=(-1)^{w\cdot z}
\]
and using the identity
\[
\mathbb E[R]=|\Phi|^2.
\]
That inclusion lifts the Raz–Tal oracle problem to \(\tfrac12\)BQP and yields an oracle \(O\) such that \(\tfrac12\mathrm{BQP}^O\not\subseteq \mathrm{PH}^O\); the same paper conjectures that already 3-Forrelation lies beyond \(\tfrac12\)BQP [2410.08051].

A different restricted model is IQP. Recent work showed that signed 2-Forrelation is solvable by a single IQP computation with one query to the joint oracle \(O_{f,g}\), and the unsigned \(|\Phi|\) version by two IQP runs and two total queries. The construction hinges on the quadratic identity
\[
Q(x)+Q(y)+Q(x+y)=x\cdot y+|x||y|\pmod 2,
\qquad
Q(x)=\sum_{i<j}x_ix_j,
\]
which allows the inner-product phase \((-1)^{x\cdot y}\) to be synthesized inside a commuting diagonal layer. The same paper derives an oracle separation
\[
(BPP^{IQP})^O \not\subseteq PH^O
\]
and proves Fourier-growth bounds showing that any IQP algorithm solving 2-Forrelation must accept on an exponentially large set of outputs [2604.15248].

## 6. Explicit-input completeness, oracle constructions, and related offshoots

In the explicit-input setting, Forrelation becomes a vehicle for reductions and embeddings rather than only a black-box separation. One line of work restricts each \(f_i\) in explicit \(k\)-Forrelation to be either constant or of the form
\[
f_i(x)=(-1)^{C_i(x)},
\]
where \(C_i(x)\) is a product of at most three input bits, with at least one function depending on exactly three bits. Under that restriction, explicit \(k\)-Forrelation remains PromiseBQP-complete, and the same structure yields direct feature maps and quantum kernels showing that a variational quantum classifier or a QSVM with a carefully engineered Forrelation embedding can solve a PromiseBQP-complete classification task efficiently [2207.05865].

The Forrelation distribution also functions as an oracle gadget. One paper describes it as “a sort of cryptographic code” by which an oracle can make information available to BQP while keeping it hidden from classical machines. There the Raz–Tal Forrelation distribution \(\mathcal F_N\) is used to encode answers to other computations inside oracle blocks that are quantumly distinguishable from uniform but pseudorandom to \(\mathsf{PH}\) and \(\mathsf{AC}^0\). This idea underlies oracle constructions such as \(\mathsf{NP}^{\mathsf{BQP}}\not\subset\mathsf{BQP}^{\mathsf{PH}}\) and \(\mathsf{BQP}^{\mathsf{NP}}\not\subset\mathsf{PH}^{\mathsf{BQP}}\) via the composed problems \(OR\circ Forrelation\) and \(Forrelation\circ OR\) [2111.10409].

Privacy-preserving variants also preserve the underlying separation. In a covert verifiable learning model with public quantum phase queries and private classical membership queries, Forrelation can be solved with polynomially many public and private queries while maintaining either exact target-covertness against unidirectional adversaries or cheat-sensitive privacy against i.i.d. ancilla-free adversaries. The paper presents this as evidence that the exponential quantum-classical separation for Forrelation survives under covertness constraints [2510.07193].

Finally, a related but distinct operator-norm variant, spectral Forrelation, replaces Boolean sign functions by two subsets \(S,U\subseteq\{0,1\}^n\) and asks whether
\[
\|\Pi_U H^{\otimes n}\Pi_S\|_{\mathrm{op}}^2
\]
is above or below a threshold. Equivalently, the question is whether there exists a quantum state whose computational-basis measurement distribution is concentrated on \(S\) while its Fourier-basis measurement distribution is concentrated on \(U\). That matrix-norm formulation underlies a classical-oracle separation between QMA and QCMA [2511.09551].

Forrelation therefore occupies a rare position in quantum complexity theory: it is at once a concrete Fourier-analytic quantity, a nearly extremal witness of quantum query advantage, a robust source of oracle separations, a flexible template for restricted and experimental models, and a starting point for generalizations in which the same Hadamard-structured interference is recast as parity-decision-tree hardness, random-orthogonal correlation, covert learning, or operator-norm geometry.

Source: https://www.emergentmind.com/topics/forrelation-problem