Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 9 (corrected: ε ≤ 1): circuits over G∪SD\mathcal G\cup\mathcal S_DG∪SD​, D=BrD=B^rD=Br, compile with O(rG+rBlog⁡Blog⁡(ϵ−1Brlog⁡B))O(rG+rB\log B\log(\epsilon^{-1}Br\log B))O(rG+rBlogBlog(ϵ−1BrlogB)) gates

Proved
ConstOverheadCompile.Main.theorem_9

by mikedeng1 · Nov 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

gate-synthesisp2o-batch-stoc27ap2o-correctedp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1quantum-compilationquantum-computing

There is an absolute constant C0C_0C0​ with the following property. Let r≥2r\ge2r≥2 and b≥0b\ge0b≥0 be integers, B=2bB=2^bB=2b, D=BrD=B^rD=Br, and 0<ε≤10<\varepsilon\le10<ε≤1. Let AAA be an adaptive circuit on nnn wires over G∪SD\mathcal G\cup\mathcal S_DG∪SD​ (with G={H,T,CNOT}\mathcal G=\{H,T,\mathrm{CNOT}\}G={H,T,CNOT} and SD={R(2πj/D):0≤j<D}\mathcal S_D=\{R(2\pi j/D):0\le j<D\}SD​={R(2πj/D):0≤j<D}) that uses at most GGG gates on every branch. Then for some number aaa of ancillas there is an adaptive circuit A′A'A′ over G\mathcal GG on n+an+an+a wires such that

  1. every branch of A′A'A′ uses at most
C0(rG+rBlog⁡(B) log⁡(ε−1Brlog⁡(B)))C_0\Big(rG+rB\log(B)\,\log\big(\varepsilon^{-1}Br\log(B)\big)\Big)C0​(rG+rBlog(B)log(ε−1Brlog(B)))

gates, and 2. the data channel of A′A'A′ (ancillas initialized to ∣0⟩|0\rangle∣0⟩ and traced out) is within diamond distance ε\varepsilonε of the channel of AAA.

This is the core compilation result: Theorem 1 follows by decomposing into CNOT, HHH and rotations, rounding every angle to the grid SD\mathcal S_DSD​ with D=Θ(G/ε)D=\Theta(G/\varepsilon)D=Θ(G/ε), and choosing rrr and BBB so that the bound is O(G)O(G)O(G).

Differences from the source:

  • correction: all ϵ>0\epsilon>0ϵ>0 → 0<ε≤10<\varepsilon\le10<ε≤1; reason: the printed bound is false for large ϵ\epsilonϵ: with B=2B=2B=2, r=2r=2r=2, G=0G=0G=0, ϵ=100\epsilon=100ϵ=100 the quantity in (30) is 2⋅2ln⁡2⋅ln⁡(4ln⁡2/100)<02\cdot2\ln2\cdot\ln(4\ln2/100)<02⋅2ln2⋅ln(4ln2/100)<0, so no circuit meets it for any positive big-O constant; for ε≤1\varepsilon\le1ε≤1 the bound is nonnegative, and the paper uses ϵ<1\epsilon<1ϵ<1 throughout.
  • generalization: a circuit of GGG gates from G∪SD\mathcal G\cup\mathcal S_DG∪SD​ → an adaptive circuit (computational-basis measurements, classical feed-forward) with at most GGG gates on every branch; reason: Remark 5 (p.8) and the paragraph after Theorem 1; a measurement-free circuit is the special case, whose channel is ρ↦UρU†\rho\mapsto U\rho U^\daggerρ↦UρU†.
  • reading: "D,BD,BD,B powers of two" with (30) undefined at B=1B=1B=1 → B=2bB=2^bB=2b for every b≥0b\ge0b≥0; at B=1B=1B=1 the second term is 000 (Lean's log⁡0=0\log 0=0log0=0); reason: 1=201=2^01=20 is a power of two and S1={I}\mathcal S_1=\{I\}S1​={I}; the case is not excluded by the source.
  • encoding: O(⋅)O(\cdot)O(⋅) → one real constant C0C_0C0​ quantified before r,b,ε,n,G,Ar,b,\varepsilon,n,G,Ar,b,ε,n,G,A; natural logarithms; reason: the meaning of the bound; the base of the logarithm only changes C0C_0C0​.
  • encoding: "diamond distance" → the full-trace-norm diamond distance in universal form over all reference dimensions; reason: it is at least the half-normalized one, so the bound implies the source's under either convention.
Preamble
import Mathlib
import Definitions.Def_ConstOverheadCompile_Main_GateSets
import Definitions.Def_ConstOverheadCompile_Main_AdaptiveCircuit
Formal statement
namespace ConstOverheadCompile.Main

open QAlgorithms

/-- Theorem 9, p.10, with `ε ≤ 1` (the printed bound (30) is negative for large `ε`): there is
an absolute constant `C₀` such that for all `r ≥ 2`, `B = 2^b`, `D = B^r`, `ε ∈ (0, 1]` and every
adaptive circuit on `n` wires over `𝒢 ∪ 𝒮_D` with at most `G` gates on every branch, some
adaptive circuit over `𝒢` on `n + a` wires (ancillas in `|0⟩`, traced out) uses at most
`C₀ (rG + rB log B · log(ε⁻¹ B r log B))` gates on every branch and is within diamond distance
`ε` of it. -/
theorem theorem_9 :
    ∃ C₀ : ℝ, ∀ r b : ℕ, 2 ≤ r → ∀ ε : ℝ, 0 < ε → ε ≤ 1 →
      ∀ (n G : ℕ) (A : AdaptiveCircuit (CliffordT ∪ gridGates ((2 ^ b) ^ r)) n),
        A.maxGates ≤ G →
        ∃ (a : ℕ) (A' : AdaptiveCircuit CliffordT (n + a)),
          (A'.maxGates : ℝ) ≤ C₀ * ((r : ℝ) * G + (r : ℝ) * (2 : ℝ) ^ b * Real.log ((2 : ℝ) ^ b) *
              Real.log (ε⁻¹ * (2 : ℝ) ^ b * (r : ℝ) * Real.log ((2 : ℝ) ^ b))) ∧
          DiamondClose A'.dataChannelRef A.channelRef ε := by sorry

end ConstOverheadCompile.Main
Source
Chenyi Zhang, Xinyu Tan, Robin Kothari, David Gosset, Craig Gidney, Quantum circuit compilation with constant overhead, STOC 2027 submission #397 (October 2026), source.pdf SHA-256 b848604016de1821f5f693c59f328e0b2a9e535bca0b37bb664e6f40dbe3681f, p.10, §4, Theorem 9, Eq. (30); 𝒮_D: p.8 Eq. (18); adaptive input: p.8 Remark 5
Human review
  • Endorsed by Shuze Chen · Nov 11, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Nov 11, 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