Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2, p. 2 — approximations compose: errors of successive circuits add on the initialized map

Proved
CliffordTApprox.Ancilla.composition

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

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

Let C1,C2C_1, C_2C1​,C2​ be circuits of gates from {H,T,CNOT}\{H, T, \mathrm{CNOT}\}{H,T,CNOT} on three wires (data qubit, two ancillas), let U1,U2U_1, U_2U1​,U2​ be 2×22\times22×2 matrices with U1U_1U1​ unitary, and suppose

∥C1−U1∥F≤ε1,∥C2−U2∥F≤ε2,\|\mathcal C_1 - \mathcal U_1\|_F \le \varepsilon_1, \qquad \|\mathcal C_2 - \mathcal U_2\|_F \le \varepsilon_2,∥C1​−U1​∥F​≤ε1​,∥C2​−U2​∥F​≤ε2​,

where Cj:ψ↦Cj(ψ⊗∣00⟩)\mathcal C_j : \psi\mapsto C_j(\psi\otimes|00\rangle)Cj​:ψ↦Cj​(ψ⊗∣00⟩) and Uj:ψ↦(Ujψ)⊗∣00⟩\mathcal U_j:\psi\mapsto(U_j\psi)\otimes|00\rangleUj​:ψ↦(Uj​ψ)⊗∣00⟩. Let C2C1C_2C_1C2​C1​ be the circuit that runs C1C_1C1​ and then C2C_2C2​. Then

∥C2C1−U2U1∥F≤ε1+ε2.\|\mathcal{C_2C_1} - \mathcal{U_2U_1}\|_F \le \varepsilon_1 + \varepsilon_2 .∥C2​C1​−U2​U1​∥F​≤ε1​+ε2​.

This is the step behind the paper's "the ability to approximate Λ(eiφ)\Lambda(e^{i\varphi})Λ(eiφ) implies the ability to approximate any single qubit unitary": approximations of the factors of a decomposition combine, with the errors added.

Formalization Note. Circuits are lists applied head first, so running C1C_1C1​ and then C2C_2C2​ is the list concatenation c₁ ++ c₂, whose matrix is C2C1C_2C_1C2​C1​. The ancillas of C1C_1C1​ need not be returned clean: any leakage is part of ε1\varepsilon_1ε1​. Every circuit over {H,T,CNOT}\{H,T,\mathrm{CNOT}\}{H,T,CNOT} is unitary.

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

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

/-- §2, p. 2: approximations compose. If `c₁` approximates `U₁` (unitary) and `c₂` approximates `U₂`,
with errors measured on the initialized map, then running `c₁` and then `c₂` approximates `U₂ U₁`
with the errors added. -/
theorem composition (c₁ c₂ : Circuit htcxGateSet (1 + 2))
    (U₁ U₂ : Matrix (Qubits 1) (Qubits 1) ℂ) (hU₁ : U₁ ∈ Matrix.unitaryGroup (Qubits 1) ℂ)
    (ε₁ ε₂ : ℝ)
    (h₁ : frobNorm (initializedMap c₁.unitary - idealMap U₁ 2) ≤ ε₁)
    (h₂ : frobNorm (initializedMap c₂.unitary - idealMap U₂ 2) ≤ ε₂) :
    frobNorm (initializedMap (c₁ ++ c₂).unitary - idealMap (U₂ * U₁) 2) ≤ ε₁ + ε₂ := 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. 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