目录Contents
什么是表示阶梯What a representation ladder is
一个纠错码不是一张图,而是一族互相翻译的描述。QEC-Bank 给每个条目排一架五级梯子:越靠下越能直接交给机器执行,越靠上越接近物理与数学的洞见。这一章先讲清梯子的五级各问什么问题,以及为什么每一级都要单独标注来源。 An error-correcting code is not one picture but a family of mutually translating descriptions. The QEC-Bank gives every entry a five-rung ladder: the lower rungs can be handed straight to a machine, the upper ones sit closer to physical and mathematical insight. This chapter explains what question each rung asks, and why every rung carries its own provenance label.
1.1五级,五个问题Five rungs, five questions
在直觉教程里,表面码是一幅画:比特住在边上,星形检查问四条边的 X 奇偶,面检查问四条边的 Z 奇偶(toric code 全图),剪开后出现两种边界。这幅画对人很友好,对程序却没有意义——程序需要的是能直接做运算的东西。反过来,一张 0/1 矩阵对程序很友好,却看不出「边界」「圈」「阈值」这些词。表示阶梯(representation ladder)就是把同一个码的各种描述,按「机器可执行」到「人类可洞见」排成五级:
In the intuition guide the surface code is a picture: qubits live on edges, star checks ask the X-parity of four edges, face checks ask the Z-parity of four edges (the toric code at a glance), and cutting the torus open produces two kinds of boundary. That picture is friendly to people and meaningless to a program, which needs something it can compute with. Conversely, a 0/1 matrix is friendly to a program but hides words like “boundary”, “loop” and “threshold”. A representation ladder arranges all descriptions of one code on five rungs, from machine-executable to human-insightful:
| 阶Rung | 名称Name | 它回答的问题The question it answers | 表面码条目里有几条Entries for the surface code |
|---|---|---|---|
| R1 | 检查(Checks)Checks | 稀疏的 Pauli 生成元,写成辛形式的 0/1 行——所有对易、秩、逻辑算符、码距计算的可执行基线。Sparse Pauli generators as symplectic 0/1 rows — the executable baseline for every commutation, rank, logical and distance computation. | 1 条:symplectic-css-checks1: symplectic-css-checks |
| R2 | 结构(Structure)Structure | 检查背后的结构:CSS 配对、链复形、格点——为什么这些行会对易、为什么恰好剩 1 个逻辑比特。The structure behind the checks: CSS pairs, chain complexes, lattices — why the rows commute and why exactly one logical qubit survives. | 2 条:hypergraph-product、homological2: hypergraph-product, homological |
| R3 | 动力学(Dynamics)Dynamics | 有先后顺序的测量时间表,以及每一时刻的瞬时稳定子群。Ordered measurement schedules and their instantaneous stabilizer groups. | 0 条none |
| R4 | 电路与探测器(Circuit & detectors)Circuit & detectors | 有名字的症状提取电路,以及探测器错误模型。Named syndrome-extraction circuits and detector error models. | 0 条none |
| R5 | 跨模型视图(Cross-model views)Cross-model views | 代数、ZX、费米子、张量、统计物理等其他语言的词典——可执行的或有启发的。Algebraic, ZX, fermionic, tensor and statistical dictionaries — executable or illuminating. | 4 条:statistical-mechanics、zx、fermionic — quon、tensor-network4: statistical-mechanics, zx, fermionic — quon, tensor-network |
注意最后一列:表面码条目在 R3、R4 两级没有任何记录。这不是遗漏了没写,而是 QEC-Bank 对「什么算一条记录」有严格要求(第 4 章专门解释)。一架有空级的梯子,比一架把所有格子都填满好看的梯子更诚实。
Note the last column: the surface-code entry records nothing at rungs R3 and R4. That is not an omission; the QEC-Bank has strict rules for what counts as a record (Chapter 4 is devoted to this). A ladder with empty rungs is more honest than one with every square filled in for looks.
1.2每一级都写明来源:derived / canonical / curatedEvery rung carries a provenance: derived / canonical / curated
同一架梯子上,不同的级可信的方式不一样。R1 的矩阵是 QEC-Bank 的构造器现场算出来的;R2 的超图积是一条有公认定义的数学构造;R5 的「随机键 Ising 模型」则是从一篇具体论文里挑出来的叙述。把这三种东西写成同一种字体,读者就分不清哪句话是机器验证过的、哪句话是文献里说的。所以 QEC-Bank 给每条记录标一个来源标签QEC-Bank 每条 views 记录的 origin.kind 字段:derived(由某个转换器从上游数据算出,附转换器名与版本)、canonical(照公认定义写下)、curated(从一篇文献中挑选整理,附该文献的 bibkey)。:
On one ladder, different rungs earn trust in different ways. The R1 matrices are computed on the spot by the QEC-Bank constructor; the R2 hypergraph product is a mathematical construction with an agreed definition; the R5 “random-bond Ising model” is a narrative selected from one specific paper. Print all three in the same typeface and a reader cannot tell which sentence the machine verified and which one a paper asserted. So every record carries a provenance labelThe origin.kind field of every QEC-Bank views record: derived (computed from upstream data by a named, versioned converter), canonical (written down from an agreed definition), curated (selected and organised from one paper, whose bibkey is attached).:
| 标签Label | 含义Meaning | 本条目中的例子Example in this entry |
|---|---|---|
| derived | 由一个有名字、有版本号的转换器从上游数据算出来;换一台机器重跑会得到同样的东西。Computed from upstream data by a named, versioned converter; rerunning on another machine yields the same thing. | R1:derived by surface.build HGP output -> CheckMatrix.from_css v1R1: derived by surface.build HGP output -> CheckMatrix.from_css v1 |
| canonical | 照公认的数学定义写下,不依赖某一篇论文的表述。Written from an agreed mathematical definition, independent of any one paper's phrasing. | R2:hypergraph-productR2: hypergraph-product |
| curated | 从一篇具体文献中挑选、整理的叙述;标签后面永远跟着那篇文献的 bibkey。机器没有重算它。A narrative selected and organised from one specific paper; the label is always followed by that paper's bibkey. The machine did not recompute it. | R2 的 homological,以及 R5 的全部四条R2's homological, and all four R5 records |
表示阶梯回答的不是「表面码是什么」,而是「表面码有哪几种可靠的说法,每种说法可靠到什么程度」。接下来四章按级往上走:第 2 章 R1(机器算的),第 3 章 R2(定义与文献),第 4 章 R3/R4(诚实地空着),第 5 章 R5(四本词典,全部 curated)。
The ladder does not answer “what is the surface code” but “in how many reliable ways can it be stated, and how reliable is each”. The next four chapters climb rung by rung: Chapter 2 is R1 (machine-computed), Chapter 3 is R2 (definition and literature), Chapter 4 is R3/R4 (honestly empty), Chapter 5 is R5 (four dictionaries, all curated).
R1 · 检查矩阵:机器手里的表面码R1 · The check matrices: the surface code in the machine's hands
梯子的第一级把「星与面」压成两张 0/1 矩阵。这一章写出 L=3 时的那两张矩阵,说明它们怎么由星与面翻译而来,以及机器拿到它们之后能算出什么。来源标签:derived。 The first rung flattens “stars and faces” into two 0/1 matrices. This chapter writes out the two matrices at L=3, explains how they translate from stars and faces, and what the machine can compute once it has them. Provenance: derived.
2.1从检查到行向量From checks to row vectors
给全部 n 个数据比特编号(n = 物理比特数,就是记账里的那个 n)。一条 X 型检查(星)就是一行长 n 的 0/1 串:它碰到的比特写 1,其余写 0。把所有 X 检查的行叠起来,得到矩阵 HXX 检查矩阵:每行一条 X 型检查,每列一个数据比特,(i, j) 位为 1 表示第 i 条检查作用在第 j 个比特上。;Z 检查(面)同样叠成 HZZ 检查矩阵:每行一条 Z 型检查,每列一个数据比特。。这一对矩阵就是表面码的 CSS 形式Calderbank–Shor–Steane:每条检查要么全是 X、要么全是 Z,于是码由一对二元矩阵 (H_X, H_Z) 完整给出。。直觉教程里的碰撞规则「X 撞 Z 的格数为奇数才报警」,翻译成矩阵语言只有一句话:任意一行 X 与任意一行 Z 的重叠个数必须是偶数。
Number all n data qubits (n = the number of physical qubits, the same n as in the ledger). One X-type check (a star) becomes a 0/1 string of length n: a 1 on every qubit it touches, 0 elsewhere. Stack all X-check rows and you have the matrix HXThe X check matrix: one row per X-type check, one column per data qubit; entry (i, j) = 1 means check i acts on qubit j.; the Z checks (faces) stack into HZThe Z check matrix: one row per Z-type check, one column per data qubit.. This pair is the surface code in CSS formCalderbank–Shor–Steane: every check is all-X or all-Z, so the code is fully specified by a pair of binary matrices (H_X, H_Z).. The intuition guide's collision rule, “alarm only when X meets Z on an odd number of cells”, becomes a single matrix sentence: any X row and any Z row must overlap on an even number of qubits.
「辛形式」(symplectic form)是把两张矩阵拼成一张更大的表 [HX | 0 ; 0 | HZ]:每一行有 2n 位,前 n 位记 X 部分,后 n 位记 Z 部分。这样任何 Pauli 检查(哪怕不是纯 X 或纯 Z)都能写成一行,对易判据统一成一条公式:两行 (x | z) 与 (x′ | z′) 对易,当且仅当 x·z′ + z·x′ = 0(模 2),这叫辛内积,其中 x·z′ 是逐位相乘再相加。它不是把两行当普通向量做点积:单比特的 X = (1 | 0) 与 Z = (0 | 1),普通点积是 1·0 + 0·1 = 0,辛内积却是 1·1 + 0·0 = 1,所以 X 与 Z 反对易。对纯 X 行与纯 Z 行,辛内积就退化成上面那条「重叠个数为偶数」。QEC-Bank 的 R1 记录 symplectic-css-checks 说的就是这张叠起来的表——「所有对易、秩、逻辑、码距计算的通用可执行基线」。
The “symplectic form” glues the two matrices into one larger table [HX | 0 ; 0 | HZ]: each row has 2n bits, the first n recording the X part, the last n the Z part. Any Pauli check, even one that is not pure X or pure Z, then fits on a row, and the commutation test becomes one formula: rows (x | z) and (x′ | z′) commute exactly when x·z′ + z·x′ = 0 (mod 2), the symplectic product, where x·z′ multiplies position by position and adds. It is not the ordinary dot product of the two rows: for a single qubit, X = (1 | 0) and Z = (0 | 1) have ordinary dot product 1·0 + 0·1 = 0, yet symplectic product 1·1 + 0·0 = 1, so X and Z anticommute. For a pure-X row against a pure-Z row, the symplectic product reduces to the “even overlap” rule above. The QEC-Bank R1 record symplectic-css-checks is exactly this stacked table — “the universal executable baseline used for commutation, rank, logical, and distance calculations”.
2.2L = 3 的两张矩阵The two matrices at L = 3
QEC-Bank 构造器处理的是未旋转平面族 [[2L²−2L+1, 1, L]](条目主体 atlas-entity:surface#subject)。方括号是 [[n, k, d]] 记号:n = 物理比特数,k = 逻辑比特数(两者见记账),d = 码距,即最短逻辑算符的长度;L = 版图的边长。所以这族码 n = 2L²−2L+1,k = 1,d = L。旋转版、XZZX、扭缺陷、三维版都不在这架梯子的参数描述范围内。L=3 时 n = 9 + 4 = 13:9 个比特编号 q0–q8 排成 3×3 方阵,4 个比特 q9–q12 嵌在方阵的四个格心。6 条 X 检查与 6 条 Z 检查,矩阵每行 13 位,竖线把 9 位块与 4 位块隔开:
The QEC-Bank constructor covers the unrotated planar family [[2L²−2L+1, 1, L]] (the entry's subject, atlas-entity:surface#subject). The brackets are the [[n, k, d]] notation: n = physical qubits, k = logical qubits (both from the ledger), d = distance, i.e. the length of the shortest logical operator; L = the side length of the layout. So this family has n = 2L²−2L+1, k = 1, d = L. rotated, XZZX, twist-defect and 3D variants are outside what this ladder's parameters describe. At L=3, n = 9 + 4 = 13: nine qubits q0–q8 form a 3×3 array and four qubits q9–q12 sit in its four cell centres. Six X checks and six Z checks; each row has 13 bits, with the bar separating the 9-bit block from the 4-bit block:
行是检查(X0…X5 是 X 检查、Z0…Z5 是 Z 检查),列是比特 q0…q12,粗竖线左边是 9 个比特×比特列、右边是 4 个检查×检查列;蓝底的 1 表示「这条检查碰这个比特」。Rows are checks (X0…X5 the X checks, Z0…Z5 the Z checks), columns are the qubits q0…q12, with the 9 bit×bit columns left of the thick bar and the 4 check×check columns right of it; a shaded 1 means “this check touches this qubit”.
| HX | q0 | q1 | q2 | q3 | q4 | q5 | q6 | q7 | q8 | q9 | q10 | q11 | q12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| X0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| X1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
| X2 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| X3 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 |
| X4 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| X5 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| HZ | q0 | q1 | q2 | q3 | q4 | q5 | q6 | q7 | q8 | q9 | q10 | q11 | q12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Z0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| Z1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| Z2 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
| Z3 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
| Z4 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 |
| Z5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |
| y=4 | q6 | Z4 | q7 | Z5 | q8 |
|---|---|---|---|---|---|
| y=3 | X3 | q11 | X4 | q12 | X5 |
| y=2 | q3 | Z2 | q4 | Z3 | q5 |
| y=1 | X0 | q9 | X1 | q10 | X2 |
| y=0 | q0 | Z0 | q1 | Z1 | q2 |
| x=0 | x=1 | x=2 | x=3 | x=4 |
这些比特和检查在构造器坐标里的位置(灰底 q = 比特,橙底 X = X 检查,蓝底 Z = Z 检查):每条检查碰它上下左右紧挨着的比特,q0–q8 占偶数坐标、q9–q12 占奇数坐标。Where these qubits and checks sit in the constructor's coordinates (grey q = qubit, orange X = X check, blue Z = Z check): each check touches the qubits directly above, below, left and right of it; q0–q8 occupy even coordinates, q9–q12 odd ones.
读一行试试。HX 的第一行 X0 是 100100000 | 1000:这条 X 检查作用在 q0、q3、q9 上——三个比特,一条缺腿的边界星。第二行 X1 是 010010000 | 1100,作用在 q1、q4、q9、q10——四个比特,一颗完整的内部星。数每行的 1:HX 有四行重量 3、两行重量 4;HZ 同样。这正是两种边界在矩阵里留下的指纹。
Read one row. The first row of HX, X0 = 100100000 | 1000, acts on q0, q3, q9 — three qubits, a boundary star missing a leg. The second, X1 = 010010000 | 1100, acts on q1, q4, q9, q10 — four qubits, a full interior star. Count the 1s per row: HX has four rows of weight 3 and two of weight 4; HZ likewise. That is the fingerprint the two kinds of boundary leave in the matrix.
现在验证对易。取 HX 第一行 {q0, q3, q9} 与 HZ 第一行 {q0, q1, q9}:重叠 {q0, q9},两个,偶数 ✓。取 HX 第二行 {q1, q4, q9, q10} 与 HZ 第三行 {q3, q4, q9, q11}:重叠 {q4, q9},两个 ✓。QEC-Bank 的推导页记录了完整的结果:先不做模 2,乘积 HXHZᵀ 的每个元素都是 0 或 2;模 2 后全部为 0。
Now verify commutation. Take HX row 1, {q0, q3, q9}, against HZ row 1, {q0, q1, q9}: overlap {q0, q9}, two qubits, even ✓. Take HX row 2, {q1, q4, q9, q10}, against HZ row 3, {q3, q4, q9, q11}: overlap {q4, q9}, two ✓. The QEC-Bank derivation page records the full result: before reducing mod 2, every entry of HXHZᵀ is either 0 or 2; after reduction, all vanish.
QEC-Bank 构造器的坐标里,重量 3 的 Z 检查落在上下两条毛边界,重量 3 的 X 检查落在左右两条光边界。直觉教程的画法正好转了 90°(毛边界在左右)。两者只差一次旋转,不是两种码。
In the QEC-Bank constructor's coordinates, the weight-3 Z checks lie on the top and bottom rough boundaries and the weight-3 X checks on the left and right smooth boundaries. The intuition guide's drawing is rotated by 90° (rough on the left and right). One rotation apart, not two codes.
2.3机器拿到矩阵后算什么What the machine computes from the matrices
R1 之所以叫「可执行基线」,是因为下面每件事都只是对这两张矩阵做线性代数:
R1 is called the “executable baseline” because each of the following is nothing but linear algebra on the two matrices:
| 要算的量Quantity | 矩阵运算Matrix operation | L = 3 的答案Answer at L = 3 |
|---|---|---|
| 检查两两对易All checks commute | HXHZᵀ = 0 | 成立(每个元素 0 或 2 → 0)holds (every entry 0 or 2 → 0) |
| 逻辑比特数 kLogical qubits k | n − rank(HX) − rank(HZ) | 13 − 6 − 6 = 113 − 6 − 6 = 1 |
| 逻辑算符Logical operators | 与全部 Z 行正交、又不是 X 行的组合的 0/1 向量(Z̄ 同理)0/1 vectors orthogonal to every Z row yet not a combination of X rows (and dually for Z̄) | 方阵的一行是 X̄,一列是 Z̄a row of the 3×3 block is X̄, a column is Z̄ |
| 码距 dDistance d | 最轻的逻辑算符的重量weight of the lightest logical | 3(L=3、4 穷举验证;L=5 为 bounded)3 (exhaustive at L=3, 4; L=5 is bounded) |
这里的 rank矩阵的秩:线性独立的行数,即不能用其中一些行相加(模 2)得到全 0 的最大行数。 一栏藏着直觉教程第 2 章那个账本:HX 的 6 行全部独立,秩就是行数。只说「没有『全部相乘 = I』的恒等式」还不够,因为也许有一部分行乘起来就等于 I;3.1 节的折叠框「直接用秩验证 k = 1」从只被一行碰到的比特 q0、q1、q2 开始一层层往里剥,把任何一部分行相乘得 I 的可能都排除了。k = 13 − 12 = 1,机器与手算得到同一个数。而码距那一栏是诚实标签第一次出场:L=3 和 L=4 是verified(穷举所有 CSS 逻辑算符),L=5 只是 bounded(定理给下界 d ≥ 5,带种子的低重量搜索找到一条重量 5 的逻辑算符作上界见证)。
The rankThe rank of a matrix: the number of linearly independent rows, i.e. the largest number of rows no subset of which adds (mod 2) to all zeros. column hides the ledger of the intuition guide's Chapter 2: all 6 rows of HX are independent, so the rank equals the row count. Saying “there is no ‘product of all = I’ identity” is not enough, since some subset of the rows might still multiply to I; the fold “Verifying k = 1 directly from ranks” in §3.1 peels layer by layer inward from q0, q1, q2, the qubits touched by only one row, and rules out every such subset. k = 13 − 12 = 1; machine and hand agree. The distance row is where honesty labels first appear: L=3 and L=4 are verified (every CSS logical enumerated), while L=5 is only bounded (the theorem gives d ≥ 5; a seeded low-weight search finds a weight-5 logical as the upper witness).
在下面的 L=3 沙盘里点几个比特制造错误:每个亮起的警报,就是 HX 或 HZ 某一行与错误向量的内积为 1。
Click a few qubits in the L=3 sandbox below to create errors: every alarm that lights up is one row of HX or HZ whose inner product with the error vector equals 1.
QEC-Bank 页面上 R1 的标签是 derived by surface.build HGP output -> CheckMatrix.from_css v1,参考文献 tillich2009quantum(J.-P. Tillich, G. Zémor, “Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength”, 2009)。「derived」意味着:上面两张矩阵不是抄来的,而是构造器从两条开链的超图积(第 3 章)算出来后,由 CheckMatrix.from_css 转换成辛形式的。
On the QEC-Bank page the R1 label reads derived by surface.build HGP output -> CheckMatrix.from_css v1, reference tillich2009quantum (J.-P. Tillich, G. Zémor, “Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength”, 2009). “Derived” means the two matrices above were not copied: the constructor computed them from the hypergraph product of two open chains (Chapter 3) and CheckMatrix.from_css converted them to symplectic form.
R2 · 结构:矩阵为什么长这样R2 · Structure: why the matrices look like that
R1 给出了矩阵,R2 解释矩阵。表面码条目在这一级有两条记录:超图积(canonical)说明这两张矩阵是怎么由一条 3 比特重复码「相乘」出来的;同调表示(curated)说明为什么横跨串是逻辑算符、码距等于最短的横跨。 R1 gave the matrices; R2 explains them. The surface-code entry has two records here: the hypergraph product (canonical) shows how the two matrices are “multiplied out” of a 3-bit repetition code; the homological view (curated) shows why spanning strings are logical operators and why the distance is the shortest span.
3.1超图积:两条开链相乘The hypergraph product: two open chains multiplied
从最小的经典码开始。长 L 的重复码把一位说 L 遍(L = 码字长度,也就是表面码版图的边长),它的检查矩阵 H 是 (L−1)×L 的「相邻两位相等」表(L−1 行、L 列):
Start with the smallest classical code. The length-L repetition code says one bit L times (L = codeword length, which is also the side length of the surface-code layout); its check matrix H is the (L−1)×L table of “adjacent bits agree” (L−1 rows, L columns):
三个数字里,ker核(kernel):满足 H·v = 0 的所有向量 v 的集合。ker(H) 是重复码的码字(这里只有全 1 一个非零码字);ker(Hᵀ) 是检查之间的线性关系。 的两个维数最要紧。dim ker(H) = 1:唯一的非零码字是全 1(核只有「0 0 0」和「1 1 1」两个元素)。dim ker(Hᵀ) = 0:检查之间没有线性关系——这是开链的代数签名。要是把链首尾接成一个圈(加一行「第 L 位与第 1 位相等」),新行是旧行之和,dim ker(Hᵀ) 就变成 1。请记住这个 0 与 1 的差别。
Of the three numbers, the two kerKernel: the set of all vectors v with H·v = 0. ker(H) holds the repetition codewords (here only the all-ones word besides zero); ker(Hᵀ) holds the linear relations among the checks. dimensions matter most. dim ker(H) = 1: the only nonzero codeword is all-ones (the kernel has just two elements, “0 0 0” and “1 1 1”). dim ker(Hᵀ) = 0: no linear relation among the checks — the algebraic signature of an open chain. Close the chain into a loop (add a row “bit L equals bit 1”) and the new row is the sum of the old ones, so dim ker(Hᵀ) becomes 1. Remember this 0-versus-1 difference.
超图积(hypergraph product, HGP)把两份 H 相乘。比特分成两块:比特×比特块有 L² 个(对应 3×3 方阵 q0–q8),检查×检查块有 (L−1)² 个(对应格心 q9–q12)。两张量子检查矩阵由 ⊗(张量积:把一个矩阵的每个元素换成它乘另一个矩阵)拼出:
The hypergraph product (HGP) multiplies two copies of H. Qubits split into two blocks: bit×bit with L² qubits (the 3×3 array q0–q8) and check×check with (L−1)² qubits (the cell centres q9–q12). The two quantum check matrices are assembled with ⊗ (the tensor product: replace each entry of one matrix by that entry times the other matrix):
从公式到一条检查。HX 的行按 (i, j) 编号:i 是 H 的第 i 行(第 i 条经典检查,0…L−2),j 是第 j 个比特(0…L−1),行号 = i·L + j。左块 H ⊗ IL 在 (i, j) 行、比特×比特 qa·L+b 那一列的元素是 H[i][a]·[b = j],所以这一行碰 b = j、a = i 或 i+1 的两个比特;右块 IL−1 ⊗ Hᵀ 在格心比特 qL²+c(L−1)+e 那一列的元素是 [c = i]·H[e][j],所以碰 c = i、e = j−1 或 j(落在 0…L−2 里的那些)。例:L = 3 的 X1 是第 1 行,(i, j) = (0, 1)。左块给 a ∈ {0, 1}、b = 1,即 q1、q4;右块给 c = 0、e ∈ {0, 1},即 q9、q10。合起来 X1 = {q1, q4, q9, q10},正是 2.2 节表里 X1 那一行,也就是坐标图里 (x, y) = (2, 1) 那颗内部星。HZ 同理:行 (a′, i) 的行号 = a′(L−1) + i,左块 IL ⊗ H 碰 qa′L+b(b = i 或 i+1),右块 Hᵀ ⊗ IL−1 碰 qL²+c(L−1)+i(c = a′−1 或 a′)。例:Z3 是第 3 行,(a′, i) = (1, 1),左块给 q4、q5,右块给 c ∈ {0, 1},即 q10、q12,所以 Z3 = {q4, q5, q10, q12},与表中一致。脚本对 L = 3 的全部 12 行核对过这两条下标规则与构造器的输出逐位相同。
From the formula to one check. Rows of HX are labelled (i, j): i is row i of H (classical check i, 0…L−2), j is bit j (0…L−1), and the row number is i·L + j. In the left block H ⊗ IL, the entry of row (i, j) in the column of the bit×bit qubit qa·L+b is H[i][a]·[b = j], so the row touches the two qubits with b = j and a = i or i+1; in the right block IL−1 ⊗ Hᵀ, the entry in the column of the face-centre qubit qL²+c(L−1)+e is [c = i]·H[e][j], so it touches c = i and e = j−1 or j (those within 0…L−2). Example: X1 of L = 3 is row 1, (i, j) = (0, 1). The left block gives a ∈ {0, 1}, b = 1, i.e. q1 and q4; the right block gives c = 0, e ∈ {0, 1}, i.e. q9 and q10. Together X1 = {q1, q4, q9, q10}, exactly row X1 of the §2.2 table, the interior star at (x, y) = (2, 1) of the coordinate map. HZ works the same way: row (a′, i) has number a′(L−1) + i, its left block IL ⊗ H touches qa′L+b (b = i or i+1), and its right block Hᵀ ⊗ IL−1 touches qL²+c(L−1)+i (c = a′−1 or a′). Example: Z3 is row 3, (a′, i) = (1, 1): the left block gives q4, q5, the right block gives c ∈ {0, 1}, i.e. q10 and q12, so Z3 = {q4, q5, q10, q12}, as in the table. A script checked these two index rules against the constructor's output for all 12 rows at L = 3, bit for bit.
对易是「设计进去」的:HXHZᵀ 从两块各得一项,两项都等于 H ⊗ Hᵀ,在 𝔽₂ 上相加为 0。这正是 2.2 节看到的「每个元素 0 或 2」——第二块比特不是装饰,它提供了抵消所需的第二份副本。QEC-Bank 的说法是:「X 与 Z 检查让一个奇偶映射一次只作用一边。」
Commutation is designed in: HXHZᵀ gets one term from each block, both equal to H ⊗ Hᵀ, and they add to 0 over 𝔽₂. This is exactly the “every entry 0 or 2” of §2.2 — the second qubit block is not decorative; it supplies the second copy needed for cancellation. In the QEC-Bank's words: “X and Z checks let one parity map act at a time.”
现在兑现那个 0 与 1。HGP 的维数公式是:
Now cash in the 0-versus-1. The HGP dimension formula is:
两条开链相乘得 1 个逻辑比特——表面码;把两条链都接成圈,kᵀ 从 0 变 1,得 2 个逻辑比特——toric code(环面上的记账)。直觉教程里「边界 vs 把手」的几何差别,在这里变成经典因子矩阵的余秩corank:dim ker(Hᵀ),即检查之间独立线性关系的个数。开链为 0,闭链为 1。是 0 还是 1。QEC-Bank 原话:「open-chain corank is exactly what leaves one logical qubit rather than the toric code's two」。
Two open chains multiplied give 1 logical qubit — the surface code; close both chains into loops, kᵀ goes from 0 to 1, and you get 2 — the toric code (the ledger on the torus). The intuition guide's geometric difference “boundary versus handle” becomes here a question of whether the classical factor matrix's corankcorank: dim ker(Hᵀ), the number of independent linear relations among the checks. 0 for an open chain, 1 for a closed one. is 0 or 1. In the QEC-Bank's words: “open-chain corank is exactly what leaves one logical qubit rather than the toric code's two”.
直接用秩验证 k = 1(QEC-Bank 推导页的算法)Verifying k = 1 directly by ranks (the QEC-Bank derivation page's route)
每张量子矩阵有 L(L−1) 行,而且行全部独立。在 2.2 节的表里就能看出来:q0、q1、q2 三列在 HX 里各自只有一个 1(分别在 X0、X1、X2),所以任何一组加起来等于 0 的行都不能含 X0、X1、X2;去掉它们之后,q3、q4、q5 列又各自只剩 X3、X4、X5 的 1,于是这三行也不在。一行不剩,rank(HX) = 6 = L(L−1)。HZ 看 q0、q2、q3、q5、q6、q8 列,同理。一般 L 的同一论证(从每行的悬边往里「剥」)写在参数页 2.2 节。于是 k = [L² + (L−1)²] − 2L(L−1) = (L − (L−1))² = 1(k = 逻辑比特数,L = 链长),对任何 L 成立。reproduce.py 对 L = 3, 4, 5 断言矩阵公式、整数 {0,2} 抵消、最近邻几何与秩。
Each quantum matrix has L(L−1) rows, all independent, as the tables of §2.2 show. Columns q0, q1, q2 each have a single 1 in HX (in X0, X1, X2 respectively), so no group of rows adding up to 0 can contain X0, X1 or X2; with those gone, columns q3, q4, q5 each keep a single 1, in X3, X4, X5, so those rows are out too. No row is left: rank(HX) = 6 = L(L−1). For HZ look at columns q0, q2, q3, q5, q6, q8 in the same way. The same argument for general L (peeling inward from the dangling edge of each row) is in §2.2 of the parameters page. Hence k = [L² + (L−1)²] − 2L(L−1) = (L − (L−1))² = 1 (k = logical qubits, L = chain length) for every L. reproduce.py asserts the matrix formulas, the integer {0,2} cancellation, nearest-neighbour geometry and the ranks for L = 3, 4, 5.
3.2同调表示:三项链复形The homological view: a three-term chain complex
第二条 R2 记录换一种眼光看同两张矩阵。把面、边、顶点各看成一个 0/1 向量空间:C₂(每个面一个坐标,即 Z 检查)、C₁(每条边一个坐标,即比特)、C₀(每个顶点一个坐标,即 X 检查)。∂(读「边界」)是把一个几何体映到它的边界的线性映射:一块面的边界是围着它的边,一条边的边界是它的两个端点。写成矩阵,∂₂ 恰好是 HZᵀ,∂₁ 恰好是 HX:
The second R2 record looks at the same two matrices through a different lens. Treat faces, edges and vertices each as a 0/1 vector space: C₂ (one coordinate per face, i.e. per Z check), C₁ (one per edge, i.e. per qubit), C₀ (one per vertex, i.e. per X check). ∂ (read “boundary”) is the linear map sending a geometric object to its boundary: a face's boundary is the edges around it, an edge's boundary is its two endpoints. As matrices, ∂₂ is exactly HZᵀ and ∂₁ is exactly HX:
先手算两个边界,数据就是 2.2 节的表。一块面的边界:Z0 这一行碰 q0、q1、q9,所以 ∂₂(Z0) = q0 + q1 + q9,就是围着它的三条边(它贴着边界,所以只有三条)。一条边的边界:看 HX 的 q4 这一列,1 在 X1 与 X4 两行,所以 ∂₁(q4) = X1 + X4,这条边的两个端点;而 q1 这一列只有 X1 一个 1,∂₁(q1) = X1,这条边只有一个端点,另一头伸出了版图(这就是悬边)。再验证「边界的边界是空的」:∂₁∂₂(Z0) = ∂₁(q0) + ∂₁(q1) + ∂₁(q9) = X0 + X1 + (X0 + X1) = 0(q0 列的 1 在 X0,q9 列的 1 在 X0 与 X1),每个端点出现两次,模 2 抵消。
First compute two boundaries by hand, using the tables of §2.2. The boundary of a face: row Z0 touches q0, q1, q9, so ∂₂(Z0) = q0 + q1 + q9, the three edges around it (it sits at the rim, so only three). The boundary of an edge: column q4 of HX has its 1s in rows X1 and X4, so ∂₁(q4) = X1 + X4, the edge's two endpoints; column q1 has a single 1, in X1, so ∂₁(q1) = X1: this edge has only one endpoint and its other end sticks out of the patch (a dangling edge). Now check “the boundary of a boundary is empty”: ∂₁∂₂(Z0) = ∂₁(q0) + ∂₁(q1) + ∂₁(q9) = X0 + X1 + (X0 + X1) = 0 (column q0 has its 1 in X0, column q9 in X0 and X1): every endpoint appears twice and cancels mod 2.
这幅图把直觉教程的三句话变成三个定义。一条 Z 错误链是 C₁ 里的一个向量 c(每条边一个 0/1 分量,1 = 这条边上有 Z);它的警报是 ∂₁ 作用后的结果——警报在端点。没有警报的链(∂₁ c = 0)叫闭链cycle:边界为零的链。在平面版图上还要「相对」边界——搭在毛边界上的端点不算端点,所以正式名称是相对闭链 relative cycle。;其中是某个面集合之边界的(c = ∂₂ f,f 是 C₂ 里的面向量:每个面一个 0/1 分量,1 = 选中这个面)叫边界链boundary:等于若干面的边界之和,即若干 Z 检查的乘积,对编码信息什么也不做。——可收缩的圈 = 什么都没发生。逻辑算符就是闭链除去边界链:闭而不是边界——横跨两条毛边界的串。码距是最短的这样一条链。
The diagram turns three sentences of the intuition guide into three definitions. A Z error chain is a vector c in C₁ (one 0/1 entry per edge, 1 = a Z on that edge); its alarms are what ∂₁ produces — alarms sit at endpoints. A chain with no alarms (∂₁ c = 0) is a cycleA chain with zero boundary. On the planar layout this is taken “relative” to the boundary: an endpoint resting on a rough boundary does not count, hence the formal name relative cycle.; one that is itself the boundary of some set of faces (c = ∂₂ f, where f is a face vector in C₂: one 0/1 entry per face, 1 = that face is selected) is a boundaryThe boundary of a set of faces, i.e. a product of Z checks; it does nothing to the encoded information. — a contractible loop = nothing happened. Logical operators are cycles that are not boundaries — strings spanning rough boundary to rough boundary. Distance is the shortest such chain.
字母表:c = 链向量,C₁ 的元素,每条边一个 0/1 分量;f = 面向量,C₂ 的元素,每个面一个 0/1 分量;∂₁、∂₂ = 两个边界映射(边→顶点、面→边);C₀、C₁、C₂ = 顶点、边、面上的 0/1 向量空间。Legend: c = chain vector, an element of C₁, one 0/1 entry per edge; f = face vector, an element of C₂, one 0/1 entry per face; ∂₁, ∂₂ = the two boundary maps (edges→vertices, faces→edges); C₀, C₁, C₂ = the 0/1 vector spaces on vertices, edges, faces.
「相对」(relative)这个词是平面版图特有的。环面上每条链的端点都在某个顶点上;平面上,链可以把端点搭在毛边界外面——那里没有顶点,也就没有警报(毛边界吃掉 Z-链的警报)。同调语言的处理方式是把边界上的那些点「商掉」,这就是相对链复形。QEC-Bank 记录的原文:「Logical strings are relative cycles modulo boundaries, and distance is the shortest nontrivial primal or dual relative cycle.」——「primal」指 Z 串(走边),「dual」指 X 串(走对偶格的边,即穿过面)。
The word “relative” is specific to the planar layout. On the torus every chain endpoint sits on some vertex; on the plane a chain may rest an endpoint beyond the rough boundary, where there is no vertex and so no alarm (the rough boundary swallows Z-chain alarms). Homology handles this by “quotienting out” those boundary points; that is the relative chain complex. The QEC-Bank record verbatim: “Logical strings are relative cycles modulo boundaries, and distance is the shortest nontrivial primal or dual relative cycle.” “Primal” means Z strings (along edges), “dual” means X strings (along dual-lattice edges, i.e. through faces).
两条 R2 记录的标签不同,要分开读。hypergraph-product 是 canonical:它就是 QEC-Bank 构造器实际执行的定义,参考 tillich2009quantum。homological 是 curated from bravyi1998quantum(S. B. Bravyi, A. Yu. Kitaev, “Quantum codes on a lattice with boundary”, 1998),另附 bombin2007homological(H. Bombín, M. A. Martín-Delgado, “Homological Error Correction: Classical and Quantum Codes”, 2007):机器没有单独去验证「相对闭链」这套话,它是从这两篇文献整理来的叙述,与 R1 的机器计算相容,但不由机器保证。
The two R2 records carry different labels and must be read apart. hypergraph-product is canonical: it is the very definition the QEC-Bank constructor executes, reference tillich2009quantum. homological is curated from bravyi1998quantum (S. B. Bravyi, A. Yu. Kitaev, “Quantum codes on a lattice with boundary”, 1998), with bombin2007homological (H. Bombín, M. A. Martín-Delgado, “Homological Error Correction: Classical and Quantum Codes”, 2007) attached: the machine did not separately verify the “relative cycle” language; it is a narrative organised from those two papers, consistent with the R1 computation but not guaranteed by it.
对。闭链 k₁ᵀ = 1,开链 k₂ᵀ = 0,乘积项 1·0 = 0,只剩 k₁k₂ = 1。几何上这是一只圆筒(一个方向绕回、另一个方向有两条边界),也恰好存 1 个逻辑比特。两条链都要闭合才能拿到 toric code 的 2。
Right. The closed chain has k₁ᵀ = 1, the open one k₂ᵀ = 0, so the product term is 1·0 = 0 and only k₁k₂ = 1 survives. Geometrically this is a cylinder (wrapping one way, two boundaries the other way), and it too stores exactly 1 logical qubit. Both chains must close to reach the toric code's 2.
分别写下两条链的 k 与 kᵀ:开链 (1, 0),闭链 (1, 1)。再代入公式。
Write down (k, kᵀ) for each chain: open (1, 0), closed (1, 1). Then substitute.
R3 / R4 · 两级空梯,以及它们本该装什么R3 / R4 · Two empty rungs, and what they would hold
QEC-Bank 页面上 R3 与 R4 各写着一句「No representation at this rung is recorded for this entry」。这一章解释这两级本该记录什么、QEC-Bank 仓库里实际有什么相关文件、为什么那份文件不算一条记录。 On the QEC-Bank page, R3 and R4 each read “No representation at this rung is recorded for this entry”. This chapter explains what the two rungs would record, what related file the QEC-Bank repository actually holds, and why that file does not count as a record.
4.1R3 会装什么:有顺序的测量What R3 would hold: measurements in order
R1、R2 描述的是一个静态对象:一组同时成立的检查。真实机器通常给每条检查配一个辅助比特,让大量检查并行地测;但一个数据比特同一时刻只能参加一个两比特门,所以碰同一个比特的检查必须排好先后,而这个顺序决定了一个故障会怎样扩散(4.3 节的钩子错误就是例子)。R3「动力学」记录的是有序的测量时间表,以及每个时刻的瞬时稳定子群instantaneous stabilizer group, ISG:在测量序列的某一时刻,此刻被确定为 +1 的全部检查的乘积群。对静态稳定子码它始终不变;对 Floquet 码等动态码它随时间轮换。。对表面码这种静态稳定子码,时间表并不改变稳定子群本身,所以 R3 对它不是必需的——但也不是无意义的:哪条检查先测、哪条后测,决定了一个错误会在哪几轮被看见(只报「变化」的探测器)。QEC-Bank 目前对表面码没有 R3 记录。
R1 and R2 describe a static object: a set of checks that hold simultaneously. A real machine usually gives each check its own ancilla and measures many checks in parallel; but a data qubit can take part in only one two-qubit gate at a time, so checks that touch the same qubit must be ordered, and that order decides how a fault spreads (the hook errors of §4.3 are an example). R3 “Dynamics” records an ordered measurement schedule together with the instantaneous stabilizer groupISG: at a given moment in the measurement sequence, the group generated by all checks currently known to be +1. For a static stabilizer code it never changes; for dynamic codes such as Floquet codes it rotates in time. at every step. For a static stabilizer code like the surface code the schedule does not change the stabilizer group, so R3 is not required for it — but neither is it meaningless: which check is measured first and which later decides in which rounds an error becomes visible (detectors that report only “change”). The QEC-Bank currently has no R3 record for the surface code.
4.2R4 会装什么:电路与探测器What R4 would hold: circuits and detectors
R4「电路与探测器」记录的是有名字的症状提取电路——每条检查用哪个辅助比特、几层 CNOT、什么顺序(谁去问「四条边的奇偶」)——以及对应的探测器错误模型detector error model, DEM:列出电路里每个可能的故障、它会点亮哪些探测器、是否翻转逻辑观测量。译码器直接在它上面工作。。这一级的内容决定了「电路级噪声」下的一切数字(再往下一层:电路级噪声)。
R4 “Circuit & detectors” records named syndrome-extraction circuits — which ancilla each check uses, how many CNOT layers, in what order (who asks “the parity of four edges”) — and the corresponding detector error modelDEM: lists every possible fault in the circuit, which detectors it lights, and whether it flips the logical observable. Decoders work directly on it.. The contents of this rung determine every number under “circuit-level noise” (one level down: circuit-level noise).
4.3仓库里有什么,页面上为什么没有What the repository holds, and why the page shows nothing
说得精确一点。QEC-Bank 仓库里有一份文件 codes/surface/circuit_memory_l3.yaml(schema qec-atlas-ancilla-css-memory-circuit-v1),内容是 L=3(边长 3)逻辑 X 记忆实验的电路草案:13 个数据比特、12 条检查各配一个辅助比特、一份四层 CNOT 时间表,外加两条「钩子故障」样例。但表面码条目的 views 字段里没有任何 rung 为 R3 或 R4 的断言,页面也就诚实地显示为空。文件存在 ≠ 记录存在:一条 QEC-Bank 记录要有来源标签、参考文献与可核对的断言,那份 yaml 目前只是一份数据文件。
To be precise. The QEC-Bank repository contains a file, codes/surface/circuit_memory_l3.yaml (schema qec-atlas-ancilla-css-memory-circuit-v1), holding a draft circuit for an L=3 (side length 3) logical-X memory experiment: 13 data qubits, one ancilla per each of the 12 checks, a four-layer CNOT schedule, plus two “hook fault” fixtures. But the surface-code entry's views field contains no assertion at rung R3 or R4, so the page honestly shows those rungs empty. A file existing is not a record existing: a QEC-Bank record needs a provenance label, references and a checkable assertion; that yaml is, for now, a data file.
下面把那份文件里两条检查的时间表抄出来,让你看到「R4 会装什么」的具体形状。X 检查 0 就是 2.2 节 HX 的第一行 {q0, q3, q9};Z 检查 6 是 HZ 的第一行 {q0, q1, q9}。
Below, the schedule for two checks is copied from that file, so you can see the concrete shape of “what R4 would hold”. X check 0 is the first row of HX from §2.2, {q0, q3, q9}; Z check 6 is the first row of HZ, {q0, q1, q9}.
| 检查Check | 第 1 层Layer 1 | 第 2 层Layer 2 | 第 3 层Layer 3 | 第 4 层Layer 4 | 样例故障Fixture fault |
|---|---|---|---|---|---|
| X 0 {q0, q3, q9} | q9 | q3 | q0 | — | 第 1 层后辅助比特出 X → 传到数据 {q0, q3}X on the ancilla after layer 1 → propagates to data {q0, q3} |
| Z 6 {q0, q1, q9} | q1 | q9 | — | q0 | 第 1 层后辅助比特出 Z → 传到数据 {q0, q9}Z on the ancilla after layer 1 → propagates to data {q0, q9} |
那两条样例故障就是钩子错误hook error:辅助比特在 CNOT 序列中途出错,错误顺着剩下的 CNOT 传到两个数据比特上——单个故障造出重量 2 的数据错误。CNOT 顺序的设计目标就是让钩子的方向背离最短逻辑串的方向。:一个辅助比特的单个故障,经过后续 CNOT 变成两个数据比特上的错误。CNOT 顺序之所以重要,是因为要让这条重量 2 的错误不沿着最短逻辑串的方向躺下——这正是 R4 需要一份「有名字的」电路、而不是随便一份电路的原因。测量本身会错这件事,在 R4 里就变成了探测器错误模型中的具体一行。
Those two fixture faults are hook errorsA hook error: the ancilla fails partway through the CNOT sequence and the fault rides the remaining CNOTs onto two data qubits — one fault creating a weight-2 data error. CNOT ordering is designed so that hooks point away from the shortest logical string.: one fault on one ancilla becomes an error on two data qubits via the later CNOTs. CNOT order matters because that weight-2 error must not lie along the shortest logical string — which is exactly why R4 demands a named circuit rather than any circuit. Measurements themselves fail; in R4 that fact becomes a concrete row of the detector error model.
QEC-Bank 页面原文:R3「No representation at this rung is recorded for this entry」,R4 同样。本章的时间表来自仓库中的数据文件,不是 QEC-Bank 的 views 断言;它没有来源标签,也没有被 QEC-Bank 的验证器纳入任何证书。请把它当作「R4 长什么样」的示意,而不是表面码条目已记录的表示。
QEC-Bank page verbatim: R3 “No representation at this rung is recorded for this entry”, and the same for R4. The schedule in this chapter comes from a data file in the repository, not from a QEC-Bank views assertion; it has no provenance label and is not covered by any certificate of the QEC-Bank verifier. Treat it as an illustration of “what R4 looks like”, not as a representation the surface-code entry has recorded.
R5 · 四本词典:把表面码翻译进别的物理R5 · Four dictionaries: translating the surface code into other physics
最高一级不再给出新的矩阵,而是给出词典:表面码的哪个概念,对应另一门语言里的哪个概念。QEC-Bank 为表面码记录了四本:统计物理、ZX 图、quon 量子化图、PEPS 张量网络。四本全部是 curated——每本词典后面都站着一篇具体的论文。 The top rung gives no new matrices; it gives dictionaries: which surface-code concept corresponds to which concept in another language. The QEC-Bank records four for the surface code: statistical mechanics, ZX diagrams, quon quantized graphs, PEPS tensor networks. All four are curated — a specific paper stands behind each.
5.1统计物理:随机键 Ising 模型Statistical mechanics: the random-bond Ising model
第一本词典是译码器教程已经用过一角的:最优译码押的是概率最大的那一类,而不是最可能的那一条链。把它写成物理语言:固定一组警报,以 Z 错误链与星警报为例。与这组警报相容的错误链有很多条,先把它们按同调类分组:两条链相差若干面检查的乘积(合起来恰好围出若干块面),就算同一类;平面码上只有两类,彼此差一个逻辑算符 Z̄。每一类对应随机键 Ising 模型的一个无序扇区(disorder sector)随机键 Ising 模型里,由参考链 E₀ 决定哪些键取错号;对应译码里「与给定症状相容、且同属一个同调类」的全部错误链。。在一类里取一条参考链 E₀,同类的每条链都能写成 E₀ 再加上若干块面的边界(模 2)。于是在每块面上放一个 Ising 自旋 σ = ±1,σ = −1 表示「把这块面的边界加进来」:一条边在链上,当且仅当「它在 E₀ 上」与「它两侧的自旋相反」恰有一个成立。每条边(每个比特)就是连接两侧面自旋的一根 Ising 键:边不在 E₀ 上时键是铁磁的(两侧自旋相同能量低),在 E₀ 上时键取错号,是反铁磁的;链经过这条边,就是这根键「不满意」。贴边的边只挨着一块面,相当于连到一个固定的边界自旋。平面码的面检查彼此独立,所以同类里的每条链恰好对应一个自旋构型,链长就是不满意的键数,即能量(差一个常数;图 5.1)。每条链的相对权重 (p/(1−p))长度(p = 单个比特出错的概率;所有链共有的因子 (1−p)n 已约去,n = 比特数)就是玻尔兹曼因子 e−E/T,链长是能量 E,错误率决定温度 T。一个同调类的总权重 Zh(h 标记这个类)是该类里所有链的权重之和;类的概率是归一化后的 P(h) = Zh / Σh′Zh′,分母对所有类求和——每条链各贡献一个玻尔兹曼因子,全部加起来,统计物理里管这个和叫配分函数;它的对数换个符号再乘温度,F = −T ln Zh,就是那个扇区的自由能统计物理里衡量一个扇区总权重的量:F = −T ln Zh,Zh 是扇区里所有链的玻尔兹曼因子之和,T 是温度(由错误率 p 决定)。Zh 越大 F 越小;归一化分母对所有类相同,所以比较各类的 Zh、比较 P(h)、比较 F 是同一件事。。最优译码比较各类的 Zh(等价地,比较 P(h) 或 F);最小重量匹配只保留和式里最大的一项——最轻的那条链——把其余各项全部丢掉。被丢掉的那些项,就是译码器教程里的路径退化。
The first dictionary is one the decoders guide already opened a corner of: optimal decoding bets on the most probable class, not the most probable single chain. In physical language: fix a set of alarms; take Z error chains and star alarms as the example. Many error chains are compatible with these alarms; first sort them into homology classes: two chains differing by a product of face checks (together they enclose some faces exactly) are in the same class; on the planar code there are just two classes, differing by the logical operator Z̄. Each class corresponds to a disorder sectorIn the random-bond Ising model, the choice of which bonds carry the wrong sign, fixed by a reference chain E₀; in decoding, all error chains compatible with a given syndrome and belonging to one homology class. of the random-bond Ising model. Pick a reference chain E₀ in the class; every chain of the class is E₀ plus the boundaries of some faces (mod 2). So put an Ising spin σ = ±1 on each face, σ = −1 meaning “add this face's boundary”: an edge is on the chain exactly when one, and only one, of “it is on E₀” and “the spins on its two sides differ” holds. Each edge (each qubit) is thus an Ising bond joining the spins of its two faces: ferromagnetic (equal spins cost less) when the edge is not on E₀, wrong-sign antiferromagnetic when it is; the chain passing through the edge means the bond is “unsatisfied”. An edge on the patch border touches only one face and acts as a bond to a fixed boundary spin. The face checks of the planar code are independent, so every chain of the class corresponds to exactly one spin configuration, and the chain length is the number of unsatisfied bonds, i.e. the energy up to a constant (Figure 5.1). each chain's relative weight (p/(1−p))length (p = the probability that one qubit fails; the factor (1−p)n common to all chains is divided out, n = number of qubits) is a Boltzmann factor e−E/T, with chain length as energy E and the error rate setting the temperature T. A homology class's total weight Zh (h labels the class) is the sum of the weights of all chains in the class; the class's probability is the normalised P(h) = Zh / Σh′Zh′, the denominator summing over all classes — one Boltzmann factor per chain, all added up; statistical physics calls this sum a partition function. Its logarithm, negated and multiplied by the temperature, F = −T ln Zh, is that sector's free energyThe statistical-physics measure of a sector's total weight: F = −T ln Zh, where Zh is the sum of the Boltzmann factors of all chains in the sector and T is the temperature (set by the error rate p). Larger Zh means smaller F; the normalising denominator is the same for every class, so comparing the classes' Zh, their P(h) or their F is the same thing.. Optimal decoding compares the classes' Zh (equivalently P(h) or F); minimum-weight matching keeps only the largest term of the sum — the lightest chain — and discards all the rest. The discarded terms are what the decoders guide calls path degeneracy.
这本词典最有价值的一页是阈值:表面码的阈值就是这个随机键 Ising 模型的有序—无序相变点(沿一条叫 Nishimori 线的特殊曲线:温度不是自由参数,而由错误率定死:按上面把链长当能量的写法,就是 e−1/T = p/(1−p),正是「链权重 = 玻尔兹曼因子」要求的对应)。译码器教程阈值账本里的 10.9% 与 10.3% 由此分家。两者用的是同一个码容量模型:每个比特独立地以概率 p 出错,检查读数完美。10.9%(10.93% ± 0.02%)是 Nishimori 线上的相变点,对应最优译码,来自对随机键 Ising 模型的早期数值研究(Wang、Harrington、Preskill 2003 年摘要引用的值);10.3%(10.31% ± 0.01%)是温度 T = 0 轴上的相变点,T = 0 时和式只剩最短链,对应最小重量匹配,由这篇 2003 年论文数值测得。差别只在有没有把最短链之外的那些项算进去:同一类里长度相同的链往往有很多条,条数越多这一类越可能,这份「条数的贡献」叫路径熵,匹配只看最短的一条,所以丢掉了它。若检查读数也以同样的概率 p 出错,模型换成三维的随机平面规范模型,同一篇论文在 T = 0 轴上测得 2.93% ± 0.02%,那已不是本节的二维模型;电路级噪声下的阈值又换了噪声模型,见账本。
The most valuable page of this dictionary is the threshold: the surface code's threshold is the order–disorder transition of that random-bond Ising model (along a special curve called the Nishimori line: the temperature is not free but fixed by the error rate: with chain length as energy, as above, e−1/T = p/(1−p), exactly the correspondence “chain weight = Boltzmann factor” demands). The 10.9% and 10.3% of the decoders guide's threshold ledger part ways exactly here. Both use the same code-capacity model: every qubit fails independently with probability p, and check readings are perfect. 10.9% (10.93% ± 0.02%) is the transition on the Nishimori line and corresponds to optimal decoding; it comes from earlier numerical studies of the random-bond Ising model (the value cited in the abstract of Wang, Harrington and Preskill 2003). 10.3% (10.31% ± 0.01%) is the transition on the temperature T = 0 axis, where only the lightest chains survive in the sum, and corresponds to minimum-weight matching; that 2003 paper measured it numerically. The two differ only in whether the terms beyond the lightest chain are counted: a class often contains many chains of the same length, and the more there are the likelier the class; this contribution of the count is the path entropy, which matching drops because it keeps only the lightest chain. If check readings also fail with the same probability p, the model becomes a three-dimensional random-plaquette gauge model, and the same paper measured 2.93% ± 0.02% on its T = 0 axis: no longer the 2D model of this section. Circuit-level thresholds change the noise model again; see the ledger.
curated from dennis2002topological(E. Dennis, A. Kitaev, A. Landahl, J. Preskill, “Topological quantum memory”, 2002),附 wang2003confinement(C. Wang, J. Harrington, J. Preskill, “Confinement-Higgs transition in a disordered gauge theory and the accuracy threshold for quantum memory”, 2003)。QEC-Bank 的机器不模拟 Ising 模型;这本词典是文献叙述。
curated from dennis2002topological (E. Dennis, A. Kitaev, A. Landahl, J. Preskill, “Topological quantum memory”, 2002), with wang2003confinement (C. Wang, J. Harrington, J. Preskill, “Confinement-Higgs transition in a disordered gauge theory and the accuracy threshold for quantum memory”, 2003). The QEC-Bank machine does not simulate the Ising model; this dictionary is a literature narrative.
5.2ZX 图:无相位蜘蛛 = CSS 码ZX diagrams: phase-free spiders = CSS codes
ZX 演算ZX-calculus:一种画量子线路与量子态的图形语言。节点叫「蜘蛛」,分 Z 型与 X 型两色,每个蜘蛛可带一个相位角;一组改写规则保证「图相等 ⇔ 线性映射相等」。把量子态画成图:节点是蜘蛛(spider),分 Z 色与 X 色,腿连到别的蜘蛛或外界。「无相位」(phase-free)指所有蜘蛛的相位角都是 0。第二本词典的核心句是:无相位 ZX 图与 CSS 码由同一种数据描述:一个二元线性子空间(一组 0/1 向量在模 2 加法下张成的集合,记作 S)。做法见 Kissinger 2022 第 3–4 节,图 5.2 是最小的例子。Z-X 标准形:S 的每个基向量画一只内部 Z 蜘蛛,每个比特画一只 X 蜘蛛并带一条输出腿,基向量第 j 位是 1 就把那只 Z 蜘蛛连到第 j 只 X 蜘蛛。Z 蜘蛛把同一个 0/1 值复制到它所有的腿,X 蜘蛛输出输入之和(模 2),所以这张图表示的态是 S 里所有向量 |x⟩ 之和。这个态被 S 里每个向量对应的 X 型算符、以及与 S 正交的每个向量对应的 Z 型算符稳定;检查多到恰好固定这一个态、不剩逻辑比特的 CSS 码叫极大 CSS 码,它固定的正是这个态(图 5.2a)。表面码存着 k = 1 个逻辑比特,不固定单个态,要的是编码映射:先多画 k 条参考腿,把编码器写成 n + k 条腿上的一个态,它有 n − k 条检查、再加上 2k 条由逻辑算符 X̄、Z̄ 得到的稳定子,共 n + k 条,正好是极大的;然后把 k 条参考腿弯下来当作输入,就得到从 k 个逻辑比特到 n 个物理比特的映射(图 5.2b)。
The ZX-calculusA graphical language for quantum circuits and states. Nodes are “spiders” of two colours, Z and X, each possibly carrying a phase angle; a set of rewrite rules guarantees “equal diagrams ⇔ equal linear maps”. draws quantum states as graphs: the nodes are spiders, coloured Z or X, with legs to other spiders or to the outside. “Phase-free” means every spider's phase angle is 0. The core sentence of the second dictionary: phase-free ZX diagrams and CSS codes are described by the same kind of data, a binary linear subspace (the set spanned by some 0/1 vectors under addition mod 2, written S). The recipe is in Sections 3–4 of Kissinger 2022, and Figure 5.2 shows the smallest examples. Z-X normal form: draw one interior Z spider per basis vector of S and one X spider with one output leg per qubit, and connect a Z spider to the j-th X spider when its basis vector has a 1 in position j. A Z spider copies one 0/1 value to all its legs and an X spider outputs the sum (mod 2) of its inputs, so the diagram represents the sum of |x⟩ over all vectors x in S. That state is stabilized by the X-type operator of every vector in S and the Z-type operator of every vector orthogonal to S; a CSS code with just enough checks to fix this single state, leaving no logical qubit, is called maximal, and it fixes exactly this state (Figure 5.2a). The surface code stores k = 1 logical qubit, so it fixes no single state; what is wanted is the encoding map. Draw k extra reference legs and write the encoder as a state on n + k legs: it has the n − k checks plus 2k stabilizers obtained from the logical operators X̄ and Z̄, n + k in all, which is maximal; then bend the k reference legs down into inputs, giving the map from k logical qubits to n physical ones (Figure 5.2b).
这本词典的用处在格点手术。手术教程里,合并是在缝合线上连乘检查,分裂把两块贴片重新分开——但分裂并不撤销合并:合并测量了联合奇偶并把态投影到读数上,分裂只是停掉缝合检查、测掉缝合比特,已测得的奇偶留在纸上。两者都不是只作用在逻辑比特上的幺正门:线路图也能画它们,但要加上辅助比特、测量和按读数做的纠正。在 ZX 里它们各是一只蜘蛛表示的映射(de Beaudrap 与 Horsman 2020):测 X̄₁X̄₂ 的粗糙合并是一只 2 进 1 出的 X 蜘蛛,读数为 −1 时先在一条输入上加一个 Z(图 5.3a);粗糙分裂是一只 1 进 2 出的 X 蜘蛛(图 5.3b);把 X 换成 Z 就是光滑的合并与分裂。蜘蛛融合是另一回事:它说两张图相等(相连的同色蜘蛛可以合成一只),是用来化简、证明两个协议做的是同一件事的等式,不是一步物理操作(图 5.3c)。QEC-Bank 原话:「rough/smooth merge and split operations become spider maps, so lattice surgery is diagram rewriting rather than an opaque stabilizer schedule.」
This dictionary earns its keep in lattice surgery. In the surgery guide, a merge multiplies checks along the seam and a split restores two separate patches — but a split does not undo the merge: the merge measured the joint parity and projected the state onto the readout, while the split only stops the seam checks and measures out the seam qubits, so the measured parity stays on record. Neither is a unitary gate acting on the logical qubits alone: a circuit diagram can draw them too, but only with ancillas, measurements and outcome-dependent corrections. In ZX each is a map drawn as one spider (de Beaudrap and Horsman 2020): the rough merge measuring X̄₁X̄₂ is an X spider with 2 inputs and 1 output, with a Z first applied to one input when the outcome is −1 (Figure 5.3a); the rough split is an X spider with 1 input and 2 outputs (Figure 5.3b); swapping X for Z gives the smooth merge and split. Spider fusion is a different thing: it says two diagrams are equal (joined same-colour spiders can be combined into one), an equality used to simplify and to prove that two protocols do the same thing, not a physical step (Figure 5.3c). QEC-Bank verbatim: “rough/smooth merge and split operations become spider maps, so lattice surgery is diagram rewriting rather than an opaque stabilizer schedule.”
curated from kissinger2022phasefree(A. Kissinger, “Phase-free ZX diagrams are CSS codes (...or how to graphically grok the surface code)”, 2022),附 debeaudrap2020zx(N. de Beaudrap, D. Horsman, “The ZX calculus is a language for surface code lattice surgery”, 2020)与 bombin2023unifying(H. Bombín, D. Litinski, N. Nickerson, F. Pastawski, S. Roberts, “Unifying flavors of fault tolerance with the ZX calculus”, 2023)。「无相位 ZX = CSS」是可以机械检查的等价,但 QEC-Bank 目前没有对表面码运行这一检查——标签是 curated,不是 derived。
curated from kissinger2022phasefree (A. Kissinger, “Phase-free ZX diagrams are CSS codes (...or how to graphically grok the surface code)”, 2022), with debeaudrap2020zx (N. de Beaudrap, D. Horsman, “The ZX calculus is a language for surface code lattice surgery”, 2020) and bombin2023unifying (H. Bombín, D. Litinski, N. Nickerson, F. Pastawski, S. Roberts, “Unifying flavors of fault tolerance with the ZX calculus”, 2023). “Phase-free ZX = CSS” is a mechanically checkable equivalence, but the QEC-Bank has not run that check on the surface code — the label is curated, not derived.
5.3quon 与量子化图:星与面成为同一种东西Quon and quantized graphs: stars and faces become one thing
第三本词典来自一门较少人知的图形语言 quonLiu–Wozniakowski–Jaffe 提出的三维图形语言:量子态与门画成嵌在三维流形里的「带电荷的弦」,代数恒等式变成弦与曲面亏格之间的拓扑关系。。在它的「量子化图」版本里,表面码底下的那块 toric 体(把边界忘掉、只看内部)被画成一张图,而星形检查与面检查统一成同一种算符:图上的圈算符cycle operator:量子化图上沿一个闭合圈的算符。在 quon 表示中,toric code 的顶点算符 A(v) 与面算符 B(p) 都是圈算符,只是所绕的圈不同。。直觉教程里「星与面互为对偶」(比特住在边上,顶点与面互换)在这里成为图的自对偶;两个逻辑比特的四个基态成为四张亏格为 0(亏格:曲面上「把手」的个数,球面为 0、环面为 1)的带电荷图。
The third dictionary comes from a less widely known graphical language, quonA 3D picture-language by Liu, Wozniakowski and Jaffe: quantum states and gates are drawn as “charged strings” embedded in a 3-manifold, and algebraic identities become topological relations between strings and the genus of surfaces.. In its “quantized graph” version, the toric bulk under the surface code (forget the boundaries, look only at the interior) is drawn as a graph, and star checks and face checks unify into one kind of operator: cycle operatorsAn operator along a closed cycle of the quantized graph. In the quon representation, the toric code's vertex operators A(v) and plaquette operators B(p) are both cycle operators, differing only in which cycle they run around. on the graph. The intuition guide's “stars and faces are dual” (qubits live on edges, vertices and faces swap) becomes the graph's self-duality; the four ground states of the two logical qubits become four genus-0 charged graphs (genus: the number of “handles” of a surface, 0 for a sphere, 1 for a torus).
这本词典额外暴露了两样东西:费米子复合体(一颗星警报 e 与一块面警报 m 绕一圈差一个 −1,它们的组合 ψ 具有费米子统计)和扭缺陷(e↔m 对偶墙的端点)的记账。QEC-Bank 原话:「charged string diagrams expose the fermionic composite and twist-defect bookkeeping」。注意 QEC-Bank 说的是平面码底下的 toric 体——文献处理的是 n × n 方格上的 toric code(论文写作 [[n², 2, n]];按「每条边一个比特」数,n × n 环面有 2n² 条边,即本系列记账里的 [[2L², 2, L]]),边界的 quon 处理不在记录范围内。
This dictionary additionally exposes two things: the fermionic composite (a star alarm e and a face alarm m acquire a −1 when one circles the other, so their composite ψ has fermionic statistics) and the bookkeeping of twist defects (endpoints of an e↔m duality wall). QEC-Bank verbatim: “charged string diagrams expose the fermionic composite and twist-defect bookkeeping”. Note the QEC-Bank speaks of the toric bulk underlying the planar patch — the paper treats the toric code on an n × n square lattice (written [[n², 2, n]] there; counting one qubit per edge, an n × n torus has 2n² edges, the [[2L², 2, L]] of this series' ledger); a quon treatment of the boundaries is not part of the record.
这条记录是四本词典里唯一带 gap 字段的:wanted:fermionic-compiler。QEC-Bank 目前没有任何机器能把检查矩阵自动翻译成 quon / 费米子表示;这本词典完全靠文献,机器推导仍是悬赏中的开放问题 →。来源:curated from liu2019quantized(Z. Liu, “Quantized Graphs and Quantum Error Correction”, 2019),附 liu2017quon(Z. Liu, A. Wozniakowski, A. M. Jaffe, “Quon 3D language for quantum information”, 2017)。方言标注:quon。
This is the only one of the four dictionaries carrying a gap field: wanted:fermionic-compiler. No QEC-Bank machine can yet translate a check matrix into a quon / fermionic representation automatically; this dictionary rests entirely on the literature, and the machine derivation remains an open problem on the wanted list →. Provenance: curated from liu2019quantized (Z. Liu, “Quantized Graphs and Quantum Error Correction”, 2019), with liu2017quon (Z. Liu, A. Wozniakowski, A. M. Jaffe, “Quon 3D language for quantum information”, 2017). Dialect: quon.
5.4PEPS:基态是一张带虚拟 ℤ₂ 对称的张量网络PEPS: the ground space is a tensor network with a virtual ℤ₂ symmetry
第四本词典换到凝聚态物理的语言。PEPSprojected entangled pair states,投影纠缠对态:把二维格点上每个格点放一个小张量,相邻张量通过「虚拟腿」缩并,得到整个系统的量子态。是矩阵乘积态(MPS)的二维推广。 把一个二维量子态写成一张张量网络:每个格点一个小张量,相邻张量之间用虚拟腿相连并求和。表面码的编码空间(物理上叫基态空间)可以写成这样一张网络,而且局部张量有一个虚拟 ℤ₂ 对称virtual Z2 symmetry:在每条虚拟腿上同时作用一个 Z(两次作用回到原状,故名 ℤ₂ = {0,1} 群),局部张量保持不变。配合 G-单射性(见下一段),这条对称性是 toric code 拓扑序的张量网络表述。:在所有虚拟腿上同时作用一个 Z,张量不变。
The fourth dictionary switches to the language of condensed-matter physics. A PEPSProjected entangled pair state: place a small tensor on every site of a 2D lattice and contract neighbouring tensors through “virtual legs” to obtain the state of the whole system. The 2D generalisation of matrix product states (MPS). writes a 2D quantum state as a tensor network: one small tensor per site, neighbouring tensors joined and summed over through virtual legs. The surface code's code space (physically, its ground space) can be written as such a network, and the local tensor has a virtual ℤ₂ symmetryActing with a Z on every virtual leg at once (twice returns to the identity, hence the group ℤ₂ = {0,1}) leaves the local tensor unchanged. Together with G-injectivity (next paragraph), this symmetry is the tensor-network statement of the toric code's topological order.: apply Z to every virtual leg at once and the tensor is unchanged.
只有这条对称性还推不出什么:乘积态的张量也可以满足它。例如物理腿总是 |0⟩、四条虚拟腿只在「全 0」或「全 1」时取 1 的张量,四条腿同时作用 Z 时相位是 (−1)0 或 (−1)4,都等于 1,所以不变;可收缩出来的却是毫无纠缠的 |00…0⟩。Schuch、Cirac、Pérez-García 的定理还要求 G-单射性(这里 G = ℤ₂):张量除了在虚拟腿上 ℤ₂ 不变,还要在对称允许的那部分虚拟空间上是单射的,即不同的虚拟边界状态给出不同的物理态,不会像上例那样被压成同一个。toric code 的张量满足更强的 ℤ₂-等距性:它可以取成把四条虚拟腿投影到偶宇称子空间(Z⊗Z⊗Z⊗Z = +1)的投影算符。在这些前提下、放在环面上(周期边界),论文证明直觉教程里三件分别论证的事都来自这条对称性:拓扑简并(ℤ₂ 时 4 个基态,即环面上 2 个逻辑比特),局部不可区分(任何局部测量都读不出逻辑信息——不偷看的检查之所以可能),以及任意子激发(链端点的警报就是 e、m 粒子;这一条用到等距性)。平面码的「1 个逻辑比特」还要额外规定边界上的张量,不在这篇论文的定理里。QEC-Bank 的结论句:「The code's topological order is therefore a constraint on the local tensor, not merely a property asserted from its Hamiltonian.」——拓扑序不是从哈密顿量宣布出来的性质,而是写在一个小张量上的约束。
The symmetry alone implies nothing of the sort: a product-state tensor can satisfy it too. Take a tensor whose physical leg is always |0⟩ and whose four virtual legs give 1 only when they are all 0 or all 1: applying Z to all four legs gives the phase (−1)0 or (−1)4, both 1, so it is invariant; yet the contracted state is the unentangled |00…0⟩. The Schuch–Cirac–Pérez-García theorems also require G-injectivity (here G = ℤ₂): besides being ℤ₂-invariant on its virtual legs, the tensor must be injective on the part of the virtual space the symmetry allows, i.e. different virtual boundary states give different physical states instead of being squashed together as in the example. The toric-code tensor satisfies the stronger ℤ₂-isometry: it can be taken as the projector of the four virtual legs onto the even-parity subspace (Z⊗Z⊗Z⊗Z = +1). Under these assumptions, and on the torus (periodic boundaries), the paper proves that three things the intuition guide argued separately follow from the symmetry: topological degeneracy (4 ground states for ℤ₂, i.e. 2 logical qubits on the torus), local indistinguishability (no local measurement reads the logical information — the reason no-peek checks are possible), and anyonic excitations (alarms at chain endpoints are the e and m particles; this one uses the isometry). The planar code's “1 logical qubit” needs boundary tensors as well and is outside the paper's theorems. The QEC-Bank's closing sentence: “The code's topological order is therefore a constraint on the local tensor, not merely a property asserted from its Hamiltonian.”
curated from schuch2010peps(N. Schuch, J. I. Cirac, D. Pérez-García, “PEPS as ground states: Degeneracy and topology”, 2010)。QEC-Bank 不构造张量网络、不做缩并;这本词典是文献叙述。
curated from schuch2010peps (N. Schuch, J. I. Cirac, D. Pérez-García, “PEPS as ground states: Degeneracy and topology”, 2010). The QEC-Bank builds no tensor network and performs no contraction; this dictionary is a literature narrative.
5.5四本词典对照表The four dictionaries side by side
| 语言Language | 表面码的对应物Surface-code counterpart | 它买到什么What it buys | 来源标签Provenance |
|---|---|---|---|
| 随机键 Ising 模型Random-bond Ising model | 错误链 = 无序区;同调类概率 = 自由能error chains = disorder sectors; class probability = free energy | 阈值 = 相变点;匹配 = 零温近似threshold = phase transition; matching = zero-temperature limit | curated from dennis2002topological |
| ZX 演算ZX-calculus | 无相位图 = CSS 码的同一个 𝔽₂ 子空间phase-free diagram = the same 𝔽₂ subspace as the CSS code | 粗糙合并(2 → 1,测 X̄₁X̄₂;结果为 −1 时先补一个 Z;光滑合并则测 Z̄₁Z̄₂、补 X)与分裂(1 → 2)都画成蜘蛛;蜘蛛融合是两张图表示同一线性映射的等式,不是一步操作rough merge (2 → 1, measures X̄₁X̄₂; outcome −1 first adds a Z correction; a smooth merge measures Z̄₁Z̄₂ and uses an X correction) and split (1 → 2) are drawn as spiders; spider fusion is an equality between two diagrams of the same linear map, not an operation | curated from kissinger2022phasefree |
| quon · 量子化图quon · quantized graphs | 星与面 = 圈算符;e/m 对偶 = 图自对偶stars and faces = cycle operators; e/m duality = graph self-duality | 费米子复合体与扭缺陷的记账(机器推导:开放问题)fermionic composite and twist bookkeeping (machine derivation: open) | curated from liu2019quantized |
| PEPS 张量网络PEPS tensor network | 基态 = 带虚拟 ℤ₂ 对称的局部张量ground space = local tensor with virtual ℤ₂ symmetry | 在环面上,虚拟 ℤ₂ 对称加 G-单射性(部分结论还要 ℤ₂-等距性)推出简并、局部不可区分与任意子;平面码的边界不在这条定理里on the torus, virtual ℤ₂ symmetry plus G-injectivity (ℤ₂-isometry for some results) gives degeneracy, local indistinguishability and anyons; planar boundaries are outside the theorem | curated from schuch2010peps |
四本词典没有一本给出新的数字或新的矩阵,也没有一本被 QEC-Bank 的机器重算过。它们的价值在于把问题搬到别的领域已经解决的地方:阈值搬进相变理论,手术搬进图改写,对偶搬进图论,拓扑序搬进张量的对称性。R5 的标签全部是 curated,读者应当照此对待:可信,但可信的方式是「有那篇论文」,不是「机器算过」。
None of the four dictionaries produces a new number or a new matrix, and none has been recomputed by the QEC-Bank machine. Their value is in moving a question to a field where it is already solved: thresholds into phase-transition theory, surgery into graph rewriting, duality into graph theory, topological order into tensor symmetry. Every R5 label is curated, and readers should treat them accordingly: trustworthy, but in the sense of “that paper exists”, not “the machine checked it”.
走完梯子,回头看Top of the ladder, looking back
从下往上复述一遍。R1:两张 0/1 矩阵 HX、HZ,L=3(边长 3)时各 6 行 13 列,HXHZᵀ = 0,k = 13 − 6 − 6 = 1(k = 逻辑比特数,13 = n = 物理比特数);由构造器算出(derived)。R2:这两张矩阵是长 3 重复码与自己的超图积,开链余秩 0 决定了 k = 1 而非 2(canonical);同一对矩阵又是三项链复形的两个边界映射,逻辑串 = 相对闭链除去边界,码距 = 最短的非平凡相对闭链(curated)。R3、R4:没有记录;仓库里有一份四层 CNOT 时间表的数据文件,但它不是一条 QEC-Bank 断言。R5:四本 curated 词典——Ising 自由能、ZX 蜘蛛、quon 圈算符、PEPS 虚拟对称——各自站着一篇论文,其中 quon 那本挂着一个开放问题。
Replayed bottom to top. R1: two 0/1 matrices HX, HZ, each 6 rows by 13 columns at L=3 (side length 3), HXHZᵀ = 0, k = 13 − 6 − 6 = 1 (k = logical qubits, 13 = n = physical qubits); computed by the constructor (derived). R2: those matrices are the hypergraph product of the length-3 repetition code with itself, and the open chain's corank 0 is what makes k = 1 rather than 2 (canonical); the same pair is also the two boundary maps of a three-term chain complex, logical strings = relative cycles modulo boundaries, distance = the shortest nontrivial relative cycle (curated). R3, R4: no records; the repository holds a data file with a four-layer CNOT schedule, but it is not a QEC-Bank assertion. R5: four curated dictionaries — Ising free energy, ZX spiders, quon cycle operators, PEPS virtual symmetry — each backed by one paper, the quon one carrying an open problem.
带走一个习惯:以后在任何地方看到「表面码等价于 X」,先问两件事——它在梯子的哪一级,标签是什么。同一个「等价」,在 R1 是可以重跑的计算,在 R5 是一篇论文的叙述。两者都有价值,但不该被混为一谈。
Take one habit with you: whenever you next read “the surface code is equivalent to X”, ask two things first — which rung, and which label. The same word “equivalent” is a rerunnable computation at R1 and a paper's narrative at R5. Both are valuable; they should not be confused.
符号与读法Symbols & how to read them
| 符号Symbol | 名称与读法Name & how to read it | 在本教程中的含义Meaning in this tutorial |
|---|---|---|
| n k d | 读「n、k、d」Read “n, k, d” | n = 物理(数据)比特数,k = 逻辑比特数(记账),d = 码距 = 最短逻辑算符的长度(绕不回来的圈)。合写为 [[n, k, d]]。本页 L=3 时 [[13, 1, 3]]。n = physical (data) qubits, k = logical qubits (the ledger), d = distance = length of the shortest logical operator (loops that do not come back). Written together as [[n, k, d]]. Here at L=3: [[13, 1, 3]]. |
| L | 读「L」Read “L” | 版图的边长,也是重复码因子的长度;未旋转族里 n = 2L²−2L+1,d = L。The layout's side length, also the length of the repetition factor; in the unrotated family n = 2L²−2L+1 and d = L. |
| p | 读「p」Read “p” | 单个比特出错的概率(5.1 节);它决定 Ising 词典里的温度 T。The probability that one qubit fails (§5.1); it sets the temperature T in the Ising dictionary. |
| HX HZ | 读「H X / H Z」Read “H-X / H-Z” | X 检查矩阵与 Z 检查矩阵:每行一条检查,每列一个比特,1 表示「这条检查碰到这个比特」(2.1 节)。The X and Z check matrices: one row per check, one column per qubit, a 1 meaning “this check touches this qubit” (§2.1). |
| ᵀ | 上标 T,读「转置」Superscript T, read “transpose” | 把矩阵的行列互换。HXHZᵀ 的 (i, j) 元 = 第 i 条 X 检查与第 j 条 Z 检查共享的比特数。Swap a matrix's rows and columns. Entry (i, j) of HXHZᵀ = the number of qubits shared by X check i and Z check j. |
| 𝔽₂ | 双线 F 下标 2,读「F 二」Blackboard F sub 2, read “F-two” | 只有 0、1 两个元素、加法按模 2 的数域。检查矩阵的所有运算都在它上面进行;「= 0」意味着「是偶数」。The field with elements 0, 1 and addition mod 2. All check-matrix arithmetic lives here; “= 0” means “is even”. |
| ⊗ | 圆圈叉,读「张量积」A circled cross, read “tensor product” | A ⊗ B:把 A 的每个元素 a 换成 a·B 拼成的大矩阵。超图积的两张矩阵由它拼出(3.1 节)。A ⊗ B: the large matrix obtained by replacing each entry a of A with a·B. The hypergraph-product matrices are assembled with it (§3.1). |
| Im | 读「m 阶单位矩阵」Read “the m-by-m identity” | 对角线全 1、其余全 0 的 m×m 矩阵;乘任何东西都不改变它。The m×m matrix with 1s on the diagonal and 0s elsewhere; multiplying by it changes nothing. |
| rank ker | 读「秩 / 核」Read “rank / kernel” | rank(H) = 线性独立行数;ker(H) = 满足 H·v = 0 的向量集合;dim ker(Hᵀ) 叫余秩(corank),是检查之间关系的个数。rank(H) = number of independent rows; ker(H) = all v with H·v = 0; dim ker(Hᵀ) is the corank, the number of relations among checks. |
| kQ = k₁k₂ + k₁ᵀk₂ᵀ | HGP 维数公式The HGP dimension formula | 超图积码的逻辑比特数;ki = dim ker(Hi),kiᵀ = dim ker(Hiᵀ)。开链 1·1 + 0·0 = 1,闭链 1·1 + 1·1 = 2。Logical qubits of a hypergraph-product code; ki = dim ker(Hi), kiᵀ = dim ker(Hiᵀ). Open chains 1·1 + 0·0 = 1, closed 1·1 + 1·1 = 2. |
| ∂ | 圆体 d,读「边界」(partial / boundary)A curly d, read “boundary” (or “partial”) | 把几何体映到其边界的线性映射:∂₂ 面→边 = HZᵀ,∂₁ 边→顶点 = HX;∂₁∂₂ = 0(3.2 节)。The linear map sending a shape to its boundary: ∂₂ faces→edges = HZᵀ, ∂₁ edges→vertices = HX; ∂₁∂₂ = 0 (§3.2). |
| C₂ → C₁ → C₀ | 读「链复形」Read “chain complex” | 三个 0/1 向量空间(面、边、顶点)由两个边界映射串起来;表面码的 R2 同调表示。Three 0/1 vector spaces (faces, edges, vertices) strung together by two boundary maps; the surface code's R2 homological view. |
| c f | 读「c、f」Read “c, f” | c = 链向量:C₁ 的元素,每条边一个 0/1 分量,1 表示该边上有 Z;∂₁c = 它的警报(端点)。f = 面向量:C₂ 的元素,每个面一个 0/1 分量;∂₂f = 所选面的边界,即若干 Z 检查的乘积(3.2 节)。c = chain vector: an element of C₁, one 0/1 entry per edge, 1 meaning a Z on that edge; ∂₁c = its alarms (endpoints). f = face vector: an element of C₂, one 0/1 entry per face; ∂₂f = the boundary of the chosen faces, i.e. a product of Z checks (§3.2). |
| Zh P(h) F = −T ln Zh | 读「类权重」「类概率」「自由能」Read “class weight”, “class probability”, “free energy” | Zh = 同调类 h 里所有链的权重之和(每条链一个玻尔兹曼因子 e−E/T,E = 链长,T 由错误率定);P(h) = Zh/Σh′Zh′ 是该类的概率;F 是 Zh 的对数换个符号再乘 T。匹配取 T → 0,只留和式里最大的一项——最短链(5.1 节)。Zh = the sum of the weights of all chains in homology class h (one Boltzmann factor e−E/T per chain, E = chain length, T set by the error rate); P(h) = Zh/Σh′Zh′ is the class probability; F is the logarithm of Zh, negated and multiplied by T. Matching takes T → 0 and keeps only the largest term — the shortest chain (§5.1). |
| ℤ₂ | 双线 Z 下标 2,读「Z 二」Blackboard Z sub 2, read “Z-two” | 两元素群 {0, 1}(做两次回到原状)。PEPS 词典里的「虚拟 ℤ₂ 对称」:在所有虚拟腿上作用 Z,张量不变(5.4 节)。The two-element group {0, 1} (do it twice and you are back). In the PEPS dictionary, the “virtual ℤ₂ symmetry”: apply Z to every virtual leg and the tensor is unchanged (§5.4). |
| R1 … R5 | 读「第一级到第五级」Read “rung one to rung five” | 表示阶梯的五级:检查 / 结构 / 动力学 / 电路与探测器 / 跨模型视图(1.1 节)。The five rungs: checks / structure / dynamics / circuit & detectors / cross-model views (§1.1). |
| ⇒ | 双线箭头,读「推出」A double arrow, read “implies” | A ⇒ B:由 A 得出 B。A ⇒ B: from A one concludes B. |
本教程新增词汇New terms in this tutorial
| 术语Term | 白话定义Plain definition |
|---|---|
| 表示阶梯representation ladder | 把一个码的各种描述按「机器可执行 → 人类可洞见」排成 R1–R5 五级,每级单独标注来源。One code's descriptions arranged on five rungs R1–R5 from machine-executable to human-insightful, each with its own provenance. |
| 来源标签 derived / canonical / curatedprovenance label derived / canonical / curated | 机器从上游算出 / 照公认定义写下 / 从一篇文献整理(附 bibkey)。Computed by the machine from upstream / written from an agreed definition / organised from one paper (with bibkey). |
| 辛形式symplectic form | 把每条 Pauli 检查写成 2n 位的 0/1 行(前 n 位 X、后 n 位 Z),对易判据成为一个二元内积。Each Pauli check as a 2n-bit 0/1 row (first n bits X, last n bits Z); commutation becomes one binary inner product. |
| 超图积(HGP)hypergraph product (HGP) | 用两张经典检查矩阵按 ⊗ 拼出一对自动对易的量子检查矩阵;表面码 = 两条开重复链的超图积。Two classical check matrices assembled with ⊗ into a pair of automatically commuting quantum check matrices; the surface code = the HGP of two open repetition chains. |
| 相对链复形 / 相对闭链relative chain complex / relative cycle | 把毛边界上的端点「商掉」后的链复形;端点搭在边界上的链算作闭链。逻辑串 = 相对闭链除去边界。The chain complex with rough-boundary endpoints quotiented out; a chain ending on the boundary counts as a cycle. Logical strings = relative cycles modulo boundaries. |
| 瞬时稳定子群(ISG)instantaneous stabilizer group (ISG) | 测量序列某一时刻已确定为 +1 的全部检查的群;R3 的记录对象。The group of all checks known to be +1 at one moment of a measurement sequence; what R3 records. |
| 探测器错误模型(DEM)detector error model (DEM) | 电路中每个故障 → 点亮哪些探测器、是否翻转逻辑观测量的清单;R4 的记录对象。The list of every circuit fault → which detectors it lights and whether it flips the logical observable; what R4 records. |
| 钩子错误hook error | 辅助比特中途出错、经后续 CNOT 传到两个数据比特的重量 2 错误;CNOT 顺序要让它背离最短逻辑串。A weight-2 data error from one mid-sequence ancilla fault riding later CNOTs; CNOT order must point it away from the shortest logical. |
| 随机键 Ising 模型random-bond Ising model | 键的符号随机翻转的 Ising 模型;表面码译码的统计物理对应,阈值 = 其相变点。An Ising model with randomly flipped bond signs; the statistical-physics counterpart of surface-code decoding, threshold = its phase transition. |
| 蜘蛛(ZX)spider (ZX) | ZX 图的节点,Z 色或 X 色;无相位 ZX 图与 CSS 码是同一个 𝔽₂ 子空间。合并、分裂画成蜘蛛;「蜘蛛融合」是把两个相连的同色蜘蛛并成一个的图等式,不是合并操作本身。A node of a ZX diagram, coloured Z or X; a phase-free ZX diagram and a CSS code are one 𝔽₂ subspace. Merge and split are drawn as spiders; spider fusion is the diagram equality that joins two connected spiders of one colour into one, not the merge operation itself. |
| quon / 量子化图quon / quantized graph | 三维弦图语言及其图版本;星与面统一为圈算符,e/m 对偶 = 图自对偶;机器推导是开放问题。A 3D string-diagram language and its graph version; stars and faces unified as cycle operators, e/m duality = graph self-duality; machine derivation is open. |
| PEPSPEPS | 二维张量网络态;toric code 的基态可以写成带虚拟 ℤ₂ 对称的局部张量;这条对称性加上 G-单射性(部分结论还要 ℤ₂-等距性),在环面上推出拓扑序的三个标志:简并、局部不可区分、任意子(5.4 节)。A 2D tensor-network state; the toric-code ground space can be written with a local tensor that has a virtual ℤ₂ symmetry; this symmetry together with G-injectivity (ℤ₂-isometry for some results) yields, on the torus, the three hallmarks of topological order: degeneracy, local indistinguishability, anyons (§5.4). |
延伸阅读Further reading
- J.-P. Tillich, G. Zémor, “Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength” (2009)
超图积的原始论文;R1 与 R2 hypergraph-product 记录的参考。tillich2009quantumThe original hypergraph-product paper; reference for R1 and the R2 hypergraph-product record. tillich2009quantum - S. B. Bravyi, A. Yu. Kitaev, “Quantum codes on a lattice with boundary” (1998)
带边界的格点码,即平面表面码的出生证;R2 homological 记录的 curated 来源。bravyi1998quantumLattice codes with boundary — the planar surface code's birth certificate; curated source of the R2 homological record. bravyi1998quantum - H. Bombín, M. A. Martín-Delgado, “Homological Error Correction: Classical and Quantum Codes” (2007)
同调纠错的系统表述。bombin2007homologicalThe systematic homological formulation of error correction. bombin2007homological - E. Dennis, A. Kitaev, A. Landahl, J. Preskill, “Topological quantum memory” (2002)
随机键 Ising 映射与阈值理论的奠基文;R5 statistical-mechanics 的 curated 来源。dennis2002topologicalThe founding paper of the random-bond Ising mapping and threshold theory; curated source of R5 statistical-mechanics. dennis2002topological - C. Wang, J. Harrington, J. Preskill, “Confinement-Higgs transition in a disordered gauge theory and the accuracy threshold for quantum memory” (2003)
把统计物理映射推到带测量错误的三维情形。wang2003confinementExtends the statistical-physics mapping to the 3D case with measurement errors. wang2003confinement - A. Kissinger, “Phase-free ZX diagrams are CSS codes (...or how to graphically grok the surface code)” (2022)
「无相位 ZX = CSS」的等价定理;R5 zx 的 curated 来源。kissinger2022phasefreeThe “phase-free ZX = CSS” equivalence; curated source of R5 zx. kissinger2022phasefree - N. de Beaudrap, D. Horsman, “The ZX calculus is a language for surface code lattice surgery” (2020)
蜘蛛与合并 / 分裂的最早严格对应。debeaudrap2020zxThe first rigorous match of spiders with merge / split. debeaudrap2020zx - H. Bombín, D. Litinski, N. Nickerson, F. Pastawski, S. Roberts, “Unifying flavors of fault tolerance with the ZX calculus” (2023)
把电路式、基于测量、基于融合与 Floquet 容错统一进 ZX。bombin2023unifyingCircuit-based, measurement-based, fusion-based and Floquet fault tolerance unified in ZX. bombin2023unifying - Z. Liu, A. Wozniakowski, A. M. Jaffe, “Quon 3D language for quantum information” (2017);Z. Liu, “Quantized Graphs and Quantum Error Correction” (2019)
quon 语言的起源,及其对 toric code 的量子化图表示;R5 fermionic — quon 的 curated 来源是 2019 年那篇。liu2017quon, liu2019quantizedThe origin of the quon language, and its quantized-graph representation of the toric code; the curated source of R5 fermionic — quon is the 2019 paper. liu2017quon, liu2019quantized - N. Schuch, J. I. Cirac, D. Pérez-García, “PEPS as ground states: Degeneracy and topology” (2010)
用局部张量的虚拟对称推导拓扑序;R5 tensor-network 的 curated 来源。schuch2010pepsTopological order derived from the local tensor's virtual symmetry; curated source of R5 tensor-network. schuch2010peps
① 本教程的每个来源标签都照抄 QEC-Bank 页面:R1 derived,R2 一条 canonical、一条 curated,R3/R4 无记录,R5 四条全部 curated。② 机器实际重算的只有 R1/R2-HGP 的内容:n、k、CSS 结构、L=3 与 L=4 的码距(verified);L=5 的码距是 bounded。③ 第 4 章的 CNOT 时间表来自仓库数据文件 circuit_memory_l3.yaml,不是 QEC-Bank 断言,没有来源标签。④ 5.1 节出现的 10.9% 与 10.3% 都是码容量模型下的数字,2.9% 与 0.57%/步属于不同噪声模型,本页只为区分而提及。⑤ 全部内容限于未旋转平面族 [[2L²−2L+1, 1, L]]([[n, k, d]] = 物理比特数、逻辑比特数、码距,L = 边长,见 2.2 节);quon 词典说的更是它底下的 toric 体。⑥ ZX 与链复形的插图是示意,不是从矩阵机械生成的。
① Every provenance label here is copied from the QEC-Bank page: R1 derived, R2 one canonical and one curated, R3/R4 no records, R5 all four curated. ② The machine actually recomputes only the R1 / R2-HGP content: n, k, CSS structure, and the distances at L=3 and L=4 (verified); the L=5 distance is bounded. ③ The CNOT schedule in Chapter 4 comes from the repository data file circuit_memory_l3.yaml, not from a QEC-Bank assertion, and carries no provenance label. ④ The 10.9% and 10.3% in §5.1 are both code-capacity numbers; 2.9% and 0.57%/step belong to different noise models and are mentioned only to keep them apart. ⑤ Everything is restricted to the unrotated planar family [[2L²−2L+1, 1, L]] ([[n, k, d]] = physical qubits, logical qubits, distance; L = side length; see §2.2); the quon dictionary speaks only of the toric bulk beneath it. ⑥ The ZX and chain-complex figures are illustrations, not mechanically generated from the matrices.
条目总览 · 直觉 · 导览 · 表示阶梯(本页) · 参数与实例 · 形式化 IR 与证书 · 译码器 · 逻辑操作 · 用例与实现 · 关系 · 推导与指南 · 参考文献。QEC-Bank 原页:在 QEC-Bank 中查看此条目 →;R2 的完整推导见 QEC-Bank 的 HGP 构造页 与 CSS 链复形词典。
Entry overview · Intuition · Guided tour · Representation ladder (this page) · Parameters & instances · Formal IR & certificates · Decoders · Logical operations · Use cases & realizations · Relations · Derivations & guides · References. QEC-Bank source page: Open in the QEC-Bank →; the full R2 derivation is on the QEC-Bank HGP construction page and the CSS chain-complex dictionary.