QSearch: amplitude amplification with unknown amplitude, the expected cost (BHMT Theorem 3) #
Category: 1-Mathlib (CSD-free).
BHMT's QSearch runs amplitude amplification in stages l = 0, 1, 2, … with the guesses
M_l = ⌈(6/5)^l⌉: at each stage it measures a fresh copy of ψ directly, and failing that
draws a round count j uniformly below M_l, amplifies a fresh copy j rounds and measures.
Their Theorem 3: the expected number of applications of A and A⁻¹ before a good element
is found is O(1/√a), with a = goodProb G ψ the unknown success probability.
- The stage law.
stageProbAt G ψ j = a + (1 − a) · goodProb (Q^j ψ)is the success probability of a stage at round countj(the direct measurement, then the amplified one on a fresh copy);stageProb G ψ Maverages it overj < M. OnceM · sin 2θ ≥ 1the average is at least1/4(quarter_le_stageProb, from the engineqsearch_average), and it is always at leasta(le_stageProb). - The run as a random process (
QSearchRun): on a probability space, stageldraws its round countJ land records its successW l; the stages are independent (iIndepFun),J lis uniform belowM_l, and givenJ l = jthe stage succeeds with the Born probabilitystageProbAt G ψ j. The applications charged to a reached stage are2 + 2 J l— the direct run, the fresh preparation, and two per round — andcostsums them over the reached stages. - The bookkeeping. Stage
lis reached with probability∏_{k<l} (1 − p_k)(meas_reach, from independence), a reached stage costsM_l + 1in expectation (lintegral_stageCost, independence of the fresh draw from the past), so the expected cost is∑_l (M_l + 1) ∏_{k<l} (1 − p_k)(lintegral_cost). Past the critical stage everyp_k ≥ 1/4, so the reach probabilities decay like(3/4)^{l − l₀}(meas_reach_le), and the series is bounded by the explicit geometric weightsqsearchWeight(qsearch_partial_sum_le:45 · (6/5)^{l₀}). - ★★ BHMT Theorem 3 (
qsearch_expected_cost): for0 < a < 1, the expected cost of a run is at most54/√a. Belowa ≤ 3/4the critical stage is the first with(6/5)^{l₀} > 1/sin 2θ, so(6/5)^{l₀} ≤ (6/5)/sin 2θandsin 2θ ≥ √a; above it every stage already succeeds with probability≥ a > 3/4.
Honest scope #
The theorem is the upper bound of BHMT's Θ(1/√a); the matching lower bound is the optimality
of Grover search (Bennett–Bernstein–Brassard–Vazirani), not treated here. The cost charged to a
stage, 2 + 2j, is an upper bound on the applications actually used when the direct
measurement already succeeds. The process model is an abstract probability space carrying the
stage variables with the stated laws — the standard reading of "independent stages with fresh
randomness"; its consistency is witnessed by exists_qsearchRun on the infinite product of
the stage laws. Query counting is by applications of the abstract step, as in
AmplitudeAmplification.lean; no gate decomposition is claimed. The constant 54 is not
optimised (BHMT's own accounting gives a smaller one).
Source #
Brassard, Høyer, Mosca, Tapp 2002, Quantum amplitude amplification and estimation, Contemp.
Math. 305, Theorem 3 and the algorithm QSearch (§2, with c = 6/5), Lemma 2 (the engine,
qsearch_average).
The schedule #
The stage-l guess M_l = ⌈(6/5)^l⌉.
Equations
Instances For
The stage success probability #
The success probability of one stage at round count j: the direct measurement of ψ
succeeds with probability a = goodProb G ψ; failing that, a fresh copy is amplified j
rounds and measured.
Equations
- QuantumInfo.stageProbAt G ψ j = QuantumInfo.goodProb G ψ + (1 - QuantumInfo.goodProb G ψ) * QuantumInfo.goodProb G ((QuantumInfo.ampStep ψ G)^[j] ψ)
Instances For
The success probability of a stage with guess M: the round count is uniform below M.
Equations
- QuantumInfo.stageProb G ψ M = (↑M)⁻¹ * ∑ j ∈ Finset.range M, QuantumInfo.stageProbAt G ψ j
Instances For
The direct measurement alone: a stage succeeds with probability at least a.
The amplified measurement alone: a stage succeeds at least as often as Q^j ψ does.
A stage succeeds with probability at least a.
★ The engine, in stage form (BHMT Lemma 2): once M · sin 2θ ≥ 1, a stage succeeds
with probability at least 1/4.
The run as a random process #
A run of QSearch as a random process. On a probability space (Ω, μ), stage l draws
its round count J l and records its success W l. The stages are independent, J l is
uniform below the guess M l, and given J l = j the stage succeeds with the Born probability
stageProbAt G ψ j (the direct measurement, then the amplified one on a fresh copy).
The round count drawn at stage
l.Whether stage
lfound a good element.- measurable_J (l : ℕ) : Measurable (self.J l)
The round counts are measurable.
- measurable_W (l : ℕ) : Measurable (self.W l)
The outcomes are measurable.
The stages use fresh randomness.
The round count is uniform below the guess.
- law (l j : ℕ) : μ (self.J l ⁻¹' {j} ∩ self.W l ⁻¹' {true}) = μ (self.J l ⁻¹' {j}) * ENNReal.ofReal (stageProbAt G ψ j)
Given the round count, the stage succeeds with the Born probability.
Instances For
Stage l is reached: every earlier stage failed.
Instances For
The failure event of stage k, seen through stage k's own variables.
The round-count event of stage k, seen through stage k's own variables.
Reaching stage l: every earlier stage fails, independently.
The round count of stage l is independent of reaching stage l.
The cost #
The applications of A and A⁻¹ charged to stage l if it is reached: one for the direct
run, one for the fresh preparation and two per amplification round.
Instances For
The total cost of the run: the charges of every reached stage.
Instances For
The expected cost is the sum of the expected stage costs.
∑_{j<M} (2 + 2j) = M (M + 1).
A reached stage costs M_l + 1 in expectation: the fresh draw is independent of the
past, and a uniform round count below M has mean (M − 1)/2.
The stage law, averaged: stage l succeeds with probability stageProb G ψ (M l).
Past the critical stage #
Once every stage from l₀ on succeeds with probability at least 1/4, the probability of
reaching stage l is at most (3/4)^{l − l₀}.
The series #
The schedule series, bounded: every partial sum of (M_l + 1)(3/4)^{l − l₀} is at most
45 · (6/5)^{l₀}. Before the critical stage the terms are ≤ 3 c^l = 3 c^{l₀} (5/6)^{l₀−l},
after it ≤ 3 c^{l₀} (9/10)^{l−l₀}.
The expected cost #
The expected cost past a critical stage: if every stage from l₀ on succeeds with
probability at least 1/4, the expected cost is at most 45 · (6/5)^{l₀}.
★★ BHMT Theorem 3, the upper bound. For a unit state with unknown success probability
0 < a < 1, a run of QSearch uses at most 54/√a applications of A and A⁻¹ in
expectation. Below a ≤ 3/4 the critical stage l₀ is the first with (6/5)^{l₀} > 1/sin 2θ,
past which every stage succeeds with probability ≥ 1/4; above it the direct measurement
already succeeds with probability > 3/4 at every stage.
The model is consistent: a run on the product of the stage laws #
The law of one stage with guess M and conditional success probabilities q: the round
count j uniform below M, then success with probability q j.
Equations
- One or more equations did not get rendered due to their size.
Instances For
★ The model is consistent. For every unit state with 0 < a < 1 and every schedule of
positive guesses, the product of the stage laws over the stages carries a QSearchRun: the
coordinates are independent (iIndepFun_infinitePi) and each has the stage law.