Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quantum Complexity Theory

This document collects the basic definitions of quantum complexity theory: models of quantum computation (quantum Turing machines, uniform circuit families, query model), the standard quantum complexity classes (, , , , …), gate-set considerations and Solovay–Kitaev, the standard inclusions and separations, oracle results, and the major open problems. It is intended as a reference companion to math/complexity-theory.md (classical complexity) and to misc/deutsch-jozsa.md (a worked algorithm in the query model).

For broader quantum-computing background and hands-on code see the qcfront project. For the concrete algorithm-engineering side — how classical predicates compile into the quantum oracles and circuits that the cost models below count gates and queries against — see misc/quantum-algorithms.md.

1. Why a Separate Model?

Classical complexity (math/complexity-theory.md § 1) measures resources on a Turing machine — discrete state transitions on a tape, deterministic or nondeterministic. Quantum computation requires unitary evolution on a Hilbert space, with measurement at the end producing a classical outcome distributed by the Born rule. This is not a Turing machine in the usual sense; even the "quantum Turing machine" (below) is rarely the working model in practice.

The standard cost measures are:

  • Quantum time = number of elementary unitary gates applied (or circuit depth = longest input-to-output gate path).
  • Quantum space = number of qubits used.
  • Query complexity = number of uses of an oracle unitary (an oracle for a classical function, treated as cost 1).

The relationship between these mirrors the classical case but with quantum-specific subtleties (no-cloning forbids free copying; measurement is irreversible; gate sets are finite but only approximate arbitrary unitaries).

2. Models of Quantum Computation

2.1 Quantum circuits

A quantum circuit on qubits is a sequence of gates, each a unitary acting on a constant number of qubits (typically 1 or 2). The Hilbert space is of dimension .

Inputs are encoded as basis states for ; the output is read off by measuring a designated subset of qubits in the computational basis. By the Born rule, outcome occurs with probability .

A circuit family is a sequence with acting on (a polynomial in ) qubits, deciding a language via " majority outcome of is " (with whatever error model the class allows).

2.2 Uniformity

A circuit family is uniform if a classical polynomial-time Turing machine, on input , outputs a description of . Equivalently, the gate-by-gate specification of is computable in classical time.

Without uniformity one gets non-uniform quantum complexity ( etc.); these classes are strictly larger (they contain undecidable languages, just like classical ). All standard quantum complexity classes (, , , …) require uniformity.

So the classical Turing machine is still in the picture — but as a meta-machine generating the circuit description, not as the substrate of the quantum computation itself.

2.3 Universal gate sets

The set of all unitaries on qubits, , is a continuous group of real dimension — uncountable, so it cannot be generated by any finite gate set exactly. But finite gate sets can generate dense subgroups, and dense is good enough for any approximation tolerance.

A gate set is universal if its closure under composition is dense in (or in — global phase is unobservable). Standard universal sets:

  • — Hadamard, -gate, controlled-NOT. The textbook universal set.
  • — Hadamard plus the classical 3-bit Toffoli (controlled-controlled-NOT). Universal for real-amplitude quantum computation, and universal over for .
  • — Clifford gates () alone are not universal (Gottesman–Knill: efficiently classically simulable); adding the non-Clifford gate makes the set universal.

Solovay–Kitaev theorem (1995–97): for any universal gate set closed under inverses, any single-qubit unitary can be approximated to error in operator norm by a sequence of gates from , with (or for more refined modern variants). So " gates" claims with a fixed universal gate set absorb overhead per approximated gate; for polynomial-time claims this is negligible.

This is why is robust under choice of gate set: any two universal sets simulate each other with polylogarithmic overhead.

2.4 The quantum Turing machine

A quantum Turing machine (Deutsch 1985, formalized by Bernstein–Vazirani 1993) is a Turing machine whose configurations are vectors in a Hilbert space and whose transition function is a unitary on the configuration space. It is polynomially equivalent to the uniform circuit model: .

QTMs are almost never used to describe algorithms (the moving-head-in-superposition mechanics are awkward), but they appear in the foundational definition of and in some proofs that benefit from a step-by-step time evolution.

2.5 The quantum query model

