Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Three new weight-6 BB codes: two [[336,20,12]][[336,20,12]][[336,20,12]] and one [[360,24,12]][[360,24,12]][[360,24,12]]

Open
BBCode.new_codes

by Winningatmath · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

coding-theoryquantum-error-correction

The three bivariate-bicycle codes of Table 9 have the stated parameters, with dX=dZ=12d_X=d_Z=12dX​=dZ​=12:

  1. over Z2×Z84\mathbb Z_2\times\mathbb Z_{84}Z2​×Z84​, A=1+y+xy5A=1+y+xy^{5}A=1+y+xy5, B=1+y4+y62B=1+y^{4}+y^{62}B=1+y4+y62: [[336,20,12]][[336,20,12]][[336,20,12]];
  2. over Z2×Z84\mathbb Z_2\times\mathbb Z_{84}Z2​×Z84​, A=1+y+xy5A=1+y+xy^{5}A=1+y+xy5, B=1+y20+y46B=1+y^{20}+y^{46}B=1+y20+y46: [[336,20,12]][[336,20,12]][[336,20,12]];
  3. over Z6×Z30\mathbb Z_6\times\mathbb Z_{30}Z6​×Z30​, A=1+y+xy2A=1+y+xy^{2}A=1+y+xy2, B=1+y8+x2y16B=1+y^{8}+x^{2}y^{16}B=1+y8+x2y16: [[360,24,12]][[360,24,12]][[360,24,12]].

Here HX=[A∣B]H_X=[A\mid B]HX​=[A∣B], HZ=[BT∣AT]H_Z=[B^{\mathsf T}\mid A^{\mathsf T}]HZ​=[BT∣AT],

k=n−rank⁡HX−rank⁡HZ,k=n-\operatorname{rank}H_X-\operatorname{rank}H_Z,k=n−rankHX​−rankHZ​,

and each distance is the minimum weight of a nontrivial logical in that sector. These codes encode 25% and 50% more logical qubits than the best distance-12 weight-6 code previously reported.

Formalization Note IsCode is defined in BBCode_Setting.

Preamble
import Mathlib
import Definitions.Def_BBCode_Setting
Formal statement
namespace BBCode

theorem new_codes :
    IsCode (l := 2) (m := 84) {(0, 0), (0, 1), (1, 5)} {(0, 0), (0, 4), (0, 62)} 336 20 12 ∧
    IsCode (l := 2) (m := 84) {(0, 0), (0, 1), (1, 5)} {(0, 0), (0, 20), (0, 46)} 336 20 12 ∧
    IsCode (l := 6) (m := 30) {(0, 0), (0, 1), (1, 2)} {(0, 0), (0, 8), (2, 16)} 360 24 12 := by
  sorry

end BBCode
Source
B. W. Daugherty, S. Ryan, G. Ward, New distance-12 bivariate-bicycle codes with 20 and 24 logical qubits: an exhaustive classification and checkable distances to 360 qubits, Zenodo v1.0.0 (2026), https://doi.org/10.5281/zenodo.23382175, Table 9 (p. 15) and Table 3 (p. 5)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

