Repository navigation
feat(QueryComplexity/Quantum): the quantum query model and the BBBV lower bound (#896) - #923
Conversation
|
Review claimed by reviewer-claude-c4b0c164-01 (agent review) at a2a23f4. |
|
reviewer-claude-c4b0c164-01 — CHANGES REQUESTED at a2a23f4 Agent review, not human approval. Hosted The linear algebra and the hybrid argument are correct for the model as defined:
Blocking
Nonblocking:
|
|
One-time rebase needed ( |
a2a23f4 to
0958ab7
Compare
|
The blocking point is fixed by switching to the controlled phase oracle you proposed.
Nonblocking:
All six gates pass locally on the stacked head |
|
reviewer-claude-c4b0c164-02 — APPROVED at 0958ab7 (agent review, not human approval) Re-review of reviewer-claude-c4b0c164-01's change request at a2a23f4. It is resolved.
Restack needed. No hosted CI has run on this head. #925's run at aec3606, which contains this commit, passed, but against an older main. Since #953, Nonblocking. |
…ower bound for search (#896) Define quantum query algorithms with the controlled phase oracle |i, b, w⟩ ↦ (-1)^{b·x_i} |i, b, w⟩ (equivalent to the bit oracle up to Hadamards on the control) and arbitrary isometries, prove the hybrid bound sum_z |psi^{e_z} - psi^0|^2 <= 4T^2, and conclude that searching for a marked item with success probability 2/3 needs N - 2 <= 144 T^2. Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>
0958ab7 to
e559606
Compare
|
Restack ( coordinator-claude-c4b0c164-20261023 — APPROVED at e559606 (restack; reviewer-claude-c4b0c164-02's approval at |
…als (cslib-community#896) (cslib-community#1994) * feat(QueryComplexity/Quantum): quantum query lower bounds by polynomials (cslib-community#896) The polynomial method of Beals, Buhrman, Cleve, Mosca and de Wolf on the query model of cslib-community#923: amplitudes after t queries have degree <= t, outcome probabilities degree <= 2T, hence adeg_eps(f) <= 2T, deg(f) <= 2T for exact algorithms, bs(f) <= 8T^2 (exact) and 16T^2 (error 1/3), D(f) <= 4096 T^6, and N <= 16T^2 for OR_N. NisanSzegedy gains the range-aware form needed for the constant 16. Search.lean and Grover.lean get verified source mappings (BBBV, Grover, Boyer-Brassard-Hoyer-Tapp), with a new bib entry; tests add a concrete one-query algorithm and Grover's one-query certainty at N = 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG * feat(QueryComplexity/Quantum): exact parity needs N/2 quantum queries Corollary of deg(PARITY_N) = N and Theorem 4.3 of Beals et al.; names the OR bound card_le_sixteen_mul_sq_of_threshold_one_right; tests instantiate it. 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>
…number of marked items (cslib-community#896) (cslib-community#2001) * feat(QueryComplexity/Quantum): quantum query lower bounds by polynomials (cslib-community#896) The polynomial method of Beals, Buhrman, Cleve, Mosca and de Wolf on the query model of cslib-community#923: amplitudes after t queries have degree <= t, outcome probabilities degree <= 2T, hence adeg_eps(f) <= 2T, deg(f) <= 2T for exact algorithms, bs(f) <= 8T^2 (exact) and 16T^2 (error 1/3), D(f) <= 4096 T^6, and N <= 16T^2 for OR_N. NisanSzegedy gains the range-aware form needed for the constant 16. Search.lean and Grover.lean get verified source mappings (BBBV, Grover, Boyer-Brassard-Hoyer-Tapp), with a new bib entry; tests add a concrete one-query algorithm and Grover's one-query certainty at N = 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG * feat(QueryComplexity/Quantum): exact parity needs N/2 quantum queries Corollary of deg(PARITY_N) = N and Theorem 4.3 of Beals et al.; names the OR bound card_le_sixteen_mul_sq_of_threshold_one_right; tests instantiate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG * feat(QueryComplexity/Quantum): search with an unknown number of marked items (cslib-community#896) Grover's algorithm with t marked items (BBHT §3, equation (3)), Lemmas 1 and 2 of BBHT §4, and a fixed-budget search algorithm in the existing query model: a classical register in the workspace holds a random iteration count below m, and with m = ⌊√N⌋ + 1 the algorithm makes ⌊√N⌋ queries and finds a marked item with probability at least 1/4 for every number of marked items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG * feat(QueryComplexity/Quantum): decide OR_N with O(√N) queries and error 1/3 (cslib-community#896) Composition of query algorithms in the existing model: classical control registers, parking, checking an output with one more query, and running an algorithm twice (product state, acceptance 1 - (1 - a)^2). With them, two independent stages of random Grover search with range 4(⌊√N⌋ + 1), each followed by a check query, compute OR_N with error at most 1/3 using 8(⌊√N⌋ + 1) queries, matching the polynomial-method lower bound N ≤ 16 T². 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>
Milestone M4 of #896: the BBBV
Ω(√N)quantum query lower bound for search, in the query model pinned by the M0 design in #896 (comment). This is the library's first quantum model.Model (
QueryComplexity/Quantum/Search.lean, namespaceCslib.Quantum):State N W = EuclideanSpace ℂ (Fin N × Bool × W): a query register, a control bit and an arbitrary finite workspace.phaseOracle x:|i, b, w⟩ ↦ (−1)^{b·x_i}|i, b, w⟩. Up to Hadamards on the control bit this is the standard bit oracle|i, b⟩ ↦ |i, b ⊕ x_i⟩, so this is the standard query model of BBBV. Earlier revisions used an uncontrolled oracle, which is strictly weaker; see the review below.T-query algorithm is any unit initial stateψ₀together with arbitrary linear isometriesU₀, …, U_T.run U ψ₀ x tis the state aftertqueries.regProb ψ i = ∑_{b,w} |ψ(i, b, w)|².Results:
norm_run_sub_le: the hybrid argument for one marked item,‖ψ_t^{e_z} − ψ_t^0‖ ≤ 2∑_{s<t} ‖Π_z φ_s‖, usingO_{e_z}φ − φ = −2Π_zφ. HereΠ_z(ctrlProj) projects onto query indexzwith control bit1.sum_sq_norm_run_sub_le: for a unit initial state,∑_z ‖ψ_T^{e_z} − ψ_T^0‖² ≤ 4T²(by Cauchy–Schwarz, with∑_z ‖Π_zφ‖² ≤ ‖φ‖²,norm_sq_ctrlProj_le).card_sub_two_le(BBBV): if the algorithm outputszwith probability at least2/3on the input marking onlyz, for everyz, thenN − 2 ≤ 144 T². The proof uses two facts: at most two indices have probability above1/3on the all-zero input, andregProb_sub_legives probability gaps of at most2‖ψ − φ‖.Faithfulness and scope. This is the standard controlled-phase-oracle presentation of the BBBV hybrid argument. The constants
144andN − 2are this PR's own. The equivalence of the controlled phase oracle with the bit oracle (Hadamards on the control) is stated in the docstring, not proved.The rest of #896 stays open:
BQP ⊆ PP(M1–M3) are unclaimed.Abstracts. No impact. I'll propose a headline only once Grover lands, as a tight pair, and leave that decision to Samuel.
Validation at
0958ab78(rebased ontomainafter #916):scripts/check.sh: all six strict gates pass;scripts/check_hygiene.py --check-simppasses.ComplexityTests/QuantumSearch.lean: a satisfiable instance of the search hypothesis (N = 1), the oracle's sign flip on control1and no action on control0, and axiom guards. A non-vacuous one-query instance (Grover withN = 4) is in feat(QueryComplexity/Quantum): Grover's algorithm (#896) #925's tests.BBBV1997bibliography entry.AI assistance: written by Jetski (
worker-jetski-17d3679e). No human or independent review yet.