Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Appendix C2: basis averages and maximal symmetry term

Open
QAlgorithms.Papers.Independent.Extend50.P09.u1_basis_twirl_and_expansion

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

prove2quantum

Let n,k,t,αn,k,t,\alphan,k,t,α be integers with 0≤k,t≤n0\le k,t\le n0≤k,t≤n and 0≤α≤n−k0\le\alpha\le n-k0≤α≤n−k. Append a fixed unit vector of charge α\alphaα to kkk logical qubits and conjugate by a Haar-random unitary in the full commutant of the nnn-qubit Hamming-weight operator. Erase a fixed known set of ttt sites. Let ϵChoi\epsilon_{\rm Choi}ϵChoi​ and ϵworst\epsilon_{\rm worst}ϵworst​ denote the optimal CPTP recovery errors, using root fidelity FFF and purified distance P=1−F2P=\sqrt{1-F^2}P=1−F2​, respectively on the normalized maximally entangled input and on all reference-entangled inputs with one common decoder.

All logarithms are base two. Asymptotic inequalities are eventual bounds with positive constants chosen before the sizes, ancillary vectors, and erased sets over which they are uniform. For fixed 0<a<10<a<10<a<1, α=an\alpha=anα=an is imposed only along an admissible unbounded integer-size subsequence, with positive k,tk,tk,t; the threshold may depend on its little-o convergence rate.

For all distinct computational words x,yx,yx,y, and with q=∣x∣+αq=|x|+\alphaq=∣x∣+α,

EUEU(∣x⟩⟨y∣)=0,EUEU(∣x⟩⟨x∣)=Πq(n)/(nq).\mathbb E_U\mathcal E_U(|x\rangle\langle y|)=0,\qquad \mathbb E_U\mathcal E_U(|x\rangle\langle x|)=\Pi_q^{(n)}/\binom nq.EU​EU​(∣x⟩⟨y∣)=0,EU​EU​(∣x⟩⟨x∣)=Πq(n)​/(qn​).

Let ρavgx,x\rho_{\rm avg}^{x,x}ρavgx,x​ be its ttt-site marginal and ζ0\zeta_0ζ0​ the uniform average of these marginals. In the interior linear-charge regime kt2=o(n)kt^2=o(n)kt2=o(n),

max⁡xP(ρavgx,x,ζ0)=kt4na(1−a)(1+O(kt2/n)).\max_xP(\rho_{\rm avg}^{x,x},\zeta_0)=\frac{k\sqrt t}{4n\sqrt{a(1-a)}}\left(1+O(kt^2/n)\right).xmax​P(ρavgx,x​,ζ0​)=4na(1−a)​kt​​(1+O(kt2/n)).

The twirl is exact without asymptotic restrictions. The displayed expansion restores the missing O in printed (C23), as supported by (C14) and Theorem 3.

The exact environmental average and its fidelity are also retained: with q=∣x∣+αq=|x|+\alphaq=∣x∣+α,

ρavgx,x=∑i=0th(q,i)Πi(t),F(ρavgx,x,ζ0)=∑i=0t(ti)βih(q,i),\rho_{\rm avg}^{x,x}=\sum_{i=0}^t h(q,i)\Pi_i^{(t)},\qquad F(\rho_{\rm avg}^{x,x},\zeta_0)=\sum_{i=0}^t\binom ti\sqrt{\beta_i h(q,i)},ρavgx,x​=i=0∑t​h(q,i)Πi(t)​,F(ρavgx,x​,ζ0​)=i=0∑t​(it​)βi​h(q,i)​,

where h(q,i)=(n−tq−i)/(nq)h(q,i)=\binom{n-t}{q-i}/\binom nqh(q,i)=(q−in−t​)/(qn​) with signed invalid binomial indices zero, and βi\beta_iβi​ is the uniform logical-basis marginal coefficient defined above.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P09
Formal statement
noncomputable section

open scoped Matrix Matrix.Norms.Elementwise ComplexConjugate ENNReal ComplexOrder

open MeasureTheory Filter

namespace QAlgorithms.Papers.Independent.Extend50.P09

attribute [local instance] Classical.propDecidable Classical.decEq

-- Exact generic definitions from the pinned accepted library.

open QAlgorithms.Papers.Independent.Information100.P22 (Op mixed bell)

open QAlgorithms.Papers.Independent.Information100.P67 (conditionalMinEntropy)

open QAlgorithms.Papers.Independent.Advance50.P02 (negLog)

attribute [local instance] QAlgorithms.Papers.Independent.Extend50.P09.covariantMatrixMeasurable

attribute [local instance] QAlgorithms.Papers.Independent.Extend50.P09.covariantMatrixBorel

/-- Appendix C2, PDF p.21, (C19)–(C23): exact basis twirl and maximal
symmetry distance. The missing O in printed (C23) is restored using (C14)
and Theorem 3; no exact finite-n equality is asserted for that expansion. -/
theorem u1_basis_twirl_and_expansion :
    (∀ n k alpha : ℕ, ∀ hk : k ≤ n, alpha ≤ n-k →
      ∀ psi : EuclideanSpace ℂ (CovariantWord 2 (n-k)), ChargeState alpha psi →
      ∀ mu : Measure (Op (CovariantWord 2 n)), IsCommutantHaarLaw (U1Group n) mu →
      ∀ x y : CovariantWord 2 k,
      (∫ U, appendUnitaryEncoder hk (pureDensity psi) U (Matrix.single x y 1) ∂mu) =
        if x = y then (n.choose (chargeHammingWeight x+alpha) : ℂ)⁻¹ • u1SectorProjector n (chargeHammingWeight x+alpha) else 0) ∧
    (∀ n k t alpha : ℕ, ∀ hk : k ≤ n, ∀ ht : t ≤ n, alpha ≤ n-k →
      ∀ psi : EuclideanSpace ℂ (CovariantWord 2 (n-k)), ChargeState alpha psi →
      ∀ mu : Measure (Op (CovariantWord 2 n)), IsCommutantHaarLaw (U1Group n) mu →
      ∀ x : CovariantWord 2 k,
      firstTrace ht (∫ U, appendUnitaryEncoder hk (pureDensity psi) U (pureDensity (ket x)) ∂mu) =
        avgBasis n t (chargeHammingWeight x+alpha) ∧
      rootFidelity (avgBasis n t (chargeHammingWeight x+alpha)) (choiMarginalState n k t alpha) =
        ∑ i ∈ Finset.range (t+1), (t.choose i : ℝ) *
          Real.sqrt (choiMarginalCoefficient n k t alpha i *
            hyper n t (chargeHammingWeight x+alpha) i)) ∧
    (∀ a : ℝ, 0 < a → a < 1 → ∃ C : ℝ, 0 < C ∧
      ∀ N k t alpha : ℕ → ℕ, Tendsto N atTop atTop →
      Tendsto (fun i => u1Ratio true (N i) (k i) (t i)) atTop (nhds 0) →
      (∀ i, 0 < N i ∧ 0 < k i ∧ k i ≤ N i ∧ 0 < t i ∧ t i ≤ N i ∧
        alpha i ≤ N i-k i ∧ (alpha i : ℝ) = a*N i) →
      ∃ i0 : ℕ, ∀ i ≥ i0,
      |basisDistance (N i) (k i) (t i) (alpha i) /
        u1Leading true a (N i) (k i) (t i)-1| ≤
          C*u1Ratio true (N i) (k i) (t i)) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P09

end
Source
Near-optimal covariant quantum error-correcting codes from random unitaries with symmetries, arXiv:2112.01498v2, PDF p. 21, Appendix C2: basis averages and maximal symmetry term
Read-back

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

Let Wm={0,1}mW_m=\{0,1\}^mWm​={0,1}m, let ∣x∣|x|∣x∣ be the sum of the bits of xxx, and write a≤h,a>ha_{\le h},a_{>h}a≤h​,a>h​ for the first hhh and last n−hn-hn−h coordinates of a∈Wna\in W_na∈Wn​. The following three assertions hold. First, for every n,k,α∈Nn,k,\alpha\in\mathbb Nn,k,α∈N, k≤nk\le nk≤n, α≤n−k\alpha\le n-kα≤n−k, every norm-one ψ∈CWn−k\psi\in\mathbb C^{W_{n-k}}ψ∈CWn−k​ supported on weight α\alphaα, and every measure μ\muμ on matrices on WnW_nWn​ that is a probability measure, assigns zero measure to the complement of

Un={U: U†U=I, UQn=QnU},(Qn)a,b=1{a=b}∣a∣,\mathcal U_n=\{U:\ U^\dagger U=I,\ UQ_n=Q_nU\}, \qquad (Q_n)_{a,b}=\mathbf1_{\{a=b\}}|a|,Un​={U: U†U=I, UQn​=Qn​U},(Qn​)a,b​=1{a=b}​∣a∣,

and satisfies (U↦VU)∗μ=μ(U\mapsto VU)_*\mu=\mu(U↦VU)∗​μ=μ for every V∈UnV\in\mathcal U_nV∈Un​, the following identity holds for all x,y∈Wkx,y\in W_kx,y∈Wk​. Define

Aψ(X)a,b=Xa≤k,b≤kψ(a>k)ψ(b>k)‾,(Pn,q)a,b=1{a=b, ∣a∣=q}.\mathcal A_\psi(X)_{a,b} =X_{a_{\le k},b_{\le k}}\psi(a_{>k})\overline{\psi(b_{>k})}, \qquad (P_{n,q})_{a,b}=\mathbf1_{\{a=b,\ |a|=q\}}.Aψ​(X)a,b​=Xa≤k​,b≤k​​ψ(a>k​)ψ(b>k​)​,(Pn,q​)a,b​=1{a=b, ∣a∣=q}​.

Then the matrix integral obeys

∫UAψ(∣x⟩⟨y∣)U† dμ(U)={(n∣x∣+α)−1Pn,∣x∣+α,x=y,0,x≠y.\int U\mathcal A_\psi(|x\rangle\langle y|)U^\dagger\,d\mu(U) = \begin{cases} \binom n{|x|+\alpha}^{-1}P_{n,|x|+\alpha},&x=y,\\ 0,&x\ne y. \end{cases}∫UAψ​(∣x⟩⟨y∣)U†dμ(U)={(∣x∣+αn​)−1Pn,∣x∣+α​,0,​x=y,x=y.​

Second, for every additional t≤nt\le nt≤n, under the same hypotheses on ψ,μ\psi,\muψ,μ, define

h(n,t,q,r)=B(n−t,q−r)(nq),cr=2−k∑j=0k(kj) h(n,t,j+α,r),h(n,t,q,r)=\frac{B(n-t,q-r)}{\binom n q}, \qquad c_r=2^{-k}\sum_{j=0}^{k}\binom k j\,h(n,t,j+\alpha,r),h(n,t,q,r)=(qn​)B(n−t,q−r)​,cr​=2−kj=0∑k​(jk​)h(n,t,j+α,r),

where B(m,z)=0B(m,z)=0B(m,z)=0 for negative integers zzz, B(m,z)=(mz)B(m,z)=\binom m zB(m,z)=(zm​) otherwise, and zero denominators are interpreted by total division. Let AqA_qAq​ and CtC_tCt​ be diagonal matrices on WtW_tWt​ with entries h(n,t,q,∣u∣)h(n,t,q,|u|)h(n,t,q,∣u∣) and c∣u∣c_{|u|}c∣u∣​, respectively, and let

(Tr⁡>tX)u,v=∑z∈Wn−tXuz,vz.(\operatorname{Tr}_{>t}X)_{u,v} =\sum_{z\in W_{n-t}}X_{uz,vz}.(Tr>t​X)u,v​=z∈Wn−t​∑​Xuz,vz​.

For every x∈Wkx\in W_kx∈Wk​,

Tr⁡>t(∫UAψ(∣x⟩⟨x∣)U† dμ(U))=A∣x∣+α,F(A∣x∣+α,Ct)=∑r=0t(tr)cr h(n,t,∣x∣+α,r),\operatorname{Tr}_{>t}\left(\int U\mathcal A_\psi(|x\rangle\langle x|)U^\dagger\,d\mu(U)\right) =A_{|x|+\alpha}, \qquad F(A_{|x|+\alpha},C_t) =\sum_{r=0}^{t}\binom t r\sqrt{c_r\,h(n,t,|x|+\alpha,r)},Tr>t​(∫UAψ​(∣x⟩⟨x∣)U†dμ(U))=A∣x∣+α​,F(A∣x∣+α​,Ct​)=r=0∑t​(rt​)cr​h(n,t,∣x∣+α,r)​,

where F(R,S)=Re⁡Tr⁡R SRF(R,S)=\operatorname{Re}\operatorname{Tr}\sqrt{\sqrt R\,S\sqrt R}F(R,S)=ReTrR​SR​​. These first two assertions allow zero register lengths. Third, for every real a∈(0,1)a\in(0,1)a∈(0,1), there exists C>0C>0C>0 such that, for any sequences N,k,t,α:N→NN,k,t,\alpha:\mathbb N\to\mathbb NN,k,t,α:N→N satisfying Ni→+∞N_i\to+\inftyNi​→+∞,

kiti2Ni⟶0,Ni>0,0<ki≤Ni,0<ti≤Ni,αi≤Ni−ki,αi=aNifor every i,\frac{k_it_i^2}{N_i}\longrightarrow0, \qquad N_i>0,\quad 0<k_i\le N_i,\quad 0<t_i\le N_i,\quad \alpha_i\le N_i-k_i,\quad\alpha_i=aN_i \quad\text{for every }i,Ni​ki​ti2​​⟶0,Ni​>0,0<ki​≤Ni​,0<ti​≤Ni​,αi​≤Ni​−ki​,αi​=aNi​for every i,

there exists i0i_0i0​ such that, for every i≥i0i\ge i_0i≥i0​,

∣Dbasis(Ni,ki,ti,αi)kiti/(4Nia(1−a))−1∣≤Ckiti2Ni,\left| \frac{D_{\mathrm{basis}}(N_i,k_i,t_i,\alpha_i)} {k_i\sqrt{t_i}/(4N_i\sqrt{a(1-a)})}-1 \right| \le C\frac{k_it_i^2}{N_i},​ki​ti​​/(4Ni​a(1−a)​)Dbasis​(Ni​,ki​,ti​,αi​)​−1​≤CNi​ki​ti2​​,

where, using the preceding Aq,CtA_q,C_tAq​,Ct​ at the indicated parameters,

Dbasis(n,k,t,α)=max⁡x∈Wk1−F(A∣x∣+α,Ct)2.D_{\mathrm{basis}}(n,k,t,\alpha) =\max_{x\in W_k}\sqrt{1-F(A_{|x|+\alpha},C_t)^2}.Dbasis​(n,k,t,α)=x∈Wk​max​1−F(A∣x∣+α​,Ct​)2​.

The exact identity αi=aNi\alpha_i=aN_iαi​=aNi​ is part of the hypotheses; in particular, no such positive integer sequences exist for irrational aaa.

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

    Confirmed by the moderator at approval.

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