Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Repetition Lengths for Almost Bitflip Channels: logical phase law and syndrome concentration

Open
QAlgorithms.Papers.Independent.Intakenext100.P93.independent_phase_and_syndrome

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

prove2quantum

Let qx,qz∈[0,1]q_x,q_z\in[0,1]qx​,qz​∈[0,1] and let each physical qubit have independent amplitude and phase errors: px=qx(1−qz)p_x=q_x(1-q_z)px​=qx​(1−qz​), py=qxqzp_y=q_xq_zpy​=qx​qz​, and pz=qz(1−qx)p_z=q_z(1-q_x)pz​=qz​(1−qx​). For the cat of length m=k+1m=k+1m=k+1, write VVV for the parity of all physical phase errors and SSS for its retained syndrome. Then VVV and SSS are independent, including impossible syndromes, and

Pr⁡(V=1)=1−(1−2qz)m2,Pr⁡(V=v,S=s)=Pr⁡(V=v)Pr⁡(S=s).\Pr(V=1)=\frac{1-(1-2q_z)^m}{2},\qquad \Pr(V=v,S=s)=\Pr(V=v)\Pr(S=s).Pr(V=1)=21−(1−2qz​)m​,Pr(V=v,S=s)=Pr(V=v)Pr(S=s).

For 0≤r≤k0\le r\le k0≤r≤k, the weight W=∣S∣W=|S|W=∣S∣ has the exact law

Pr⁡(W=r)=(kr)[(1−qx)qxr(1−qx)k−r+qx(1−qx)rqxk−r].\Pr(W=r)=\binom kr\left[(1-q_x)q_x^r(1-q_x)^{k-r}+q_x(1-q_x)^rq_x^{k-r}\right].Pr(W=r)=(rk​)[(1−qx​)qxr​(1−qx​)k−r+qx​(1−qx​)rqxk−r​].

For every ϵ>0\epsilon>0ϵ>0, its mass outside both normalized centers converges to zero:

lim⁡k→∞Pr⁡ ⁣(min⁡{∣W/k−qx∣,∣W/k−(1−qx)∣}>ϵ)=0.\lim_{k\to\infty}\Pr\!\left(\min\{|W/k-q_x|,|W/k-(1-q_x)|\}>\epsilon\right)=0.k→∞lim​Pr(min{∣W/k−qx​∣,∣W/k−(1−qx​)∣}>ϵ)=0.

The empty syndrome at k=0k=0k=0 has a separately defined zero tail mass. The centers may coincide at qx=1/2q_x=1/2qx​=1/2; no inference of a logical amplitude error is claimed there. This states the phase law and qualitative two-center concentration without adding a finite tail exponent.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P93
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakenext100.P93

open QAlgorithms

open scoped BigOperators ComplexConjugate Matrix

attribute [local instance] Classical.propDecidable Classical.decEq

/-- Smith--Smolin, PDF pp.2--3, Repetition Lengths for Almost Bitflip Channels:
phase parity is independent of the entire syndrome; syndrome weight is a
mixture of two binomials and concentrates near k qx and k(1-qx).
The centers may coincide and the endpoint distributions may be deterministic. -/
theorem independent_phase_and_syndrome (qx qz : ℝ)
    (hx0 : 0 ≤ qx) (hx1 : qx ≤ 1) (hz0 : 0 ≤ qz) (hz1 : qz ≤ 1) :
    (∀ (k : ℕ) (s : Qubits k) (v : Bool),
      (∑ u : Bool, catLogicalSyndromeMass k (qx * (1 - qz)) (qx * qz) (qz * (1 - qx)) u v s) =
        (if v then (1 - (1 - 2 * qz) ^ (k + 1)) / 2
          else (1 + (1 - 2 * qz) ^ (k + 1)) / 2) *
        iidCatSyndromeMass k (qx * (1 - qz)) (qx * qz) (qz * (1 - qx)) s) ∧
    (∀ k : ℕ, (∑ s : Qubits k, ∑ u : Bool,
      catLogicalSyndromeMass k (qx * (1 - qz)) (qx * qz) (qz * (1 - qx)) u true s) =
        (1 - (1 - 2 * qz) ^ (k + 1)) / 2) ∧
    (∀ (k r : ℕ), r ≤ k →
      syndromeWeightMass k (qx * (1 - qz)) (qx * qz) (qz * (1 - qx)) r =
        (Nat.choose k r : ℝ) *
          ((1 - qx) * qx ^ r * (1 - qx) ^ (k - r) +
            qx * (1 - qx) ^ r * qx ^ (k - r))) ∧
    (∀ epsilon : ℝ, 0 < epsilon →
      Filter.Tendsto (fun k : ℕ => concentrationTail k qx qz epsilon)
        Filter.atTop (nhds 0)) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P93

end
Source
Degenerate Quantum Codes for Pauli Channels, arXiv:quant-ph/0604107v2, PDF p. 2, Repetition Lengths for Almost Bitflip Channels: logical phase law and syndrome concentration
Read-back

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

For every qx,qz∈[0,1]q_x,q_z\in[0,1]qx​,qz​∈[0,1], including their endpoints, define for each natural number kkk a weight on pairs x,z∈{0,1}k+1x,z\in\{0,1\}^{k+1}x,z∈{0,1}k+1 by

wk(x,z)=∏i=0kqxxi(1−qx)1−xiqzzi(1−qz)1−zi,w_k(x,z)=\prod_{i=0}^{k} q_x^{x_i}(1-q_x)^{1-x_i} q_z^{z_i}(1-q_z)^{1-z_i},wk​(x,z)=i=0∏k​qxxi​​(1−qx​)1−xi​qzzi​​(1−qz​)1−zi​,

where bits in exponents are interpreted as 000 or 111. Let σ(x)j=x0⊕xj+1\sigma(x)_j=x_0\oplus x_{j+1}σ(x)j​=x0​⊕xj+1​, let Jk(u,v,s)J_k(u,v,s)Jk​(u,v,s) be the sum of wk(x,z)w_k(x,z)wk​(x,z) over x0=ux_0=ux0​=u, ⨁izi=v\bigoplus_i z_i=v⨁i​zi​=v, and σ(x)=s\sigma(x)=sσ(x)=s, and set Pk(s)=∑u,vJk(u,v,s)P_k(s)=\sum_{u,v}J_k(u,v,s)Pk​(s)=∑u,v​Jk​(u,v,s). These are precisely the masses formed with px=qx(1−qz)p_x=q_x(1-q_z)px​=qx​(1−qz​), py=qxqzp_y=q_xq_zpy​=qx​qz​, and pz=qz(1−qx)p_z=q_z(1-q_x)pz​=qz​(1−qx​). The theorem asserts that for every kkk, every syndrome s∈{0,1}ks\in\{0,1\}^ks∈{0,1}k, and every Boolean vvv,

∑uJk(u,v,s)={[1−(1−2qz)k+1]Pk(s)/2,v=true,[1+(1−2qz)k+1]Pk(s)/2,v=false,\sum_uJ_k(u,v,s)= \begin{cases} [1-(1-2q_z)^{k+1}]P_k(s)/2,&v=\mathrm{true},\\ [1+(1-2q_z)^{k+1}]P_k(s)/2,&v=\mathrm{false}, \end{cases}u∑​Jk​(u,v,s)={[1−(1−2qz​)k+1]Pk​(s)/2,[1+(1−2qz​)k+1]Pk​(s)/2,​v=true,v=false,​

and that for every kkk,

∑s∑uJk(u,true,s)=1−(1−2qz)k+12.\sum_s\sum_uJ_k(u,\mathrm{true},s)=\frac{1-(1-2q_z)^{k+1}}2.s∑​u∑​Jk​(u,true,s)=21−(1−2qz​)k+1​.

For every pair of natural numbers k,rk,rk,r with r≤kr\le kr≤k, it also asserts

∑s∈{0,1}k∣s∣=rPk(s)=(kr)[(1−qx)qxr(1−qx)k−r+qx(1−qx)rqxk−r],\sum_{\substack{s\in\{0,1\}^k\\|s|=r}}P_k(s) =\binom kr\left[(1-q_x)q_x^r(1-q_x)^{k-r} +q_x(1-q_x)^rq_x^{k-r}\right],s∈{0,1}k∣s∣=r​∑​Pk​(s)=(rk​)[(1−qx​)qxr​(1−qx​)k−r+qx​(1−qx​)rqxk−r​],

where ∣s∣|s|∣s∣ counts true bits. Finally, for every real ϵ>0\epsilon>0ϵ>0, the sequence TkT_kTk​ converges to 000 as k→∞k\to\inftyk→∞, where T0=0T_0=0T0​=0 and, for k>0k>0k>0,

Tk=∑s∈{0,1}kϵ<min⁡{∣∣s∣/k−qx∣, ∣∣s∣/k−(1−qx)∣}Pk(s).T_k=\sum_{\substack{s\in\{0,1\}^k\\ \epsilon<\min\{\,||s|/k-q_x|,\ ||s|/k-(1-q_x)|\,\}}}P_k(s).Tk​=s∈{0,1}kϵ<min{∣∣s∣/k−qx​∣, ∣∣s∣/k−(1−qx​)∣}​∑​Pk​(s).

The finite identities include k=0k=0k=0, and all zero powers, including 000^000, equal 111.

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

    Confirmed by the moderator at approval.

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