Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.2, p. 3 — a controlled preparation of |v⟩ is within √(2/4^k + 2√2/2^k) of Λ(e^{iφ}) ⊗ |00⟩ (the page: O(1/2^{0.5k}))

Proved
CliffordTApprox.Ancilla.state_distance

by mikedeng1 · Oct 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

ancillaapproximationfrobenius-normp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-circuits

Let k∈Nk \in \mathbb Nk∈N, 0≤φ≤π/40\le\varphi\le\pi/40≤φ≤π/4, let a,b,c,da,b,c,da,b,c,d be integers with a2+b2+c2+d2=4k−⌊2kcos⁡φ⌋2−⌊2ksin⁡φ⌋2a^2+b^2+c^2+d^2 = 4^k - \lfloor 2^k\cos\varphi\rfloor^2 - \lfloor 2^k\sin\varphi\rfloor^2a2+b2+c2+d2=4k−⌊2kcosφ⌋2−⌊2ksinφ⌋2, and let ∣v⟩|v\rangle∣v⟩ be the corresponding unit vector. Let WWW be any operator on three qubits (data qubit first, then two ancillas) that is a controlled preparation of ∣v⟩|v\rangle∣v⟩:

W∣0⟩∣w⟩=∣0⟩∣w⟩ for every two-qubit ∣w⟩,W∣1⟩∣00⟩=∣1⟩∣v⟩.W|0\rangle|w\rangle = |0\rangle|w\rangle\ \text{for every two-qubit }|w\rangle, \qquad W|1\rangle|00\rangle = |1\rangle|v\rangle .W∣0⟩∣w⟩=∣0⟩∣w⟩ for every two-qubit ∣w⟩,W∣1⟩∣00⟩=∣1⟩∣v⟩.

Consider the linear maps from one qubit to three qubits

W:ψ↦W(ψ⊗∣00⟩),I:ψ↦(Λ(eiφ)ψ)⊗∣00⟩.\mathcal W : \psi \mapsto W(\psi\otimes|00\rangle), \qquad \mathcal I : \psi \mapsto (\Lambda(e^{i\varphi})\psi)\otimes|00\rangle .W:ψ↦W(ψ⊗∣00⟩),I:ψ↦(Λ(eiφ)ψ)⊗∣00⟩.

Then their Frobenius distance satisfies

∥W−I∥F≤24k+222k.\|\mathcal W - \mathcal I\|_F \le \sqrt{\frac{2}{4^k} + \frac{2\sqrt 2}{2^k}} .∥W−I∥F​≤4k2​+2k22​​​.

Since the Frobenius norm dominates the operator norm, every input α∣0⟩+β∣1⟩\alpha|0\rangle + \beta|1\rangleα∣0⟩+β∣1⟩ with ∣α∣2+∣β∣2=1|\alpha|^2+|\beta|^2 = 1∣α∣2+∣β∣2=1 is mapped to within this distance of α∣000⟩+βeiφ∣100⟩\alpha|000\rangle + \beta e^{i\varphi}|100\rangleα∣000⟩+βeiφ∣100⟩, which is the paper's estimate O(1/20.5k)O(1/2^{0.5k})O(1/20.5k).

Formalization Note. WWW need not be unitary; its data-000 branch is fixed for every ancilla input, as required of a controlled operator. The distance bound uses only its action on the two inputs with ancillas ∣00⟩|00\rangle∣00⟩. The constants are pinned from the page's display ∣β(eiφ−γ)∣2+∣β∣2∥∣g⟩∥2\sqrt{|\beta(e^{i\varphi}-\gamma)|^2 + |\beta|^2\||g\rangle\|^2}∣β(eiφ−γ)∣2+∣β∣2∥∣g⟩∥2​ with ∣γ−eiφ∣≤2/2k|\gamma - e^{i\varphi}|\le\sqrt2/2^k∣γ−eiφ∣≤2​/2k and ∥∣g⟩∥2=1−∣γ∣2≤22/2k\||g\rangle\|^2 = 1-|\gamma|^2 \le 2\sqrt2/2^k∥∣g⟩∥2=1−∣γ∣2≤22​/2k. The page prints the third term of the transformed state as β∣01⟩⊗∣g⟩\beta|01\rangle\otimes|g\rangleβ∣01⟩⊗∣g⟩; by its own definition ∣v⟩=γ∣00⟩+∣1⟩⊗∣g⟩|v\rangle = \gamma|00\rangle + |1\rangle\otimes|g\rangle∣v⟩=γ∣00⟩+∣1⟩⊗∣g⟩ it is β∣1⟩⊗∣1⟩⊗∣g⟩\beta|1\rangle\otimes|1\rangle\otimes|g\rangleβ∣1⟩⊗∣1⟩⊗∣g⟩, which is what this statement uses.

Preamble
import Mathlib
import Definitions.Def_CliffordTApprox_Ancilla_Setting
Formal statement
namespace CliffordTApprox.Ancilla

open QAlgorithms
open QAlgorithms.Papers.Independent.Renew46.P12

/-- §2.2, p. 3: if `W` acts as the controlled preparation of `|v⟩` (with `(a, b, c, d)` solving
the four-square equation and `0 ≤ φ ≤ π/4`), then the initialized map of `W` is within Frobenius
distance `√(2/4^k + 2√2/2^k)` (the page: `O(1/2^{0.5k})`) of `Λ(e^{iφ}) ⊗ |00⟩`. -/
theorem state_distance (k : ℕ) (φ : ℝ) (hφ₀ : 0 ≤ φ) (hφ₁ : φ ≤ Real.pi / 4)
    (a b c d : ℤ) (habcd : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = deficit k φ)
    (W : Matrix (Qubits (1 + 2)) (Qubits (1 + 2)) ℂ)
    (hW : PreparesControlled W (vecV k φ a b c d)) :
    frobNorm (initializedMap W - idealMap (phaseGate φ) 2) ≤
      Real.sqrt (2 / 4 ^ k + 2 * Real.sqrt 2 / 2 ^ k) := by sorry

end CliffordTApprox.Ancilla
Source
Kliuchnikov, Maslov, Mosca, Asymptotically optimal approximation of single qubit unitaries by Clifford and T circuits using a constant number of ancillary qubits, arXiv:1212.0822v2, p. 3, §2.2
Human review
  • Endorsed by Shuze Chen · Oct 22, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 22, 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