For oracle algorithms (Deutsch–Jozsa, Grover, Simon, Shor's period finding), the oracle is a unitary

implementing a classical function . Query complexity counts uses of ; the gates between queries are free. This is the quantum analogue of classical decision-tree complexity, and it gives the cleanest separations between classical and quantum (see § 4 and misc/deutsch-jozsa.md).

2.6 Measurement-based and adiabatic models

Two further models, polynomially equivalent to the circuit model (and so defining the same ):

  • Measurement-based quantum computing (one-way computer, Raussendorf–Briegel 2001): prepare a large entangled resource state (a cluster state), then perform a sequence of adaptive single-qubit measurements. The "program" is the measurement pattern.
  • Adiabatic quantum computing (Farhi et al. 2000): slowly interpolate a Hamiltonian between an easy ground state () and one encoding the answer (); the spectral gap controls the required runtime.

Both are equivalent to the circuit model up to polynomial overhead. They differ in physical realizability and in algorithm-design idioms.

2.7 Cost-measure summary

SettingModel"Time" =Used for
Classical complexity (, , …)Turing machinestepsCobham/Edmonds tractability
Quantum complexity (, , …)Uniform quantum circuit familygate countShor, Grover end-to-end
Black-box quantum algorithmsQuantum query modeloracle callsDeutsch–Jozsa, Grover, Simon
Equivalent foundational modelQuantum Turing machinesteps definition
Equivalent physical modelsMBQC / adiabaticmeasurements / annealing timehardware-aligned design

All polynomially equivalent (where the question is well-posed), so vs -style statements are model-independent. Constant factors and exact gate counts depend on the model and gate set.

3. Quantum Complexity Classes

3.1 The main definitions

ClassDefinition (uniform circuit model)
Polynomial-time uniform quantum circuits with bounded error: , . The quantum analogue of .
"Exact quantum P": polynomial-time quantum circuits that accept iff with probability exactly 1 (or 0 otherwise). Quantum analogue of . The Deutsch–Jozsa promise problem is in .
Quantum analogue of : zero-error quantum, with possible "don't know" outcome of bounded probability.
Quantum analogue of : there exists a polynomial-size quantum witness such that a poly-time quantum verifier accepts with probability on yes-instances, and rejects with probability for every witness on no-instances.
Same as but the witness is a classical polynomial-length string. Sits between and .
Non-uniform : circuit family without the uniformity requirement.
with postselection (condition on a measurement outcome of arbitrarily small probability).
Languages with a polynomial-round interactive proof with quantum prover and quantum verifier; bounded error.
restricted to rounds of interaction.
with unentangled provers; .

The vs gap in , , etc. is amplifiable to by parallel repetition and majority vote, exactly as for (Chernoff bound).

3.2 Known inclusions

Highlights worth knowing:

  • (Bernstein–Vazirani 1993). Proof: compute as a sum over paths (Feynman path integral), and the sum can be evaluated in polynomial space term by term. So a polynomial-time quantum computer is no more than polynomially-space-bounded classically.
  • (Adleman–DeMarrais–Huang 1997) and the sharper (Fortnow–Rogers 1999).
  • (Jain–Ji–Upadhyay–Watrous 2010). Quantum interaction does not exceed polynomial space — striking parity with classical .
  • (Kitaev–Watrous 2000): three rounds of quantum interaction suffice. Classically, requires polynomially many rounds.
  • (Ji–Natarajan–Vidick–Wright–Yuen 2020): multi-prover interactive proofs with entangled provers decide all r.e. languages — strictly more than classical , and an outright separation from classical complexity. This resolved Connes' embedding conjecture in the negative.

3.3 Headline open questions

  • — does quantum offer a super-polynomial speedup over randomized classical for any decision problem? (Believed false in some specific cases like factoring, but unproved.)
  • ? Almost certainly false (oracle-relative separations exist, see § 5), but no unconditional proof.
  • vs the polynomial hierarchy : known oracle separations in both directions (Aaronson 2010; Raz–Tal 2019 — oracle separation ).
  • — does a quantum witness give strictly more power than a classical one? Believed yes, but only oracle separations are known.
  • — can quantum computers solve -complete problems in polynomial time? Believed firmly no; Grover gives only quadratic speedup (), and a matching lower bound (BBBV) rules out generic better-than-quadratic speedups in the black-box setting.

4. Quantum Query Complexity

For functions given by an oracle, the quantum query complexity is the minimum number of queries to needed by any bounded-error quantum algorithm. This is the most-studied setting for proving unconditional quantum-classical separations.

4.1 Headline algorithms and bounds

ProblemQuantum queriesClassical (det.)Classical (rand. bounded-err)
Deutsch–Jozsa (constant vs. balanced) exact
Bernstein–Vazirani (, find ) exact
Simon (find hidden XOR period)
Grover (unstructured search in )
Shor period-finding (mod ) on QFT-suitable structure (best known)same
Element distinctness ( items, find a repeat) (Ambainis 2004 / Aaronson–Shi)
Forrelation (2-query promise problem) (Raz–Tal 2019)same

The forrelation problem is the cleanest known way to separate from in the oracle setting.

4.2 Lower-bound techniques

Two general methods produce unconditional quantum query lower bounds:

  • Polynomial method (Beals–Buhrman–Cleve–Mosca–de Wolf 1998): the acceptance probability of any -query quantum algorithm is a real polynomial in the oracle bits of degree . Lower bounds on the approximate polynomial degree of thus give .
  • Adversary method (Ambainis 2000, with negative-weight refinement Høyer–Lee–Špalek 2007): a semidefinite program whose value characterizes exactly (up to constants). The negative-weight version gives tight lower bounds for all Boolean functions.

These are quantum-only tools — they have no classical analogue and are what makes the query setting so much cleaner than the time-complexity setting.

4.3 Polynomial vs. exponential speedup boundary

In the query model, quantum speedup over classical bounded-error algorithms is at most polynomial for total Boolean functions (no promise):

where is randomized bounded-error query complexity. So exponential speedups require promise problems (Deutsch–Jozsa, Simon, Shor, forrelation), where the oracle is restricted to lie in a structured subset.

5. Oracle Results and Barriers

As with classical complexity (math/complexity-theory.md § 9), relativization gives evidence and barriers:

  • : (Raz–Tal 2019, via forrelation). Strong evidence that is not contained in the polynomial hierarchy.
  • : (BBBV 1997 via the Grover lower bound — unstructured search needs quantum queries, so is not in relative to a random oracle). Evidence that quantum computers can't solve in polynomial time.
  • : (trivial: use an oracle that derandomizes). So separating from unconditionally would require non-relativizing techniques.

Standard classical barriers — relativization, natural proofs, algebrization — apply to quantum-vs-classical separations as well, so an unconditional proof is currently out of reach.

6. Quantum Hamiltonian Complexity

A signature quantum-native complexity class is , and its prototypical complete problem is the Local Hamiltonian Problem — the quantum analogue of -.

-Local Hamiltonian Problem. Given a Hamiltonian on qubits where each acts non-trivially on at most qubits and , and two thresholds with , decide whether the ground-state energy of is or .

Kitaev's theorem (1999): the 5-local Hamiltonian problem is -complete. Subsequently improved to 2-local (Kempe–Kitaev–Regev 2006) and even physically realistic (1D, nearest-neighbor, fixed local dimension; Aharonov–Gottesman–Irani–Kempe 2009).

This is the "Cook–Levin theorem for quantum complexity". It says: even with quantum witnesses and verifiers, the hardest problems look like estimating ground-state energies of local quantum systems — exactly the central problem of condensed matter physics. The field of Hamiltonian complexity explores how quantum complexity classes relate to physical questions (entanglement structure of ground states, area laws, the quantum PCP conjecture).

The quantum PCP conjecture (Aharonov–Arad–Vidick) — a quantum analogue of the classical PCP theorem — is one of the major open problems of the field.

7. Specific Algorithms in the Circuit Model

This section briefly indexes the canonical quantum algorithms and their circuit-model resource costs. Pages for the individual algorithms can be added to the misc/ folder over time.

AlgorithmWhat it doesGates / queriesReference
Deutsch–Jozsaconstant vs. balanced promise1 query, gatesmisc/deutsch-jozsa.md
Bernstein–Vaziranirecover hidden with 1 query, gatesBernstein–Vazirani 1993
Simonfind hidden XOR period queries + classical post-processingSimon 1994
Shorinteger factoring, discrete log gates for -bit inputShor 1994
Groverunstructured search in queries, gatesGrover 1996
Quantum Fourier Transform on qubits gates ( with approximation)Coppersmith 1994; standard
HHL (Harrow–Hassidim–Lloyd)sample from for sparse under data-access assumptionsHHL 2009
Phase estimationestimate eigenphase of unitary queries, aux gatesKitaev 1995
Amplitude amplification / estimationgeneralizes Grover; estimate amplitudes to queriesBrassard–Høyer–Mosca–Tapp 2002

8. Pointers Onward

A non-exhaustive map of where quantum complexity theory goes from here:

  • Quantum supremacy / advantage. Random Circuit Sampling, Boson Sampling, IQP — complexity-theoretically-justified candidates for tasks no classical computer can match in polynomial time. The 2019 Google "supremacy" experiment used Random Circuit Sampling.
  • Quantum cryptography. -hardness of LWE (post-quantum lattice cryptography); -based protocols; quantum money; quantum-secure pseudorandomness.
  • Quantum proofs and the certified-randomness pipeline. Mahadev's classical verification of quantum computations (2018) — a single quantum prover can be classically verified under cryptographic assumptions.
  • Quantum communication and information complexity. Quantum communication can exponentially reduce protocol length for some tasks (Buhrman–Cleve–Wigderson).
  • Quantum error correction and fault-tolerance are not strictly "complexity theory" but underpin the practical realization of : threshold theorem, surface codes, magic-state distillation.
  • Quantum descriptive complexity, query lower-bound techniques, fine-grained quantum complexity.

For a systematic treatment see Watrous, The Theory of Quantum Information (Cambridge, 2018); Kitaev–Shen–Vyalyi, Classical and Quantum Computation (AMS, 2002); and the survey Aaronson, Quantum Computing Since Democritus (Cambridge, 2013).