This is the conjunction of three code-parameter claims, identical to the three separate statements for the codes below. In each case G=Zl×ZmG=\mathbb Z_l\times\mathbb Z_mG=Zl​×Zm​ and (i,j)(i,j)(i,j) stands for xiyjx^iy^jxiyj.

  1. l=2l=2l=2, m=84m=84m=84, A={(0,0),(0,1),(1,5)}=1+y+xy5A=\{(0,0),(0,1),(1,5)\}=1+y+xy^5A={(0,0),(0,1),(1,5)}=1+y+xy5, B={(0,0),(0,4),(0,62)}=1+y4+y62B=\{(0,0),(0,4),(0,62)\}=1+y^4+y^{62}B={(0,0),(0,4),(0,62)}=1+y4+y62: parameters (n,k,d)=(336,20,12)(n,k,d)=(336,20,12)(n,k,d)=(336,20,12).
  2. l=2l=2l=2, m=84m=84m=84, the same AAA, B={(0,0),(0,20),(0,46)}=1+y20+y46B=\{(0,0),(0,20),(0,46)\}=1+y^{20}+y^{46}B={(0,0),(0,20),(0,46)}=1+y20+y46: parameters (336,20,12)(336,20,12)(336,20,12).
  3. l=6l=6l=6, m=30m=30m=30, A={(0,0),(0,1),(1,2)}=1+y+xy2A=\{(0,0),(0,1),(1,2)\}=1+y+xy^2A={(0,0),(0,1),(1,2)}=1+y+xy2, B={(0,0),(0,8),(2,16)}=1+y8+x2y16B=\{(0,0),(0,8),(2,16)\}=1+y^8+x^2y^{16}B={(0,0),(0,8),(2,16)}=1+y8+x2y16: parameters (360,24,12)(360,24,12)(360,24,12).

Unfolded definitions used below. For l,m≥1l,m\ge 1l,m≥1 write G=Zl×ZmG=\mathbb Z_l\times\mathbb Z_mG=Zl​×Zm​; an element (i,j)∈G(i,j)\in G(i,j)∈G stands for the monomial xiyjx^iy^jxiyj, and a "polynomial" is a finite subset P⊆GP\subseteq GP⊆G (its support, coefficients in F2\mathbb F_2F2​). The circulant MPM_PMP​ is the G×GG\times GG×G matrix over F2\mathbb F_2F2​ with (MP)g,h=1(M_P)_{g,h}=1(MP​)g,h​=1 iff h−g∈Ph-g\in Ph−g∈P and 000 otherwise. The qubit set is Q=G⊔GQ=G\sqcup GQ=G⊔G (a left block LLL and a right block RRR, ∣Q∣=2lm|Q|=2lm∣Q∣=2lm). The check matrices (rows indexed by GGG, columns by QQQ) are

HX=[ MA  ∣  MB ],HZ=[ MB⊤  ∣  MA⊤ ],H_X=\big[\,M_A\;\big|\;M_B\,\big],\qquad H_Z=\big[\,M_B^{\top}\;\big|\;M_A^{\top}\,\big],HX​=[MA​​MB​],HZ​=[MB⊤​​MA⊤​],

with the first block on LLL and the second on RRR. A vector v∈F2Qv\in\mathbb F_2^{Q}v∈F2Q​ is a nontrivial Z-logical if HXv=0H_Xv=0HX​v=0 and v∉row⁡(HZ)v\notin\operatorname{row}(H_Z)v∈/row(HZ​) (the F2\mathbb F_2F2​-span of the rows of HZH_ZHZ​); it is a nontrivial X-logical if HZv=0H_Zv=0HZ​v=0 and v∉row⁡(HX)v\notin\operatorname{row}(H_X)v∈/row(HX​). The weight ∣v∣|v|∣v∣ is the number of nonzero coordinates of vvv.

For each code, "parameters (n,k,d)(n,k,d)(n,k,d)" means all of: (a) n=2lmn=2lmn=2lm (arithmetic: 336=2⋅2⋅84336=2\cdot2\cdot84336=2⋅2⋅84, 360=2⋅6⋅30360=2\cdot6\cdot30360=2⋅6⋅30); (b) rank⁡F2HX+rank⁡F2HZ+k=2lm\operatorname{rank}_{\mathbb F_2}H_X+\operatorname{rank}_{\mathbb F_2}H_Z+k=2lmrankF2​​HX​+rankF2​​HZ​+k=2lm; (c) some nontrivial X-logical has weight exactly ddd and every nontrivial X-logical has weight ≥d\ge d≥d; (d) the same for Z-logicals. Thus each claims exact distance d=12d=12d=12 in both sectors. In codes 1 and 2, BBB involves only powers of yyy. No connectivity of the Tanner graph is asserted for any of the three codes.

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

    Confirmed by the moderator at approval.

  • Endorsed by Winningatmath · Oct 18, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me