BB 码 · 参数与实例BB Codes · Parameters & Instances
QEC-Bank 条目导读 · BB 码 · 参数与实例QEC-Bank entry guide · BB codes · Parameters & instances

四个输入,三个数字,
和每个数字旁边的那个词
Four inputs, three numbers,
and the word beside each number

表面码只有一个旋钮 L;BB 码有四个:两个整数 l、m 和两串指数 a_terms、b_terms。拧定四个旋钮,构造器吐出一个有限的码,QEC-Bank 再给它的 n、k、d 各配一个证据词。这一篇回答 QEC-Bank「参数与实例」侧面的问题:这四个变量到底是什么、gross 码的 [[144,12,12]] 是怎样从它们一步步算出来的、QEC-Bank 实际发布了哪两个实例、为什么 gross 的码距写着 bounded 而 toric_L3 写着 verified、Table 3 的另外几个码住在哪里、以及「十二倍」这个说法比的究竟是什么。 The surface code has one knob, L; a BB code has four: two integers l, m and two lists of exponents, a_terms and b_terms. Fix the four knobs and the constructor emits one finite code, to whose n, k, d the QEC-Bank then attaches an evidence word each. This guide answers the questions of the QEC-Bank “Parameters & instances” facet: what exactly the four variables are, how the gross code's [[144,12,12]] is computed from them step by step, which two instances the QEC-Bank actually ships, why the gross distance says bounded while toric_L3 says verified, where the other Table 3 codes live, and what the “twelve-fold” claim actually compares.

前置:《BB 码 · 高中数学版》,尤其构造与对易定理和k 从哪里来。那里推导了公式;这里对照 QEC-Bank 的原始文件,逐字核对每个数字与它的证据词。QEC-Bank 是本系列依托的纠错码知识库:每个码是一个「条目」,条目按参数、译码器、逻辑操作等分成几个「侧面」;instances.yaml 登记这个条目发布的具体码(实例)及其 [[n, k, d]];constructor.py 是从四个家族变量造出检查矩阵的程序;参数账本页(gross-parameter-ledger.md)是逐项解释这些数字的说明页。新内容:家族变量的正式定义、gross 第 0 条检查的六个比特编号、bounded 的两半、Table 3 亲戚各自的 QEC-Bank 条目、含帮手比特的 288、以及「渐近坏」这条文献声明。 Prerequisite: “BB Codes · High-School Edition”, especially construction and the commutation theorem and where k comes from. That guide derived the formulas; this one checks every number and its evidence word against the QEC-Bank source files, word for word. The QEC-Bank is the knowledge base of error-correcting codes behind this series: each code is an “entry”, split into “facets” such as parameters, decoders and logical operations; instances.yaml registers the concrete codes (instances) the entry publishes and their [[n, k, d]]; constructor.py is the program that builds the check matrices from the four family variables; and the parameter ledger page (gross-parameter-ledger.md) explains those numbers item by item. New here: the formal definition of the family variables, the six qubit indices of gross check 0, the two halves of bounded, the QEC-Bank entries of the Table 3 relatives, the ancilla-inclusive 288, and the literature claim “asymptotically bad”.
目录Contents
第 1 章Chapter 1

四个家族变量:l、m、a_terms、b_termsThe four family variables: l, m, a_terms, b_terms

「参数」在 QEC-Bank 里有两层意思:一层是描述一个码的三个数 [[n, k, d]],另一层是生成这个码要拧的旋钮。表面码只有一个旋钮,BB 码有四个。先把四个旋钮的正式定义抄下来,再看构造器拿到它们之后具体做了什么,最后说清这个构造器只覆盖哪一族。 “Parameters” means two things in the QEC-Bank: the three numbers [[n, k, d]] that describe a code, and the knobs you turn to generate it. The surface code has one knob; a BB code has four. We first copy down the formal definition of the four knobs, then watch what the constructor does with them, and finally state exactly which family this constructor covers.

1.1名片 [[n, k, d]],与它旁边的证据词The calling card [[n, k, d]], and the evidence word beside it

量子码的名片是[[n, k, d]]双方括号是量子码的记法(单方括号 [n,k,d] 留给经典码):n 个物理量子比特,编码 k 个逻辑量子比特,码距 d。:n 个物理比特一起保护 k 个逻辑比特,d 是码距能通过全部检查、却改写逻辑信息的最轻算符(逻辑算符)的重量,即它触碰的量子比特数。——能骗过全部检查、却改写逻辑信息的最轻算符触碰的比特数。n 与 k 的记账规则在《从高考数学到 Toric Code》的 4.4 节(注意那里用 k 记独立检查的条数;从 BB 教程起 k 直接记逻辑比特数,见BB 教程第 0 章的记号说明),d 的定义在同一教程的 5.8 节。BB 教程里你已经算过 gross 的 k:两个秩都是 66,k = 2 × 6 = 12。

A quantum code's calling card is [[n, k, d]]Double brackets denote a quantum code (single brackets [n,k,d] are reserved for classical codes): n physical qubits encoding k logical qubits with distance d.: n physical qubits jointly protecting k logical qubits, with d the distanceThe weight, i.e. the number of qubits touched, of the lightest operator that passes every check yet rewrites the logical information (a logical operator).: the number of qubits touched by the lightest operator that fools every check yet rewrites logical data. The bookkeeping rule for n and k is in section 4.4 of “From Exam Maths to the Toric Code” (note that k there counts independent checks; from the BB guide onward k counts logical qubits directly, see the notation note in Chapter 0 of the BB guide), and d is defined in section 5.8 of the same guide. In the BB guide you have already computed k for gross: both ranks are 66, so k = 2 × 6 = 12.

QEC-Bank 比一般的参数表多做一件事:每个数字旁边站着一个证据词QEC-Bank 给每条声明标注来源类别的固定词汇(origin kind):verified(机器独立重算并相符)、bounded(只有上下界,未穷举)、claimed(引自文献、未重算)等。。说人话:verified 是「QEC-Bank 的机器自己重算过,结果一样」;bounded 是「机器只算出了一半(上界),另一半(下界)靠引文」;claimed 是「照抄文献,机器没算」。同一个 d = 12,写成 verified、bounded 或 claimed,是三句强度不同的话。本篇每张表都会把这个词原样保留。

The QEC-Bank does one thing more than an ordinary parameter table: beside every number stands an evidence wordThe fixed vocabulary (origin kind) the QEC-Bank attaches to every claim's source: verified (independently recomputed by machine and matching), bounded (only bounds, no exhaustive check), claimed (cited from the literature, not recomputed), and others.. In plain words: verified means “the QEC-Bank machine recomputed it itself and got the same answer”; bounded means “the machine computed only half (the upper bound), the other half (the lower bound) rests on a citation”; claimed means “copied from a paper, the machine did not compute it”. The same d = 12 written as verified, bounded or claimed is three statements of different strength. Every table in this guide keeps that word verbatim.

1.2QEC-Bank 登记的四个变量The four variables the QEC-Bank registers

表面码的参数页只登记一个家族变量生成一族码中某一个成员所需的输入参数。BB 条目有四个:l、m、a_terms、b_terms。 L。BB 条目的参数页登记了四个,原文如下(左列是 instances.yaml 里的字段名):

The surface-code parameters page registers a single family variableAn input parameter that selects one member of a code family. The BB entry has four: l, m, a_terms, b_terms., L. The BB entry's page registers four, in these words (the left column is the field name in instances.yaml):

变量VariableQEC-Bank 原文QEC-Bank wording人话In plain wordsgross 的取值Value for gross
lpositive cyclic order of x环面横向有 l 格;往右挪 l 次回到原地(xl = 1)the torus is l sites wide; l steps to the right return you home (xl = 1)12
mpositive cyclic order of y环面纵向有 m 格;往上挪 m 次回到原地(ym = 1)the torus is m sites tall; m steps up return you home (ym = 1)6
a_termsinteger exponent pairs for the monomials of A, reduced modulo (l,m)多项式 A 的每一项写成一对指数 (a, b),代表单项式 xayb;指数按 mod l、mod m 约化each term of the polynomial A written as an exponent pair (a, b), standing for the monomial xayb; exponents reduced mod l and mod m[[3,0],[0,1],[0,2]]
= x³ + y + y²
b_termsinteger exponent pairs for the monomials of B, reduced modulo (l,m)多项式 B 的每一项,同上each term of the polynomial B, likewise[[0,3],[1,0],[2,0]]
= y³ + x + x²

字母:l、m = 两个循环阶(环面的宽与高);x、y = 往右、往上各挪一格的平移(BB 教程 2.2 节);(a, b) = 一个单项式 xayb 的两个指数;A、B = 两个多项式。Letters: l, m = the two cyclic orders (width and height of the torus); x, y = the translations one site right and one site up (BB guide section 2.2); (a, b) = the two exponents of one monomial xayb; A, B = the two polynomials.

读这张表时有两个细节值得停一下。第一,[3,0] 是「x 的指数 3、y 的指数 0」,所以是 x³,不是 y³;[0,3] 才是 y³。第二,「reduced modulo (l,m)」的意思是:写 [15,0] 和写 [3,0] 在 l = 12 时是同一项,因为往右挪 15 格等于挪 3 格。constructor.py 里对应的一行是 (term[0] % l, term[1] % m)。四个变量取定之后,就得到一个实例家族变量取定具体值后得到的那一个有限码对象,有确定的检查矩阵和确定的 [[n,k,d]]。QEC-Bank 的 BB 条目发布了两个:gross 与 toric_L3。。QEC-Bank 为 BB 条目发布了两个实例,标签叫 gross 和 toric_L3;第 3 章逐字转录它们的记录。

Two details in this table deserve a pause. First, [3,0] means “exponent 3 on x, exponent 0 on y”, hence x³, not y³; [0,3] is y³. Second, “reduced modulo (l,m)” means that writing [15,0] and writing [3,0] give the same term when l = 12, because moving 15 sites right is the same as moving 3. The matching line in constructor.py is (term[0] % l, term[1] % m). Once the four variables are fixed you have an instanceThe one finite code object obtained once the family variables are fixed: a definite check matrix and a definite [[n,k,d]]. The QEC-Bank BB entry ships two: gross and toric_L3.. The QEC-Bank ships two instances for the BB entry, labelled gross and toric_L3; Chapter 3 transcribes their records word for word.

1.3构造器拿到四个变量后做了什么What the constructor does with the four variables

codes/bivariate_bicycle/constructor.py 只有几十行,做的正是 BB 教程 2.3 节与3.1 节的翻译:① 造一个 l × l 的循环移位 S(第 i 行的 1 在第 (i+1) mod l 列,这是「正向」约定);② 令 x = Sl ⊗ Im、y = Il ⊗ Sm;③ 对 a_terms 的每一对 (a, b) 算出置换矩阵 xayb,全部按 mod 2 相加,得到 lm × lm 的矩阵 A,B 同理;④ 拼出 HX = [A | B],HZ = [Bᵀ | Aᵀ];⑤ 交给 CheckMatrix.from_css 并调用 validate(),即当场核对 CSS 条件。格子 (i, j) 的编号是 i·m + j(先数行再数列),左层比特占第 0 到 lm−1 列,右层占第 lm 到 2lm−1 列。

codes/bivariate_bicycle/constructor.py is a few dozen lines and performs exactly the translation of BB guide section 2.3 and section 3.1: (1) build an l × l cyclic shift S (row i has its 1 in column (i+1) mod l, the “forward” convention); (2) set x = Sl ⊗ Im, y = Il ⊗ Sm; (3) for each pair (a, b) in a_terms form the permutation matrix xayb and add them all mod 2, giving the lm × lm matrix A, and likewise B; (4) assemble HX = [A | B], HZ = [Bᵀ | Aᵀ]; (5) hand them to CheckMatrix.from_css and call validate(), which checks the CSS condition on the spot. Site (i, j) is numbered i·m + j (rows first, then columns); left-layer qubits occupy columns 0 to lm−1, right-layer qubits columns lm to 2lm−1.

这套约定不是抽象的。reproduce.py 断言 gross 第 0 条 X 检查(格子 (0,0))恰好碰这六个比特:[1, 2, 18, 75, 78, 84]。自己数一遍:A 的三项 x³、y、y² 把 (0,0) 送到 (3,0)、(0,1)、(0,2),编号 3·6+0 = 18、1、2,这是左层的三腿;B 的三项 y³、x、x² 送到 (0,3)、(1,0)、(2,0),编号 3、6、12,加上右层的偏移 72 得 75、78、84。第 0 条 Z 检查是 [3, 60, 66, 76, 77, 126]:Bᵀ 把三次平移倒过来走,(0,−3) = (0,3) → 3、(−1,0) = (11,0) → 66、(−2,0) = (10,0) → 60;Aᵀ 在右层给 (−3,0) = (9,0) → 54+72 = 126、(0,−1) = (0,5) → 77、(0,−2) = (0,4) → 76。下面的实验台把预设固定在 gross,点任何一条检查看它的六条腿,把读数里的比特编号和这两行对一对。图上横轴是 i(x 方向,向右),纵轴是 j(y 方向,向上);实心点是左层比特,空心点是右层比特;高亮的腿旁边标着它的编号,格子 (0,0) 在左下角。

None of this is abstract. reproduce.py asserts that gross X check 0 (site (0,0)) touches exactly these six qubits: [1, 2, 18, 75, 78, 84]. Count them yourself: the three terms x³, y, y² of A send (0,0) to (3,0), (0,1), (0,2), numbered 3·6+0 = 18, 1, 2, the three left-layer legs; the three terms y³, x, x² of B send it to (0,3), (1,0), (2,0), numbered 3, 6, 12, plus the right-layer offset 72 gives 75, 78, 84. Z check 0 is [3, 60, 66, 76, 77, 126]: Bᵀ walks the three translations backwards, (0,−3) = (0,3) → 3, (−1,0) = (11,0) → 66, (−2,0) = (10,0) → 60; Aᵀ on the right layer gives (−3,0) = (9,0) → 54+72 = 126, (0,−1) = (0,5) → 77, (0,−2) = (0,4) → 76. The bench below is preset to gross; click any check to see its six legs and compare the qubit indices in the readout with these two lines. In the picture the horizontal axis is i (the x direction, rightwards) and the vertical axis is j (the y direction, upwards); filled dots are left-layer qubits, hollow dots right-layer qubits; each highlighted leg carries its index, and site (0,0) is at the bottom left.

1.4范围:一个固定约定下的环面 BB 码Scope: torus BB codes under one fixed convention

必须说清一次:QEC-Bank 的这个条目对应 eczoo(Error Correction Zoo,一个公开的纠错码百科网站)的集合 qcga(正式身份 eczoo-entity:qcga#collection),构造器覆盖的是平移不变、写在有限二维环面上、按 HX = [A | B]、HZ = [Bᵀ | Aᵀ] 拼装的那一族。文献里同样冠以 BB 之名的开边界平面版、剪枝版、自对偶版、多变量版、qudit 版,都不是这个构造器生成的对象,它们的 n、k、d 不在本篇的表里;QEC-Bank 的「关系」侧面和 pedagogy/variant-boundary-map.md 专门处理它们。反过来,环面码本身在这一族之内:A = 1 + x、B = 1 + y 就是它(BB 教程 3.1 节)——这正是 QEC-Bank 把 toric_L3 收作第二个实例的原因。

This must be said once, plainly: this QEC-Bank entry corresponds to the eczoo (the Error Correction Zoo, a public encyclopaedia website of error-correcting codes) collection qcga (formal identity eczoo-entity:qcga#collection), and the constructor covers the family that is translation-invariant, written on a finite two-dimensional torus, and assembled as HX = [A | B], HZ = [Bᵀ | Aᵀ]. The open-boundary planar, pruned, self-dual, multivariate and qudit variants that the literature also files under “BB” are not objects this constructor produces, and their n, k, d are not in this guide's tables; the QEC-Bank “Relations” facet and pedagogy/variant-boundary-map.md handle them. Conversely, the toric code itself is inside the family: A = 1 + x, B = 1 + y is exactly it (BB guide section 3.1), which is why the QEC-Bank keeps toric_L3 as its second instance.

关键想法Key idea

一族码 = 一个构造器 + 几个家族变量。BB 的四个变量里,l、m 定环面大小,a_terms、b_terms 定两个多项式;约定(正向移位、先行后列、左层在前、交换转置)由构造器固定。QEC-Bank 的每一条 [[n,k,d]] 记录都挂在一个实例上——四个变量取定后的那个有限对象——而不是挂在「BB 码」这个族名上,因为只有有限对象能被机器逐位重算。

A code family = one constructor + a few family variables. Of BB's four, l and m fix the torus size and a_terms, b_terms fix the two polynomials; the conventions (forward shift, rows before columns, left layer first, swapped transposes) are fixed by the constructor. Every [[n,k,d]] record in the QEC-Bank hangs on an instance, the finite object obtained once the four variables are set, never on the family name “BB code”, because only a finite object can be recomputed bit by bit by a machine.

第 2 章Chapter 2

n、重量、k、d 各从哪里来Where n, weight, k and d come from

四个变量进去,四类数字出来:比特数 n、检查重量、逻辑比特数 k、码距 d。前三类是「一算便知」的算术,第四类要两份证书。这一章按 QEC-Bank 的 gross-parameter-ledger.md 逐项走,每项先给公式,再代入 gross 与 toric_L3 的数。 Four variables go in, four kinds of numbers come out: the qubit count n, the check weight, the logical count k, the distance d. The first three are arithmetic you can do at once; the fourth needs two certificates. This chapter follows the QEC-Bank file gross-parameter-ledger.md item by item, giving the formula first and then the gross and toric_L3 values.

2.1n = 2lm:每个格子两个比特n = 2lm: two qubits per site

环面有 N = lm 个格子,每个格子放两个数据比特(左层一个、右层一个),所以 n = 2lm。矩阵语言里:A、B 都是 N × N,[A | B] 有 2N 列,列数就是比特数。gross:N = 12 × 6 = 72,n = 144;toric_L3:N = 3 × 3 = 9,n = 18。人话:n 数的是数据比特,账本原文特意补了一句,它「excludes syndrome ancillas, couplers, routing workspace, spare modules, and decoder hardware」——不含帮手比特、耦合器、布线、备用模块和译码硬件。第 5 章再把帮手加回来。

The torus has N = lm sites and each site carries two data qubits (one in the left layer, one in the right), so n = 2lm. In matrix language: A and B are both N × N, [A | B] has 2N columns, and the column count is the qubit count. Gross: N = 12 × 6 = 72, n = 144; toric_L3: N = 3 × 3 = 9, n = 18. In plain words: n counts data qubits; the ledger adds deliberately that it “excludes syndrome ancillas, couplers, routing workspace, spare modules, and decoder hardware”. Chapter 5 puts the helpers back.

N = lm · n = 2N = 2lm
gross: 2 × 72 = 144 · toric_L3: 2 × 9 = 18

N = 环面格子数,l、m = 环面的宽与高,n = 数据比特数。N = number of torus sites, l, m = width and height of the torus, n = data qubits.

2.2检查重量 = |A| + |B|;左层比特度 = |A| 条 X 加 |B| 条 Z,右层反过来Check weight = |A| + |B|; a left-layer qubit meets |A| X-checks and |B| Z-checks, a right-layer qubit the reverse

一个单项式是置换矩阵,每行每列恰有一个 1;一个有 |A| 个不同约化项的多项式,矩阵每行每列恰有 |A| 个 1(BB 教程 2.3 节)。于是 HX = [A | B] 的每一行有 |A| + |B| 个 1:每条 X 检查碰 |A| + |B| 个比特;HZ 同理。反过来看列:左层比特所在的列在 A 里有 |A| 个 1、在 Bᵀ 里有 |B| 个 1,所以每个左层比特被 |A| 条 X 检查和 |B| 条 Z 检查碰到;右层比特的列在 B 里、在 Aᵀ 里,所以反过来,被 |B| 条 X 检查和 |A| 条 Z 检查碰到。|A| = |B| 时两层一样;不相等时两层不同,例如 bb5(|A| = 2,|B| = 3):左层比特 2 X + 3 Z,右层 3 X + 2 Z。gross:|A| = |B| = 3,检查重量 6,比特度 3 + 3。账本特意说,「degree six」这个压缩说法会丢掉 Pauli 类型的划分,而电路里三条 X 型和三条 Z 型相互作用「have different ancilla preparations and fault propagation」——帮手比特的制备方式与错误传播路径都不同,所以要写成 3 + 3。reproduce.py 不是从「三项」推出重量,而是逐行逐列真的数了一遍:A、B 的每行每列都是 3,HX、HZ 的每行都是 6、每列都是 3。

A monomial is a permutation matrix, exactly one 1 per row and per column; a polynomial with |A| distinct reduced terms is a matrix with exactly |A| ones per row and per column (BB guide section 2.3). So every row of HX = [A | B] has |A| + |B| ones: every X check touches |A| + |B| qubits, and likewise HZ. Reading columns instead: a left-layer qubit's column has |A| ones in A and |B| ones in Bᵀ, so every left-layer qubit sits in |A| X checks and |B| Z checks; a right-layer qubit's column lies in B and in Aᵀ, so it is the other way round, |B| X checks and |A| Z checks. When |A| = |B| the two layers agree; otherwise they differ, e.g. bb5 (|A| = 2, |B| = 3): left-layer qubits 2 X + 3 Z, right-layer 3 X + 2 Z. Gross: |A| = |B| = 3, check weight 6, qubit degree 3 + 3. The ledger points out that the compressed phrase “degree six” loses the Pauli split, while in a circuit the three X-type and three Z-type interactions “have different ancilla preparations and fault propagation”, so it is written 3 + 3. reproduce.py does not infer the weight from “three terms”; it actually counts every row and column: every row and column of A and B is 3, every row of HX and HZ is 6, every column is 3.

检查重量check weight = |A| + |B|
左层比特度left-layer degree = |A| X + |B| Z
右层比特度right-layer degree = |B| X + |A| Z
gross: 3 + 3 = 6; 3 X + 3 Z · toric_L3: 2 + 2 = 4; 2 X + 2 Z
bb5: 2 + 3 = 5; 左 2 X + 3 Z,右 3 X + 2 Zleft 2 X + 3 Z, right 3 X + 2 Z

|A|、|B| = 多项式 A、B 的(约化后不同的)项数;检查重量 = 一条检查碰的比特数;比特度 = 一个比特被几条检查碰。|A|, |B| = the number of (distinct reduced) terms of A and B; check weight = qubits touched by one check; qubit degree = checks touching one qubit.

2.3k = 2(lm − r):秩的亏损的两倍k = 2(lm − r): twice the rank deficit

稳定子计数给 k = n − rank HX − rank HZ。BB 教程 4.1 节证明两个秩相等(记作 r),所以 k = 2lm − 2r = 2(lm − r)。账本对这一步补了一句为什么可以直接相加:CSS 码的稳定子秩是两个秩之和,「because pure-X and pure-Z binary symplectic rows cannot cancel each other」——纯 X 行和纯 Z 行写在辛表示的不同半边,互相抵消不了。gross:GF(2) 上高斯消元得 rank HX = rank HZ = 66,稳定子秩 132,k = 144 − 132 = 12。toric_L3:两个秩各 8,k = 18 − 16 = 2。

The stabilizer count gives k = n − rank HX − rank HZ. BB guide section 4.1 proves the two ranks are equal (call the value r), so k = 2lm − 2r = 2(lm − r). The ledger adds why the two may simply be added: the CSS stabilizer rank is their sum “because pure-X and pure-Z binary symplectic rows cannot cancel each other”; pure-X and pure-Z rows live in different halves of the symplectic representation and cannot cancel. Gross: Gaussian elimination over GF(2) gives rank HX = rank HZ = 66, stabilizer rank 132, k = 144 − 132 = 12. toric_L3: both ranks 8, k = 18 − 16 = 2.

k = n − rank HX − rank HZ = 2lm − 2r = 2(lm − r)
gross: 2(72 − 66) = 2 × 6 = 12 · toric_L3: 2(9 − 8) = 2

k = 逻辑比特数,n = 数据比特数,HX/HZ = X/Z 检查矩阵,rank = 秩(独立检查数),r = 两个相等的秩,lm − r = 秩的亏损(多余的检查条数)。k = logical qubits, n = data qubits, HX/HZ = the X/Z check matrices, rank = number of independent checks, r = the common value of the two ranks, lm − r = the rank deficit (redundant checks).

亏损 lm − r 有一个更有解释力的读法(BB 教程 4.2 节):把一对多项式 (u, v) 送到 uA + vB,所有这样的 uA + vB 组成理想 (A, B)(补课 2.A 在 toric_L3 上数了一遍)。按「系数 ↔ 格子」的编码(xiyj ↔ 格子 (i, j),编号 i·m + j)写成矩阵,这个映射是 [Aᵀ | Bᵀ] 乘列向量 (u; v),不是 [A | B]:构造器约定下,A 的第 0 列落在编号 4、5、54 上,那是 Aᵀ 的图案;A 的第 0 行(1、2、18)才是多项式 A 的图案,所以 Aᵀ 的第 s 列正是把 A 的形状平移到格子 s。[Aᵀ | Bᵀ] 与 HZ = [Bᵀ | Aᵀ] 只差左右两块的次序,秩相同,都是 r = 66,这就是理想的维数;剩下的 72 − 66 = 6 维是商空间 R/(A,B)。账本原话:「the dual side has the same six-dimensional defect, leaving twelve logical dimensions in the middle」。两个重要的诚实限定紧跟其后。第一,这是「a computed fact for these periods and polynomials」——对这组 l、m、A、B 算出来的事实,不是所有三项 BB 多项式都编码 12 个比特的承诺。第二,「Three terms in A and three in B do not determine the rank: changing their exponents changes the common ideal and can change k」——三项不决定 k,改指数就改理想,k 随之变。最直接的证据你在 BB 教程见过:同一对 A、B 放到 9 × 6 的环面上,k 从 12 掉到 8。

The deficit lm − r has a more explanatory reading (BB guide section 4.2): send a pair of polynomials (u, v) to uA + vB; all such uA + vB form the ideal (A, B) (catch-up 2.A counts it on toric_L3). Written as a matrix under the coefficient-to-site encoding (xiyj ↔ site (i, j), index i·m + j), this map is [Aᵀ | Bᵀ] acting on the column vector (u; v), not [A | B]: under the constructor's convention column 0 of A sits on indices 4, 5, 54, which is the pattern of Aᵀ; row 0 of A (1, 2, 18) is the pattern of the polynomial A, so column s of Aᵀ is the shape of A translated to site s. [Aᵀ | Bᵀ] differs from HZ = [Bᵀ | Aᵀ] only in the order of its two blocks, so both have rank r = 66, and that is the dimension of the ideal; the remaining 72 − 66 = 6 dimensions are the quotient R/(A,B). In the ledger's words: “the dual side has the same six-dimensional defect, leaving twelve logical dimensions in the middle”. Two honest qualifiers follow at once. First, this is “a computed fact for these periods and polynomials”, not a promise that every three-term BB polynomial pair encodes twelve qubits. Second, “Three terms in A and three in B do not determine the rank: changing their exponents changes the common ideal and can change k”. The most direct evidence you have already seen in the BB guide: the same A, B on a 9 × 6 torus drops k from 12 to 8.

补课 · 「理想 (A, B)」与「商 R/(A,B)」是什么:在 toric_L3 上数一遍Catch-up · What “the ideal (A, B)” and “the quotient R/(A,B)” are: counted on toric_L3

把环面上的一种 0/1 格子图案看成一个多项式:格子 (i, j) 上有 1,就写一项 xiyj。所有图案组成的集合记作 R(约定 xl = ym = 1,加法是逐格异或),它有 lm 维:gross 72 维,toric_L3 9 维。多项式相乘就是图案的平移叠加:u·A 是「把 A 的形状按 u 的每一项平移一次,再全部叠起来」。理想 (A, B) 就是所有形如 uA + vB 的图案(u、v 任取)。写成矩阵:Aᵀ 的第 s 列是把 A 的形状平移到格子 s 的图案(A 的第 s 行就是第 s 条 X 检查的左层腿),所以理想正是矩阵 [Aᵀ | Bᵀ] 的列能叠出来的全部图案,维数是它的秩;[Aᵀ | Bᵀ] 与 HZ = [Bᵀ | Aᵀ] 只差两块的次序,秩就是 r。商 R/(A,B) 不是「剩下的那些图案」,而是把 R 里的图案分组:两个图案 p、q 算同一类,当且仅当 p + q 在理想里(p 加上某个 uA + vB 就变成 q)。每一类的图案个数都和理想一样多(2r 个),所以一共 2lm ÷ 2r = 2lm − r 类,商的维数是 lm − r,正是亏损。

Read a 0/1 pattern on the torus as a polynomial: a 1 on site (i, j) is the term xiyj. The set of all patterns is called R (with xl = ym = 1, and addition is site-wise XOR); it has lm dimensions: 72 for gross, 9 for toric_L3. Multiplying polynomials is translating and overlaying patterns: u·A means “translate the shape of A by each term of u and overlay everything”. The ideal (A, B) is the set of all patterns of the form uA + vB (u and v arbitrary). As a matrix: column s of Aᵀ is the shape of A translated to site s (row s of A holds the left legs of X check s), so the ideal is exactly the set of patterns the columns of [Aᵀ | Bᵀ] can build, and its dimension is that matrix's rank; [Aᵀ | Bᵀ] differs from HZ = [Bᵀ | Aᵀ] only in the order of the blocks, so the rank is r. The quotient R/(A,B) is not “the patterns left over”; it sorts the patterns of R into classes: p and q are in the same class exactly when p + q lies in the ideal (adding some uA + vB turns p into q). Every class holds as many patterns as the ideal does (2r), so there are 2lm ÷ 2r = 2lm − r classes, and the quotient has dimension lm − r, which is the deficit.

toric_L3 手算:A = 1 + x,B = 1 + y。u·A 的每一项放下一对横向相邻的格子,v·B 的每一项放下一对纵向相邻的格子;叠加时的抵消也是一个格子被放了两次,所以 uA + vB 里 1 的个数总是偶数。反过来,任何偶数个格子都凑得出来:把它们两两配对,每一对之间沿一条路径走,路径上每一步都是一对相邻格子,叠起来中间全部抵消,只剩两端。所以 (A, B) 恰好是「偶数个 1 的全部图案」,共 28 = 256 个,维数 8,与表中 toric_L3 的秩 8 一致。于是 toric_L3 的 29 = 512 个图案正好分成两类:偶数个 1 的全部图案是一类(包括全 0,也就是理想本身);奇数个 1 的全部图案是另一类(例如单个格子 (0,0))。两类 = 21,商的维数 9 − 8 = 1,k = 2 × 1 = 2。注意奇数类里任意两个图案相加都回到偶数类,它不是一块「A、B 够不着的补集」,而是一个类。gross 的图案不能这样一眼看出,秩 66 要靠消元,商的维数 72 − 66 = 6,k = 12。

By hand on toric_L3: A = 1 + x, B = 1 + y. Each term of u·A drops a horizontally adjacent pair of sites, each term of v·B a vertically adjacent pair; cancellation when overlaying also removes a site placed twice, so uA + vB always has an even number of 1s. Conversely any even set of sites can be built: pair them up and walk a path between the two sites of each pair; every step of the path is an adjacent pair, and overlaid they cancel everywhere except at the two ends. So (A, B) is exactly “all patterns with an even number of 1s”, 28 = 256 of them, dimension 8, matching the rank 8 of toric_L3 in the table. The 29 = 512 patterns of toric_L3 therefore fall into exactly two classes: all patterns with an even number of 1s form one class (it contains the all-zero pattern and is the ideal itself); all patterns with an odd number of 1s form the other (for example the single site (0,0)). Two classes = 21, the quotient has dimension 9 − 8 = 1, and k = 2 × 1 = 2. Note that adding any two patterns of the odd class lands back in the even class: it is a class, not a “complement that A and B cannot reach”. For gross the patterns cannot be read off at a glance: the rank 66 takes elimination, the quotient has dimension 72 − 66 = 6, and k = 12.

一个具体的路径例子(图 2.A):单格 (0,0) 与单格 (2,1) 同类,因为它们的和 1 + x2y 在理想里:(1 + x)·A + x2·B = (1 + x2) + (x2 + x2y) = 1 + x2y。一步一步看:1·A 放下 (0,0)、(1,0),x·A 放下 (1,0)、(2,0),x2·B 放下 (2,0)、(2,1);(1,0) 与 (2,0) 各被放两次,模 2 消掉,只剩两端。

A concrete path example (Fig. 2.A): the single site (0,0) and the single site (2,1) are in the same class, because their sum 1 + x2y lies in the ideal: (1 + x)·A + x2·B = (1 + x2) + (x2 + x2y) = 1 + x2y. Step by step: 1·A drops (0,0), (1,0); x·A drops (1,0), (2,0); x2·B drops (2,0), (2,1); (1,0) and (2,0) are each placed twice and cancel mod 2, leaving only the two ends.

i=012 j=012 1·A1·Ax·Ax·Ax²·Bx²·B A = 1 + x:一对横向相邻的格子A = 1 + x: a horizontal pair of sitesB = 1 + y:一对纵向相邻的格子B = 1 + y: a vertical pair of sites1·A 放下 (0,0)、(1,0)1·A drops (0,0), (1,0)x·A 放下 (1,0)、(2,0)x·A drops (1,0), (2,0)x²·B 放下 (2,0)、(2,1)x²·B drops (2,0), (2,1)× = 被放了两次,模 2 相消× = placed twice, cancels mod 2剩下的只有两端 (0,0)、(2,1):only the two ends (0,0), (2,1) remain:(1 + x)·A + x²·B = 1 + x²y(1 + x)·A + x²·B = 1 + x²y所以单格 (0,0) 与单格 (2,1) 同类so the single site (0,0) and the single(两者之和在理想里)site (2,1) are in the same class 虚线框 = 3 × 3 环面的一个周期;灰点 = 格子;灰色数字 = 坐标 i(向右)、j(向上)dashed box = one period of the 3 × 3 torus; grey dots = sites; grey numbers = coordinates i (right), j (up)
图 2.AFig. 2.A toric_L3 的 3 × 3 环面上,一个图案就是一组格子(多项式的一项 xiyj = 格子 (i, j))。橙色的两块横条是 1·A 与 x·A(A = 1 + x 放下一对横向相邻的格子),蓝色竖条是 x2·B(B = 1 + y 放下一对纵向相邻的格子)。× 标出被放了两次、模 2 相消的格子;实心大点是剩下的两端。 On the 3 × 3 torus of toric_L3 a pattern is a set of sites (a term xiyj of a polynomial = site (i, j)). The two amber horizontal bars are 1·A and x·A (A = 1 + x drops a horizontally adjacent pair), the blue vertical bar is x2·B (B = 1 + y drops a vertically adjacent pair). × marks sites placed twice, which cancel mod 2; the large solid dots are the two ends that remain.

2.4d:两份证书,不是一个标签d: two certificates, not one label

n、重量、k 都是一次高斯消元的事;d 不是。账本这一节的标题就叫「Distance: two certificates, not one label」。说 d = 12 要同时交两份东西:下界——证明不存在重量小于 12 的非平凡逻辑算符(要排除的对象太多,不能靠找);上界——拿出一个重量恰为 12 的逻辑算符(一个具体的见证witness:一个具体的、可机器复核的例子。这里指一个与所有检查对易、却不是检查乘积、重量恰为某个数的 Pauli 算符;它只证明 d 不超过那个数。,找到就算)。BB 教程 4.4 节讲过这个分工;第 3 章把 gross 的两份证书各自是谁写的、写在哪里,逐字抄下来——那正是「bounded」这个词的全部内容。

n, weight and k are one Gaussian elimination each; d is not. The ledger's section is titled precisely “Distance: two certificates, not one label”. To say d = 12 you must hand over two things at once: a lower bound, a proof that no non-trivial logical operator of weight below 12 exists (too many objects to exclude by searching); and an upper bound, an actual logical operator of weight exactly 12 (a concrete witnessA concrete, machine-checkable example: here a Pauli operator that commutes with every check, is not a product of checks, and has weight exactly some number; it proves only that d does not exceed that number., which counts as soon as it is found). BB guide section 4.4 introduced this division of labour; Chapter 3 copies out who wrote each of gross's two certificates and where, which is the entire content of the word “bounded”.

关键想法Key idea

四个变量 → n = 2lm、重量 = |A| + |B| 是数数;k = 2(lm − r) 是一次 GF(2) 高斯消元;d 要一条下界证明加一个上界见证。前三类 QEC-Bank 每次验证都重算,所以它们的证据词永远是 verified;d 的证据词取决于两份证书分别是谁给的。

Four variables → n = 2lm and weight = |A| + |B| are counting; k = 2(lm − r) is one Gaussian elimination over GF(2); d needs a lower-bound proof plus an upper-bound witness. The QEC-Bank recomputes the first three on every verification run, so their evidence word is always verified; the evidence word of d depends on who supplied each of the two certificates.

第 3 章Chapter 3

两个已发布实例,与它们的证据词The two shipped instances and their evidence words

QEC-Bank 的参数表看上去只是两行六个数,但每个数旁边都有一个词:verified 或 bounded。这一章逐字转录 instances.yaml,解释 verified 是哪台机器怎样写下的,再把 gross 那行 d = 12 的「bounded」拆成两半:下界是谁的,上界是谁的,为什么两个 12 相等却仍不叫 verified。 The QEC-Bank parameters table looks like two rows of six numbers, but beside each stands a word: verified or bounded. This chapter transcribes instances.yaml word for word, explains which machine writes verified and how, and then splits the “bounded” on the gross row d = 12 into its two halves: whose lower bound, whose upper bound, and why two equal twelves still do not earn verified.

3.1实例表The instance table

下表逐字转录 codes/bivariate_bicycle/instances.yaml 与 QEC-Bank 参数页。斜体是证据词(QEC-Bank 称 origin kind)。

The table transcribes codes/bivariate_bicycle/instances.yaml and the QEC-Bank parameters page verbatim. Italics are the evidence words (the QEC-Bank calls them origin kinds).

实例Instancel × mABnkdcssd 的依据Basis for d
gross12 × 6x³ + y + y²y³ + x + x²144 verified12 verified12 boundedtrue verified下界 12:bravyi2024bicycle(引文,未重放);上界 12:rand-lowweight-v1,seed 5,iters 2000lower 12: bravyi2024bicycle (cited, not replayed); upper 12: rand-lowweight-v1, seed 5, iters 2000
toric_L33 × 31 + x1 + y18 verified2 verified3 verifiedtrue verified穷举 CSS 逻辑算符(exact-css-enum),exact: 3exhaustive CSS logical enumeration (exact-css-enum), exact: 3

表中字母:l、m = 环面的宽与高,A、B = 两个多项式,n = 数据比特数,k = 逻辑比特数,d = 码距,css = 两族检查是否全部对易(HXHZT = 0,模 2)。Letters in the table: l, m = width and height of the torus, A, B = the two polynomials, n = data qubits, k = logical qubits, d = distance, css = whether the two check families all commute (HXHZT = 0 mod 2).

注意两行的 d 写法不同。toric_L3 是 {property: d, exact: 3}——一个数、一个词 verified。gross 是三行:lower、upper、origin——同一个 12 出现两次,各带自己的来源。这个结构差异不是排版偶然,它就是本章的主题。

Notice that the two rows write d differently. toric_L3 is {property: d, exact: 3}: one number, one word, verified. gross is three lines, lower, upper, origin: the same 12 appears twice, each with its own source. This structural difference is no accident of layout; it is the subject of this chapter.

3.2verified 是怎么写下的How “verified” gets written

n、k、css 的 verified 直白:验证器(make verify-entry E=codes/bivariate_bicycle)重新运行构造器,读矩阵宽度得 n,做两次 GF(2) 高斯消元得 k,检查 HXHZT 是否全零得 css,再与 yaml 里的声明比对。两个实例三项全部相符,所以六个 verified;加上 toric_L3 的 d,共七个。toric_L3 的 d 也是 verified,方法 exact-css-enum:逐一枚举所有重量小于 3 的候选,确认每一个要么触发某条检查、要么本身是检查的乘积,没有一个是逻辑算符;再出示一个重量 3 的逻辑算符。18 个比特的枚举量很小(BB 教程 5.1 节说过它是「检验约定的锚点」:把转置忘掉,检查立刻不再两两对易),所以 toric_L3 三个数全是 verified。

The verified on n, k and css is straightforward: the verifier (make verify-entry E=codes/bivariate_bicycle) reruns the constructor, reads n off the matrix width, does two Gaussian eliminations over GF(2) for k, checks that HXHZT is all zero for css, and compares with the yaml claims. All three items agree for both instances, hence six verifieds; with toric_L3's d that makes seven. The d of toric_L3 is also verified, by exact-css-enum: enumerate one by one every candidate of weight below 3, confirm that each either trips some check or is itself a product of checks, so none is a logical; then exhibit one logical of weight 3. For 18 qubits the enumeration is tiny (BB guide section 5.1 called it “the anchor that checks conventions”: forget the transpose and the checks stop commuting at once), so all three numbers of toric_L3 are verified.

3.3为什么 gross 是 bounded:下界是引文,上界是种子搜索Why gross is bounded: a cited lower bound, a seeded-search upper bound

gross 有 144 个比特。要穷举重量 1 到 11 的全部候选,数量级远超验证器的例行预算(下一篇形式化证书导读会算这个数)。于是 QEC-Bank 把 d 的声明拆成两半分别记账,instances.yaml 原文:

Gross has 144 qubits. Exhausting every candidate of weight 1 to 11 is far beyond the verifier's routine budget by many orders of magnitude (the formal-certificates guide computes that number). So the QEC-Bank splits the distance claim into two separately book-kept halves; the instances.yaml text reads:

- property: d
 lower: {value: 12}
 upper: {value: 12, method: rand-lowweight-v1,
    seed: 5, iters: 2000}
 origin: {kind: bounded, ref: bravyi2024bicycle}

d = 码距;lower/upper 的 value = 下界与上界的数值;method = 上界搜索算法的名字;seed、iters = 搜索的随机种子与迭代次数;origin = 整条声明的证据词与引文。d = distance; the value under lower/upper = the numerical bound; method = the name of the upper-bound search; seed, iters = its random seed and iteration count; origin = the evidence word and citation of the whole claim.

下界 d ≥ 12:引文。账本原话:「bravyi2024bicycle supplies the claim that no nontrivial logical Pauli has weight below 12. The QEC-Bank does not currently replay that lower-bound certificate. The citation is therefore part of the structured origin, not decorative bibliography.」人话:「没有比 12 更轻的逻辑算符」这句话是 Bravyi、Cross、Gambetta、Maslov、Rall、Yoder 的论文(“High-Threshold and Low-Overhead Fault-Tolerant Quantum Memory”,2024)说的,QEC-Bank 的机器没有自己重算这一半;所以 ref: bravyi2024bicycle 写在 origin 里,是这条声明的结构性组成部分,不是文末装饰。

Lower bound d ≥ 12: a citation. In the ledger's words: “bravyi2024bicycle supplies the claim that no nontrivial logical Pauli has weight below 12. The QEC-Bank does not currently replay that lower-bound certificate. The citation is therefore part of the structured origin, not decorative bibliography.” Plainly: the statement “nothing lighter than 12 is a logical” comes from the paper by Bravyi, Cross, Gambetta, Maslov, Rall and Yoder (“High-Threshold and Low-Overhead Fault-Tolerant Quantum Memory”, 2024), and the QEC-Bank machine did not recompute that half; so ref: bravyi2024bicycle sits inside origin as a structural part of the claim, not as an ornament at the end.

上界 d ≤ 12:种子搜索。验证器每次都重跑一个确定性的低重量搜索 rand-lowweight-v1。账本描述了它的步骤:构造中心化子零空间与全部同类检查对易的 Pauli 算符构成的空间:X 型即 H_Z v = 0 的解 v。逻辑算符就住在这个空间里、稳定子行空间之外。(与所有 Z 检查对易的 X 串,即 HZv = 0 的解),用 NumPy 种子 5 抽取确定性的二元组合,排除落在稳定子类里的,再用同类稳定子贪心地减轻代表的重量,在 2000 次迭代内找到重量 12。这是「a rerunnable existence witness for a logical of weight at most 12」——一个可重跑的存在性见证:d 至多 12。

Upper bound d ≤ 12: a seeded search. On every run the verifier reruns a deterministic low-weight search, rand-lowweight-v1. The ledger describes its steps: build the centralizer nullspaceThe space of Pauli operators commuting with every check of one type: for X-type, the solutions v of H_Z v = 0. Logical operators live in this space, outside the stabilizer row space. (X strings commuting with every Z check, i.e. solutions of HZv = 0), sample deterministic binary combinations with NumPy seed 5, reject those that fall in a stabilizer class, greedily reduce each representative's weight by same-type stabilizers, and find weight 12 within 2,000 iterations. This is “a rerunnable existence witness for a logical of weight at most 12”: d is at most 12.

为什么两个 12 相等还叫 bounded。账本:「Because the cited lower bound and machine upper bound meet, d = 12. The origin is bounded, not verified: the machine has not exhaustively excluded weights one through eleven at n = 144.」规则很干脆:只要下界那一半不是 QEC-Bank 自己穷举出来的,整条声明就叫 bounded。bounded 不是「可能不对」,它是一句精确的话:「上界机器可重跑,下界靠引文,两者没有被同一台穷举机器合拢」。

Why two equal twelves are still bounded. The ledger: “Because the cited lower bound and machine upper bound meet, d = 12. The origin is bounded, not verified: the machine has not exhaustively excluded weights one through eleven at n = 144.” The rule is blunt: whenever the lower half was not exhaustively produced by the QEC-Bank itself, the whole claim is called bounded. Bounded does not mean “possibly wrong”; it is the precise sentence “the upper bound is machine-rerunnable, the lower bound rests on a citation, and the two were not closed by one exhaustive machine”.

为什么是种子 5,不是种子 0?Why seed 5 and not seed 0?

账本对此专门作了说明:「The seed is not tuned data. A seed-zero run with 2,000 iterations reaches only weight 14, while a longer seed-zero run reaches 12. The stored seed-five search is a compact deterministic witness.」人话:种子 0 跑 2000 次只能压到重量 14,跑更久也能到 12;存种子 5 只是为了让见证短而确定,不是挑一个「好看」的数据。存下来的见证必须每次重跑都得到同一个 12,否则验证失败。BB 教程的实验台几秒内只能把 gross 压到 16 左右(4.4 节),QEC-Bank 的 2000 次迭代才到 12——同一件事,预算不同。账本还写明了将来的处理规则:「If a future engine finds a smaller logical, verification reports an improvement or mismatch; the expected distance must then be diagnosed against the literature rather than adjusted silently.」若哪天有搜索找到重量 11 的逻辑算符,验证器会报告不符,而不是悄悄把 12 改成 11——因为那将与引文的下界矛盾,需要人去诊断。

The ledger addresses this directly: “The seed is not tuned data. A seed-zero run with 2,000 iterations reaches only weight 14, while a longer seed-zero run reaches 12. The stored seed-five search is a compact deterministic witness.” Plainly: seed 0 reaches only weight 14 in 2,000 iterations and does reach 12 if run longer; seed 5 is stored to keep the witness short and deterministic, not to pick a flattering number. The stored witness must reproduce the same 12 on every rerun or verification fails. The BB guide's bench only gets gross down to about 16 in a few seconds (section 4.4); the QEC-Bank's 2,000 iterations reach 12: the same task on different budgets. The ledger also fixes the rule for the future: “If a future engine finds a smaller logical, verification reports an improvement or mismatch; the expected distance must then be diagnosed against the literature rather than adjusted silently.” Should some search one day find a weight-11 logical, the verifier reports a mismatch rather than quietly changing 12 to 11, because that would contradict the cited lower bound and needs a human diagnosis.

诚实说明Honesty box

QEC-Bank 的 intuition.md 把这条分界线说成「that remaining division of trust is explicit」——尚存的这一份信任分工是明写的。gross 的 n = 144、k = 12、css、上界 12 是机器的;下界 12 是文献的。二者合起来我们「知道」d = 12,但 QEC-Bank 不把两种来源的结论混写成一个 verified。这条分界线在形式化 IR 与证书那一侧面会以「gross 没有精确码距证书」的形式再次出现。

The QEC-Bank file intuition.md puts this line as “that remaining division of trust is explicit”. Gross's n = 144, k = 12, css and the upper bound 12 belong to the machine; the lower bound 12 belongs to the literature. Together we “know” d = 12, but the QEC-Bank does not blend two kinds of source into one verified. The same line reappears in the Formal IR & certificates facet as “gross holds no exact-distance certificate”.

检查站Checkpoint第 3 章Chapter 3
假设 QEC-Bank 把 rand-lowweight-v1 的迭代次数从 2000 提到 2 000 000,依然只找到重量 12 的逻辑算符。gross 的 d 会从 bounded 变成 verified 吗?Suppose the QEC-Bank raised the rand-lowweight-v1 iterations from 2,000 to 2,000,000 and still found nothing lighter than weight 12. Would the gross distance go from bounded to verified?

对。「没找到更轻的」和「不存在更轻的」是两回事。只有穷举(如 toric_L3 的 exact-css-enum)或另一种完备证书能把下界交给机器;在 n = 144 上这超出了验证器的例行预算,所以 bounded 已经是诚实且完整的记录。

Right. “Found nothing lighter” and “nothing lighter exists” are different statements. Only exhaustion (like toric_L3's exact-css-enum) or another complete certificate hands the lower bound to a machine; at n = 144 that is beyond the verifier's routine budget, so bounded is already the honest and complete record.

问自己:随机搜索能排除重量 11 的逻辑算符吗?它只能找到东西,不能证明找不到。而 claimed 是「机器什么都没算」,gross 的 n、k、上界都是机器算的。

Ask: can a random search rule out a weight-11 logical? It can only find things, never prove absence. And claimed means “the machine computed nothing”, whereas gross's n, k and upper bound are all machine results.

第 4 章Chapter 4

家族的其他成员:Table 3 的亲戚住在各自的条目里The rest of the family: the Table 3 relatives live in their own entries

BB 教程讲了八个码,可 bivariate_bicycle 条目只发布两个实例。另外六个在哪?它们各有一张自己的 QEC-Bank 卡,而且卡上 d 的证据词多半是 claimed。这一章把八张卡并排放好,说清每个 d 后面站着哪个词,以及为什么「gross」这个名字在 QEC-Bank 里指向两张不同的卡。 The BB guide covered eight codes, yet the bivariate_bicycle entry ships only two instances. Where are the other six? Each has its own QEC-Bank card, and on most of those cards the evidence word of d is claimed. This chapter lines up the eight cards, states which word stands behind each d, and explains why the name “gross” points to two different cards in the QEC-Bank.

4.1八张卡,三个证据词Eight cards, three evidence words

先让浏览器把七个 BB 码的 n、rank、k 现场重算一遍(下表第一行的 bicycle 是单变量的祖先,不在这个构造器里,只出现在静态表中;点「重算 n 与 k」;再点「再加低重搜索」可以看到本页几秒钟的搜索能把 d 压到哪里,那只是上界)。表的「证据」一列就是 QEC-Bank 各条目上 d 旁边的词。

First let the browser recompute n, rank and k for the seven BB codes live (bicycle, the first row of the table below, is the univariate ancestor and is not in this constructor; it appears only in the static table; press “Recompute n and k”; “Also run the low-weight search” shows how far a few seconds of search on this page can push d, an upper bound only). The “evidence” column is the word beside d on each QEC-Bank entry.

下表把每个码送回它在 QEC-Bank 里的家。Table 3 指 bravyi2024bicycle 论文(arXiv 2308.07915)里列出 BB 码的那张表,共七个:[[72,12,6]]、[[90,8,10]]、[[108,8,10]]、[[144,12,12]]、[[288,12,18]],以及两个只知道码距上界的更大例子 [[360,12,≤24]] 与 [[756,16,≤34]](「≤」表示论文写作时只有上界)。本篇与 BB 教程只讲前五个,下表也只列这五个;bb72、bb90、bb108、bb288 是它们在 QEC-Bank 里的单独条目(T1 级别的「object」卡:构造器存着精确的多项式约定,重算 n、k,d 照抄论文,其他侧面尚未调研)。

The table below sends each code back to its QEC-Bank home. Table 3 is the table of BB codes in the bravyi2024bicycle paper (arXiv 2308.07915), seven in all: [[72,12,6]], [[90,8,10]], [[108,8,10]], [[144,12,12]], [[288,12,18]], and two larger examples known only up to a distance upper bound, [[360,12,≤24]] and [[756,16,≤34]] (“≤” means only an upper bound was known when the paper was written). This guide and the BB guide cover only the first five, and so does the table below; bb72, bb90, bb108, bb288 are their separate QEC-Bank entries (T1 “object” cards: the constructor stores the exact polynomial convention, recomputes n and k, copies d from the paper, and the other facets are not yet surveyed).

QEC-Bank 条目QEC-Bank entryl × mAB[[n, k, d]]d 的证据词Evidence word of dn/k
bicycle3单变量:C = 1 + x,HX = HZ = [C | Cᵀ](祖先,不是双变量实例)one variable: C = 1 + x, HX = HZ = [C | Cᵀ] (the ancestor, not a bivariate instance)[[6, 2, 2]]verified3
bivariate_bicycle / toric_L33 × 31 + x1 + y[[18, 2, 3]]verified9
bb55 × 31 + x1 + y + x²y²[[30, 4, 5]]verified7.5
bb726 × 6x³ + y + y²y³ + x + x²[[72, 12, 6]]claimed6
bb9015 × 3x⁹ + y + y²1 + x² + x⁷[[90, 8, 10]]claimed11.25
bb1089 × 6x³ + y + y²y³ + x + x²[[108, 8, 10]]claimed13.5
bivariate_bicycle / gross12 × 6x³ + y + y²y³ + x + x²[[144, 12, 12]]bounded12
gross(另一张卡) (a second card)12 × 6x³ + y + y²y³ + x + x²[[144, 12, ?]]未登记(页面显示 d = ?)not recorded (page shows d = ?)12
bb28812 × 12x³ + y² + y⁷y³ + x + x²[[288, 12, 18]]claimed24

表中字母:l、m = 环面的宽与高,A、B = 两个多项式(bicycle 只有一个 C),n = 数据比特数,k = 逻辑比特数,d = 码距,n/k = 每个逻辑比特平均占用的数据比特数。n、k 在所有条目上都是 verified。Letters in the table: l, m = width and height of the torus, A, B = the two polynomials (bicycle has a single C), n = data qubits, k = logical qubits, d = distance, n/k = data qubits per logical qubit. n and k are verified on every entry.

三个词的分布不是随机的。能穷举的小码(bicycle 6 比特、toric_L3 18 比特、bb5 30 比特)d 全是 verified;Table 3 里本篇讲到的另外四个码 d 全是 claimed——QEC-Bank 重算了它们的 n、k,但 d = 6、10、10、18 是照抄论文,连上界见证也没有登记;只有 gross 是 bounded,因为它是 bivariate_bicycle 这张 T3 级别条目的主实例(T0、T1、T3 是 QEC-Bank 的条目等级;这里只需知道:上面说的 T1 卡只有构造器与 n、k,而 bivariate_bicycle 这张卡的各个侧面都已调研),条目为它跑了种子搜索。人话:同一张 Table 3 里,「d = 12」比「d = 6」在 QEC-Bank 里多了半份机器证书,不是因为 12 更可信,而是因为 QEC-Bank 对 gross 多做了工作。

The distribution of the three words is not random. The small codes that can be exhausted (bicycle at 6 qubits, toric_L3 at 18, bb5 at 30) all have d verified; the other four Table 3 codes covered here all have d claimed: the QEC-Bank recomputed their n and k, but d = 6, 10, 10, 18 are copied from the paper, with not even an upper-bound witness recorded; only gross is bounded, because it is the primary instance of the T3-level bivariate_bicycle entry (T0, T1, T3 are QEC-Bank entry grades; all that matters here is that the T1 cards above hold only a constructor with n and k, while every facet of the bivariate_bicycle card has been surveyed), which ran the seeded search for it. Plainly: within the same Table 3, “d = 12” carries half a machine certificate more than “d = 6” in the QEC-Bank, not because 12 is more believable but because the QEC-Bank did more work on gross.

4.2「gross」为什么有两张卡Why “gross” has two cards

表里出现了两次 [[144, 12, ·]]。一张是 bivariate_bicycle 条目的实例 gross——本篇的主角,d = 12 bounded。另一张是 QEC-Bank 里单独的 gross 条目,主体是 eczoo 的集合 eczoo-entity:gross#collection,级别 T1,状态「admitted」;它的构造器同样重算了 n = 144、k = 12(都 verified),但参数表的 d 一栏是空的,页面直接显示 d=?,且译码、操作、关系、实现四个侧面「remain unsurveyed」。两张卡描述的是同一个 144 比特的矩阵,但 QEC-Bank 的原则是「Source, page, and formal object are separate identities」——来源、页面与形式对象是三个不同的身份,eczoo 里有一个叫 gross code 的条目,QEC-Bank 就为它保留一张卡。读到「gross code」时先看是哪张卡:本篇引用的所有数字与证据词都来自 bivariate_bicycle 那张。

[[144, 12, ·]] appears twice in the table. One is the instance gross of the bivariate_bicycle entry, the subject of this guide, d = 12 bounded. The other is the QEC-Bank's separate gross entry, whose subject is the eczoo collection eczoo-entity:gross#collection, tier T1, status “admitted”; its constructor likewise recomputes n = 144 and k = 12 (both verified), but the d column of its parameters table is empty, the page shows d=?, and its decoder, operation, relation and realization facets “remain unsurveyed”. Both cards describe the same 144-qubit matrix, but the QEC-Bank principle is “Source, page, and formal object are separate identities”: eczoo has an entry called gross code, so the QEC-Bank keeps a card for it. When you read “gross code”, check which card it is; every number and evidence word quoted in this guide comes from the bivariate_bicycle card.

易错点Pitfall

「QEC-Bank 里有 [[288,12,18]]」不等于「QEC-Bank 验证了 d = 18」。bb288 条目上 n = 288、k = 12 是 verified,d = 18 是 claimed:机器只重算了两个秩(各 138),没有对 d 做任何事。读任何一张 BB 参数表时,把 d 后面的词一起读出来。

“The QEC-Bank has [[288,12,18]]” is not “the QEC-Bank verified d = 18”. On the bb288 entry n = 288 and k = 12 are verified, d = 18 is claimed: the machine recomputed only the two ranks (138 each) and did nothing about d. Whenever you read a BB parameter table, read the word after d aloud with it.

第 5 章Chapter 5

十二倍的边界:帮手比特、电路码距与渐近The limits of twelve-fold: helpers, circuit distance and asymptotics

「gross 码比表面码省十二倍」是这个条目最常被转述的一句话。这一章把它拆开:它比的是什么(只比数据比特)、加上帮手比特后变成什么(288 对 287)、静态的 12 为什么不等于电路的 12,以及为什么这个漂亮的常数不能外推成「渐近好」。前三项来自 QEC-Bank 的账本,最后一项是一条文献声明。 “The gross code saves twelve-fold over the surface code” is the most repeated sentence about this entry. This chapter takes it apart: what it compares (data qubits only), what it becomes with helper qubits included (288 versus 287), why the static 12 is not the circuit's 12, and why this handsome constant cannot be extrapolated to “asymptotically good”. The first three come from the QEC-Bank ledger; the last is a literature claim.

5.1只比数据比特:n/k = 12 对 d² = 144Data qubits only: n/k = 12 against d² = 144

账本的算法很简单:gross 每个逻辑比特平均占 n/k = 144/12 = 12 个数据比特,码距 12。文献里的旋转表面码要达到同样的码距 12,一块贴片用 d² = 144 个数据比特存 1 个逻辑比特(旋转贴片 [[d², 1, d]] 的数字见表面码「参数与实例」导读 4.2 节,那是本侧面的表面码版本)。144 ÷ 12 = 12,这就是 bravyi2024bicycle 强调的「twelve-fold finite-block comparison」:码距相同时每个逻辑比特占的数据比特数之比。同一篇论文的标题数字是另一种比法,来自电路级噪声下的数值模拟(第 3、8 节):每个操作(CNOT、制备、测量、空等)以概率 p = 0.1% 独立出错的标准去极化电路噪声;gross 一侧用 MIN-SUM 置信传播加 combination-sweep 版本的 OSD 译码,288 个物理比特(含帮手),估计每轮逻辑错误率约 2 × 10⁻⁷,论文由此估计能把 12 个逻辑比特保存近一百万轮症状测量;对照是 12 块独立的旋转表面码贴片,要把每轮错误率从 10⁻³ 压到 10⁻⁶ 需要近 3000 个物理比特,论文说节省超过 10 倍。两个数字比的东西不同:一个固定码距、只数数据比特;另一个在同一噪声模型下、逻辑错误率大致相当时比物理比特总数(约 2 × 10⁻⁷ 对 10⁻⁶,并不相等,所以「10 倍」是近似的),而且依赖电路、噪声模型与译码器。BB 教程的1.2 节已经画过这张图,这里再放一次,把鼠标停在点上看 k·d²/n:表面码约为 1,gross 是 12。

The ledger's arithmetic is simple: gross spends n/k = 144/12 = 12 data qubits per logical qubit at distance 12. To reach the same distance 12, the rotated surface code of the literature uses one patch of d² = 144 data qubits for 1 logical qubit (the rotated-patch numbers [[d², 1, d]] are in section 4.2 of the surface-code “Parameters & instances” guide, the surface-code version of this facet). 144 ÷ 12 = 12: this is the “twelve-fold finite-block comparison” that bravyi2024bicycle emphasises, the ratio of data qubits per logical qubit at equal distance. The headline number of the same paper compares something else and comes from numerical simulation under circuit-level noise (sections 3 and 8): the standard depolarizing circuit noise in which every operation (CNOT, preparation, measurement, idling) fails independently with probability p = 0.1%; on the gross side, MIN-SUM belief propagation with the combination-sweep version of OSD as decoder, 288 physical qubits (helpers included), an estimated logical error rate of about 2 × 10⁻⁷ per cycle, from which the paper estimates that 12 logical qubits survive nearly one million syndrome cycles; the comparator is 12 separate rotated surface-code patches, which need nearly 3000 physical qubits to push the per-cycle error rate from 10⁻³ down to 10⁻⁶, and the paper claims a saving of more than 10 times. The two numbers compare different things: one at equal distance counting data qubits only; the other counts all physical qubits at roughly comparable logical error rates under one noise model (about 2 × 10⁻⁷ versus 10⁻⁶, not equal, so “10 times” is approximate), and it depends on the circuit, the noise model and the decoder. Section 1.2 of the BB guide drew this picture already; here it is again. Hover a point for k·d²/n: about 1 for surface codes, 12 for gross.

gross: n/k = 144/12 = 12
旋转表面码 d = 12rotated surface code, d = 12: d² = 144 个数据比特存 1 个data qubits for 1
144 / 12 = 12

n = 数据比特数,k = 逻辑比特数,d = 码距;n/k = 每个逻辑比特平均占用的数据比特数。n = data qubits, k = logical qubits, d = distance; n/k = data qubits per logical qubit.

5.2算上帮手:288 个物理比特Counting the helpers: 288 physical qubits

[[n,k,d]] 的 n 只数数据比特。真实芯片上每条检查要一个帮手比特辅助比特(ancilla):专职测一条检查的量子比特,依次和该检查的数据比特做 CNOT 再被读出。表面码教程里打开过这个黑盒。去测它。gross 有 72 条 X 检查加 72 条 Z 检查共 144 条,按每条一个帮手,就是 144 个帮手比特;数据 144 加帮手 144,共 288 个物理比特存 12 个逻辑比特。BB 教程 5.6 节给过这个 288。对照组:旋转表面码 d = 12 是 144 个数据比特加 143 个帮手,共 287 个物理比特存 1 个(表面码参数导读的同一节,来自表面码条目的 reproduce.py 断言)。288 对 287,几乎相同的物理比特数,12 个逻辑比特对 1 个——加上帮手后,倍数仍然接近十二。

The n in [[n,k,d]] counts data qubits only. On a real chip every check needs a helper qubitAn ancilla: a qubit dedicated to measuring one check, which performs CNOTs with that check's data qubits in turn and is then read out. The surface-code guide opened this box. to measure it. Gross has 72 X checks plus 72 Z checks, 144 in all, so one helper each gives 144 helper qubits; 144 data plus 144 helpers is 288 physical qubits storing 12 logical qubits. BB guide section 5.6 gave this 288. The comparison: the rotated surface code at d = 12 is 144 data qubits plus 143 helpers, 287 physical qubits storing 1 (the same section of the surface-code parameters guide, from the surface entry's reproduce.py assertions). 288 against 287, nearly identical physical-qubit counts, 12 logical qubits against 1: with helpers included the factor stays close to twelve.

但账本立刻划出边界:「It is not a full-machine ratio.」一个 BB 周期还需要「syndrome ancillas, degree-six interactions, a seven-CNOT-layer schedule in the original proposal, measurement/reset, classical detector processing, and BP-OSD」——六腿的相互作用要两层耦合的芯片、原论文深度 7 的 CNOT 调度、测量与复位、经典探测器处理和 BP-OSD 译码器;架构还可能加上「movement, communication, spare blocks, or surface-code ancillas for logical operations」。结论是一条方法论:「Comparisons must put the same resources in both denominators」——比较时两边的分母必须数同样的东西。

But the ledger draws the line at once: “It is not a full-machine ratio.” A BB cycle also needs “syndrome ancillas, degree-six interactions, a seven-CNOT-layer schedule in the original proposal, measurement/reset, classical detector processing, and BP-OSD”: the six-legged interactions need a two-layer coupling chip, the original paper's depth-7 CNOT schedule, measurement and reset, classical detector processing and the BP-OSD decoder; architectures may further add “movement, communication, spare blocks, or surface-code ancillas for logical operations”. The conclusion is a rule of method: “Comparisons must put the same resources in both denominators”.

gross 含帮手gross with helpers: 144 + 144 = 288 → k = 12
旋转表面码 d = 12 含帮手rotated surface d = 12 with helpers: 144 + 143 = 287 → k = 1

第一个加数 = 数据比特数 n,第二个加数 = 帮手比特数 = 检查条数(gross 72 + 72 = 144);k = 逻辑比特数。两边都不含耦合器、布线、译码硬件。First summand = data qubits n, second = helper qubits = number of checks (gross: 72 + 72 = 144); k = logical qubits. Neither side includes couplers, routing or decoder hardware.

5.3静态的 12 不是电路的 12The static 12 is not the circuit's 12

账本还有一节「Static versus circuit distance」,说的是:12 属于静态稳定子码。一旦用电路去测症状,就定义了一个时空故障码spacetime fault code:把「电路里每个位置可能出的每种错」当作比特、「探测器」当作检查得到的更大的码;电路码距是能在其中造成一个不可探测的非平凡逻辑错误的最少故障数,可以小于静态码距。,其「minimum undetectable fault set can be smaller」。这里要读准:电路码距数的是最少几个电路故障能既骗过所有探测器、又真的改变逻辑信息(造成一个非平凡的逻辑错误),这个数可能少于 12。只骗过探测器还不够:有些故障组合彼此抵消,或者合起来只等于一个稳定子,逃过了探测也无害,不算。Bravyi 等(arXiv 2308.07915 第 6 节)的定义是:Z 型电路码距是「the minimum number of faulty operations in the SM circuit that can generate an undetectable Z-type logical error」,X 型同理,电路码距取两者中较小的;他们对 gross 的深度 7 电路只算出上界 dcirc ≤ 10(表 1)。原因在 BB 教程 6.2 节讲过:帮手比特中途出错会沿后续 CNOT 传播到多个数据比特,CNOT 的顺序决定它传到哪里。于是账本列出四件不能从静态账本推出的事:「a distance-12 fault circuit; a universal threshold; a decoder-independent logical error rate; a logical-gate error rate」。这四件事分别归译码器与逻辑操作两个侧面管。人话:本篇的 12 是矩阵的性质;芯片上能不能拿到 12,要看电路。

The ledger has a further section, “Static versus circuit distance”: the 12 belongs to the static stabilizer code. As soon as a circuit measures the syndrome, it defines a spacetime fault codeThe larger code obtained by treating “each possible fault at each circuit location” as a bit and “detectors” as checks; its circuit distance, the fewest faults that can cause an undetectable non-trivial logical error, can be smaller than the static distance. whose “minimum undetectable fault set can be smaller”. Read it carefully: the circuit distance counts the fewest circuit faults that both fool every detector and actually change the logical information (cause a non-trivial logical error), and that number may be below 12. Fooling the detectors is not enough: some fault combinations cancel each other, or add up to a mere stabilizer; they escape detection and do no harm, and they do not count. The definition of Bravyi et al. (arXiv 2308.07915, section 6): the Z-type circuit distance is “the minimum number of faulty operations in the SM circuit that can generate an undetectable Z-type logical error”, likewise for X, and the circuit distance is the smaller of the two; for the depth-7 circuit of gross they obtain only the upper bound dcirc ≤ 10 (Table 1). The reason was given in BB guide section 6.2: a helper qubit that fails midway spreads through later CNOTs onto several data qubits, and the CNOT order decides where. Hence the ledger lists four things that do not follow from the static ledger: “a distance-12 fault circuit; a universal threshold; a decoder-independent logical error rate; a logical-gate error rate”. They belong to the Decoders and Logical operations facets. Plainly: this guide's 12 is a property of a matrix; whether a chip gets 12 depends on the circuit.

5.4渐近:一条文献声明,不是账本结论Asymptotics: a literature claim, not a ledger conclusion

gross 的 k·d²/n = 12 远高于表面码的约 1,很容易让人以为「把环面放大,这个数会一直涨」。QEC-Bank 的 intuition.md 把这列为失败模式之一:「Finite constants do not imply asymptotic goodness. The gross point is a strong finite block. It is not evidence that fixed sparse polynomials evade two-dimensional tradeoffs as the torus grows.」人话:gross 是一个很强的有限块;固定两个多项式、只放大环面,并不能逃出 BPT 界那种二维权衡。BPT 界(Bravyi、Poulin、Terhal,arXiv 0909.5200)的前提有两条:比特排在二维格子上,单位面积里的比特数有上限;每条检查只碰相距不超过某个固定距离的比特。满足这两条的码必须有 k·d² ≤ c·n,常数 c 只取决于检查的作用范围和每个格点的维数,与码有多大无关。固定两个多项式、只放大环面时,每条检查的腿仍是那几个固定的平移,作用范围不变,两条前提都成立,界直接管用,k·d²/n 不能无限上涨。若只固定项数、让指数随环面一起变大,检查可以伸得越来越远,第二条前提不再成立,BPT 不再直接适用;那种情形的限制来自下面这条文献声明。card.yaml 的表示阶梯里有一条 R5 层的「quotient-module」断言,证据词 curated、出处 postema2025existence:商空间 R/(A,B) 控制 k,多项式的因子与公共根解释了「why finite blocks can have high rate, and why the studied subclass is not an asymptotically good family」——为什么有限块可以有高码率,以及为什么所研究的子类不是渐近好的一族。BB 教程 6.6 节用一句话转述过:固定项数、无限放大环面时,码率与相对距离不能同时保持非零。

Gross's k·d²/n = 12 is far above the surface code's roughly 1, and it is tempting to think “enlarge the torus and this number keeps rising”. The QEC-Bank file intuition.md lists this among the failure modes: “Finite constants do not imply asymptotic goodness. The gross point is a strong finite block. It is not evidence that fixed sparse polynomials evade two-dimensional tradeoffs as the torus grows.” Plainly: gross is a strong finite block; fixing the two polynomials and only enlarging the torus does not escape the two-dimensional trade-off of the BPT bound. The BPT bound (Bravyi, Poulin, Terhal, arXiv 0909.5200) has two premises: the qubits sit on a two-dimensional lattice with a bounded number per unit area, and every check touches only qubits within some fixed distance of each other. Codes meeting both must satisfy k·d² ≤ c·n, where the constant c depends only on the check range and the dimension per lattice site, not on the size of the code. With the two polynomials fixed and only the torus growing, the legs of every check are still the same few translations, the range does not change, both premises hold, and the bound applies directly: k·d²/n cannot rise without limit. If only the number of terms is fixed and the exponents grow with the torus, checks can reach further and further, the second premise fails and BPT no longer applies directly; the limit in that case comes from the literature claim below. In card.yaml's representation ladder there is an R5 “quotient-module” assertion, evidence word curated, source postema2025existence: the quotient R/(A,B) controls k, and polynomial factors and common roots explain “why finite blocks can have high rate, and why the studied subclass is not an asymptotically good family”. BB guide section 6.6 paraphrased it in one sentence: with a fixed number of terms and an ever-larger torus, rate and relative distance cannot both stay non-zero.

证据词要读准:这条是 curated(QEC-Bank 整理的文献结论),在 derivations.md 的 provenance split 里归入「Literature claims」的「asymptotic limitation」一项,QEC-Bank 的机器没有、也不可能对「渐近」做任何重算。而且 postema2025existence 在 QEC-Bank 的引文登记里目前是「metadata pending」——文献扫描报告给出的题目是 Postema 与 Kokkelmans 的 “Existence and Characterisation of Bivariate Bicycle Codes”(2025,arXiv 2502.17052),登记待补。真正渐近好的码要换掉阿贝尔群 Zl × Zm,那是qLDPC 教程 4.4 节的主题。

Read the evidence word precisely: this assertion is curated (a literature conclusion organised by the QEC-Bank), filed under “Literature claims” as the “asymptotic limitation” item in the provenance split of derivations.md; the QEC-Bank machine has not, and could not, recompute anything about “asymptotics”. Moreover, postema2025existence is currently “metadata pending” in the QEC-Bank citation registry; the scout report gives the title as Postema and Kokkelmans, “Existence and Characterisation of Bivariate Bicycle Codes” (2025, arXiv 2502.17052), registration pending. Truly asymptotically good codes replace the abelian group Zl × Zm, the subject of section 4.4 of the qLDPC guide.

关键想法Key idea

「十二倍」是一句有四个限定的话:只比数据比特、且码距相同(144/12 对 144/1;若按电路级模拟、逻辑错误率大致相当(约 2 × 10⁻⁷ 对 10⁻⁶)来比,论文给的是 288 对近 3000,超过 10 倍);加帮手后 288 对 287,倍数仍近十二,但两边都没数耦合器、调度、译码器;12 是静态码距,电路码距另算;这是有限块的常数,不是渐近性质。四个限定各有出处,前三条在 QEC-Bank 账本,第四条是文献声明。

“Twelve-fold” is a sentence with four qualifiers: data qubits only, at equal distance (144/12 against 144/1; compared in circuit-level simulation at roughly comparable logical error rates (about 2 × 10⁻⁷ versus 10⁻⁶), the paper gives 288 against nearly 3000, more than ten-fold); with helpers 288 against 287, still nearly twelve, but neither side counts couplers, schedule or decoder; 12 is the static distance, the circuit distance is a separate matter; and it is a finite-block constant, not an asymptotic property. Each qualifier has its source: the first three in the QEC-Bank ledger, the fourth a literature claim.

尾声Epilogue

四个变量,两个实例,三个词Four variables, two instances, three words

回放一遍:BB 条目的家族变量是 l、m、a_terms、b_terms;构造器按正向移位、先行后列、左层在前、交换转置的固定约定拼出 HX = [A | B]、HZ = [Bᵀ | Aᵀ]。n = 2lm 与检查重量 |A| + |B| 是数数,k = 2(lm − r) 是一次 GF(2) 高斯消元,d 要下界证明加上界见证。QEC-Bank 发布 gross 与 toric_L3 两个实例:n、k、css 全部 verified;toric_L3 的 d = 3 由穷举 verified;gross 的 d = 12 由 bravyi2024bicycle 的下界引文与 rand-lowweight-v1(seed 5,iters 2000)的上界见证合成 bounded。本篇讲到的 Table 3 另外四个码住在 bb72、bb90、bb108、bb288 各自的条目里(Table 3 还有 [[360,12,≤24]]、[[756,16,≤34]] 两个,本篇未涉及),d 均为 claimed;bicycle 与 bb5 由穷举 verified;另有一张 T1 的 gross 卡,d 未登记。「十二倍」只比数据比特,加帮手是 288 对 287,静态 12 不是电路 12,渐近坏是一条 curated 的文献声明。

Replay: the BB entry's family variables are l, m, a_terms, b_terms; the constructor assembles HX = [A | B], HZ = [Bᵀ | Aᵀ] under the fixed conventions of forward shift, rows before columns, left layer first, swapped transposes. n = 2lm and the check weight |A| + |B| are counting, k = 2(lm − r) is one Gaussian elimination over GF(2), d needs a lower-bound proof plus an upper-bound witness. The QEC-Bank ships two instances, gross and toric_L3: n, k, css verified throughout; toric_L3's d = 3 verified by enumeration; gross's d = 12 bounded, from the cited lower bound bravyi2024bicycle and the upper witness of rand-lowweight-v1 (seed 5, iters 2000). The other four Table 3 codes covered here live in their own entries bb72, bb90, bb108, bb288 (Table 3 also has [[360,12,≤24]] and [[756,16,≤34]], not covered here) with d claimed; bicycle and bb5 are verified by enumeration; a separate T1 gross card records no d. “Twelve-fold” compares data qubits only, becomes 288 against 287 with helpers, the static 12 is not the circuit 12, and asymptotic badness is a curated literature claim.

符号与读法Symbols & how to read them

符号Symbol名称与读法Name & how to read it在本篇中的含义Meaning in this guide
[[n, k, d]]双方括号,读「n k d 码」Double brackets, read “an n k d code”n 个数据比特、k 个逻辑比特、码距 d 的量子码;gross 是 [[144,12,12]]。A quantum code with n data qubits, k logical qubits, distance d; gross is [[144,12,12]].
l, m读「两个循环阶」Read “the two cyclic orders”环面的宽与高;xl = ym = 1。gross 12 × 6,toric_L3 3 × 3。Width and height of the torus; xl = ym = 1. Gross 12 × 6, toric_L3 3 × 3.
a_terms, b_terms读「A 的项、B 的项」Read “the terms of A, of B”指数对 (a, b) 的列表,每对代表单项式 xayb,按 mod l、mod m 约化;gross 的 a_terms = [[3,0],[0,1],[0,2]]。Lists of exponent pairs (a, b), each standing for the monomial xayb, reduced mod l and mod m; gross has a_terms = [[3,0],[0,1],[0,2]].
x, y读「两个平移」Read “the two translations”x = Sl ⊗ Im 往右挪一格,y = Il ⊗ Sm 往上挪一格;S 是正向循环移位。x = Sl ⊗ Im moves one site right, y = Il ⊗ Sm one site up; S is the forward cyclic shift.
|A|, |B|读「A 的项数」Read “the number of terms of A”约化后不同单项式的个数;检查重量 = |A| + |B|,gross 为 3 + 3 = 6。The number of distinct reduced monomials; check weight = |A| + |B|, 3 + 3 = 6 for gross.
HX, HZ读「X 检查矩阵、Z 检查矩阵」Read “the X and Z check matrices”HX = [A | B],HZ = [Bᵀ | Aᵀ],各 lm × 2lm;CSS 条件 HXHZT = 0(模 2)。HX = [A | B], HZ = [Bᵀ | Aᵀ], each lm × 2lm; the CSS condition HXHZT = 0 (mod 2).
rank, r读「秩」Read “rank”矩阵中独立行的个数(模 2);两个秩相等记 r;gross r = 66,toric_L3 r = 8。The number of independent rows (mod 2); the common value of the two ranks is r; gross r = 66, toric_L3 r = 8.
R/(A,B)读「R 模 (A,B)」Read “R mod (A,B)”把所有 uA + vB 当作零后剩下的商空间;维数 = lm − r = k/2;gross 为 6。The quotient left after every uA + vB is set to zero; dimension = lm − r = k/2; 6 for gross.
n/k, k·d²/n读「每逻辑比特的数据比特数」「性价比」Read “data qubits per logical qubit”, “figure of merit”gross:n/k = 12,k·d²/n = 12;表面码 k·d²/n ≈ 1。Gross: n/k = 12, k·d²/n = 12; surface codes k·d²/n ≈ 1.
≤ ≥ ⊗ ᵀ读「小于等于 / 大于等于 / 克罗内克积 / 转置」Read “at most / at least / Kronecker product / transpose”d ≤ 12 由见证给出,d ≥ 12 由引文给出;⊗ 把 Sl 的每个元素换成整块 Im;ᵀ 把平移倒过来走。d ≤ 12 from the witness, d ≥ 12 from the citation; ⊗ replaces each element of Sl by a block Im; ᵀ walks every translation backwards.

本篇新增词汇New terms in this guide

术语Term白话定义Plain definition
家族变量family variable生成一族码中某个成员所需的输入;BB 有四个:l、m、a_terms、b_terms。The inputs that select one member of a code family; BB has four: l, m, a_terms, b_terms.
实例instance家族变量取定后的有限码对象;QEC-Bank 的 BB 条目发布 gross 与 toric_L3。The finite code object once the variables are fixed; the QEC-Bank BB entry ships gross and toric_L3.
证据词(origin kind)evidence word (origin kind)verified = 机器独立重算相符;bounded = 上界机器、下界引文;claimed = 照抄文献;curated = QEC-Bank 整理的文献结论。verified = independently recomputed by machine; bounded = machine upper bound, cited lower bound; claimed = copied from the literature; curated = a literature conclusion organised by the QEC-Bank.
穷举 CSS 枚举(exact-css-enum)exhaustive CSS enumeration (exact-css-enum)逐一检查所有重量小于 d 的候选都不是逻辑算符;toric_L3 的 d = 3 由此 verified。Checking one by one that no candidate of weight below d is a logical; how toric_L3's d = 3 is verified.
见证(witness)/ rand-lowweight-v1witness / rand-lowweight-v1一个可重跑找到的重量恰为 12 的逻辑算符(seed 5,iters 2000);只证上界。A rerunnable search that finds a logical of weight exactly 12 (seed 5, iters 2000); proves only the upper bound.
检查重量 / 比特度check weight / qubit degree一条检查碰几个比特 / 一个比特被几条检查碰;gross 为 6 与 3 + 3。Qubits touched by one check / checks touching one qubit; 6 and 3 + 3 for gross.
帮手比特(ancilla)helper qubit (ancilla)专职测一条检查的比特;gross 144 条检查配 144 个,合计 288 个物理比特。A qubit dedicated to measuring one check; gross's 144 checks need 144, for 288 physical qubits in all.
静态码距 / 电路码距static / circuit distance检查矩阵的 d / 在症状电路里造成一个不可探测的非平凡逻辑错误所需的最少故障数(无害的故障组合不算);后者可以更小,gross 的深度 7 电路已知 ≤ 10。The d of the check matrix / the fewest faults in the syndrome circuit that cause an undetectable non-trivial logical error (harmless fault combinations do not count); the latter can be smaller, and is known to be ≤ 10 for the depth-7 circuit of gross.
Table 3Table 3bravyi2024bicycle 论文里列出七个 BB 码的那张表:[[72,12,6]]、[[90,8,10]]、[[108,8,10]]、[[144,12,12]]、[[288,12,18]],以及只有码距上界的 [[360,12,≤24]]、[[756,16,≤34]];本篇只讲前五个。The table in bravyi2024bicycle listing seven BB codes: [[72,12,6]], [[90,8,10]], [[108,8,10]], [[144,12,12]], [[288,12,18]], plus [[360,12,≤24]] and [[756,16,≤34]] with distance upper bounds only; this guide covers the first five.

延伸阅读Further reading

  • S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, T. J. Yoder, “High-Threshold and Low-Overhead Fault-Tolerant Quantum Memory” (2024)
    bravyi2024bicycle(QEC-Bank 已登记完整元数据)。gross 码距下界的出处;Table 3 的五个码;「十二倍」比较的来源。bravyi2024bicycle (full metadata registered in the QEC-Bank). The source of the gross lower bound, of the five Table 3 codes, and of the twelve-fold comparison.
  • D. J. C. MacKay, G. Mitchison, P. L. McFadden, “Sparse Graph Codes for Quantum Error-Correction” (2004)
    mackay2004sparse(已登记)。第 4 章表中 bicycle [[6,2,2]] 的单变量祖先。mackay2004sparse (registered). The one-variable ancestor behind bicycle [[6,2,2]] in the Chapter 4 table.
  • J. J. Postema, S. J. J. M. F. Kokkelmans, “Existence and Characterisation of Bivariate Bicycle Codes” (2025, arXiv 2502.17052)
    postema2025existence——据文献扫描报告,登记待补(QEC-Bank 参考文献页显示 metadata pending)。5.4 节「渐近坏」这条 curated 声明的出处。postema2025existence: from the scout report, registration pending (the QEC-Bank references page shows metadata pending). The source of the curated “asymptotically bad” claim in section 5.4.
  • QEC-Bank: gross-code parameter and provenance ledger
    codes/bivariate_bicycle/pedagogy/gross-parameter-ledger.md。第 2、3、5 章逐段引用的原文:矩阵尺寸、重量、秩、商维数、两份证书、数据比特对全机器开销、静态对电路码距。codes/bivariate_bicycle/pedagogy/gross-parameter-ledger.md. The text quoted throughout Chapters 2, 3 and 5: matrix sizes, weights, ranks, quotient dimension, the two certificates, data-only versus full-machine overhead, static versus circuit distance.
诚实总账The honesty ledger

机器重算过的:两个实例的 n、k、css,gross 的行列重量、两个秩 66、商维数 6、第 0 条检查的支撑、重量 12 上界见证,toric_L3 的精确码距 3。引文支撑的:gross 的下界 12(bravyi2024bicycle,QEC-Bank 未重放)。照抄文献的:bb72、bb90、bb108、bb288 的 d。QEC-Bank 整理的文献结论:渐近坏(postema2025existence,登记待补)。本篇自己算的、QEC-Bank 页面上没有的数:第 4 章表中各码的 n/k,以及 5.2 节的 288(144 条检查各配一个帮手;QEC-Bank 账本只说 n「excludes syndrome ancillas」,具体帮手数是本篇按每检查一个数出来的)。本篇不给阈值的数值,电路码距也只引用了 Bravyi 等人对 gross 深度 7 电路的上界 dcirc ≤ 10(5.3 节),没有自己计算;这两个量都不是检查矩阵的属性,细节请去译码器侧面。写作时没有在本机运行 reproduce.py 或验证器;所有数字抄自仓库文件。

Recomputed by machine: n, k and css of both instances; gross's row and column weights, the two ranks 66, the quotient dimension 6, the support of check 0, the weight-12 upper witness; toric_L3's exact distance 3. Citation-backed: gross's lower bound 12 (bravyi2024bicycle, not replayed by the QEC-Bank). Copied from the literature: the d of bb72, bb90, bb108, bb288. Literature conclusions organised by the QEC-Bank: asymptotic badness (postema2025existence, registration pending). Computed in this guide and not on any QEC-Bank page: the n/k column of the Chapter 4 table, and the 288 of section 5.2 (one helper per each of 144 checks; the QEC-Bank ledger only says n “excludes syndrome ancillas”, the helper count is ours at one per check). This guide gives no threshold numbers, and for the circuit distance it only cites Bravyi et al.'s upper bound dcirc ≤ 10 for the depth-7 circuit of gross (section 5.3) without computing it; neither is a property of a check matrix; for details see the Decoders facet. Neither reproduce.py nor the verifier was run on this machine while writing; every number is copied from repository files.