目录Contents
家族变量与实例Family variable and instances
「参数」这个词在 QEC-Bank 里有两层:一层是描述一个码的三个数 [[n, k, d]],另一层是生成这个码的旋钮。先把两层分开,再说清 QEC-Bank 的构造器到底覆盖哪一族。 “Parameters” has two layers in the QEC-Bank: the three numbers [[n, k, d]] that describe a code, and the knob that generates it. We separate the two layers first, then state exactly which family the QEC-Bank constructor covers.
1.1[[n, k, d]]:一个码的名片[[n, k, d]]: a code's calling card
量子纠错码的通用名片是[[n, k, d]]双方括号是量子码的记法(单方括号 [n,k,d] 留给经典码):n 个物理量子比特,编码 k 个逻辑量子比特,码距 d。:n 个物理量子比特,一起保护 k 个逻辑量子比特(n、k 的记账规则见 Toric Code 直觉教程的「记账」一节);d 是码距能通过全部检查、却改写逻辑信息的最轻算符(逻辑算符)的重量,即它触碰的量子比特数。,即一个不触发任何警报、却改写了逻辑信息的算符最少要碰几个比特(码距首次定义于 Toric Code 直觉教程「它的致命弱点」一节)。这样的算符叫逻辑算符;它碰到的比特数叫它的重量。在直觉教程里你已经数过这三个数:账本给出 k = 1,最短的横跨串给出 d。
The universal calling card of a quantum code 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 (the n, k bookkeeping rule is in the toric guide's “ledger” section), and 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 smallest number of qubits that an operator must touch in order to trip no alarm and still rewrite the logical information (distance was first defined in its “fatal flaw” section). Such an operator is a logical operator; the number of qubits it touches is its weight. You have counted all three in the intuition guide: the ledger gave k = 1, and the shortest spanning string gave d.
本篇反复出现的 QEC-Bank(QEC-Bank)是本系列所属的量子纠错码数据库。它为每个码建一个条目;条目里有一段生成检查矩阵的程序(叫构造器),一份实例清单,清单上的每个数字都附一个说明来源的词;另有一个验证器程序,重新运行构造器、重新计算这些数字,与清单比对。第 3 章会细看这套记账。
The QEC-Bank (QEC-Bank) that keeps appearing on this page is the database of quantum error-correcting codes this series belongs to. Each code gets an entry; the entry holds a program that generates the check matrices (the constructor) and a list of instances in which every number carries a word saying where it comes from; a separate program, the verifier, reruns the constructor, recomputes those numbers and compares them with the list. Chapter 3 looks at this bookkeeping closely.
1.2家族变量 L,实例 L3、L4、L5The family variable L; instances L3, L4, L5
但「表面码是 [[?, 1, ?]]」的问号填不上:表面码不是一个码,而是一族码,芯片可以做成 3×3、5×5、7×7。要生成一个具体的码,得先告诉构造器一个数。那个数就是家族变量生成一族码中某一个成员所需的输入参数。表面码条目只有一个:L,取值 L ≥ 2 的整数(奇偶皆可)。 L。QEC-Bank 的参数页只登记了这一个变量,并标注「distance (odd or even, L ≥ 2)」:L 既是格子的边长,也(如第 2 章将证明的)恰好等于码距。给 L 一个具体值,构造器就吐出一个实例家族变量取定具体值后得到的那一个有限码对象,有确定的检查矩阵和确定的 [[n,k,d]]。QEC-Bank 用标签 L3、L4、L5 命名。——一个有限的、可以逐比特写出来的码对象。QEC-Bank 为表面码发布了三个实例,标签就叫 L3、L4、L5。
Yet the blanks in “the surface code is [[?, 1, ?]]” cannot be filled: the surface code is not one code but a family, and the chip can be 3×3, 5×5, 7×7. To produce a concrete code you must first hand the constructor a number. That number is the family variableThe input parameter that selects one member of a code family. The surface-code entry has exactly one: L, an integer with L ≥ 2 (odd or even). L. The QEC-Bank parameters page registers this single variable, annotated “distance (odd or even, L ≥ 2)”: L is the side length of the grid and, as Chapter 2 will prove, exactly the distance. Give L a concrete value and the constructor emits an instanceThe one finite code object obtained once the family variable is fixed: a definite check matrix and a definite [[n,k,d]]. The QEC-Bank labels them L3, L4, L5.: a finite code object whose every qubit and check can be written down. The QEC-Bank ships three surface-code instances, labelled L3, L4, L5.
实例instances: L3 = [[13,1,3]] L4 = [[25,1,4]] L5 = [[41,1,5]]
字母:n = 物理(数据)比特数,k = 逻辑比特数,d = 码距,L = 家族变量(格子边长,L ≥ 2)。Letters: n = physical (data) qubits, k = logical qubits, d = distance, L = family variable (grid side length, L ≥ 2).
1.3范围:构造器只做「未旋转的平面版图」Scope: the constructor builds only the unrotated planar patch
必须说清一次:QEC-Bank 的构造器(程序文件 codes/surface/constructor.py)生成的是未旋转的平面表面码,即直觉教程里那块左右毛边、上下光边的版图,检查方块的边与芯片的边平行;QEC-Bank 内部给这个对象的编号是 atlas-entity:surface#subject。文献里同样叫「表面码」的还有好几种别的码:把版图斜着转 45° 裁出来、更省比特的旋转版(第 4.2 节画出它);每条检查混用 X 和 Z 的 XZZX 版;在格子里引入错位(twist,错位处的检查混用 X 和 Z)的扭缺陷版;以及三维版。它们都不在本篇的参数和实例表里。第 4 章会拿旋转版做一次比较,但那是引用文献的数字,不是构造器算出来的。
This must be said once, plainly: the QEC-Bank constructor (the program file codes/surface/constructor.py) builds the unrotated planar surface code, the very patch with rough left/right and smooth top/bottom boundaries from the intuition guide, whose check squares are aligned with the edges of the chip; the QEC-Bank's internal identifier for this object is atlas-entity:surface#subject. The literature uses the name “surface code” for several other codes too: the rotated patch, cut out at 45° and cheaper in qubits (drawn in §4.2); the XZZX variant, whose every check mixes X and Z; twist-defect versions, which introduce a dislocation (a twist, where the checks mix X and Z) into the lattice; and three-dimensional versions. None of them is in this guide's parameter and instance tables. Chapter 4 will compare against the rotated patch once, but those are literature numbers, not constructor output.
一族码 = 一个构造器 + 一个家族变量。实例 = 变量取定后的那一个有限对象。QEC-Bank 的每一条 [[n,k,d]] 记录都挂在某个实例上,而不是挂在「表面码」这个族名上——因为只有有限对象才能被机器逐位验证。
A code family = one constructor + one family variable. An instance = the one finite object once the variable is fixed. Every [[n,k,d]] record in the QEC-Bank hangs on an instance, never on the family name “surface code”, because only a finite object can be checked bit by bit by a machine.
n、k、d 各从哪里来Where n, k, d come from
直觉教程里是数格子;这里把同一件事写成三条公式,并给每条一个「为什么对任何 L 都成立」的论证。三条论证的结构不同:n 是数数,k 是算秩,d 是一对不等式。 The intuition guide counted cells; here the same facts become three formulas, each with an argument for why it holds at every L. The three arguments have different shapes: n is counting, k is a rank computation, d is a pair of inequalities.
2.1n = L² + (L−1)²:两块比特n = L² + (L−1)²: two blocks of qubits
构造器不是画图再数点。它从一个经典码出发:长度 L 的重复码。把 L 个比特排成一行,每两个相邻比特之间放一条检查「这两位相等吗」,一共 L − 1 条检查。于是链上比特和检查交替出现:比特 0、检查 0、比特 1、检查 1、……、比特 L−1,每条检查碰它左右两个比特。写成矩阵就是重复码校验矩阵 Hrep_parity(L):一个 (L−1)×L 的 0/1 矩阵,行是检查、列是比特,每行是「相邻两位 1 1」。它描述经典重复码「相邻比特必须相等」的 L−1 条检查。:行是检查,列是比特,L = 3 时 H 的两行是 (1, 1, 0) 和 (0, 1, 1)。
The constructor does not draw a picture and count dots. It starts from a classical code: the repetition code of length L. Put L bits in a row and place a check “are these two equal?” between every pair of neighbours, L − 1 checks in all. Along the chain, bits and checks alternate: bit 0, check 0, bit 1, check 1, …, bit L−1, and each check touches the bit on its left and the bit on its right. As a matrix this is the repetition-code check matrix Hrep_parity(L): an (L−1)×L binary matrix, rows = checks, columns = bits, each row reading “adjacent pair 1 1”. It encodes the L−1 checks “neighbouring bits must agree” of the classical repetition code.: rows are checks, columns are bits; for L = 3 its two rows are (1, 1, 0) and (0, 1, 1).
构造器把两条这样的链「相乘」,这一步叫超图乘积HGP(hypergraph product,Tillich 与 Zémor 2009):把两个经典码「相乘」得到一个 CSS 量子码的通用配方。两条链的成员两两配对,(比特, 比特)与(检查, 检查)成为量子比特,(检查, 比特)成为 X 检查,(比特, 检查)成为 Z 检查。(记作 HGP(rep_L, rep_L))。它造出的是一个 CSS 码Calderbank–Shor–Steane 码:检查分成两族,一族每条只由 X 组成,另一族每条只由 Z 组成;没有一条检查混用 X 和 Z。:检查分成两族,一族每条只放 X(X 检查),另一族每条只放 Z(Z 检查),没有一条检查混用两种字母;名字取自 Calderbank、Shor、Steane 三人。先看它做了什么:链 A 横放在顶上,链 B 竖放在左边,铺出一张棋盘,棋盘的每个格子是一对(A 的一个成员, B 的一个成员)。成员只有「比特」和「检查」两种,所以格子只有四种:
The constructor “multiplies” two such chains; the operation is called the hypergraph productHGP (hypergraph product, Tillich and Zémor 2009): the general recipe that multiplies two classical codes into a CSS quantum code. Members of the two chains are paired up: (bit, bit) and (check, check) become qubits, (check, bit) becomes an X check, (bit, check) a Z check. (written HGP(rep_L, rep_L)). What it builds is a CSS codeCalderbank–Shor–Steane code: the checks come in two families, each check of one family made of X only, each check of the other made of Z only; no check mixes X and Z.: the checks come in two families, one whose checks contain only X (the X checks) and one whose checks contain only Z (the Z checks), and no check mixes the two letters; the name comes from Calderbank, Shor and Steane. First what it does: lay chain A across the top and chain B down the left side to span a board; each cell of the board is one pair (a member of A, a member of B). A member is either a bit or a check, so there are only four kinds of cell:
| 格子 =(A 的成员, B 的成员)cell = (member of A, member of B) | 变成什么becomes | 个数how many | 在直觉教程的图里in the intuition guide's picture |
|---|---|---|---|
| (比特, 比特)(bit, bit) | 量子比特qubit | L × L = L² | 横边(含两侧悬边)horizontal edge (including the danglers) |
| (检查, 检查)(check, check) | 量子比特qubit | (L−1) × (L−1) = (L−1)² | 竖边vertical edge |
| (检查, 比特)(check, bit) | X 检查X check | (L−1) × L | 星(顶点)star (vertex) |
| (比特, 检查)(bit, check) | Z 检查Z check | L × (L−1) | 面plaquette |
谁碰谁只有一条规则:一条检查碰它上下左右紧挨着的四个格子(贴着棋盘边缘的检查少一个邻居)。横着走一格,就是在链 A 上从一个检查走到它碰的比特;竖着走一格,就是在链 B 上走同样的一步。把棋盘画出来,你会认出直觉教程的版图:星的左右是横边、上下是竖边,所以星是 XXXX;最上、最下一行的星没有上或下的邻居,只剩三条腿,那就是光边界。面的上下是横边、左右是竖边;最左、最右一列的横边外侧没有检查格,就是毛边界的悬边。下面一步一步拼这张棋盘,点任意一格可以看它是哪一对、碰哪几个比特。
Who touches whom follows one rule: a check touches the four cells directly above, below, left and right of it (a check on the rim of the board has one neighbour fewer). One step across is a step along chain A from a check to a bit it touches; one step down is the same move along chain B. Draw the board and you recognise the intuition guide's patch: a star has horizontal edges on its left and right and vertical edges above and below, so a star is XXXX; stars in the top and bottom rows have no neighbour above or below and keep only three legs, which is the smooth boundary. A plaquette has horizontal edges above and below and vertical edges left and right; the horizontal edges in the leftmost and rightmost columns have no check cell beyond them, and these are the dangling edges of the rough boundary. Build the board step by step below; click any cell to see which pair it is and which qubits it touches.
这张棋盘把三件事一次数清。量子比特是两块之和,检查是另外两块之和,对任何 L 都成立:
The board settles the counting in one go. The qubits are the sum of two blocks and the checks the sum of the other two, for every L:
n = 物理比特数,L = 家族变量;L² 与 (L−1)² 是两块比特的个数。n = physical qubits, L = family variable; L² and (L−1)² are the sizes of the two qubit blocks.
给读 QEC-Bank 源文件的人:构造器把(比特, 比特)比特 (a, b) 存在坐标 (2b, 2a),把(检查, 检查)比特存在奇数坐标,并把两块分别叫「顶点比特」和「面比特」。那是另一种画法里的叫法(比特画在顶点和面心上),坐标则是这张棋盘把行列对调的样子;本页一律叫横边比特和竖边比特,免得和「星 = 顶点」混淆。
For readers of the QEC-Bank source: the constructor stores (bit, bit) qubit (a, b) at coordinate (2b, 2a) and the (check, check) qubits at odd coordinates, and calls the two blocks “vertex qubits” and “face qubits”. Those names come from another drawing (qubits on vertices and face centres), and the coordinates are this board with rows and columns swapped; this page says horizontal-edge and vertical-edge qubits throughout, so that nothing clashes with “star = vertex”.
2.2k = 1:两块检查矩阵的秩都是 L(L−1)k = 1: both check matrices have rank L(L−1)
X 检查和 Z 检查各有 L(L−1) 条,两族合计 2L(L−1)。CSS 码的两族检查各写成一个 0/1 矩阵:HX 每行是一条 X 检查,HZ 每行是一条 Z 检查,两者的每一列都是同一个比特,1 表示「这条检查碰这个比特」。要用「n − 独立检查数」记账(稳定子计数法),还得确认它们全部独立:没有哪一组检查乘起来等于 I,也就没有哪条检查是别的检查的乘积。线性代数里「独立的行有几条」叫秩rank:一个 0/1 矩阵里线性独立的行数(模 2)。rank = 行数,就是「没有一组行加起来(模 2)等于 0」,即没有一条检查是其他检查的乘积。,所以要证的是 rank(HX) = rank(HZ) = L(L−1)。直觉教程说明了全部星的乘积不是 I;这里需要更强的结论:任何一组(至少一颗)星乘起来都不是 I。论证只用每行最左边那条悬边。
There are L(L−1) X checks and L(L−1) Z checks, 2L(L−1) in all. Each family of a CSS code is written as one binary matrix: each row of HX is an X check, each row of HZ a Z check, every column of both is the same qubit, and a 1 means “this check touches this qubit”. To use the ledger “n minus independent checks” (the stabilizer count) we must also know that they are all independent: no group of checks multiplies to I, so no check is a product of others. In linear algebra the number of independent rows is the rankThe number of linearly independent rows of a binary matrix (mod 2). rank = number of rows means that no group of rows adds up (mod 2) to 0, i.e. no check is a product of the others., so the claim is rank(HX) = rank(HZ) = L(L−1). The intuition guide showed that the product of all stars is not I; here we need more: no group of stars (one or more) multiplies to I. The argument uses only the dangling edge at the left end of each row.
假设有一组星的乘积是 I。只看第 b 行的横边:碰得到它们的只有第 b 行的星,而第 c 颗星碰这一行的第 c 条和第 c+1 条横边(从 0 数起)。最左的悬边(第 0 条)只被第 0 颗星碰到,所以第 0 颗星不在组里,否则悬边上会剩一个 X。第 0 颗不在,第 1 条横边就只剩第 1 颗星能碰到,于是第 1 颗也不在;这样一颗一颗剥到行尾。每一行都剥完,组里一颗星也不剩,与「至少一颗」矛盾。所以 L(L−1) 颗星全部独立。面的论证一样,只是从每一列最上面那条横边往下剥:它只被正下方的那块面碰到。
Suppose some group of stars multiplies to I. Look only at the horizontal edges of row b: only stars of row b touch them, and star number c touches edges c and c+1 of the row (counting from 0). The leftmost, dangling edge (edge 0) is touched by star 0 alone, so star 0 is not in the group, or an X would be left on the dangler. With star 0 out, edge 1 can only be touched by star 1, so star 1 is out too; peel star after star to the end of the row. Once every row is peeled no star is left, contradicting “one or more”. So all L(L−1) stars are independent. The plaquettes work the same way, peeling downward from the top horizontal edge of each column, which is touched only by the plaquette directly below it.
= L² + (L−1)² − 2L(L−1) = (L − (L−1))² = 1
k = 逻辑比特数,n = 物理比特数,HX/HZ = X/Z 检查矩阵,rank = 秩(独立检查数),L = 家族变量。k = logical qubits, n = physical qubits, HX/HZ = the X/Z check matrices, rank = number of independent checks, L = family variable.
下面这台账本对 d = 2、3、4、5 现场演示同一件事(这里的 d 就是 L)。看清一点:不论 L 多大,n 与检查数永远只差 1。
The ledger below performs the same computation live for d = 2, 3, 4, 5 (this widget's d is our L). Notice: whatever L is, n and the number of checks always differ by exactly 1.
L = 2 手算一遍;以及 QEC-Bank 程序里的矩阵写法与环面的对照L = 2 by hand; the matrix form in the QEC-Bank code; the contrast with the torus
L = 2 的版图只有 5 个比特:上行两条横边 h00、h01,下行两条 h10、h11(下标 = 行, 位置),中间一条竖边 v。两颗星在两行,两块面在两列。检查矩阵每行是一条检查、每列是一个比特,1 表示「这条检查碰这个比特」:
The L = 2 patch has just 5 qubits: two horizontal edges h00, h01 in the top row, two, h10, h11, in the bottom row (subscripts = row, position), and one vertical edge v between them. The two stars sit in the two rows, the two plaquettes in the two columns. Each row of a check matrix is one check, each column one qubit, and a 1 means “this check touches this qubit”:
| h00 | h01 | h10 | h11 | v | |
|---|---|---|---|---|---|
| HX · 上行的星HX · top-row star | 1 | 1 | 0 | 0 | 1 |
| HX · 下行的星HX · bottom-row star | 0 | 0 | 1 | 1 | 1 |
| HZ · 左列的面HZ · left plaquette | 1 | 0 | 1 | 0 | 1 |
| HZ · 右列的面HZ · right plaquette | 0 | 1 | 0 | 1 | 1 |
两行 HX 都不是全 0,相加得 (1, 1, 1, 1, 0) 也不是全 0,所以 rank(HX) = 2;HZ 同理为 2。k = 5 − 2 − 2 = 1。顺手核对对易:上行的星与左列的面共享 h00 和 v 两个比特,偶数,对易;其余三对也各共享两个。这四行与构造器对 L = 2 实际输出的矩阵逐位相同(换成它的比特编号后)。
Neither row of HX is all zero and their sum (1, 1, 1, 1, 0) is not all zero either, so rank(HX) = 2; likewise rank(HZ) = 2. k = 5 − 2 − 2 = 1. Check commutation while you are here: the top-row star and the left plaquette share h00 and v, two qubits, an even number, so they commute; each of the other three pairs also shares two. These four rows agree entry by entry with the matrices the constructor actually outputs for L = 2 (after translating to its qubit numbering).
QEC-Bank 的程序(qeclib/constructions.py 里的 hgp)把整张棋盘压成两行:HX = [H ⊗ IL | IL−1 ⊗ Hᵀ],HZ = [IL ⊗ H | Hᵀ ⊗ IL−1]。竖线左边的列是横边比特,右边的列是竖边比特。式子里有三样工具,先各说一句:
The QEC-Bank code (hgp in qeclib/constructions.py) compresses the whole board into two lines: HX = [H ⊗ IL | IL−1 ⊗ Hᵀ], HZ = [IL ⊗ H | Hᵀ ⊗ IL−1]. Columns left of the bar are horizontal-edge qubits, columns right of it vertical-edge qubits. The formula uses three tools; one sentence on each first:
- Hᵀ 是 H 的转置:行和列对调。H 的行是检查、列是比特,Hᵀ 反过来,第 i 行读作「比特 i 被哪些检查碰到」。L = 3 时 H 的两行是 (1, 1, 0)、(0, 1, 1),Hᵀ 的三行是 (1, 0)、(1, 1)、(0, 1):比特 0 只被检查 0 碰,比特 1 被两条都碰,比特 2 只被检查 1 碰。
- Im 是 m×m 单位矩阵:对角线上是 1,其余是 0。第 i 行第 j 列为 1 当且仅当 i = j,在这里读作「待在同一行(或同一列),不挪动」。I1 就是一个数 1。
- ⊗ 是克罗内克积:把前一个矩阵的每个元素换成「这个元素乘以后一个矩阵」。前一个矩阵管「沿链 A 横着走」,后一个管「沿链 B 竖着走」。
- Hᵀ is the transpose of H: rows and columns swapped. The rows of H are checks and its columns bits; Hᵀ is the other way round, and its row i reads “which checks touch bit i”. For L = 3 the rows of H are (1, 1, 0), (0, 1, 1), and the three rows of Hᵀ are (1, 0), (1, 1), (0, 1): bit 0 is touched only by check 0, bit 1 by both, bit 2 only by check 1.
- Im is the m×m identity matrix: 1 on the diagonal, 0 elsewhere. Entry (i, j) is 1 exactly when i = j, read here as “stay in the same row (or column), do not move”. I1 is just the number 1.
- ⊗ is the Kronecker product: replace each entry of the first matrix by “that entry times the second matrix”. The first factor handles moves along chain A (sideways), the second moves along chain B (up and down).
拿 L = 2 算一遍。H = (1 1),是 1 × 2 的矩阵;Hᵀ 是一列 (1, 1);IL−1 = I1 = 1。H ⊗ I2 把 H 的两个 1 各换成一块 I2,得 [I2 I2],一个 2 × 4 的块;I1 ⊗ Hᵀ 就是 Hᵀ 那一列。程序里横边比特的列按「先位置、后行」排:位置 0 的两行 h00、h10,再位置 1 的 h01、h11,最后是竖边 v。标上这些列名:
Work it out for L = 2. H = (1 1) is a 1 × 2 matrix; Hᵀ is the column (1, 1); IL−1 = I1 = 1. H ⊗ I2 replaces each of the two 1s of H by a block I2, giving [I2 I2], a 2 × 4 block; I1 ⊗ Hᵀ is just the column Hᵀ. In the code the horizontal-edge columns are ordered by position first, then row: at position 0 the two rows h00, h10, then at position 1 h01, h11, and finally the vertical edge v. With these column labels:
| h00 | h10 | h01 | h11 | v | |
|---|---|---|---|---|---|
| HX 第 1 行(H ⊗ I2 | Hᵀ)HX row 1 (H ⊗ I2 | Hᵀ) | 1 | 0 | 1 | 0 | 1 |
| HX 第 2 行HX row 2 | 0 | 1 | 0 | 1 | 1 |
| HZ 第 1 行(I2 ⊗ H | Hᵀ)HZ row 1 (I2 ⊗ H | Hᵀ) | 1 | 1 | 0 | 0 | 1 |
| HZ 第 2 行HZ row 2 | 0 | 0 | 1 | 1 | 1 |
按列名对回上面那张表:HX 第 1 行碰 h00、h01、v,就是上行的星;第 2 行碰 h10、h11、v,是下行的星。HZ 第 1 行碰 h00、h10、v,是左列的面;第 2 行是右列的面。四行和手画的表一模一样,只是列的顺序换了。左上那块 H ⊗ IL 说的正是「每颗星碰同一行里相邻两条横边」(H 管横着走一步,IL 管留在同一行),上面的剥皮论证就是在说这一块的行已经彼此独立。
Match them to the hand-made table above by column label: row 1 of HX touches h00, h01, v, the top-row star; row 2 touches h10, h11, v, the bottom-row star. Row 1 of HZ touches h00, h10, v, the left plaquette; row 2 is the right plaquette. The four rows are exactly those of the hand-made table with the columns in a different order. The top-left block H ⊗ IL says precisely “each star touches two neighbouring horizontal edges of its row” (H takes one step sideways, IL stays in the same row), and the peeling argument above says that the rows of this block are already independent.
熟悉超图乘积的读者会用维数公式 k = k₁k₂ + k₁ᵀk₂ᵀ。这里 ki 是第 i 个经典码能存的比特数(比特数 − rank H = L − (L−1) = 1),kiᵀ 是「检查之间有几个依赖关系」(检查数 − rank H = (L−1) − (L−1) = 0)。开链的检查没有依赖,所以 k = 1·1 + 0·0 = 1。把两条链各自首尾相接成环,就多出一条检查(L 条检查、秩仍是 L−1),依赖变成 1 个,公式给 1·1 + 1·1 = 2,这就是环面码的 k = 2。在棋盘上看,环面没有悬边,剥皮论证无处下手,而全部星的乘积确实是 I。QEC-Bank 的 pedagogy/hgp-construction.md 写出了这一整段。
Readers who know the hypergraph product will use the dimension formula k = k₁k₂ + k₁ᵀk₂ᵀ. Here ki is the number of bits the i-th classical code stores (bits − rank H = L − (L−1) = 1), and kiᵀ counts the dependencies among its checks (checks − rank H = (L−1) − (L−1) = 0). An open chain has no dependent checks, so k = 1·1 + 0·0 = 1. Close each chain into a ring and one check is added (L checks, rank still L−1), one dependency appears, and the formula gives 1·1 + 1·1 = 2: the toric code's k = 2. On the board, a torus has no dangling edge, so the peeling has nowhere to start, and the product of all stars really is I. The QEC-Bank page pedagogy/hgp-construction.md spells this out in full.
2.3d = L:一条上界,一条下界d = L: one upper bound, one lower bound
码距是三个数里唯一需要两个方向论证的:上界要找到一个重量 L 的逻辑算符,下界要说明没有更轻的。
Distance is the only one of the three numbers that needs an argument in two directions: the upper bound needs one logical operator of weight L, the lower bound needs a reason why nothing lighter exists.
上界 d ≤ L。在棋盘上取一整行横边,全放 Z,记作 Z̄:它从左边的悬边走到右边的悬边,碰 L 个比特。一颗星若在这一行,就碰这一行里相邻的两条横边;不在这一行就一条也不碰。所以每颗星与 Z̄ 共享 0 或 2 个比特,按碰撞规则全部对易,Z̄ 不触发任何星。面是 Z 型检查,和 Z̄ 天然对易。同理,取一整列横边(每行一条,从上光边到下光边)全放 X,记作 X̄:一块面若在这一列,就碰这一列里上下相邻的两条横边,否则一条不碰,所以 X̄ 骗过全部面。Z̄ 和 X̄ 恰好在一个比特上相交,两者反对易。于是 Z̄ 不是检查的乘积:检查的乘积必须与 X̄ 对易,因为 X̄ 与每一条检查都对易。X̄ 同理。两个重量为 L 的逻辑算符就此到手,这正是直觉教程里横跨两条边界的串。
Upper bound d ≤ L. Take one whole row of horizontal edges on the board and put Z on all of them; call it Z̄. It runs from the dangling edge on the left to the dangling edge on the right and touches L qubits. A star in that row touches two neighbouring horizontal edges of the row; a star in any other row touches none. So every star shares 0 or 2 qubits with Z̄, commutes with it by the collision rule, and Z̄ trips no star. Plaquettes are Z-type and commute with Z̄ automatically. In the same way, take one whole column of horizontal edges (one per row, smooth edge at the top to smooth edge at the bottom) and put X on them; call it X̄. A plaquette in that column touches two vertically neighbouring horizontal edges of the column, any other plaquette none, so X̄ fools every plaquette. Z̄ and X̄ meet on exactly one qubit, so they anticommute. Hence Z̄ is not a product of checks: such a product must commute with X̄, because X̄ commutes with every single check. The same goes for X̄. Two logical operators of weight L are in hand, precisely the boundary-to-boundary spanning strings of the intuition guide.
下界 d ≥ L。要证明「没有更轻的」,候选太多,不能逐个排除。QEC-Bank 的证明改用互不相交的拷贝:Z̄ 可以放在 L 行里的任意一行,这 L 个拷贝两两不共享比特,却是同一个逻辑算符。原因是相邻两行之差恰好是夹在中间那一排面的乘积:每块面碰它上下两条横边,一排面乘起来,两行横边各剩一个 Z,中间的竖边每条被左右两块面各碰一次,成对抵消。乘上检查不改变逻辑内容。
Lower bound d ≥ L. Proving “nothing lighter exists” cannot proceed candidate by candidate; there are far too many. The QEC-Bank proof uses pairwise-disjoint copies instead: Z̄ can sit on any of the L rows, and these L copies share no qubit, yet they are the same logical operator. The reason is that two neighbouring rows differ by exactly the product of the row of plaquettes between them: each plaquette touches the horizontal edge above and the one below it, so the product of a row of plaquettes leaves a Z on each of the two rows of horizontal edges, while each vertical edge in between is touched once by the plaquette on its left and once by the one on its right and cancels. Multiplying by checks does not change the logical content.
现在取任意一个与 Z̄ 反对易的逻辑算符 P。它必须与每一个拷贝都反对易(补课 2.A 解释为什么乘上检查不改变这一点)。与一整行 Z 反对易,意味着 P 在这一行的横边上必须放了至少一个 X 或 Y。L 行两两不交,所以 P 至少碰 L 个比特:wt(P)算符 P 的重量(weight):它作用的量子比特中,作用不是恒等 I 的那些的个数。 ≥ L。与 X̄ 反对易的 P 用 L 个互不相交的 X̄ 列同样处理。最后一步:只存 1 个逻辑比特时,每个不是检查乘积的逻辑算符都至少与 X̄、Z̄ 之一反对易(补课 2.A)。两边合起来,d = L。下面的棋盘从第 6 步开始,画出这两条串和 Z̄ 的 L 个拷贝。
Now take any logical operator P that anticommutes with Z̄. It must anticommute with every copy (Catch-up 2.A explains why multiplying by checks cannot change that). Anticommuting with a whole row of Z's means P places at least one X or Y on a horizontal edge of that row. The L rows are pairwise disjoint, so P touches at least L qubits: wt(P)The weight of an operator P: the number of qubits on which it acts as something other than the identity I. ≥ L. A P that anticommutes with X̄ is handled the same way by the L disjoint X̄ columns. The last step: with a single logical qubit, every logical operator that is not a product of checks anticommutes with at least one of X̄, Z̄ (Catch-up 2.A). Together, d = L. The board below starts at step 6 and draws the two strings and the L copies of Z̄.
补课 · 对易、反对易,以及一个逻辑比特的四类逻辑算符Catch-up · Commuting, anticommuting, and the four logical classes of one qubit
对易与反对易怎么数。单比特上 X 和 Z 反对易:XZ = −ZX;同一个 Pauli 与自己、以及任何 Pauli 与 I 都对易。两个多比特 Pauli 串 P、Q 逐比特比较,数一数有几个比特上两者放了不同的非 I 字母(例如一个 X 一个 Z)。每个这样的比特贡献一个负号,所以个数为偶数时 PQ = QP(对易),为奇数时 PQ = −QP(反对易)。例:P = X₁X₂,Q = Z₂Z₃,只在比特 2 上不同,1 个,反对易;P = X₁X₂,Q = Z₁Z₂,2 个,对易。这就是直觉教程的碰撞规则。
How to count commuting and anticommuting. On one qubit X and Z anticommute, XZ = −ZX, while a Pauli commutes with itself and anything commutes with I. Compare two multi-qubit Pauli strings P, Q qubit by qubit and count the qubits where they carry different non-identity letters (say an X and a Z). Each such qubit contributes a minus sign, so an even count gives PQ = QP (commute) and an odd count PQ = −QP (anticommute). Example: P = X₁X₂ and Q = Z₂Z₃ differ only on qubit 2, one qubit, so they anticommute; P = X₁X₂ and Q = Z₁Z₂ differ on two, so they commute. This is the collision rule of the intuition guide.
这里只谈 Pauli 串。一个 Pauli 串在每个比特上放 I、X、Y、Z 之一,前面可以带一个整体相位 ±1 或 ±i。上一段的数法只对这样的算符成立:两个 Pauli 串要么对易,要么反对易。一般的算符不一定,例如单比特上的 X + Z 与 Z 既不对易也不反对易((X + Z)Z = XZ + I,Z(X + Z) = ZX + I = −XZ + I,两者不相等也不互为相反数)。下面说的「逻辑算符」都是指与每条检查都对易的 Pauli 串。
Only Pauli strings here. A Pauli string puts one of I, X, Y, Z on each qubit, with an overall phase ±1 or ±i in front. The count above works only for such operators: two Pauli strings either commute or anticommute. A general operator need not do either; on one qubit, X + Z neither commutes nor anticommutes with Z ((X + Z)Z = XZ + I and Z(X + Z) = ZX + I = −XZ + I, which are neither equal nor opposite). From here on, “logical operator” means a Pauli string that commutes with every check.
乘上检查不改变与逻辑算符的对易关系。设 P 是逻辑算符,所以它与每条检查 S 都对易。R 是任意一个 Pauli 串。比较 P 与 R、P 与 RS:P(RS) = (PR)S,而 PR = ±RP,再把 P 挪过 S 不产生新符号,所以 P(RS) = ±(RS)P,符号与 P、R 之间的一样。例如 Z̄ 的另一行拷贝 = Z̄ × (一排面),P 与它的对易关系和与 Z̄ 的完全相同。
Multiplying by a check does not change commutation with a logical operator. Let P be a logical operator, so it commutes with every check S, and let R be any Pauli string. Compare P with R and with RS: P(RS) = (PR)S, PR = ±RP, and moving P past S adds no sign, so P(RS) = ±(RS)P with the same sign as between P and R. For instance, the copy of Z̄ on another row is Z̄ × (a row of plaquettes), and P commutes or anticommutes with it exactly as with Z̄.
分类的规矩:差一个检查乘积、差一个相位,都算同一类。两个逻辑算符如果相差一个检查乘积(乘上检查的乘积就从一个变成另一个),它们对码字做的事一样,归为一类;整体相位 ±1、±i 也不计。例:第 0 行的 Z̄ 与第 1 行的拷贝差一排面,同一类;−Z̄ 与 Z̄ 只差相位,也同一类。
The sorting rule: a product of checks or a phase does not change the class. Two logical operators that differ by a product of checks (multiply one by some checks and you get the other) act the same way on code states, so they go in one class; an overall phase ±1, ±i is ignored as well. Example: Z̄ on row 0 and its copy on row 1 differ by a row of plaquettes, so they are one class; −Z̄ and Z̄ differ only by a phase, also one class.
数一数:k = 1 时恰好四类。不计相位,一个 n 比特 Pauli 串就是 2n 个 0/1:每个比特上「有没有 X 成分」「有没有 Z 成分」(Y 两样都有)。所以一共 4n 种。「与某条检查对易」是这 2n 个比特上的一条模 2 方程(重叠处不同字母的个数为偶数),n − k 条独立检查给 n − k 条独立方程,每条砍掉一半:剩 4n / 2n−k = 2n+k 个逻辑算符。检查的乘积有 2n−k 种(检查独立,每条选或不选,结果各不相同),每一类恰好是某个逻辑算符乘遍这 2n−k 种得到的,大小都一样。于是类数 = 2n+k / 2n−k = 4k,k = 1 时是 4。用 L = 2 验一遍:n = 5,45 = 1024 个 Pauli 串;4 条检查砍四次一半,剩 64 个逻辑算符;检查乘积 24 = 16 种;64 / 16 = 4(我们用程序把 1024 个逐一试过,结果相同)。
Count them: exactly four classes when k = 1. Ignoring phase, an n-qubit Pauli string is 2n bits: for each qubit, “does it have an X part?” and “does it have a Z part?” (Y has both). So there are 4n of them. “Commutes with a given check” is one mod-2 equation on those 2n bits (the number of overlap positions with different letters is even), and n − k independent checks give n − k independent equations, each cutting the count in half: 4n / 2n−k = 2n+k logical operators remain. There are 2n−k products of checks (the checks are independent, so each choice of which to include gives a different product), and each class is one logical operator multiplied by all 2n−k of them, so all classes have the same size. Hence the number of classes is 2n+k / 2n−k = 4k, which is 4 for k = 1. Check it at L = 2: n = 5 gives 45 = 1024 Pauli strings; the 4 checks halve that four times, leaving 64 logical operators; there are 24 = 16 check products; 64 / 16 = 4 (we tried all 1024 by program and got the same).
四类各是谁。候选代表是:检查的乘积(什么都不做),X̄,Z̄,以及 X̄Z̄。在单个比特上 Y = iXZ,所以 Ȳ = iX̄Z̄,和 X̄Z̄ 只差相位 i,同一类。按上一段,与 X̄、Z̄ 的对易关系是一类的「指纹」,只需看代表:检查乘积与 X̄、Z̄ 都对易;X̄ 与 X̄ 对易、与 Z̄ 反对易;Z̄ 与 Z̄ 对易、与 X̄ 反对易;Ȳ 与两者都反对易(X̄ 挪过 X̄Z̄ 时只在 Z̄ 处出一个负号,Z̄ 同理)。四个指纹互不相同,所以这是四个不同的类,而总共只有四类,于是一个都没漏,与单个比特上的 I、X、Z、Y 一一对应。结论:一个不是检查乘积的逻辑算符落在 X̄、Z̄、Ȳ 三类之一,至少与 X̄、Z̄ 之一反对易。这正是下界论证最后一步要的。
Who the four classes are. The candidate representatives are: a product of checks (do nothing), X̄, Z̄, and X̄Z̄. On one qubit Y = iXZ, so Ȳ = iX̄Z̄, which differs from X̄Z̄ only by the phase i and is the same class. By the paragraph before, how an operator commutes with X̄ and Z̄ is a fingerprint of its class, so looking at representatives is enough: a check product commutes with both X̄ and Z̄; X̄ commutes with X̄ and anticommutes with Z̄; Z̄ commutes with Z̄ and anticommutes with X̄; Ȳ anticommutes with both (moving X̄ past X̄Z̄ picks up one minus sign, at Z̄, and likewise for Z̄). The four fingerprints differ, so these are four different classes, and since there are only four classes none is missing; they match I, X, Z, Y on a single qubit. Conclusion: a logical operator that is not a product of checks lies in the X̄, Z̄ or Ȳ class and anticommutes with at least one of X̄, Z̄, which is what the last step of the lower bound needs.
下界lower: L 个不相交的拷贝disjoint copies ⇒ wt(P) ≥ L · ∴ d = L
d = 码距,L = 家族变量(格子边长),P = 任意一个不是检查乘积的逻辑算符,wt(P) = 它的重量(触碰的比特数)。d = distance, L = family variable (grid side), P = any logical operator that is not a product of checks, wt(P) = its weight (qubits touched).
这条证明用到的只有「哪条检查碰哪些比特」,棋盘只是帮你看清;它也不依赖对小实例的穷举,对每个 L ≥ 2 一次说完。QEC-Bank 的 pedagogy/distance-proof.md 把它称为「有限版图上的 systolic 论证」(systolic 一词来自几何:曲面上最短的绕不掉的圈叫 systole):L 个不相交的拷贝就是 L 道独立的关卡,任何与之反对易的算符都得逐道留下至少一个比特。这个定理,正是第 3 章里 L5 那行「下界」一栏的来源。
The proof uses nothing but “which check touches which qubits”; the board only helps you see it. Nor does it rely on enumerating small instances: it settles every L ≥ 2 at once. The QEC-Bank page pedagogy/distance-proof.md calls it the finite-patch version of a systolic argument (the word comes from geometry, where the shortest loop on a surface that cannot be shrunk away is called the systole): the L disjoint copies are L independent checkpoints, and any operator anticommuting with them must leave at least one qubit at each. This theorem is exactly where the “lower bound” entry of the L5 row in Chapter 3 comes from.
三个已发布实例,与它们的证据词The three shipped instances and their evidence words
QEC-Bank 的参数表看起来只是九个数字,但每个数字旁边都站着一个词:verified 或 bounded。这一章解释这两个词分别由哪台机器、用哪种方法写下,以及为什么同一个定理证出的 d = L,在 L5 这一行却记作「有界」。 The QEC-Bank parameters table looks like nine numbers, but beside each stands a word: verified or bounded. This chapter explains which machine wrote each word by which method, and why the very theorem that proves d = L is recorded as “bounded” on the L5 row.
3.1实例表The instance table
下表逐字转录 QEC-Bank 的实例文件 codes/surface/instances.yaml(一份纯文本清单,每个实例一段,列出它的参数和每条声明)与 QEC-Bank 参数页。每个数字后的斜体词是 QEC-Bank 的证据词QEC-Bank 给每条声明标注来源类别的固定词汇:verified(机器独立重算并相符)、bounded(只有上下界,未穷举)、claimed(引自文献、未重算)等。(QEC-Bank 称 origin kind),说明这个数字是怎么来的:verified = 验证器独立重算、结果相符;bounded = 只记录了一个下界和一个上界;claimed = 引自文献、没有重算(本表没有用到)。dennis2002topological 这样的写法是 QEC-Bank 的文献键:第一作者姓、年份、标题首词,指向文末延伸阅读里的同名条目。
The table transcribes the QEC-Bank instance file codes/surface/instances.yaml (a plain-text list with one block per instance, giving its parameters and every claim) and the QEC-Bank parameters page word for word. The italic word after each number is the QEC-Bank evidence wordThe fixed vocabulary the QEC-Bank attaches to every claim's origin: verified (independently recomputed by machine and matching), bounded (only bounds, no exhaustive check), claimed (cited from literature, not recomputed), and others. (the QEC-Bank calls it the origin kind), saying where the number comes from: verified = the verifier recomputed it independently and it matched; bounded = only a lower and an upper bound are recorded; claimed = taken from the literature without recomputation (not used in this table). A string like dennis2002topological is a QEC-Bank citation key: first author's surname, year, first word of the title; it points to the entry of the same name under Further reading at the end.
| 实例Instance | L | n | k | d | d 的依据Basis for d |
|---|---|---|---|---|---|
| L3 | 3 | 13 verified | 1 verified | 3 verified | 穷举 CSS 逻辑算符(exact-css-enum)exhaustive CSS logical enumeration (exact-css-enum) |
| L4 | 4 | 25 verified | 1 verified | 4 verified | 穷举 CSS 逻辑算符(exact-css-enum)exhaustive CSS logical enumeration (exact-css-enum) |
| L5 | 5 | 41 verified | 1 verified | 5 bounded | 下界 5:第 2 章定理 + dennis2002topological;上界 5:rand-lowweight-v1,seed 0,iters 2000 找到的重量 5 逻辑算符lower 5: the Chapter 2 theorem + dennis2002topological; upper 5: a weight-5 logical found by rand-lowweight-v1, seed 0, iters 2000 |
表中字母:L = 家族变量,n = 物理比特数,k = 逻辑比特数,d = 码距。Letters in the table: L = family variable, n = physical qubits, k = logical qubits, d = distance.
三个实例的 css: true 也都是 verified。这一栏说的是:检查确实分成纯 X、纯 Z 两族(2.1 节的 CSS 码),而且两族彼此对易。验证器检查的是 HXHZT = 0(模 2)。HZT 是 HZ 的转置把矩阵的行和列对调:原来第 i 行第 j 列的元素搬到第 j 行第 i 列。(行列对调),所以乘积第 i 行第 j 列的元素 = X 检查 i 与 Z 检查 j 同时碰到的比特个数,模 2。它等于 0,就是每一对都共享偶数个比特、全部对易。例:2.2 节折叠「L = 2 手算」的表格里,上行的星与左列的面共享 h00 和 v,2 个,这个元素是 0。先看最小的那个。下面是 L3 的版图,画法和直觉教程一样:比特在边上(边中点的小圆点),星在顶点,面是方格。数一数,13 个数据比特、6 颗星、6 块面;点几条边制造错误,观察警报。这就是表格第一行所描述的那个有限对象。
All three instances also carry css: true as verified. The field says that the checks really do split into a pure-X and a pure-Z family (the CSS code of §2.1) and that the two families commute. The verifier tests HXHZT = 0 (mod 2). HZT is the transposeSwap the rows and columns of a matrix: the entry in row i, column j moves to row j, column i. of HZ (rows and columns swapped), so entry (i, j) of the product is the number of qubits that X check i and Z check j both touch, mod 2. It is 0 exactly when every pair shares an even number of qubits, i.e. all of them commute. Example: in the table of the §2.2 fold “L = 2 by hand”, the top-row star and the left plaquette share h00 and v, two qubits, so that entry is 0. Start with the smallest. Below is the L3 patch, drawn as in the intuition guide: qubits on edges (the small dots at edge midpoints), stars at vertices, plaquettes as squares. Count 13 data qubits, 6 stars, 6 plaquettes; click a few edges to plant errors and watch the alarms. This is the finite object the first table row describes.
3.2verified 是怎么写下的How “verified” gets written
n 和 k 的 verified 直白:验证器重新运行构造器,数出矩阵宽度得 n,算两个秩得 k,与实例文件里的声明比对。d 的 verified 要多做一步:exact-css-enum(qeclib/distance.py 里的枚举程序)按重量 1、2、3……的顺序,逐一枚举每一种比特组合上的纯 X 型与纯 Z 型算符,检查它是否骗过全部检查、又不是检查的乘积;第一个这样的算符出现时的重量就是 d。这等于确认了所有更轻的算符要么触发某条检查、要么本身就是检查的乘积,同时出示了一个重量恰为 d 的逻辑算符。只看纯 X 与纯 Z 就够了:CSS 码里 X 检查只看算符的 Z 部分、Z 检查只看 X 部分,所以任何逻辑算符的 X 部分与 Z 部分各自仍骗过全部检查,且至少一个不是检查的乘积,而它们都不比原算符重。这与形式验证页的 Lean 小规模精确码距证书是两套不同的穷举:那份证书把 X、Y、Z 三种 Pauli 全部枚举,不借助 CSS 结构。L3 和 L4 的码距在实例文件里登记为精确值,验证器就对它们跑这个枚举,结果与声明相符,所以这两行的 d 是 verified。
The verified on n and k is straightforward: the verifier reruns the constructor, reads n off the matrix width, computes the two ranks for k, and compares with the claims in the instance file. The verified on d takes one more step: exact-css-enum (the enumeration routine in qeclib/distance.py) goes through weights 1, 2, 3, … in order and enumerates one by one the pure-X and pure-Z operators on every set of qubits of that size, testing whether the operator fools every check without being a product of checks; the weight at which the first such operator appears is d. This confirms that every lighter operator either trips some check or is itself a product of checks, and it exhibits a logical of weight exactly d. Pure X and pure Z suffice: in a CSS code the X checks see only an operator's Z part and the Z checks only its X part, so the X part and the Z part of any logical each still fool every check, at least one of them is not a product of checks, and neither is heavier than the original. This is a different exhaustive method from the Lean small exact-distance certificate of the formal-verification page: that certificate enumerates all three Paulis X, Y, Z without using the CSS structure. The instance file records the distances of L3 and L4 as exact values, so the verifier runs this enumeration on them; the results match, and those two rows carry verified for d.
3.3为什么 L5 是 bounded 而不是 verifiedWhy L5 is bounded, not verified
L5 的码距在实例文件里没有登记成精确值,而是拆成一个下界和一个上界分别记账(下面的原文)。验证器只核对登记的内容,所以对 L5 不跑穷举枚举。这不是算不动:41 个比特上重量 ≤ 4 的纯 X 型、纯 Z 型算符合计约 23 万个(112,791 种比特组合,各试 X 与 Z 两次),我们在工作站上用同一个 exact-css-enum 对 L5 跑了一次,不到 1 秒就返回 d = 5(2026-09-24,脚本见本篇的核对记录)。L5 写成 bounded 是记账方式的选择,下面说清两半各靠什么。下界 d ≥ 5:来自第 2 章的定理,文献出处记为 dennis2002topological(Dennis、Kitaev、Landahl、Preskill,“Topological quantum memory”,2002)。这是推理,不是机器枚举;QEC-Bank 目前的验证器没有核对下界的程序,所以规定下界必须附一条文献出处。上界 d ≤ 5:验证器每次都重跑一次低重量搜索 rand-lowweight-v1(QEC-Bank 的随机低重量搜索,第 1 版)。它随机生成一个骗过另一类全部检查的算符,扔掉恰好是检查乘积的,再反复乘上检查、只要能让重量变小就乘,最后记下最轻的那个;X 型、Z 型各试 2000 次。种子(seed)0 固定了这串随机数,所以谁重跑都得到同一个结果。它找到一个重量 5 的逻辑算符,一个机器可复现的见证。两个 5 相等,所以我们「知道」d = 5;但只要下界不是机器穷举得到的,QEC-Bank 就把这条声明叫 bounded。原文写得很直接:「The word bounded is intentional」。
The instance file does not record L5's distance as an exact value; it splits it into a lower and an upper bound with separate bookkeeping (quoted below). The verifier checks only what is recorded, so for L5 it does not run the exhaustive enumeration. This is not a matter of cost: on 41 qubits the pure-X and pure-Z operators of weight ≤ 4 number about 230,000 (112,791 sets of qubits, each tried once as X and once as Z), and running the same exact-css-enum on L5 on our workstation returned d = 5 in under a second (2026-09-24; the script is in this page's check notes). Writing L5 as bounded is a bookkeeping choice, and here is what each half rests on. Lower bound d ≥ 5: from the Chapter 2 theorem, with literature provenance dennis2002topological (Dennis, Kitaev, Landahl, Preskill, “Topological quantum memory”, 2002). This is reasoning, not machine enumeration; the current QEC-Bank verifier has no routine that checks lower bounds, so its rules demand a literature reference for every lower bound. Upper bound d ≤ 5: on every run the verifier reruns the low-weight search rand-lowweight-v1 (the QEC-Bank random low-weight search, version 1). It draws a random operator that fools every check of the other type, throws it away if it happens to be a product of checks, then keeps multiplying by checks whenever that lowers the weight, and records the lightest result; 2000 tries each for X type and Z type. The seed 0 fixes the sequence of random numbers, so anyone who reruns it gets the same result. It finds a logical of weight 5, a machine-reproducible witness. The two fives agree, so we “know” d = 5; but whenever the lower bound was not obtained by machine enumeration, the QEC-Bank calls the claim bounded. The source says it outright: “The word bounded is intentional”.
upper: {value: 5, method: rand-lowweight-v1, seed: 0, iters: 2000}
origin: {kind: bounded, ref: dennis2002topological}
d = 码距;lower/upper 的 value = 下界与上界的数值;seed、iters = 搜索的随机种子与迭代次数。d = distance; the value under lower/upper = the numerical bound; seed, iters = the search's random seed and iteration count.
这就是 L5 那个有限对象。41 个数据比特、20 颗星、20 块面。试着画一条从左侧悬边到右侧悬边的 Z 链:它需要恰好 5 步,零警报——你亲手复现了 rand-lowweight-v1 找到的那种重量 5 见证。
Here is the L5 finite object: 41 data qubits, 20 stars, 20 faces. Try drawing a Z-chain from a left dangler to a right one: it takes exactly 5 steps and raises zero alarms. You have just reproduced by hand the kind of weight-5 witness that rand-lowweight-v1 finds.
bounded 不是「可能不对」。它是一句精确的话:「下界靠定理与文献,上界靠可复现见证,两者未经同一台穷举机器合拢」。反过来,verified 也不比定理「更真」,它只是多了一层独立的机械核对。QEC-Bank 把二者分开写,是为了让读者能分辨「机器重算过什么」与「人推理过什么」——这条分界线在形式化证书那一侧面会再次出现。
Bounded does not mean “possibly wrong”. It is a precise sentence: “the lower bound rests on a theorem and the literature, the upper bound on a reproducible witness, and the two were not closed by the same exhaustive machine”. Conversely, verified is not “truer” than a theorem; it merely adds one independent layer of mechanical checking. The QEC-Bank keeps the two words apart so a reader can tell what a machine recomputed from what a human reasoned. The same dividing line reappears in the formal certificates facet.
对。「没找到更轻的」和「不存在更轻的」是两回事;只有穷举(exact-css-enum)或另一种完备证书能把下界交给机器。这里的下界已经有定理,所以 bounded 已是诚实且完整的记录。
Right. “Found nothing lighter” and “nothing lighter exists” are different statements; only exhaustion (exact-css-enum) or another complete certificate hands the lower bound to a machine. The lower bound here already has a theorem, so bounded is the honest and complete record.
问自己:随机搜索能排除重量 4 的逻辑算符吗?它只能找到东西,不能证明找不到。
Ask: can a random search rule out a weight-4 logical? It can only find things, never prove absence.
算上帮手比特:4d²−4d+1,与那条二维天花板Counting the helpers: 4d²−4d+1, and the two-dimensional ceiling
[[n,k,d]] 里的 n 只数数据比特。真实芯片上测检查还要用帮手比特。这一章按最常见的排法(每条检查配一个自己的帮手)把帮手算进去,和文献里的旋转版比一次,最后解释为什么 k 停在一个常数:只要码距随 √n 增长,二维几何就只允许常数个逻辑比特。 The n in [[n,k,d]] counts data qubits only. On a real chip, measuring the checks also takes helper qubits. This chapter adds the helpers under the most common layout (each check gets a helper of its own), compares once against the rotated patch from the literature, and finally explains why k stays at a constant: as long as the distance grows like √n, two-dimensional geometry allows only a constant number of logical qubits.
4.1每条检查一个帮手One helper per check
直觉教程打开过那个黑盒:测一条检查,要靠一个辅助比特依次接触四个数据比特再被读出。最常见的排法是每条检查配一个自己的帮手,所有检查同时测。这是一种排法,不是硬性要求:帮手也可以轮流用,测完一条再去测下一条,比特少了,一轮测量要多花几步时间(4.2 节有文献里的例子)。本章按「每条独立检查配一个帮手」计,未旋转版图的总数是数据比特 2d²−2d+1 加上检查数 2d(d−1) = 2d²−2d,也就是比数据比特少 1:
The intuition guide opened that box: measuring one check needs an ancilla that touches the four data qubits in turn and is then read out. The most common layout gives every check a helper of its own and measures all checks at once. That is a scheduling choice, not a requirement: helpers can also take turns, measuring one check and then the next, which saves qubits at the price of a few more steps per round (§4.2 has an example from the literature). This chapter counts one helper per independent check, so the unrotated patch totals its 2d²−2d+1 data qubits plus 2d(d−1) = 2d²−2d checks, one fewer than the data count:
d = 码距(这一族中 d = L);2d²−2d+1 = 数据比特数 n,2d²−2d = 检查数 = 帮手比特数(按每条检查一个帮手计)。d = distance (d = L in this family); 2d²−2d+1 = the data-qubit count n, 2d²−2d = the number of checks = helper qubits (one helper per check).
4.2对照:旋转版图 2d²−1(不在构造器内)For comparison: the rotated patch, 2d²−1 (outside the constructor)
QEC-Bank 的直觉短文和复现脚本 reproduce.py 都记录了一组对照数字,来源是文献而非构造器:旋转版图 [[d², 1, d]](horsman2012surface,Horsman、Fowler、Devitt、Van Meter,“Surface code quantum computing by lattice surgery”,2012)。下图以 d = 3 说明它从哪里来。左边是第 2 章的棋盘,这次把横边比特和竖边比特都画成圆点,检查画成小方块,细线连着每条检查碰的比特。在棋盘上画一个菱形(斜 45° 的正方形),只留下菱形里的 9 个比特和碰得到它们的检查:里面的 4 条四腿检查,外加菱形四条边上各一条只剩两腿的检查(转正以后,上下两边的是 X 型,左右两边的是 Z 型)。四个角上的比特被裁掉了。把菱形转 45° 摆正,就是右边的旋转版:数据比特排成 3 × 3 的方阵。横着走一行、竖着走一列都要经过 3 个比特,所以码距仍是 3(我们用 exact-css-enum 对这 9 个比特、8 条检查算过:[[9, 1, 3]])。
The QEC-Bank intuition essay and the reproduction script reproduce.py both record a set of comparison numbers whose source is the literature, not the constructor: the rotated patch [[d², 1, d]] (horsman2012surface: Horsman, Fowler, Devitt, Van Meter, “Surface code quantum computing by lattice surgery”, 2012). The figure shows where it comes from for d = 3. On the left is the board of Chapter 2, this time with both the horizontal-edge and the vertical-edge qubits drawn as dots, checks as small squares, and thin lines from each check to the qubits it touches. Draw a diamond (a square tilted by 45°) on the board and keep only the 9 qubits inside it and the checks that touch them: the 4 four-leg checks inside, plus one check on each of the diamond's four sides that keeps only two legs (once the patch is turned upright, the ones on the top and bottom are X type, those on the left and right Z type). The four corner qubits are cut away. Turn the diamond by 45° and set it upright: that is the rotated patch on the right, with its data qubits in a 3 × 3 array. A row and a column each pass through 3 qubits, so the distance is still 3 (we ran exact-css-enum on these 9 qubits and 8 checks: [[9, 1, 3]]).
一般的 d 也一样:旋转版有 d² 个数据比特、d² − 1 条检查,加上每条检查一个帮手,总数 2d² − 1。它和未旋转版用的是同一种四腿检查,只是边界沿斜线裁,省下的比特全在边界附近。reproduce.py 对 d = 3 和 d = 12 断言了下面这些数:
General d works the same way: the rotated patch has d² data qubits and d² − 1 checks, and with one helper per check the total is 2d² − 1. It uses the same four-leg checks as the unrotated patch; only the boundary is cut along a diagonal, and all the qubits saved sit near the boundary. reproduce.py asserts these values for d = 3 and d = 12:
| d | 未旋转:数据 / 总数Unrotated: data / total | 旋转(文献):数据 / 总数Rotated (literature): data / total | 来源Source |
|---|---|---|---|
| 3 | 13 / 25 | 9 / 17 | 构造器 + reproduce.py 断言constructor + reproduce.py assertion |
| 5 | 41 / 81 | 25 / 49 | 公式代入(实例 L5 的 n = 41 为 verified)formula (n = 41 of instance L5 is verified) |
| 12 | 265 / 529 | 144 / 287 | reproduce.py 断言;构造器未发布 L=12 实例reproduce.py assertion; no L=12 instance is shipped |
d = 码距;「数据」= 数据比特数 n,「总数」= 数据比特 + 帮手比特,按每条检查一个帮手计。d = distance; “data” = data qubits n, “total” = data + helper qubits, counting one helper per check.
帮手也可以少于检查数。Horsman 等人(§7.1)写到,d = 3 旋转版的 8 条检查可以用 8 个帮手测,也可以让中间 4 个帮手各用两次(仍然只让相邻比特互相作用),总数就从 17 降到 9 + 4 = 13;他们拿它和未旋转版的 25 比。代价是每一轮测量要分两批做,花的时间更长。所以文献里「d = 3 要多少个物理比特」可能写 17,也可能写 13,要看帮手怎么排。
There can also be fewer helpers than checks. Horsman et al. (§7.1) note that the 8 checks of the rotated d = 3 patch can be measured with 8 helpers, or with the 4 central helpers each used twice (still with only neighbouring qubits interacting), which brings the total from 17 down to 9 + 4 = 13; they compare that with the 25 of the unrotated patch. The price is that each measurement round is done in two batches and takes longer. So a paper may give 17 or 13 as “the physical qubits for d = 3”, depending on how the helpers are scheduled.
两列「总数」都不含布线通道、备用比特和魔法态工厂的面积。QEC-Bank 的原话:这些必须单独说明,「rather than hidden in “physical qubits”」。当你读到「一个逻辑比特需要 N 个物理比特」时,先问:N 数了哪些东西?
Neither “total” column includes routing lanes, spare qubits or magic-state factory space. In the QEC-Bank's words, these must be stated separately “rather than hidden in ‘physical qubits’”. Whenever you read “one logical qubit needs N physical qubits”, first ask: what exactly did N count?
4.3k·d² = O(n):为什么一块补丁的 k 不随 L 增长k·d² = O(n): why one patch’s k cannot grow with L
把三个数放在一起看:n 随 L² 增长,k 永远是 1,d = L。所以k/n → 0编码率趋于零:逻辑比特数除以物理比特数,随 L 增大无限变小。:L = 10 时 181 个数据比特只存 1 个逻辑比特。而 d = Θ(√n)「与 √n 同阶」:d 被 √n 的常数倍从上下两侧夹住。这里 d = L,n ≈ 2L²,故 d ≈ √(n/2)。:比特数翻 4 倍,码距只翻 2 倍。Bravyi、Poulin、Terhal 证明了一条把 k、d、n 绑在一起的定理(bravyi2010tradeoffs,“Tradeoffs for reliable quantum information storage in 2D systems”,2010)。它有两条前提:(1) 比特排在一张间距固定的二维正方格子上,每个格点一个比特,所以单位面积里的比特数有上限(没有这一条,就能把任意一个码塞进一小块面积,「局域」就没有意义了);(2) 每条检查碰的比特都落在一个 w × w 的小方块里,w 是固定的,不随码变大而变大。在这两条前提下,任何稳定子码(论文对更一般的一类码也证明了)都满足 k·d² ≤ c·n,常数 c 只取决于 w 和每个格点上量子系统的大小,与 n 无关。表面码的格子间距固定、每条检查只碰相邻的比特,两条前提都满足。
这条不等式对表面码说了什么?把它改写成 k ≤ c·n/d²。表面码的 d = Θ(√n),n/d² 被一个常数封顶(n ≈ 2L²,d = L,n/d² ≈ 2),所以 k 也被一个常数封顶,不能随 L 增长。定理不说这个常数是 1:k 恰好等于 1,是 2.2 节算的两个秩给出的,由这块版图的检查决定。把数代进去看离天花板多近:表面码的 k·d² = L²,L = 10 时是 100,而 n = 181,比值约 0.55;L 越大这个比值越接近 1/2,所以表面码离这条天花板只差一个常数因子。
那想多存几个逻辑比特怎么办?最简单的是在平面上多摆几块互不相连的补丁:m 块给出 [[m·n, m, L]],k 涨到 m,d 不变。它完全符合定理:k·d² = m·L²,和总比特数 m·n 一起涨。定理挡住的是另一件事:编码率 k/n 不趋于零(k 与 n 成正比)的同时,让码距 d 无限增长。k 和 d 都慢慢长是允许的:摆 L 块码距为 L 的补丁,k = d = L,总比特数 n ≈ 2L³,k·d² = L³ ≈ n/2,没有违反定理,只是 k/n ≈ 1/(2L²) 仍然趋于零。要让 k/n 保持不变、d 又越来越大,在上面两条前提下做不到;若仍保留前提 (1) 的平面等密度排布,就只能放宽前提 (2),允许检查碰到远处的比特。这正是 qLDPCquantum low-density parity-check:每条检查只碰少数几个比特、每个比特只被少数几条检查碰到的量子码;「少数」不随码变大而增长,但不要求这些比特在平面上彼此挨着。(量子低密度校验)码走的路:每条检查仍只碰几个比特,但不要求它们在平面上挨着。完整推导(包括「在平面上挨着」这个条件在哪一步用到)见 QEC-Bank 的 BPT 推导页。
Put the three numbers side by side: n grows like L², k is always 1, d = L. Hence k/n → 0The encoding rate, logical qubits divided by physical qubits, shrinks without limit as L grows.: at L = 10, 181 data qubits store a single logical qubit. And d = Θ(√n)“Of the same order as √n”: d is sandwiched between constant multiples of √n. Here d = L and n ≈ 2L², so d ≈ √(n/2).: four times the qubits buys only twice the distance. Bravyi, Poulin and Terhal proved a theorem that ties k, d and n together (bravyi2010tradeoffs, “Tradeoffs for reliable quantum information storage in 2D systems”, 2010). It has two hypotheses: (1) the qubits sit on a two-dimensional square lattice with fixed spacing, one qubit per site, so the number of qubits per unit area is bounded (without this, any code could be packed into a tiny area and “local” would mean nothing); (2) the qubits each check touches all fit inside a w × w block, with w fixed and not growing with the code. Under these two hypotheses every stabilizer code (the paper also covers a more general class) obeys k·d² ≤ c·n, where the constant c depends only on w and on the size of the quantum system at each site, not on n. The surface code has fixed spacing and each check touches only neighbouring qubits, so it meets both hypotheses.
What does the inequality say about the surface code? Rewrite it as k ≤ c·n/d². The surface code has d = Θ(√n), so n/d² is capped by a constant (n ≈ 2L², d = L, n/d² ≈ 2), and k is capped by a constant too: it cannot grow with L. The theorem does not say that constant is 1: k is exactly 1 because of the two ranks computed in §2.2, which is a property of this patch's checks. To see how close the surface code comes to the ceiling, plug in numbers: k·d² = L², which at L = 10 is 100 against n = 181, a ratio of about 0.55, and the ratio approaches 1/2 as L grows, so the surface code sits within a constant factor of the ceiling.
So how do you store more logical qubits? The simplest way is to lay several separate patches side by side in the plane: m patches give [[m·n, m, L]], raising k to m with d unchanged. That is fully consistent with the theorem: k·d² = m·L² grows along with the total qubit count m·n. What the theorem rules out is something else: keeping the encoding rate k/n away from zero (k proportional to n) while the distance d grows without bound. Letting k and d both grow slowly is allowed: lay out L patches of distance L and k = d = L with n ≈ 2L³ qubits, so k·d² = L³ ≈ n/2, within the theorem, although k/n ≈ 1/(2L²) still goes to zero. Keeping k/n fixed while d keeps growing is impossible under the two hypotheses; if the fixed-density planar layout of hypothesis (1) is kept, the only way is to relax hypothesis (2) and let checks reach distant qubits. That is the road taken by qLDPCquantum low-density parity-check: codes in which each check touches only a few qubits and each qubit is touched by only a few checks, “few” not growing with the code, but with no requirement that those qubits be neighbours in a plane. (quantum low-density parity-check) codes: each check still touches only a few qubits, but they need not be neighbours in the plane. The complete derivation, including the step where “neighbours in the plane” is used, is on the QEC-Bank BPT derivation page.
(二维局域码的上限,Bravyi–Poulin–Terhalthe 2-D local ceiling, Bravyi–Poulin–Terhal)
n = 物理比特数,k = 逻辑比特数,d = 码距,L = 家族变量;O(n) = 不超过 n 的某个常数倍。n = physical qubits, k = logical qubits, d = distance, L = family variable; O(n) = at most some constant times n.
九个数字,两个词Nine numbers, two words
回放一遍:表面码是一族码,家族变量 L ≥ 2;构造器 HGP(rep_L, rep_L) 生成未旋转的平面版图,n = L²+(L−1)² 是两块比特之和,k = 1 来自两个秩都等于 L(L−1),d = L 来自一行 Z、一列 X 两条串(上界)与 Z̄ 的 L 个不相交拷贝(下界)。QEC-Bank 发布 L3、L4、L5 三个实例;n、k、css 全部 verified;d 在 L3、L4 由穷举 verified;在 L5,实例文件把它登记成定理下界加随机搜索上界,所以是 bounded。算上帮手(每条检查一个),未旋转版图用 (2d−1)² 个比特存 1 个逻辑比特。这个 1 是两个秩算出来的精确值;二维局域性的天花板 k·d² = O(n) 则说明,只要 d 随 √n 增长,k 就只能停在一个常数。
Replay: the surface code is a family with variable L ≥ 2; the constructor HGP(rep_L, rep_L) builds the unrotated planar patch, n = L²+(L−1)² is the sum of two qubit blocks, k = 1 follows from both ranks equalling L(L−1), and d = L from a Z row and an X column (upper bound) plus L disjoint copies of Z̄ (lower bound). The QEC-Bank ships three instances, L3, L4, L5; n, k and css are verified throughout; d is verified by enumeration at L3 and L4; at L5 the instance file records it as a theorem lower bound plus a random-search upper bound, hence bounded. Helpers included (one per check), the unrotated patch spends (2d−1)² qubits on one logical qubit. That 1 is the exact value the two ranks give; the two-dimensional ceiling k·d² = O(n) says that as long as d grows like √n, k can only stay at a constant.
符号与读法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 的量子码;单方括号留给经典码。A quantum code with n physical qubits, k logical qubits, distance d; single brackets are for classical codes. |
| L | 家族变量,读「L」The family variable, read “L” | 格子边长,L ≥ 2 的整数;对这一族恰等于码距 d。The grid side length, an integer L ≥ 2; for this family it equals the distance d. |
| HGP(rep_L, rep_L) | 读「两份长度 L 重复码的超图乘积」Read “the hypergraph product of two length-L repetition codes” | 由两个经典校验矩阵生成 CSS 量子码的配方;rep_L(记 H)是 (L−1)×L 的 0/1 矩阵,每行「1 1」相邻,rank(H) = L−1。The recipe turning two classical check matrices into a CSS code; rep_L (written H) is the (L−1)×L binary matrix with adjacent “1 1” rows, rank(H) = L−1. |
| HX, HZ | 读「X 检查矩阵、Z 检查矩阵」Read “the X and Z check matrices” | 每行一条检查、每列一个比特的 0/1 矩阵;CSS 条件 HXHZT = 0(模 2)。Binary matrices with one check per row and one qubit per column; the CSS condition is HXHZT = 0 (mod 2). |
| rank | 读「秩」Read “rank” | 矩阵中独立行的个数(模 2);这里 rank(HX) = rank(HZ) = L(L−1)。The number of independent rows (mod 2); here rank(HX) = rank(HZ) = L(L−1). |
| wt(P) | 读「P 的重量」Read “the weight of P” | 算符 P 作用不是恒等 I 的比特数;d = 最轻逻辑算符的 wt。The number of qubits on which P acts as something other than I; d = the weight of the lightest logical. |
| ≤ ≥ | 读「小于等于 / 大于等于」Read “at most / at least” | 码距的两条不等式:上界 d ≤ L 由一条串给出,下界 d ≥ L 由不相交的拷贝给出。The two distance inequalities: the upper bound d ≤ L from one string, the lower bound d ≥ L from disjoint copies. |
| Θ(√n), O(n) | 读「西塔 根号 n」「大 O n」Read “theta of root n”, “big-O of n” | 增长阶记号:Θ = 上下都被常数倍夹住;O = 至多常数倍。k·d² = O(n) 即「不超过 n 的常数倍」。Growth-order notation: Θ = sandwiched by constant multiples both ways; O = at most a constant multiple. k·d² = O(n) means “no more than a constant times n”. |
本篇新增词汇New terms in this guide
| 术语Term | 白话定义Plain definition |
|---|---|
| CSS 码CSS code | 检查分成纯 X、纯 Z 两族的稳定子码(Calderbank–Shor–Steane);两族分别写成 HX、HZ。A stabilizer code whose checks split into a pure-X and a pure-Z family (Calderbank–Shor–Steane); the families are written HX, HZ. |
| 转置 Hᵀtranspose Hᵀ | 把矩阵 H 的行和列对调;H 的行是检查,Hᵀ 的行就是比特。H with rows and columns swapped; the rows of H are checks, so the rows of Hᵀ are bits. |
| 家族变量family variable | 生成一族码中某个成员所需的输入;表面码只有 L。The input that selects one member of a code family; the surface code has only L. |
| 实例instance | 家族变量取定后的有限码对象;QEC-Bank 发布 L3、L4、L5。The finite code object once the variable is fixed; the QEC-Bank ships L3, L4, L5. |
| 证据词(origin kind)evidence word (origin kind) | verified = 机器独立重算相符;bounded = 只有上下界;claimed = 引自文献未重算。verified = independently recomputed by machine; bounded = bounds only; claimed = cited, not recomputed. |
| 穷举 CSS 枚举(exact-css-enum)exhaustive CSS enumeration (exact-css-enum) | 利用 CSS 结构,逐一检查所有重量小于 d 的纯 X 型与纯 Z 型算符都不是逻辑算符的方法(qeclib/distance.py);L3、L4 的 d 由此 verified。X、Y、Z 全枚举是另一套方法:Lean 小规模精确码距证书。Using the CSS structure to check one by one that no pure-X or pure-Z operator of weight below d is a logical (qeclib/distance.py); how d at L3 and L4 is verified. Enumerating all of X, Y, Z is a separate method: the Lean small exact-distance certificate. |
| 见证(witness)witness | 一个具体的、可机器复核的例子,如 rand-lowweight-v1 找到的重量 5 逻辑算符;只证明上界。A concrete, machine-checkable example, such as the weight-5 logical found by rand-lowweight-v1; it proves only an upper bound. |
| 不相交拷贝disjoint copies | 同一个逻辑算符的 L 个两两不交的代表(Z̄ 放在 L 行中的任一行);证明下界 d ≥ L 的工具。L pairwise-disjoint representatives of one logical operator (Z̄ on any of the L rows); the tool that proves the lower bound d ≥ L. |
| 超图乘积(HGP)· 棋盘hypergraph product (HGP) · the board | 把两个经典码相乘:两条链的成员两两配对铺成棋盘,(比特, 比特)与(检查, 检查)是量子比特,(检查, 比特)是 X 检查,(比特, 检查)是 Z 检查,检查碰上下左右四个邻居。Multiplying two classical codes: pair up the members of the two chains on a board; (bit, bit) and (check, check) cells are qubits, (check, bit) cells X checks, (bit, check) cells Z checks, and a check touches its four neighbours. |
| 构造器 · 验证器 · 实例文件constructor · verifier · instance file | QEC-Bank 里生成检查矩阵的程序;重新运行构造器并重算声明的程序;列出每个实例及其声明的文本清单(instances.yaml)。The QEC-Bank program that generates the check matrices; the program that reruns it and recomputes the claims; the text list of instances and their claims (instances.yaml). |
| 种子(seed)seed | 随机搜索的起始编号;固定种子就固定了整串随机数,任何人重跑都得到同一结果。The starting number of a random search; fixing it fixes the whole sequence of random numbers, so every rerun gives the same result. |
| 旋转版图rotated patch | 把未旋转棋盘沿 45° 菱形裁下、再摆正得到的 [[d², 1, d]] 版本(图 4.1);不在构造器内。The [[d², 1, d]] version obtained by cutting a 45° diamond out of the unrotated board and setting it upright (Fig. 4.1); not in the constructor. |
延伸阅读Further reading
- E. Dennis, A. Kitaev, A. Landahl, J. Preskill, “Topological quantum memory” (2002)
dennis2002topological。L5 码距下界的文献出处;平面版图与边界的奠基文。dennis2002topological. The literature provenance of the L5 lower bound; the founding paper for planar patches and boundaries. - J.-P. Tillich, G. Zémor, “Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength” (2009)
tillich2009quantum。超图乘积 HGP 的原始论文;构造器 HGP(rep_L, rep_L) 的配方来源。tillich2009quantum. The original hypergraph-product paper; the recipe behind the constructor HGP(rep_L, rep_L). - S. Bravyi, D. Poulin, B. Terhal, “Tradeoffs for reliable quantum information storage in 2D systems” (2010)
bravyi2010tradeoffs。k·d² = O(n) 天花板的证明。bravyi2010tradeoffs. The proof of the k·d² = O(n) ceiling. - C. Horsman, A. Fowler, S. Devitt, R. Van Meter, “Surface code quantum computing by lattice surgery” (2012)
horsman2012surface。旋转版图 [[d²,1,d]] 的明确描述;也是格点手术的入口。horsman2012surface. The explicit description of the rotated [[d²,1,d]] patch; also the entrance to lattice surgery.
机器重算过的:三个实例的 n、k、css,L3 与 L4 的精确码距,L5 的重量 5 上界见证,以及 reproduce.py 里的资源计数。人推理并引文献支撑的:d = L 的一般定理与 L5 的下界。纯文献对照的:旋转版图 [[d²,1,d]] 与 2d²−1。本篇完全不涉及阈值——它不是检查矩阵的属性,读者请去译码器教程的阈值账本。
Recomputed by machine: n, k and css for all three instances, the exact distances at L3 and L4, the weight-5 upper witness at L5, and the resource counts in reproduce.py. Reasoned by humans with literature support: the general theorem d = L and the L5 lower bound. Literature comparison only: the rotated patch [[d²,1,d]] and 2d²−1. This guide says nothing about thresholds, which are not properties of a check matrix; for those, see the threshold ledger in the decoders guide.
条目总览 · 直觉 · 导览 · 表示阶梯 · 参数与实例(本篇) · 形式化 IR 与证书 · 译码器 · 逻辑操作 · 用例与实现 · 关系 · 推导与指南 · 参考文献 · 在 QEC-Bank 中查看此条目 →
Entry overview · Intuition · Guided tour · Representation ladder · Parameters & instances (this guide) · Formal IR & certificates · Decoders · Logical operations · Use cases & realizations · Relations · Derivations & guides · References · Open in the QEC-Bank →