Repository navigation
feat(abstracts): candidate abstract for BQP ⊆ PP (#896) - #1940
Conversation
…M2) Define BQP by polynomial-time uniform families of quantum circuits over the Hadamard, NOT, CNOT and Toffoli gates, accepting by measuring qubit 0, with bounded error 2/3 vs 1/3 (Samuel's 2026-10-30 decision on #896). Gate codes, their decoding to M1 placed gates and the acceptance probability live under Circuit/Quantum; the class and its closure under complement under Classes. Tests cover exact deciders, interference and a family that decides nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Amplitudes of Hadamard–Toffoli circuits are signed path counts over √2^h, so the acceptance probability of a uniform family is acceptGap/2^h. A polynomial-time path simulation makes acceptGap a GapP function, and mem_AWPP_of_polyTime_exponent gives BQP ⊆ AWPP (Fortnow–Rogers Thm 3.1); AWPP_subset_PP gives BQP ⊆ PP (Adleman–DeMarrais–Huang). Adds List.set_ofFn beside List.getD_ofFn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Restate the circuit model from scratch over amplitude functions
(Fin m → Bool) → ℂ: an explicit Hadamard formula, classical NOT/CNOT/Toffoli
gates as ψ ∘ flip, acceptance Σ_{y₀=1} |ψ y|² from the zero-padded input, and
uniform families and PP through the shared Computation foundation. The bridge
proves the formulas agree with Circuit.run ∘ Circuit.ofCodes on well-formed
codes, that the restated class is Cslib.Complexity.BQP, and derives the
headline from BQP_subset_PP. The audit allows only Encoding and Computation.
The renderer maps ℂ, ‖ and ± for pdflatex.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
It is stacked on #1924. |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine (independent, non-author agent): APPROVE at e244638. Samuel's editorial selection remains separate.
Read the complete eight-file layer over approved #1924. The Hadamard sign and normalization are correct; classical amplitudes pull back through the involutive controlled flip. The bridge proves per-gate and whole-run correspondence, zero padding and qubit-0 acceptance, then both directions of BQP equality. PP retains strict majority, one polynomial witness-length bound and a total verifier polynomial in combined input/certificate length. The two displayed foundations expose independent native time/space conventions; the 22-root audit allows no library quantum/class module. Concrete gate tests, Hadamard probability 1/2 and FirstBit membership establish nonvacuity.
The fixed finite gate-set scope and cited, unformalized textbook equivalence are explicit. ADH's published abstract supports the algebraic-amplitude containment and unrestricted-amplitude caveat; the approved parent supplies the Fortnow–Rogers proof mapping.
Inspected all six standalone pages and catalogue pp.26–30 from PDF run 41170716206, artifact 13030663421. Provenance identifies this head and synthetic merge b308d28; abstract, bridge, foundations and renderer digests match reviewed sources. All 15 headline/foundation declaration links are embedded and their linked source files match. Formulas and full statements are readable and unclipped. All 25 renderer tests, catalogue checks (23 abstracts/36 headlines) and whitespace pass.
Author reports all six local gates and guarded abstract audit. At the single CI inspection, Lean CI was running; title passed. No reviewer Lean build. Live head and review history rechecked before posting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
|
Carry-forward record ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
Integration record ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
Integration record ( |
…slib-community#1958) cslib-community#1921 restored the top-level README's "Selected results" after it had fallen five entries behind abstracts/catalogue.json, and abstracts/README.md two behind. Three open abstract candidates (cslib-community#1904, cslib-community#1940, cslib-community#1945) again add a catalogue entry and an abstracts/README.md row but no top-level README line. check_hygiene.py now checks, in its default selection, that README.md and abstracts/README.md each link every catalogue entry's abstract module, with the right relative path, and no abstract module outside the catalogue. CONTRIBUTING.md and the lean-abstract skill state the requirement. Found by auditor-claude-e6cf7b0d-15 (misformalization audit, round 15). Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Generated with Claude Code |
The README hygiene check (#1958) requires every catalogue entry in the root README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
🤖 Generated with Claude Code |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine (independent non-author agent): APPROVE at 0ecdb90af5977bf0019e7abb456c667c936be408.
Reviewed the README fix and main integration. The new line exactly matches the unchanged catalogue title/summary and links to the correct abstract. The abstract, bridge, gate tests and renderer symbol mappings, shared foundations and rendering scripts are byte-identical to the previously approved revision; its mathematical, API, audit and PDF coverage carries forward. The existing scope note is unchanged. No new rendering inspection is needed for this README-only fix.
Ran this head's check_abstract_readmes against isolated snapshots of both READMEs and the catalogue: passes. Whitespace and source-link checks pass. At the single CI inspection, Lean and PDF jobs were running; title passed. No reviewer Lean build. Agent review, not human approval.
#2099 defines `accepting` as `onesAt m [0]`; the bridge's rewrite chain unfolds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
🤖 Generated with Claude Code |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine (independent non-author agent): APPROVE at 7139252b7c6dd93b7337d1eef71b117a9be5462a.
Read the complete one-token proof delta and the actual accepting, onesAt and bridge definitions. Unfolding onesAt m [0] restores the qubit-0 event correspondence, including the zero-width case; no statement or model changes. The preceding README/integration review and earlier mathematical/PDF coverage carry forward. Abstract statements and rendering inputs remain unchanged; no new PDF inspection is needed.
Author reports the abstract library, BQP regression and hygiene checks passing. Whitespace passes. At the single CI inspection, Lean and PDF jobs were running; title passed. No reviewer Lean build. Agent review, not human approval.
worker-claude-e6cf7b0d-bqp-abstract(Claude Code, Opus), undercoordinator-claude-e6cf7b0d. Part of #896. Stacked on #1924 (which is stacked on #1916). Review the diff againstclaude/bqp-pp-896.This PR proposes a candidate curated abstract: Adleman–DeMarrais–Huang: BQP is contained in PP. Samuel decides whether to select it.
Change
BQPAbstract.leanrestates the quantum model from scratch, without allowlisting any library circuit or class module:abbrev State (m : ℕ) := (Fin m → Bool) → ℂ.t:(Hψ)(y) = 2^{-1/2} Σ_c (-1)^{c·y_t} ψ(y[t↦c]), written ashadamard.ψ ∘ flip t cs. Hereflipflips bittwhen every control is one, and it is an involution.(h, t, cs) : Bool × ℕ × List ℕwith an explicitWellFormedcondition, applied first to last withfoldl.Σ_{y₀=1} ‖ψ y‖², starting from the input padded with zeros,pad m x.widthandgatesare bothComputation.PolyTimefromnin unary, withn ≤ width n,0 < width n, and well-formed codes. The gate-code encoding is spelled out with theEncodingcombinators.BQP: acceptance at least2/3on members and at most1/3on non-members.PP: a strict majority ofp(|enc a|)-bit strings accepted by aComputation.PolyTimeVerifier, as Toda definesSharpP.BQPBridge.leanproves the correspondence with the library.ofLp_eval_toPlacedGate: a well-formed code acts on amplitudes exactly asapplyGatedoes. The proof expands each column withPlacedGate.eval_ket_apply. For basis states it usesGateCode.eval_toPlacedGate_ketandeval_toPlacedGate_hadamard_ket(feat(Classes/BQP): define BQP over Hadamard and Toffoli circuits (#896 M2) #1916). The classical case invertsflipwithflip_flip.ofLp_eval_ofCodes: runs of well-formed codes areCircuit.eval ∘ Circuit.ofCodes.acceptProb_eqshows that the explicit acceptance probability isCslib.Quantum.acceptProb.mem_BQP_iff: the restated class equalsCslib.Complexity.BQP, in both directions.PP_eqholds byrfl. The headline then follows fromCslib.Complexity.BQP_subset_PP(feat(Classes/BQP): BQP ⊆ AWPP ⊆ PP via path sums (#896 M3) #1924).This deviates from the plan in 6539118147, which suggested #1930's
Circuit.eval_ofCodes_apply. That lemma is not on this PR's base, and it covers only all-classical circuits. The bridge therefore proves the per-gate amplitude formula directly; it is the same short argument as #1930'sexists_toPlacedGate?_eval_apply.ComplexityTests/Abstracts/BQPTests.leanchecks the following:WellFormedexamples;1/2;BQP, transferred fromComplexityTests.BQP.firstBit_mem_BQP, and so it is in the publicPPby the headline.Existing notions considered: the library's
Cslib.Quantumcircuits andCslib.Complexity.BQP/PPare reused through the bridge. The abstract and bridge copies are deliberate Pattern A restatements, so that the abstract needs noComplexity.*allowlist; no new library definitions are added.The renderer gains
ℂ,‖and±in its pdflatex symbol table, with a unit test. No existing abstract used these symbols, since the all-abstracts ASCII test passed before.Trust surface (#1077 conventions)
ComplexityAbstracts.EncodingandComplexityAbstracts.Computation, as in the PRIMES candidate feat(abstracts): PRIMES is in P #1904. The audit reports 22 root declarations. NoComplexity.*module is allowed, quantum or otherwise.BQPwith 2/3 vs 1/3, andPPwith a strict majority.Computation.PolyTimeforwidthandgates, and over thePPverifier and its polynomial.acceptProb_eq,mem_BQP_iff). It names the proof chainBQP_subset_AWPP→AWPP_subset_PP.Scope note
The scope note is in the module docstring, the catalogue entry and the README row:
BQP.BQP ⊆ AWPPis proved in the library but not stated in the abstract.Source credit
BQP ⊆ PP, and unrestricted amplitudes give aBQPof uncountable cardinality.BQP ⊆ AWPP. The abstract cites no theorem numbers.Validation
All checks are on head e244638:
scripts/check.sh --quickfell back to all six gates because the README changed, and all six pass: build,mk_all --check,test,lint,lint-styleandcheckInitImports.#check_abstractis pinned through#guard_msgsand allows[Encoding, Computation].build_abstracts.py --checkreports 23 abstracts and 36 headline theorems.check_hygiene.py,check_changed_files.pyand the advisoryparallel_defs.py(no candidates).bqp-pp.pdflocally (6 pages) and inspected every page. Formulas, code boxes and the appendix (representation details, then shared foundations) are legible with no clipping. The log has no overfull boxes and one underfull line in the shared-foundations sentence. Declaration links were not checked locally; the Formal abstract PDFs artifact should be inspected for them.No outside review has happened yet. The coordinator routes review. Independent review should cover the abstract against the final Lean: quantifiers, the gate formulas (especially the Hadamard sign and
ψ ∘ flip), padding, uniformity, PP's strict majority, nonvacuity and readability.AI assistance
Written by Claude Code (Opus) as a worker subagent: Lean sources, bridge proofs, tests, the renderer table entry and this description.
🤖 Generated with Claude Code
https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG