Skip to content

feat(Complexity): BQP / EQP / QNC complexity classes#38

Open
tannerduve wants to merge 15 commits into
Shreyas4991:mainfrom
tannerduve:uniform-bqp
Open

feat(Complexity): BQP / EQP / QNC complexity classes#38
tannerduve wants to merge 15 commits into
Shreyas4991:mainfrom
tannerduve:uniform-bqp

Conversation

@tannerduve

@tannerduve tannerduve commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Defines the standard uniform quantum complexity classes against the new QuantumInfo-based circuit model.

What's added

  • UniformFamily in Algolean/Complexity/Basic.lean — a small abstraction for families of programs (n : ℕ) → Prog Q (α n) indexed by input size, with Uniform (cost-bound predicate) and SatisfiesSpec (correctness predicate). Reusable for any complexity class of this shape.

  • Algolean/Complexity/BQP.leanBQP, EQP, and QNC^k defined as cross-model statements: a classical Prog (TMQuery tm) generator produces a QuantumCircuit n for each input size, bounded in TMCost.steps by a polynomial; the generated circuit's toCPTP interpretation decides the language with the class's error discipline, measured by first-qubit POVM. Includes containments EQP ⊆ BQP and QNC^k ⊆ BQP.

tannerduve and others added 15 commits March 27, 2026 13:47
Bridges QuantumQuery and QuantumCircuit into QuantumInfo's semantic types
(𝐔[d], MState, CPTPMap) via a syntactic query layer.

- QuantumQuery carries only syntactic data (gate tags, Fin n indices,
  rational phase); unitaryOf maps each constructor to its genuine
  𝐔[Fin n → Fin 2] via embedQubitGate / cnotUnitary / phaseGate.
- QuantumCircuit's toCPTP interprets the tree into CPTPMap via
  ofUnitary / compose / prod, with par threading through
  finFunSplitEquiv.
- Retires QState, IsUnitary, tensorGate, measureDistribution, every
  gateX function and gateX_isUnitary lemma, QuantumCircuit.eval.
- Projective computational-basis measurement as POVM.
- Adds Physlib dependency in lakefile; Algolean.lean becomes non-module
  because QuantumInfo is non-module.
Bumps Physlib to v4.29.1 (which modularizes QuantumInfo), transitively
pulling Mathlib and the Lean toolchain to v4.29.1 as well. With the
QuantumInfo dep now a module, Algolean.lean and the three Quantum/*
files that import it can be modules themselves, matching the rest of
the project.

- Convert Algolean.lean, Quantum/Circuit, Quantum/Embed, Quantum/Oracle
  to `module` + `public import` + `@[expose] public section`.
- Drop `private` on helper defs/lemmas referenced from exposed public
  decls (fin2_sub_sub_self, cnotAction, cnotAction_involutive in Embed;
  qubitIndicator in Oracle).
- Add PolytimeBasicClasses, RandomSample, ReadWriteVec to the
  Algolean.lean roll-up; they'd landed on the branch but were never
  imported.
- Delete Algolean/Models/QuantumCircuit.lean and QuantumOracle.lean,
  superseded by the Quantum/ subdirectory in 3a97291.
Defines the `UniformFamily` abstraction in `Complexity/Basic.lean` and
uses it to state `BQP`, `EQP`, `QNC^k` in `Complexity/BQP.lean`.

- `UniformFamily Q α`: family of `Prog Q (α n)` indexed by input size.
- `Uniform` / `SatisfiesSpec` predicates capture cost and correctness.
- `BQP` is defined against `SingleTapeTM` as the classical generator
  model: classical `Prog (TMQuery tm)` generates quantum circuits
  whose `toCPTP` decides `L` with bounded error on first-qubit
  measurement. Both layers measured by `Prog.time`.
- Containments: `EQP ⊆ BQP`, `QNC^k ⊆ BQP`.

Showcases the `Prog` framework across classical and quantum models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant