Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Dimension-independent repeated qubit test

Open
QAlgorithms.Papers.Independent.Extend50.P30.repeatedQubitTesting

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

There is an absolute C>0C>0C>0 such that for every number nnn of qubits and every ε>0\varepsilon>0ε>0, there is one binary test, fixed before the unknown input ψ\psiψ, using k=6rk=6rk=6r copies. Its effect is the tensor product of rrr independent Algorithm 1 effects. It accepts every stabilizer with probability one and accepts any normalized state with all stabilizer fidelities at most 1−ε21-\varepsilon^21−ε2 with probability at most 1/31/31/3. Zero repetitions are allowed for an empty far-state promise.

k=6r≤Cε2,preject(ψ)≥23.k=6r\leq\frac{C}{\varepsilon^2},\qquad p_{\rm reject}(\psi)\geq\frac23.k=6r≤ε2C​,preject​(ψ)≥32​.

This gives the source's dimension-independent repeated qubit test in the fixed computational-basis and phase conventions.

Formalization Note Pure states carry norm one; stabilizer averages use density matrices to discard global phases. All finite tensor indices are explicitly ordered by copy, then physical qudit.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P30
Formal statement
noncomputable section

open scoped BigOperators ComplexConjugate Matrix

namespace QAlgorithms.Papers.Independent.Extend50.P30

open QAlgorithms.Papers.Independent.Information100.P63 (tensorPower)

open QAlgorithms.Papers.Independent.Gap20.P06 (ketBra)

attribute [local instance] Classical.propDecidable

/-- PDF p.22, Corollary 3.4: a universal copy bound, with repetitions tied to the physical effect. -/
theorem repeatedQubitTesting :
    ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, ∀ epsilon : ℝ, 0 < epsilon →
      ∃ r : ℕ, ∃ A : CopyTest 2 n,
        A.copies = 6 * r ∧ HEq A.accept (repeatEffect r (qubitTest n)) ∧
        (A.copies : ℝ) ≤ C / epsilon ^ 2 ∧
        ∀ v : EuclideanSpace ℂ (ResidueRegister 2 n), ‖v‖ = 1 →
          (IsStabilizer v → A.prob v = 1) ∧
          (FarFromStabilizers v epsilon → A.prob v ≤ 1 / 3) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P30

end
Source
Schur-Weyl Duality for the Clifford Group with Applications: Property Testing, a Robust Hudson Theorem, and de Finetti Representations, arXiv:1712.08628v3, PDF p. 22, corollary-3.4
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

There exists a real constant C>0C>0C>0 such that, for every n∈Nn\in\mathbb Nn∈N and every real ϵ>0\epsilon>0ϵ>0, there are r∈Nr\in\mathbb Nr∈N and a test with k=6rk=6rk=6r copies and acceptance matrix AAA satisfying A⪰0A\succeq0A⪰0, I−A⪰0I-A\succeq0I−A⪰0, and k≤C/ϵ2k\le C/\epsilon^2k≤C/ϵ2, whose acceptance matrix, after identifying its copy count with 6r6r6r, is Tn⊗rT_n^{\otimes r}Tn⊗r​ on rrr consecutive blocks of six copies. Here, with R=(Z/2Z)nR=(\mathbb Z/2\mathbb Z)^nR=(Z/2Z)n, Z=R×RZ=R\times RZ=R×R, define Wp,q(a,b)=i−∑jval⁡(pj)val⁡(qj)(−1)∑jval⁡(pj)val⁡(aj)W_{p,q}(a,b)=i^{-\sum_j\operatorname{val}(p_j)\operatorname{val}(q_j)}(-1)^{\sum_j\operatorname{val}(p_j)\operatorname{val}(a_j)}Wp,q​(a,b)=i−∑j​val(pj​)val(qj​)(−1)∑j​val(pj​)val(aj​) if a=b+qa=b+qa=b+q, and zero otherwise; set Bz(a,b)=2−n/2Wz(a,b)B_z(a,b)=2^{-n/2}W_z(a,b)Bz​(a,b)=2−n/2Wz​(a,b), Pw(a,b)=w(a)w(b)‾P_w(a,b)=w(a)\overline{w(b)}Pw​(a,b)=w(a)w(b)​, Da=∑z∈ZPBz⊗PBz+aD_a=\sum_{z\in Z}P_{B_z}\otimes P_{B_{z+a}}Da​=∑z∈Z​PBz​​⊗PBz+a​​, and Tn=12∑a∈ZDa⊗(I+Wa⊗Wa†)T_n=\frac12\sum_{a\in Z}D_a\otimes(I+W_a\otimes W_a^\dagger)Tn​=21​∑a∈Z​Da​⊗(I+Wa​⊗Wa†​). For every unit vector v∈CRv\in\mathbb C^Rv∈CR, the test probability is pA(v)=Re⁡tr⁡(APv⊗k)p_A(v)=\operatorname{Re}\operatorname{tr}(AP_v^{\otimes k})pA​(v)=Retr(APv⊗k​). Let Sn\mathcal S_nSn​ be the rank-one unit-vector matrices among (tr⁡AG)−1AG(\operatorname{tr}A_G)^{-1}A_G(trAG​)−1AG​, where AG=∣G∣−1∑P∈GPA_G=|G|^{-1}\sum_{P\in G}PAG​=∣G∣−1∑P∈G​P, and GGG ranges over subsets of {ihWz:0≤h<4, z∈Z}\{i^hW_z:0\le h<4,\ z\in Z\}{ihWz​:0≤h<4, z∈Z} containing III, closed under multiplication and adjoints, and satisfying P=cI⇒c=1P=cI\Rightarrow c=1P=cI⇒c=1. Then

Pv∈Sn ⟹ pA(v)=1,(∀S∈Sn, Re⁡tr⁡(SPv)≤1−ϵ2) ⟹ pA(v)≤13.P_v\in\mathcal S_n\ \Longrightarrow\ p_A(v)=1, \qquad \bigl(\forall S\in\mathcal S_n,\ \operatorname{Re}\operatorname{tr}(SP_v)\le1-\epsilon^2\bigr) \ \Longrightarrow\ p_A(v)\le\frac13.Pv​∈Sn​ ⟹ pA​(v)=1,(∀S∈Sn​, Retr(SPv​)≤1−ϵ2) ⟹ pA​(v)≤31​.

Tensor-power entries are products over the copies. Neither r>0r>0r>0 nor ϵ≤1\epsilon\le1ϵ≤1 is required; r=0r=0r=0 uses an empty product on a singleton register, and a soundness hypothesis that no vector satisfies makes its implication vacuous. The constant CCC is independent of both nnn and ϵ\epsilonϵ.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 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