Lemma 2 (rotation lemma) — r from (45)–(47) is odd, 1 ≤ r ≤ 5/(γθ), and one update fails to keep θmin ≤ θ ≤ θmax with probability < δ
ProvedQApproxCount.Counting.lemma_2groverhoeffdingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1rotation-lemma
Let with for some , let , and let . Let be computed from alone by eqs. (45)–(47). Then:
- is an odd integer with ;
- toss a coin with bias times and let be the number of heads. If , set ; otherwise set . The probability that the new bracket fails to contain is less than ;
- the same holds when the test is instead of .
That is,
Each round of step 2 of the algorithm is one application of this lemma: it shrinks the ratio from to at a cost of queries.
Formalization Note The lemma's "" is pinned to the explicit bound . The paper's proof gives . The hypotheses (eq. (46) divides by ) and (otherwise ) are implicit in the paper. The lemma's threshold is "more than 12%"; step 2(c) of the algorithm uses "at least 12%". Item 3 reconciles the two, so the lemma applies to the algorithm as printed. is the algorithm's rotR, a function of only.
Preamble
import Mathlib import Definitions.Def_QApproxCount_Counting_Algorithm
Formal statement
namespace QApproxCount.Counting
/-- Lemma 2 (rotation lemma), p. 8. Let `0 < θmin ≤ θ ≤ θmax ≤ 0.002` with
`θmax = (1 + γ) θmin`, `0 < γ ≤ 0.7`, let `0 < δ < 1`, and let `m ≥ 250 ln(δ⁻¹)` be the number of
tosses. The `r` computed from `θmin, θmax` alone by (45)–(47) (`rotR`) is an odd integer with
`1 ≤ r ≤ 5/(γθ)`, and, for the number of heads `h` in `m` tosses of a coin with bias `sin²(rθ)`,
the update "if the heads are more than 12% (resp. at least 12%, as in step 2(c)) set
`θmin := θmax/(1 + 0.9γ)`, otherwise set `θmax := (1 + 0.9γ) θmin`" leaves `θ` outside the new
bracket with probability less than `δ`, for both thresholds. -/
theorem lemma_2 (θmin θmax θ γ δ : ℝ) (hθmin : 0 < θmin) (hlo : θmin ≤ θ) (hhi : θ ≤ θmax)
(hθmax : θmax ≤ 0.002) (hmax : θmax = (1 + γ) * θmin) (hγ : 0 < γ) (hγ1 : γ ≤ 0.7)
(hδ : 0 < δ) (hδ1 : δ < 1) (m : ℕ) (hm : 250 * Real.log δ⁻¹ ≤ (m : ℝ)) :
Odd (rotR θmin θmax) ∧ 1 ≤ rotR θmin θmax ∧ (rotR θmin θmax : ℝ) ≤ 5 / (γ * θ) ∧
(coin (Real.sin ((rotR θmin θmax : ℝ) * θ) ^ 2) m).toOuterMeasure
{h : ℕ | ¬ (if 0.12 * (m : ℝ) < (h : ℝ) then
θmax / (1 + 0.9 * γ) ≤ θ ∧ θ ≤ θmax
else θmin ≤ θ ∧ θ ≤ (1 + 0.9 * γ) * θmin)} < ENNReal.ofReal δ ∧
(coin (Real.sin ((rotR θmin θmax : ℝ) * θ) ^ 2) m).toOuterMeasure
{h : ℕ | ¬ (if 0.12 * (m : ℝ) ≤ (h : ℝ) then
θmax / (1 + 0.9 * γ) ≤ θ ∧ θ ≤ θmax
else θmin ≤ θ ∧ θ ≤ (1 + 0.9 * γ) * θmin)} < ENNReal.ofReal δ := by sorry
end QApproxCount.Counting
Source
Aaronson & Rall, Quantum Approximate Counting, Simplified, arXiv:1908.10846v6, p. 8, Lemma 2 (proof pp. 9–10); threshold of step 2(c), p. 4
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.