feat(Complexity): BQP / EQP / QNC complexity classes#38
Open
tannerduve wants to merge 15 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defines the standard uniform quantum complexity classes against the new QuantumInfo-based circuit model.
What's added
UniformFamilyinAlgolean/Complexity/Basic.lean— a small abstraction for families of programs(n : ℕ) → Prog Q (α n)indexed by input size, withUniform(cost-bound predicate) andSatisfiesSpec(correctness predicate). Reusable for any complexity class of this shape.Algolean/Complexity/BQP.lean—BQP,EQP, andQNC^kdefined as cross-model statements: a classicalProg (TMQuery tm)generator produces aQuantumCircuit nfor each input size, bounded inTMCost.stepsby a polynomial; the generated circuit'stoCPTPinterpretation decides the language with the class's error discipline, measured by first-qubit POVM. Includes containmentsEQP ⊆ BQPandQNC^k ⊆ BQP.