Documentation

CslibFrontier.Computability.Complexity.Classes.BQP

The class BQP #

BQP is the class of problems decided with bounded error by polynomial-time uniform families of quantum circuits Bernstein, Vazirani, in the circuit formulation of Arora, Barak, Chapter 10: A ∈ BQP enc when a family F : Cslib.Quantum.UniformCircuitFamily accepts the encoding of every member of A with probability at least 2 / 3, and the encoding of every other instance with probability at most 1 / 3.

Gate set #

The circuits use the Hadamard gate and the classical reversible gates NOT, CNOT and Toffoli (Cslib.Quantum.GateCode), a fixed finite gate set whose matrix entries lie in {0, ±1, ±1/√2}. Arora and Barak instead allow any elementary operation, a unitary acting on at most three qubits, whose description a polynomial-time machine outputs. The two definitions give the same class. Toffoli and Hadamard gates are universal for quantum computation Shi, Aharonov; with the Solovay–Kitaev approximation theorem, circuits over them simulate circuits over arbitrary elementary operations with polynomial overhead and small error. This equivalence is cited, not formalized here; its exact step for the controlled phase gates, through the real encoding, is Cslib.Complexity.mem_BQP_iff_phase. A fixed finite gate set matters: Adleman, DeMarrais and Huang show that arbitrary complex amplitudes would put uncountably many languages into BQP Adleman, DeMarrais, Huang.

Acceptance is the measurement of qubit 0, after a single measurement of the whole register in the computational basis at the end; Arora and Barak note that intermediate measurements and mixed states add no power.

Main definitions #

Main results #

References #

def Cslib.Complexity.BQP {α : Type} (enc : α ↪ List Bool) :
Set (Set α)

The problems decided with bounded error by polynomial-time uniform families of quantum circuits over the Hadamard, NOT, CNOT and Toffoli gates, with respect to the encoding enc of instances: members are accepted with probability at least 2 / 3, and other instances with probability at most 1 / 3.

theorem Cslib.Complexity.mem_BQP {α : Type} {enc : α ↪ List Bool} {A : Set α} :
A ∈ BQP enc ↔ ∃ (F : Quantum.UniformCircuitFamily), ∀ (a : α), (a ∈ A → 2 / 3 ≤ F.acceptProb (enc a)) ∧ (a ∉ A → F.acceptProb (enc a) ≤ 1 / 3)
theorem Cslib.Complexity.compl_mem_BQP {α : Type} {enc : α ↪ List Bool} {A : Set α} (hA : A ∈ BQP enc) :
Aᶜ ∈ BQP enc

BQP is closed under complement: a final NOT gate on qubit 0 exchanges acceptance and rejection.