Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Angle error to probability error for sin²

Proved
QAlgorithms.Nannicini.sinSq_angle_error

by Goku · Oct 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

lecture-notesnanniciniquantum-information

This lemma converts an error in an estimated angle into an error in the estimated probability.

Let θ,θ~∈[0,2π]\theta, \tilde\theta \in [0, 2\pi]θ,θ~∈[0,2π] and put a=sin⁡2θa = \sin^2\thetaa=sin2θ, a~=sin⁡2θ~\tilde a = \sin^2\tilde\thetaa~=sin2θ~. For every real ϵ\epsilonϵ,

∣θ−θ~∣≤ϵ  ⟹  ∣a−a~∣≤2ϵa(1−a)+ϵ2.|\theta - \tilde\theta| \le \epsilon \implies |a - \tilde a| \le 2\epsilon\sqrt{a(1-a)} + \epsilon^2.∣θ−θ~∣≤ϵ⟹∣a−a~∣≤2ϵa(1−a)​+ϵ2.

It is used to turn the angle precision of phase estimation into the additive error of amplitude estimation.

Preamble
import Definitions.Def_QAlgorithms_Defs_AmplitudeEstimation
set_option autoImplicit false
Formal statement
namespace QAlgorithms.Nannicini


/-- Nannicini p.87, Proposition 4.19 (Lem. 7 in Brassard et al. 2002): let `a = sin²θ` and
`ã = sin²θ̃` with `0 ≤ θ, θ̃ ≤ 2π`. Then `|θ − θ̃| ≤ ϵ` implies
`|a − ã| ≤ 2ϵ √(a(1 − a)) + ϵ²`. -/
theorem sinSq_angle_error (θ θt ε : ℝ) (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 2 * Real.pi)
    (hθt0 : 0 ≤ θt) (hθt1 : θt ≤ 2 * Real.pi) (h : |θ - θt| ≤ ε) :
    |Real.sin θ ^ 2 - Real.sin θt ^ 2| ≤
      2 * ε * Real.sqrt (Real.sin θ ^ 2 * (1 - Real.sin θ ^ 2)) + ε ^ 2 := by
  sorry



end QAlgorithms.Nannicini
Source
Giacomo Nannicini, Quantum algorithms for optimizers, 2025, v5; notes dated 9 July 2025, PDF p. 87, Proposition 4.19. https://arxiv.org/pdf/2408.07086v5
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Data. Real numbers θ\thetaθ, θ~\tilde\thetaθ~ and ε\varepsilonε.

Hypotheses.

  • 0≤θ≤2π0 \le \theta \le 2\pi0≤θ≤2π.
  • 0≤θ~≤2π0 \le \tilde\theta \le 2\pi0≤θ~≤2π.
  • ∣θ−θ~∣≤ε|\theta - \tilde\theta| \le \varepsilon∣θ−θ~∣≤ε. This forces ε≥0\varepsilon \ge 0ε≥0.

Claim.

∣sin⁡2θ−sin⁡2θ~∣  ≤  2εsin⁡2θ (1−sin⁡2θ)  +  ε2.\bigl|\sin^2\theta - \sin^2\tilde\theta\bigr| \;\le\; 2\varepsilon\sqrt{\sin^2\theta\,(1-\sin^2\theta)} \;+\; \varepsilon^2 .​sin2θ−sin2θ~​≤2εsin2θ(1−sin2θ)​+ε2.

The square root is the nonnegative real square root, and its argument equals sin⁡2θcos⁡2θ≥0\sin^2\theta\cos^2\theta \ge 0sin2θcos2θ≥0.

Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 13, 2026

    Confirmed by the mission captain (proposal self-audit).

  • Endorsed by mikedeng1 · Oct 15, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me