Quantum minimum finding (Dürr–Høyer), with explicit bit width, interruption and gate model
ProvedQAlgorithms.Nannicini.quantumMinimumFindingLet take values of bit width , i.e. for all , and let evaluate in binary. Algorithm 2 with budget starts from a uniformly random incumbent and repeatedly runs Algorithm 1 (search with an unknown number of marked items) with the marking unitary , replacing by the returned index whenever ; a call of Algorithm 1 that would exceed the budget is interrupted at the -th application of , and the algorithm then returns . Each application of counts as one application of and is charged additional gates; each round of Algorithm 1 with qubits of precision is charged further gates (Hadamards and the inverse QFT).
There are absolute constants such that for every , , every such and every the following holds. Run Algorithm 2 independently times with budget and output an -minimal one of the returned indices. Then:
- with probability at least the output is a global minimizer of ;
- on every outcome, the total number of applications of (including the evaluations used to select the output) is at most
and the number of additional gates is at most .
This is the quadratic quantum speedup for unstructured minimization, the basis of the optimization applications of Grover search.
Formalization Note The source's gate bound is stated with the suppressed polylogarithmic factors and explicit, the interruption rule for the budget is made explicit, and , are the choices of the source's proof. Algorithm 1 is the shared formalization of the earlier corollary; the outcome law is a weight on (returned index, applications of , gates).
import Definitions.Def_QAlgorithms_Defs_AmplitudeEstimation import Definitions.Def_QAlgorithms_Nannicini_Ch04c_Model set_option autoImplicit false
namespace QAlgorithms.Nannicini
open scoped ENNReal
/-- Corrected statement. Nannicini p.96, Theorem 4.31 (Quantum minimum finding; Dürr–Høyer).
Printed: for `f : {0,1}^n → ℤ` evaluated in binary by `U_f` and `δ > 0`, Alg. 2 determines the
global minimum of `f` with probability at least `1 − δ` using `O(√2^n log 1/δ)` applications of
`U_f` in total and `Õ(√2^n)` additional gates.
Changed: (1) the bit width `b` of the values of `f` (`|f(j)| < 2^b`) is a named parameter, the
constants are uniform in it, and the gate bound is `C √2^n (n + b + 1)(1 + log 1/δ)` in the cost
model of this section (`mfStepGates`, `mfRoundOverhead`): the factors `n + b + 1` and
`1 + log 1/δ` are the polylogarithmic factors that `Õ` suppresses (Def. 1.11), made explicit;
(2) a call of Alg. 1 that would exceed the budget `T` is interrupted at the `T`-th application of
`U_f` and Alg. 2 then returns its incumbent (`minFindLoop`); (3) the budget and the number of
repetitions are the proof's (p.97): `T = ⌈c √2^n⌉` for an absolute constant `c` (the proof's
`3t̄ = 9c'√2^n`, `c'` the constant of Cor. 4.30), and `k = ⌈log₃ 1/δ⌉` independent runs, the
answer being an `f`-minimal one of the `k` returned indices, which is a global minimizer iff
some returned index is (its selection costs `k` more evaluations, counted); (4) `δ < 1` and
`log 1/δ` read as `1 + log 1/δ`, since at least one evaluation is needed for every `δ < 1`.
Why: each application of `U_m` compares a `b`-bit value with `f(ℓ)` (`Θ(b)` gates) and the source
never fixes `b`, so `Õ(√2^n)` is false when `b` is not polylogarithmic in `2^n` unless `b` is
among the suppressed parameters; and without interruption a call of Alg. 1 with no marked item
(always the case once `ℓ` is the minimum) enumerates all `2^n` strings, so the printed loop
condition alone does not give the `O(√2^n log 1/δ)` total. -/
theorem quantumMinimumFinding :
∃ c : ℝ, 0 < c ∧ ∃ C : ℝ, 0 < C ∧
∀ (n b : ℕ) (f : Qubits n → ℤ), (∀ j, |f j| < 2 ^ b) →
∀ δ : ℝ, 0 < δ → δ < 1 →
ENNReal.ofReal (1 - δ) ≤
minFindRepeatProb f b ⌈c * Real.sqrt ((2 : ℝ) ^ n)⌉₊ ⌈Real.logb 3 (1 / δ)⌉₊
(fun outs => ∃ i, ∀ j, f (outs i).1 ≤ f j) ∧
∀ outs : Fin ⌈Real.logb 3 (1 / δ)⌉₊ → Qubits n × ℕ × ℕ,
(∏ i, minFindWeight f b ⌈c * Real.sqrt ((2 : ℝ) ^ n)⌉₊ (outs i)) ≠ 0 →
(((∑ i, (outs i).2.1) + ⌈Real.logb 3 (1 / δ)⌉₊ : ℕ) : ℝ) ≤
C * Real.sqrt ((2 : ℝ) ^ n) * (1 + Real.log (1 / δ)) ∧
(((∑ i, (outs i).2.2) + ⌈Real.logb 3 (1 / δ)⌉₊ * mfStepGates n b : ℕ) : ℝ) ≤
C * Real.sqrt ((2 : ℝ) ^ n) * ((n + b + 1 : ℕ) : ℝ) * (1 + Real.log (1 / δ)) := by
sorry
end QAlgorithms.Nannicini
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Undefined names. The statement uses three names that do not appear in the frozen definition layer supplied: , and . Their meaning cannot be unfolded here, so they are treated as opaque. The only information about them comes from how they are used:
- takes a function , a bit bound , a natural number , a repetition count and an event . Its value is an extended nonnegative real in . The event is a property of an -tuple of outcomes.
- An outcome is a triple with and .
- assigns a value with a zero element to a single outcome .
- is a natural number.
What the statement asserts. There exist real constants and , fixed once and independent of everything below, such that the following holds. Take any:
- natural numbers and ;
- function with for every ;
- real number with .
Abbreviate
where is the natural-number ceiling. Then two properties hold.
(1) Success probability. Let be the event that some has an outcome whose first component satisfies for all , that is, is a global minimiser of . Then
where the left side is embedded into .
(2) Cost bounds. Take every -tuple of outcomes with
Every such tuple satisfies both
and
The left sides are computed in and then read as reals.
Edge cases.
- Mixed logarithms. The repetition count uses , while the bounds use the natural logarithm .
- Range of . Since , we have , so . In particular, for every .
- . The domain has a single point, , and .
- . The hypothesis forces .
- Vacuous product condition. If the weight product is zero for every tuple, the cost bounds in (2) hold vacuously.
- Hypotheses are satisfiable. No hypothesis is impossible; for example, with meets the requirement .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.