目录Contents
导览在看什么:被导出的数据What the tour looks at: exported data
QEC-Bank 的导览页是一个通用播放器:它不含任何 surface code 专属的代码,只是读取两份文件(七步脚本 tour.yaml 与构造器导出的 L=3 格点,L = 链长 = 码距),把每一步的高亮和说明摆到屏幕上。这一章先弄清「导出的数据」是什么、从哪里来。 The QEC-Bank tour page is a generic player: it contains no surface-specific code, only reads two files (the seven-step script tour.yaml and the constructor's exported L=3 lattice, L = chain length = distance) and puts each step's highlight and caption on screen. This chapter first settles what “exported data” is and where it comes from.
1.1七步路线,与每一步的出处标签Seven stops, each with a provenance label
导览的标题是「Surface code: see the hypergraph product」——看见超图积hypergraph product(HGP):Tillich–Zémor 提出的构造,把两个经典奇偶矩阵 H₁、H₂ 合成一个 CSS 量子码。surface code 是它最小的例子:两个因子都是重复码。。七步依次是:① 从两条开链出发(13 个坐标);② 一个 X 检查一次只动一个因子;③ Z 检查交换因子角色;④ 合上链得到环面兄弟;⑤ 开边界是缺失的关联;⑥ 两族检查铺满同一批比特;⑦ 自己去盘问构造。每一步在 tour.yaml 里都带一个 origin 字段:这七步全部标为 verified,方法分别是 surface.build(L=3)、qeclib.constructions.hgp、toric.build(L=3)、CheckMatrix.validate,最后一步是 data-driven tour player(播放器本身,这一步把操作交给你)。也就是说:导览里的每一个数字都是机器现算的,不是手抄的。
The tour is titled “Surface code: see the hypergraph product” — see the hypergraph productHGP: the Tillich–Zémor construction that fuses two classical parity matrices H₁, H₂ into one CSS quantum code. The surface code is its smallest example: both factors are repetition codes.. Its seven stops: ① start with two open chains (13 coordinates); ② an X-check acts one factor at a time; ③ Z-checks exchange the factor roles; ④ close the chains for the toric sibling; ⑤ open boundaries are missing incidences; ⑥ the two check families tile the same qubits; ⑦ interrogate the construction yourself. Every stop carries an origin field in tour.yaml: all seven are marked verified, by surface.build(L=3), qeclib.constructions.hgp, toric.build(L=3) and CheckMatrix.validate, and for the last step data-driven tour player (the player itself; that step hands control to you). In other words: every number in the tour is recomputed by the machine, not copied by hand.
本篇把七步重新分成五章:第 1 章对应 ①,第 2 章对应 ②,第 3 章对应 ③ 和 ⑥,第 4 章对应 ④,第 5 章对应 ⑤ 和 ⑦。所有静态图、表格和算例只用一个实例:QEC-Bank 的 [[13,1,3]][[n,k,d]]:n 个物理比特、k 个逻辑比特、码距 d 的量子码记法。双层方括号专属量子码,区别于经典码的 [n,k,d]。(n = 物理比特数 13,k = 逻辑比特数 1——二者的记账公式见 Toric Code 教程 4.4 节;d = 码距 3,见同一教程 5.8 节),即 L=3 的未旋转平面 surface code。两个沙盘也是 L=3;另外两个互动部件取自共享引擎,尺寸固定且不同:「剪开」动画用 L=4(4.2 节),逻辑串实验台用 d=5 的平面码(41 个比特、40 条检查,5.2 节),部件旁都会再注明。
This guide regroups the seven stops into five chapters: Chapter 1 is ①, Chapter 2 is ②, Chapter 3 covers ③ and ⑥, Chapter 4 is ④, Chapter 5 covers ⑤ and ⑦. Every static figure, table and worked example uses one instance: the QEC-Bank's [[13,1,3]][[n,k,d]]: the notation for a quantum code with n physical qubits, k logical qubits and distance d. Double brackets are reserved for quantum codes, as opposed to classical [n,k,d]. (n = 13 physical qubits, k = 1 logical qubit — the ledger formula for both is in the toric-code guide, §4.4; d = distance 3, see its §5.8), the unrotated planar surface code at L=3. The two sandboxes are L=3 as well; two other interactive widgets come from the shared engine with fixed, different sizes: the “cut open” animation uses L=4 (§4.2) and the logical-string bench a d=5 planar code (41 qubits, 40 checks, §5.2); each is flagged again next to the widget.
QEC-Bank 构造器覆盖的是未旋转的平面族 [[2L²−2L+1, 1, L]](L = 链长;n = 2L²−2L+1 个物理比特,k = 1 个逻辑比特,d = L 的码距),交付实例为 [[13,1,3]]、[[25,1,4]]、[[41,1,5]]。文献里更宽的「surface code」家族(旋转版、XZZX、twist、三维……)不在导览数据之内;本篇每一个坐标和支撑,都只属于这一个族。
The QEC-Bank constructor covers the unrotated planar family [[2L²−2L+1, 1, L]] (L = chain length; n = 2L²−2L+1 physical qubits, k = 1 logical qubit, distance d = L), shipped as [[13,1,3]], [[25,1,4]] and [[41,1,5]]. The broader “surface code” collection in the literature (rotated, XZZX, twists, 3D…) is outside the tour data; every coordinate and support on this page belongs to this one family only.
1.2两条开链的乘积:13 个坐标是怎么算出来的The product of two open chains: how the 13 coordinates are computed
导览第 ① 步的原话:「L=3 时每个因子有三个比特和两条奇偶关系。它们的超图积放下 9 个 bit×bit 比特和 4 个 check×check 比特:这 13 个坐标由 surface 构造器计算得出。」拆开读。因子是最简单的经典码——长度 3 的重复码。它的奇偶矩阵 Hparity-check matrix:每一行是一条检查,每一列是一个比特;行 i 在列 j 处为 1 表示「检查 i 看比特 j」。重复码的检查是「相邻两个比特相等」,所以每行恰有两个相邻的 1。是 2 行 3 列(QEC-Bank 记为 rep_parity(3)):
Stop ① verbatim: “For L=3 each factor has three bits and two parity relations. Their hypergraph product places nine bit×bit qubits and four check×check qubits: the 13 coordinates shown here are computed by the surface constructor.” Unpack it. A factor is the simplest classical code, the length-3 repetition code. Its parity-check matrix HOne row per check, one column per bit; a 1 in row i, column j means “check i looks at bit j”. A repetition check says “two adjacent bits agree”, so each row has exactly two adjacent 1s. has 2 rows and 3 columns (the QEC-Bank calls it rep_parity(3)):
现在取两份一样的因子,叫 A 和 B。超图积的量子比特分两块:bit×bit——A 的一个比特配 B 的一个比特,3×3 = 9 个;check×check——A 的一条关系配 B 的一条关系,2×2 = 4 个。这里的「×」就是「各取一个,配成一对」。构造器再给每一对分配平面坐标(第一坐标水平、第二坐标竖直):
Now take two identical factors, call them A and B. The hypergraph product's qubits come in two blocks: bit×bit — one bit of A paired with one bit of B, 3×3 = 9 of them; check×check — one relation of A paired with one relation of B, 2×2 = 4 of them. The “×” simply means “pick one of each and pair them”. The constructor then assigns each pair a planar coordinate (first coordinate horizontal, second vertical):
n = L² + (L−1)² = 9 + 4 = 13a = 因子 A 的索引,b = 因子 B 的索引;L = 每条链的比特数(3);n = 物理比特数a = index in factor A, b = index in factor B; L = bits per chain (3); n = number of physical qubits
| 编号Index | 块Block | (a, b) | 坐标Coord | 编号Index | 块Block | (a, b) | 坐标Coord |
|---|---|---|---|---|---|---|---|
| q0 | bit×bit | (0,0) | (0,0) | q7 | bit×bit | (2,1) | (2,4) |
| q1 | bit×bit | (0,1) | (2,0) | q8 | bit×bit | (2,2) | (4,4) |
| q2 | bit×bit | (0,2) | (4,0) | q9 | check×check | (0,0) | (1,1) |
| q3 | bit×bit | (1,0) | (0,2) | q10 | check×check | (0,1) | (3,1) |
| q4 | bit×bit | (1,1) | (2,2) | q11 | check×check | (1,0) | (1,3) |
| q5 | bit×bit | (1,2) | (4,2) | q12 | check×check | (1,1) | (3,3) |
| q6 | bit×bit | (2,0) | (0,4) |
检查也有坐标:X 检查 (a,b) 放在 (2b, 2a+1),Z 检查 (a,b) 放在 (2b+1, 2a)。于是 5×5 的格点上,偶-偶与奇-奇位置住数据比特,偶-奇位置住 X 检查,奇-偶位置住 Z 检查,没有一个空位——这就是导览首屏画出的那张图:
Checks get coordinates too: X-check (a,b) sits at (2b, 2a+1), Z-check (a,b) at (2b+1, 2a). So on the 5×5 grid the even-even and odd-odd sites hold data qubits, even-odd sites hold X-checks, odd-even sites hold Z-checks, and no site is empty — exactly the picture the tour opens with:
你在直觉教程里「画」出来的方格,这里是被「算」出来的:坐标是两个索引的线性函数,比特数 13 = 3² + 2² 是两块的面积之和。后面每一章都在重复同一件事——把一个几何事实还原成关于 H 的一句代数话。
The grid you “drew” in the intuition guide is “computed” here: coordinates are linear functions of two indices, and the qubit count 13 = 3² + 2² is the area of two blocks. Every later chapter repeats the same move — reducing a geometric fact to one algebraic sentence about H.
X 检查:A 的一条关系 × B 的一个比特X-checks: one relation of A times one bit of B
导览第 ② 步把一个内部 X 检查高亮,说它「由 A 的一条奇偶关系和 B 的一个比特索引,支撑是 H⊗I 与 I⊗Hᵀ 两块贡献的并」。这一章把这句话逐字变成图上的四条腿。 Stop ② highlights one bulk X-check and says it is “indexed by a parity relation of factor A and a bit of factor B; its support is the union of H⊗I and I⊗Hᵀ contributions”. This chapter turns that sentence, word by word, into four legs on the picture.
2.1两块矩阵,两个记号Two matrix blocks, two symbols
X 检查矩阵 HX 的每一行是一条 X 检查,每一列是一个数据比特——列也分成 bit×bit(9 列)和 check×check(4 列)两块。QEC-Bank 写的公式是:
Each row of the X-check matrix HX is one X-check, each column one data qubit — and the columns split into the same two blocks, bit×bit (9 columns) and check×check (4 columns). The QEC-Bank's formula:
两个记号。⊗ 是克罗内克积Kronecker product:A ⊗ B 把 A 的每个元素 a 换成整块 a·B。若 A 有 m 行 n 列、B 有 p 行 q 列,结果有 mp 行 nq 列。这里 H ⊗ I₃ 就是「H 的每个 1 换成一个 3×3 单位块,每个 0 换成 3×3 零块」。——BB 码教程的 2.2 节用「只动一个坐标的平移」讲过它;这里只需记住它的含义:H ⊗ I 让 H 作用在第一个索引 a 上、放过第二个索引 b,I ⊗ Hᵀ 反之。ᵀ 是转置transpose:把矩阵的行列互换。H 是 2×3(关系×比特),Hᵀ 就是 3×2(比特×关系)。Hᵀ 的第 j 行列出「比特 j 参与哪些关系」。:Hᵀ 是 3×2 的矩阵,第 j 行回答「比特 j 参与哪些关系」。I3、I2 是 3×3 与 2×2 的单位矩阵identity matrix:对角线全 1、其余全 0;乘任何东西都不改变它。。
Two symbols. ⊗ is the Kronecker productA ⊗ B replaces each entry a of A by the whole block a·B. If A has m rows and n columns and B has p rows and q columns, the result has mp rows and nq columns. Here H ⊗ I₃ is “every 1 of H becomes a 3×3 identity block, every 0 a 3×3 zero block”. — the BB-code guide's §2.2 introduced it as “a shift that moves only one coordinate”; here only its meaning matters: H ⊗ I lets H act on the first index a and leaves the second index b alone, and I ⊗ Hᵀ does the reverse. ᵀ is the transposeSwap rows and columns. H is 2×3 (relations × bits), so Hᵀ is 3×2 (bits × relations). Row j of Hᵀ lists the relations bit j takes part in.: Hᵀ is 3×2, and its row j answers “which relations does bit j belong to”. I3 and I2 are the 3×3 and 2×2 identity matricesAll 1s on the diagonal, 0 elsewhere; multiplying by it changes nothing..
于是 X 检查 (a,b)(A 的关系 a,B 的比特 b)的支撑读法是:左块——把关系 a 里的两个比特 a、a+1 各配上 b,得到 bit×bit 比特 (a,b) 与 (a+1,b),坐标 (2b,2a) 与 (2b,2a+2),正好在检查 (2b,2a+1) 的上下;右块——把 a 配上「比特 b 参与的每条关系 b′」,得到 check×check 比特 (a,b′),坐标 (2b′+1,2a+1),在检查的左右。内部的 b 参与两条关系(b−1 与 b),所以左右各一条腿,总重量 4。
So the support of X-check (a,b) (relation a of A, bit b of B) reads: left block — pair each of the two bits a, a+1 in relation a with b, giving bit×bit qubits (a,b) and (a+1,b) at (2b,2a) and (2b,2a+2), directly above and below the check at (2b,2a+1); right block — pair a with “every relation b′ that bit b takes part in”, giving check×check qubits (a,b′) at (2b′+1,2a+1), to the check's left and right. An interior b belongs to two relations (b−1 and b), hence one leg each side, weight 4 in total.
2.2六条 X 检查,逐条对账Six X-checks, audited one by one
100100000 | 1000
010010000 | 1100
001001000 | 0100
000100100 | 0010
000010010 | 0011
000001001 | 0001
这是 QEC-Bank 交付计算断言的 L=3 矩阵。竖线左边 9 列是 q0–q8,右边 4 列是 q9–q12。逐行读出支撑,与导出电路文件 circuit_memory_l3.yaml 里的 support 字段和 tour.yaml 里的标签放在一起:
This is the L=3 matrix asserted by the QEC-Bank's shipped computation. The 9 columns left of the bar are q0–q8, the 4 on the right are q9–q12. Reading the support off each row and placing it beside the support field of the exported circuit file circuit_memory_l3.yaml and the label in tour.yaml:
| 检查Check | 导览标签Tour label | 坐标Coord | H⊗I 腿(上下)H⊗I legs (up/down) | I⊗Hᵀ 腿(左右)I⊗Hᵀ legs (left/right) | 重量Weight |
|---|---|---|---|---|---|
| X0 | A check 0 × B bit 0 | (0,1) | q0 q3 | q9 | 3 |
| X1 | A check 0 × B bit 1 | (2,1) | q1 q4 | q9 q10 | 4 |
| X2 | A check 0 × B bit 2 | (4,1) | q2 q5 | q10 | 3 |
| X3 | A check 1 × B bit 0 | (0,3) | q3 q6 | q11 | 3 |
| X4 | A check 1 × B bit 1 | (2,3) | q4 q7 | q11 q12 | 4 |
| X5 | A check 1 × B bit 2 | (4,3) | q5 q8 | q12 | 3 |
对着图 1.1 数:每条腿都是一步之遥(Manhattan 距离 1)——这不是巧合,而是坐标公式的设计目的;QEC-Bank 的 reproduce.py 对交付的每个尺寸都核对这一点,不只对画出来的 L=3。导览第 ② 步让你把鼠标悬到相邻的 X 检查上、看「被复制的因子索引」如何变化:沿一行走,a 不变、b 加一;沿一列走,b 不变、a 加一。
Count against Figure 1.1: every leg is one step long (Manhattan distance 1) — no coincidence, it is what the coordinate formula was designed for; the QEC-Bank's reproduce.py checks this for every shipped size, not just the drawn L=3. Stop ② asks you to hover neighbouring X-checks and watch “the copied factor indices” change: along a row a stays and b increments; along a column b stays and a increments.
直觉教程里的「星形检查 = 顶点周围四条边」,在这里是「一条关系 × 一个比特」:竖直的两条腿来自关系 a 本身(它就是「比特 a 与 a+1 相等」),水平的两条腿来自比特 b 所属的关系。四条腿,两块矩阵,各出两条。
The intuition guide's “star check = the four edges around a vertex” is here “one relation × one bit”: the two vertical legs come from relation a itself (it says “bits a and a+1 agree”), the two horizontal legs from the relations bit b belongs to. Four legs, two matrix blocks, two legs each.
Z 检查交换角色,两族为何对易Z-checks exchange roles, and why the two families commute
导览第 ③ 步:「高亮的 Z 检查把 A 的一个比特和 B 的一条关系配对;它的两块矩阵是 I⊗H 和 Hᵀ⊗I——这正是 X 族与 Z 族交叉却对易的原因。」第 ⑥ 步补上结论:两族重叠总是偶数,构造器在导出前验证了这一点。 Stop ③: “The highlighted Z-check pairs a bit of A with a parity relation of B. Its two matrix blocks are I⊗H and Hᵀ⊗I, which is why the X and Z families cross yet commute.” Stop ⑥ adds the conclusion: the families always overlap evenly, and the constructor validates that before exporting.
3.1把 a 和 b 的职责对调Swap the duties of a and b
Z 检查 (a,b) 由 A 的比特 a 与 B 的关系 b 索引。左块 I⊗H:a 不动,关系 b 的两个比特 b、b+1 给出 bit×bit 比特 (a,b)、(a,b+1),坐标 (2b,2a)、(2b+2,2a)——在检查 (2b+1,2a) 的左右。右块 Hᵀ⊗I:b 不动,比特 a 所属的每条关系 a′ 给出 check×check 比特 (a′,b),坐标 (2b+1,2a′+1)——在检查的上下。和 X 检查恰好互换了「哪块管竖直、哪块管水平」。QEC-Bank 的 L=3 矩阵与对账表:
Z-check (a,b) is indexed by bit a of A and relation b of B. Left block I⊗H: a fixed, the two bits b, b+1 of relation b give bit×bit qubits (a,b), (a,b+1) at (2b,2a), (2b+2,2a) — left and right of the check at (2b+1,2a). Right block Hᵀ⊗I: b fixed, every relation a′ containing bit a gives check×check qubit (a′,b) at (2b+1,2a′+1) — above and below. Exactly the X-check with “which block is vertical, which horizontal” swapped. The QEC-Bank's L=3 matrix and audit table:
110000000 | 1000
011000000 | 0100
000110000 | 1010
000011000 | 0101
000000110 | 0010
000000011 | 0001
| 检查Check | 导览标签Tour label | 坐标Coord | I⊗H 腿(左右)I⊗H legs (left/right) | Hᵀ⊗I 腿(上下)Hᵀ⊗I legs (up/down) | 重量Weight |
|---|---|---|---|---|---|
| Z0 | A bit 0 × B check 0 | (1,0) | q0 q1 | q9 | 3 |
| Z1 | A bit 0 × B check 1 | (3,0) | q1 q2 | q10 | 3 |
| Z2 | A bit 1 × B check 0 | (1,2) | q3 q4 | q9 q11 | 4 |
| Z3 | A bit 1 × B check 1 | (3,2) | q4 q5 | q10 q12 | 4 |
| Z4 | A bit 2 × B check 0 | (1,4) | q6 q7 | q11 | 3 |
| Z5 | A bit 2 × B check 1 | (3,4) | q7 q8 | q12 | 3 |
3.2对易:同一个乘积出现两次,模 2 归零Commuting: the same product appears twice and vanishes mod 2
直觉教程用「角连两边」的几何论证说明星与面永远共享 0 或 2 条边(Toric Code 教程 5.1 节)。矩阵版的说法是:HX 的任一行与 HZ 的任一行,公共的 1 有偶数个;把所有这些公共计数排成一张表,就是矩阵乘积 HXHZᵀ。它按块算:
The intuition guide proved that a star and a face always share 0 or 2 edges by the geometric “a corner touches two sides” (the toric-code guide, §5.1). The matrix version: any row of HX and any row of HZ share an even number of 1s; the table of all those shared counts is the matrix product HXHZᵀ. It computes block by block:
⇒ HXHZᵀ = H⊗Hᵀ + H⊗Hᵀ = 0 在over F₂只有 0 和 1 两个数、按「1+1=0」运算的数系(也写 GF(2))。奇偶就是 F₂ 上的加法。/ The number system with only 0 and 1, where 1+1=0 (also written GF(2)). Parity is addition over F₂.H = 因子矩阵,I = 单位矩阵,ᵀ = 转置;HXHZᵀ 的第 (i,j) 元 = X 检查 i 与 Z 检查 j 的公共比特数H = factor matrix, I = identity, ᵀ = transpose; entry (i,j) of HXHZᵀ = number of qubits shared by X-check i and Z-check j
两块各贡献一次同一个矩阵 H⊗Hᵀ。在普通整数里,HXHZᵀ 的每个元素因此要么是 0、要么是 2;模 2 之后全部归零。QEC-Bank 的说法是「第二块不是装饰:它提供了那个本会破坏对易的缺陷的第二份拷贝」。看一个具体的例子——导览第 ② 步高亮的 X1 与第 ③ 步高亮的 Z2:
Each block contributes one copy of the same matrix H⊗Hᵀ. Over the ordinary integers every entry of HXHZᵀ is therefore 0 or 2; reduced mod 2, everything vanishes. In the QEC-Bank's words: “Block two is not decorative: it supplies the second copy of the would-be commutation defect.” One concrete case — X1, highlighted at stop ②, against Z2, highlighted at stop ③:
全部 36 对的公共计数(由上面两张表直接数出):
The shared counts for all 36 pairs (counted straight from the two tables above):
| |X ∩ Z| | Z0 | Z1 | Z2 | Z3 | Z4 | Z5 |
|---|---|---|---|---|---|---|
| X0 | 2 | 0 | 2 | 0 | 0 | 0 |
| X1 | 2 | 2 | 2 | 2 | 0 | 0 |
| X2 | 0 | 2 | 0 | 2 | 0 | 0 |
| X3 | 0 | 0 | 2 | 0 | 2 | 0 |
| X4 | 0 | 0 | 2 | 2 | 2 | 2 |
| X5 | 0 | 0 | 0 | 2 | 0 | 2 |
没有一个 1。这张表就是导览第 ⑥ 步「两族检查铺满同一批比特、重叠恒为偶数」的全部内容,也是 CheckMatrix.validate 在导出格点前实际执行的检查——出处标签 verified 指的就是这次乘法。
Not a single 1. This table is the whole content of stop ⑥, “the two check families tile the same qubits and overlap evenly”, and it is the check CheckMatrix.validate actually runs before the lattice is exported — the verified label refers to this multiplication.
对。X0 = {q0, q3, q9},Z0 = {q0, q1, q9},公共比特是 q0 和 q9;删掉 q9 就只剩 q0——一个「缺陷」。第二块的职责正是提供第二份拷贝把它抵消。这就是 QEC-Bank 那句「第二块不是装饰」。
Right. X0 = {q0, q3, q9} and Z0 = {q0, q1, q9} share q0 and q9; delete q9 and only q0 remains — one “defect”. The second block's job is precisely to supply the second copy that cancels it. That is the QEC-Bank's “block two is not decorative”.
查 2.2 与 3.1 的表:X0 与 Z0 各有哪几条腿?哪条腿属于 check×check 块?
Look up X0 and Z0 in the tables of §2.2 and §3.1: which legs do they have, and which one belongs to the check×check block?
把链合上:环面兄弟Close the chains: the toric sibling
导览第 ④ 步切到「periodic / toric」格点:「切换到周期格点去掉了两个端点。每颗星和每块面都是重量 4,L=3 时有 18 条边比特,环面存 2 个逻辑比特而平面贴片存 1 个。」直觉教程是先有环面、再剪开;这里反过来走,并且给出那个「2」的代数出处。 Stop ④ switches to the “periodic / toric” lattice: “Switching to the periodic lattice removes both endpoints. Every displayed star and plaquette has weight four, the lattice has 18 edge qubits at L=3, and the torus carries two logical qubits instead of the planar patch's one.” The intuition guide started from the torus and cut it open; here we walk the other way, and give the algebraic source of that “2”.
4.1合上一条链 = 多加一行,但它不独立Closing a chain = one more row, and it is dependent
开链 rep_parity(3) 有 3 个比特、2 条关系。把链首尾相接,就多出第三条关系「比特 2 与比特 0 相等」,矩阵变成 3×3。可是三行相加为零(每个比特恰被两条关系看到),新行没有带来新信息:秩rank:矩阵中真正独立的行数。开链 H 的两行独立,秩 2;闭链三行里只有两行独立,秩仍是 2。仍是 2。变化发生在转置那一侧:
The open chain rep_parity(3) has 3 bits and 2 relations. Join the ends and a third relation appears, “bit 2 equals bit 0”, making the matrix 3×3. But the three rows sum to zero (every bit is seen by exactly two relations), so the new row carries no new information: the rankThe number of genuinely independent rows. The open chain's two rows are independent, rank 2; of the closed chain's three rows only two are independent, rank still 2. stays 2. The change happens on the transpose side:
闭链closed: dim ker H = 1, dim ker Hᵀ = 1H = 因子矩阵;dim ker = 核的维数(被送到零的独立向量个数)H = factor matrix; dim ker = dimension of the kernel (independent vectors sent to zero)
这里 kerkernel(核):被矩阵送到零的向量全体。ker H 的一个元素是「通过所有检查的码字」;ker Hᵀ 的一个元素是「一组关系,乘起来什么也不说」——即检查之间的依赖。dim = 维数,独立元素的个数。 H 是「通过全部检查的码字」空间:开链与闭链都只有全 0 与全 1 两个码字,维数 1。而 ker Hᵀ 是「关系之间的依赖」:开链没有(维数 0,QEC-Bank 称之为「开链的代数签名」),闭链有一条(三行之和为零,维数 1)。超图积的逻辑比特数由两个因子的这两个维数决定:
Here kerThe kernel: all vectors the matrix sends to zero. An element of ker H is “a codeword passing every check”; an element of ker Hᵀ is “a set of relations whose product says nothing”, i.e. a dependency among checks. dim = dimension, the number of independent elements. H is the space of “codewords passing every check”: open or closed, only all-0 and all-1 qualify, dimension 1. But ker Hᵀ is “dependencies among relations”: the open chain has none (dimension 0, which the QEC-Bank calls “the algebraic signature of an open chain”), the closed chain has one (three rows summing to zero, dimension 1). The hypergraph product's logical count is fixed by these two dimensions of the two factors:
平面planar: 1·1 + 0·0 = 1 · 环面toric: 1·1 + 1·1 = 2k = 逻辑比特数;kA = dim ker HA(A 的码字数维数),kAᵀ = dim ker HAᵀ(A 的关系依赖数);B 同理k = number of logical qubits; kA = dim ker HA (codeword dimension of A), kAᵀ = dim ker HAᵀ (relation dependencies of A); likewise for B
比特数也跟着变:闭链有 3 条关系,check×check 块从 2×2 变成 3×3,n = 9 + 9 = 18(n = 物理比特数);检查数 3×3 + 3×3 = 18,但两族各有一条「全部相乘 = I」的依赖,独立的只有 16 条,k = 18 − 16 = 2(k = 逻辑比特数)。这与Toric Code 教程 5.3 节的记账 2L² − (2L² − 2) = 2(L = 环面边长)是同一件事的两种说法;那两条恒等式,就是 ker Hᵀ 里多出来的那一维。
The qubit count follows: the closed chain has 3 relations, the check×check block grows from 2×2 to 3×3, n = 9 + 9 = 18 (n = physical qubits); there are 3×3 + 3×3 = 18 checks, but each family has one “product of all = I” dependency, so only 16 are independent and k = 18 − 16 = 2 (k = logical qubits). This is the toric-code guide's §5.3 ledger 2L² − (2L² − 2) = 2 (L = side length of the torus) said a second way; those two identities are exactly the extra dimension in ker Hᵀ.
| 平面 [[13,1,3]](open)planar [[13,1,3]] (open) | 环面 [[18,2,3]](periodic)toric [[18,2,3]] (periodic) | |
|---|---|---|
| 因子矩阵factor matrix | 2×3, rank 2, dim ker Hᵀ = 0 | 3×3, rank 2, dim ker Hᵀ = 1 |
| 数据比特data qubits | 9 + 4 = 13 | 9 + 9 = 18 |
| 检查(X / Z)checks (X / Z) | 6 / 6, 全部独立all independent | 9 / 9, 各含一条依赖one dependency each |
| 检查重量check weight | 4(内部bulk)/ 3(边界boundary) | 全部 4all 4 |
| k | 1·1 + 0·0 = 1 | 1·1 + 1·1 = 2 |
| 出处provenance | verified · surface.build(L=3) | verified · toric.build(L=3) |
4.2在沙盘里来回切换Switch back and forth in the sandbox
下面先用动画看「剪开」。注意它的尺寸是 L=4,不是本页的 L=3。第 ① 格是 L=4 的环面码(每个方向 4 条边,共 32 个比特)。第 ② 格只是把所有绕回对面的边删掉:星检查按位置剩下 2、3 或 4 条腿(四个角上 2 条,其余边上 3 条),面检查剩下 0、2 或 4 条腿(两道剪口交叉处的那一块一条不剩,沿剪口的其余 6 块剩 2 条,内部 9 块完好);这一格是残缺的示意,不是一个码。第 ③ 格不是在第 ② 格上修补,而是换成一张重新画的 L=4 平面码:25 个比特、12 条星检查、12 条面检查,边界上的检查一律三条腿,左右两侧只截断面,上下两侧只截断星。导览的方向与动画相反(从平面合上成环面):平面码补回绕回的边,三腿检查长回第四条腿,比特数从 L²+(L−1)² 变成 2L²。然后是两个 L=3 沙盘:环面上画一条 Z 链,警报永远成对;平面上把同一条链画到左边或右边的毛边界(带悬边的那两侧),一端的警报会消失。注意:沙盘沿用直觉教程的画法,毛边界在左右;本页的静态图 1.1、3.1、5.1 用 QEC-Bank 导出的坐标,毛边界在上下,两者差 90°。环面版 [[18,2,3]] 在 BB 码教程里是检验约定的锚点条目,同一批数字会再次出现。
First the animation of “cutting open”. Note its size is L=4, not this page's L=3. Frame ① is the L=4 toric code (4 edges in each direction, 32 qubits). Frame ② only deletes every edge that wraps to the opposite side: stars keep 2, 3 or 4 legs depending on position (2 at the four corners, 3 elsewhere on the rim), faces keep 0, 2 or 4 (the one face where the two cuts cross keeps none, the other 6 along the cuts keep 2, the 9 interior faces are intact); this frame shows the damage and is not a code. Frame ③ is not a patched version of frame ②; it is a freshly drawn L=4 planar code: 25 qubits, 12 star checks, 12 face checks, every boundary check with three legs, the left and right sides truncating only faces and the top and bottom only stars. The tour goes the other way from the animation (closing the plane into a torus): the planar code regains its wrapping edges, three-leg checks regrow their fourth leg, and the qubit count goes from L²+(L−1)² to 2L². Then two L=3 sandboxes: paint a Z-chain on the torus and alarms always come in pairs; paint the same chain out to the left or right rough boundary of the plane (the sides with dangling edges) and one alarm disappears. Note that the sandboxes follow the intuition guide's drawing, rough boundaries left and right, while the static Figures 1.1, 3.1 and 5.1 use the QEC-Bank's exported coordinates, rough boundaries top and bottom: the two differ by 90°. The toric [[18,2,3]] is the anchor entry for checking conventions in the BB-code guide, where the same numbers reappear.
「边界还是把手」不是比喻,而是因子矩阵的余秩corank:行数减秩,即 dim ker Hᵀ——检查之间独立依赖的条数。开链 0,闭链 1。:开链 dim ker Hᵀ = 0 给平面的 1 个逻辑比特,闭链 dim ker Hᵀ = 1 给环面的 2 个。QEC-Bank 原话:「boundary versus handle is the corank of the classical factor matrix, not a metaphor.」
“Boundary versus handle” is not a metaphor but the corankRows minus rank, i.e. dim ker Hᵀ — the number of independent dependencies among checks. Open chain 0, closed chain 1. of the factor matrix: the open chain's dim ker Hᵀ = 0 gives the plane's one logical qubit, the closed chain's dim ker Hᵀ = 1 gives the torus's two. In the QEC-Bank's words: “boundary versus handle is the corank of the classical factor matrix, not a metaphor.”
边界是缺失的关联,与一次算出来的症状漫步Boundaries are missing incidences, and a computed syndrome walk
导览第 ⑤ 步回到平面,高亮左下角的 X0:「它的重量是 3,因为开链端点只有一条相邻关系;边界就是被画出来的代数余秩。」第 ⑦ 步把鼠标交给你。这一章先解释三腿,再用 QEC-Bank 算好的 q3 → q4 → q5 漫步,让一条链从一侧光边界走到另一侧。 Stop ⑤ returns to the plane and highlights X0 in the bottom-left corner: “Its weight is three because an open repetition endpoint has only one neighboring relation; the boundary is algebraic corank made visible.” Stop ⑦ hands you the mouse. This chapter explains the three legs, then uses the QEC-Bank's computed q3 → q4 → q5 walk to send one chain from one smooth boundary to the other.
5.1三条腿:Hᵀ 的端点行只有一个 1Three legs: an endpoint row of Hᵀ has a single 1
回到 2.1 的读法。X0 = (a,b) = (0,0):左块给上下两条腿 q0、q3;右块要找「B 的比特 0 参与的每条关系」——Hᵀ 的第 0 行是 (1 0),只有关系 0。于是只有一条水平腿 q9,左边没有 q(−1)。缺失的那条腿,是因子矩阵里缺失的那个 1;在闭链里 Hᵀ 的每一行都有两个 1,所以环面上没有三腿检查(第 4 章的表)。同理 Z0 = (0,0) 的右块 Hᵀ⊗I 找「A 的比特 0 参与的关系」,也只有一条,所以 Z0 缺下腿。
Back to the reading rule of §2.1. X0 = (a,b) = (0,0): the left block gives the vertical legs q0, q3; the right block looks for “every relation containing bit 0 of B” — row 0 of Hᵀ is (1 0), relation 0 only. So there is a single horizontal leg, q9, and no q(−1) to the left. The missing leg is a missing 1 in the factor matrix; in the closed chain every row of Hᵀ has two 1s, which is why the torus has no three-leg checks (Chapter 4's table). Likewise Z0 = (0,0): its right block Hᵀ⊗I looks for “relations containing bit 0 of A”, finds one, so Z0 lacks its lower leg.
于是边界的分工直接从矩阵读出:三腿 X 检查在 x=0 与 x=4 两列(左右)——直觉教程「两种边界」一章里的光边界;三腿 Z 检查在 y=0 与 y=4 两行(上下)——毛边界。注意方向:QEC-Bank 导出的几何把毛边界放在上下,比直觉教程的图转了 90°。本页的静态图 1.1、3.1、5.1 用 QEC-Bank 的方向;交互沙盘沿用直觉教程的方向(毛边界在左右)。
The boundaries' division of labour then reads straight off the matrix: three-leg X-checks fill the columns x=0 and x=4 (left/right) — the smooth boundary of the intuition guide's chapter on the two boundaries; three-leg Z-checks fill the rows y=0 and y=4 (top/bottom) — the rough boundary. Mind the orientation: the QEC-Bank's exported geometry puts the rough boundary at top and bottom, rotated 90° from the intuition guide's figures. The static Figures 1.1, 3.1 and 5.1 on this page use the QEC-Bank orientation; the interactive sandboxes keep the intuition guide's (rough boundaries left and right).
5.2症状 = 链的边界:q3 → q4 → q5Syndrome = the chain's boundary: q3 → q4 → q5
一组 X 错误写成 13 维的 0/1 向量 eX(出错的比特记 1)。哪些 Z 检查报警?就是 HZeX(模 2):第 i 个分量是「Z 检查 i 的支撑里有奇数个错误」。QEC-Bank 把这叫作「症状是错误链的∂」——∂ 读「边界」,链内部的每个检查被撞两次而抵消,只剩端点。QEC-Bank 用 L=3 矩阵直接算出的结果:
Write a set of X errors as a 13-entry 0/1 vector eX (1 on each faulty qubit). Which Z-checks fire? Exactly HZeX (mod 2): entry i says “Z-check i has an odd number of errors in its support”. The QEC-Bank calls this “the syndrome is the ∂ of the error chain” — ∂ read “boundary”: every check inside the chain is struck twice and cancels, only endpoints remain. Computed by the QEC-Bank directly from the L=3 matrices:
| 错误Error | 报警的检查Fired checks | 为什么Why |
|---|---|---|
| X 在on q4 | {Z2, Z3} | q4 同时在 Z2 = {q3,q4,q9,q11} 与 Z3 = {q4,q5,q10,q12} 里:内部错误,两个缺陷q4 lies in both Z2 = {q3,q4,q9,q11} and Z3 = {q4,q5,q10,q12}: a bulk error, two defects |
| Z 在on q4 | {X1, X4} | 对偶:HXeZ,q4 在 X1 与 X4 里The dual, HXeZ: q4 lies in X1 and X4 |
| X 在on q3 | {Z2} | q3 只属于 Z2;左边没有下一个 Z 检查——光边界吞掉一个端点q3 belongs to Z2 only; there is no next Z-check to its left — the smooth boundary swallows one endpoint |
| X 在on {q3, q4} | {Z3} | Z2 被撞两次归零,缺陷挪到 Z3Z2 is struck twice and resets; the defect moves to Z3 |
| X 在on {q3, q4, q5} | {} | Z3 也被撞两次;q5 右边同样没有 Z 检查。零警报,却不是稳定子——逻辑 X̄Z3 is struck twice as well; q5 has no Z-check to its right either. Zero alarms, yet not a stabilizer — the logical X̄ |
这正是直觉教程「边界吃掉警报」与「横跨串 = 逻辑算符」两节的矩阵版本;码距 3 就是这条横跨串的长度。
This is the matrix edition of the intuition guide's “the boundary swallows the alarm” and “spanning string = logical operator”; the distance 3 is the length of this spanning string.
为什么说 {q3, q4, q5} 不是稳定子?X 稳定子就是若干条 X 检查的乘积。把每条 X 检查写成 HX 的一行 0/1 向量,几条检查相乘就是这几行的模 2 和(同一个比特上 X·X = I,对应 1 + 1 = 0);所有这样的和组成的集合叫 HX 的行空间row space:一张 0/1 矩阵若干行的模 2 和的全体。HX 的行空间 = 全部 X 稳定子(写成 0/1 向量)。。要证明 {q3, q4, q5} 不在行空间里,不必试遍 6 行的 2⁶ = 64 种组合,找一个「证人」就够:Z 作用在竖直的一列 {q1, q4, q7} 上。对照 2.2 节的表,它与六条 X 检查的重叠分别是 X0:0 格;X1:{q1, q4} 2 格;X2:0;X3:0;X4:{q4, q7} 2 格;X5:0。全是偶数,所以它与每条 X 检查对易,也就与它们的任何乘积对易(乘积与它的重叠数 = 各行重叠数之和,偶 + 偶 = 偶)。而它与 {q3, q4, q5} 只在 q4 重叠,1 格,奇数,反对易。所以 X 作用在 {q3, q4, q5} 上不可能是 X 检查的乘积:它通过全部检查,却不是稳定子,是逻辑 X̄。
Why is {q3, q4, q5} not a stabilizer? An X stabilizer is a product of X-checks. Write each X-check as its 0/1 row of HX; multiplying checks adds their rows mod 2 (X·X = I on a shared qubit, matching 1 + 1 = 0), and the set of all such sums is the row spaceThe set of all mod-2 sums of rows of a 0/1 matrix. The row space of HX = all X stabilizers, written as 0/1 vectors. of HX. To show {q3, q4, q5} is not in it, there is no need to try all 2⁶ = 64 combinations of the 6 rows; one witness is enough: Z on the vertical column {q1, q4, q7}. From the table in §2.2, its overlaps with the six X-checks are X0: 0 cells; X1: {q1, q4}, 2 cells; X2: 0; X3: 0; X4: {q4, q7}, 2 cells; X5: 0. All even, so it commutes with every X-check and hence with every product of them (the overlap with a product is the sum of the rows' overlaps, and even + even = even). But it overlaps {q3, q4, q5} only in q4: 1 cell, odd, so they anticommute. Therefore X on {q3, q4, q5} cannot be a product of X-checks: it passes every check without being a stabilizer, which makes it the logical X̄.
译码器面对症状 s(报警的检查集合)时,选一条修复链 C 使 ∂C = s;设实际错误链是 E,则 ∂(E+C) = s + s = 0,E+C 通过全部检查。成败看的是奇偶,不是「E+C 里有没有横跨串」:数 E+C 与竖直列 {q1, q4, q7} 重叠几格(就是上面那个证人),偶数则 E+C 是稳定子,修复成功;奇数则留下一个逻辑 X̄,修复失败。例如 {q0, q1, q2} 与 {q3, q4, q5} 两条横跨串,每一条单独都是逻辑 X̄,合起来却恰好等于 X0·X1·X2(图 5.2):q9 被 X0 和 X1 各碰一次,q10 被 X1 和 X2 各碰一次,全部抵消,剩下的正是这六个比特。它与 {q1, q4, q7} 重叠 q1、q4 两格,偶数,无害。所以失败的判据是「横跨串的条数为奇数」。Z 型错误的部分分开数,用一条横向的 X 行(例如 {q3, q4, q5})做证人。怎样从症状挑出 C,交给译码器教程。
Given a syndrome s (the set of fired checks), a decoder picks a repair chain C with ∂C = s; if the actual error chain is E, then ∂(E+C) = s + s = 0, so E+C passes every check. Success or failure depends on a parity, not on whether E+C contains a spanning string: count how many cells E+C shares with the vertical column {q1, q4, q7} (the witness above). Even means E+C is a stabilizer and the repair succeeds; odd means a logical X̄ is left behind and the repair fails. For example, the two spanning strings {q0, q1, q2} and {q3, q4, q5} are each a logical X̄ on their own, yet together they equal exactly X0·X1·X2 (Fig. 5.2): q9 is hit once by X0 and once by X1, q10 once by X1 and once by X2, all of that cancels, and what is left is exactly these six qubits. The pair shares q1 and q4 with {q1, q4, q7}, two cells, even: harmless. So the failure criterion is “an odd number of spanning strings”. The Z-type part of an error is counted separately, with a horizontal X row (for example {q3, q4, q5}) as the witness. How to pick C from the syndrome is the decoders guide's job.
现在轮到导览第 ⑦ 步:自己画一条串,看它是否与全部检查对易。注意这个实验台来自共享引擎,用的是 d=5 的平面码(41 个比特、20 条星检查与 20 条面检查,共 40 条),比本页的 L=3 大,画法沿用直觉教程(比特在边上,毛边界在左右);最短的横跨串因此是 5 条边。
Now stop ⑦: draw a string yourself and see whether it commutes with every check. Note that this bench comes from the shared engine and uses a d=5 planar code (41 qubits, 20 star and 20 face checks, 40 in all), larger than this page's L=3, drawn as in the intuition guide (qubits on edges, rough boundaries left and right); the shortest spanning string therefore has 5 edges.
导出的电路文件还记录了什么?What else does the exported circuit file record?
circuit_memory_l3.yaml 除坐标与支撑外,还给每条检查一个辅助比特编号,并把 12 条检查的 CNOT 排成 4 层(每层 10 个门)。它还附两条「钩子故障」样本:X 检查 0 的辅助比特若在第 1 层后受一个 X 故障,会传播到数据比特 {q0, q3};Z 检查 6(即 Z0)同位置的 Z 故障传到 {q0, q9}。这类两比特钩子是电路级噪声与静态码距分家的原因,展开见译码器教程的电路级一节。本页只讨论静态检查矩阵。
Besides coordinates and supports, circuit_memory_l3.yaml assigns each check an ancilla index and arranges the 12 checks' CNOTs into 4 layers (10 gates each). It also ships two “hook fault” fixtures: an X fault on X-check 0's ancilla after layer 1 propagates to data qubits {q0, q3}; a Z fault at the same place on check 6 (that is, Z0) propagates to {q0, q9}. Such two-qubit hooks are why circuit-level noise and static distance part ways, developed in the decoders guide's circuit-level section. This page discusses the static check matrices only.
七步走完,与十个其他侧面Seven stops done, and ten other facets
回放整条论证:两份 2×3 的重复码矩阵 H → 两块比特(9 + 4 = 13)与线性坐标 → X 检查 = 关系 × 比特(H⊗I 竖、I⊗Hᵀ 横)→ Z 检查对调(I⊗H 横、Hᵀ⊗I 竖)→ 两块各贡献一份 H⊗Hᵀ,模 2 相消 → 合上链让 dim ker Hᵀ 从 0 变 1,k 从 1 变 2(k = 逻辑比特数)→ 三腿检查 = Hᵀ 端点行的单个 1 → 症状 = ∂链,q3 → q4 → q5 从一侧光边界走到另一侧、零警报即 X̄。每一步在导览里都带 verified 标签,每一个数字都能用 reproduce.py 重算。
Replay the whole argument: two 2×3 repetition matrices H → two qubit blocks (9 + 4 = 13) with linear coordinates → X-check = relation × bit (H⊗I vertical, I⊗Hᵀ horizontal) → Z-checks swap (I⊗H horizontal, Hᵀ⊗I vertical) → each block contributes one H⊗Hᵀ, cancelling mod 2 → closing the chains lifts dim ker Hᵀ from 0 to 1 and k from 1 to 2 (k = logical qubits) → three-leg checks = the single 1 in an endpoint row of Hᵀ → syndrome = ∂chain, q3 → q4 → q5 crossing from one smooth boundary to the other, zero alarms meaning X̄. Every stop carries a verified label in the tour, and every number can be recomputed with reproduce.py.
符号与读法Symbols & how to read them
| 符号Symbol | 名称与读法Name & how to read it | 在本篇中的含义Meaning on this page |
|---|---|---|
| H | 奇偶矩阵parity-check matrix | 重复码 rep_parity(3) 的 2×3 矩阵 [1 1 0 ; 0 1 1]:行 = 关系,列 = 比特。两个因子 A、B 各一份。The 2×3 matrix [1 1 0 ; 0 1 1] of rep_parity(3): rows = relations, columns = bits. One copy each for factors A and B. |
| ⊗ | 圆圈乘,读「克罗内克积」或「张量积」A circled times, read “Kronecker” or “tensor” product | A ⊗ B:把 A 的每个元素 a 换成整块 a·B。H ⊗ I 让 H 作用于第一个索引、放过第二个。A ⊗ B: replace each entry a of A by the block a·B. H ⊗ I lets H act on the first index and spares the second. |
| ᵀ | 上标 T,读「转置」Superscript T, read “transpose” | 行列互换。Hᵀ 的第 j 行 = 比特 j 参与的关系;端点行只有一个 1,这就是三腿检查。Swap rows and columns. Row j of Hᵀ = the relations bit j joins; an endpoint row has a single 1 — the three-leg check. |
| In | 单位矩阵identity matrix | n×n,对角线全 1。I₃ 配 bit 索引,I₂ 配关系索引。n×n with 1s on the diagonal. I₃ pairs with bit indices, I₂ with relation indices. |
| a × b | 叉号,读「配对」A cross, read “paired with” | 「各取一个」:bit×bit = A 的比特配 B 的比特;A check 0 × B bit 1 = 关系 0 配比特 1。不是乘法。“One of each”: bit×bit = a bit of A paired with a bit of B; A check 0 × B bit 1 = relation 0 paired with bit 1. Not multiplication. |
| F₂ | 读「F 二」,也写 GF(2)Read “F two”, also GF(2) | 只有 0、1 且 1+1=0 的数系;「模 2」即在此计算。HXHZᵀ 的 2 在这里等于 0。The number system with only 0 and 1 where 1+1=0; “mod 2” means computing here. The 2s in HXHZᵀ equal 0 here. |
| ker · rank | 核 · 秩kernel · rank | ker H = 被送到零的向量(码字);ker Hᵀ = 关系之间的依赖;rank = 独立行数;corank(余秩)= 行数 − rank = dim ker Hᵀ。ker H = vectors sent to zero (codewords); ker Hᵀ = dependencies among relations; rank = number of independent rows; corank = rows − rank = dim ker Hᵀ. |
| ∂ | 弯体 d,读「边界」A curly d, read “boundary” | 链的端点集;症状 = ∂(错误链) = HZeX 或 HXeZ。The endpoint set of a chain; syndrome = ∂(error chain) = HZeX or HXeZ. |
| eX | 错误向量error vector | 13 维 0/1 向量,出错比特处为 1;HZeX 的第 i 位 = Z 检查 i 是否报警。A 13-entry 0/1 vector, 1 on faulty qubits; entry i of HZeX = whether Z-check i fires. |
| [[n,k,d]] | 双层方括号Double brackets | 量子码的参数:n 物理比特、k 逻辑比特、码距 d。本篇:[[13,1,3]] 与 [[18,2,3]]。Quantum code parameters: n physical qubits, k logical qubits, distance d. Here: [[13,1,3]] and [[18,2,3]]. |
| ⇒ | 双线箭头,读「推出」A double arrow, read “implies” | A ⇒ B:由 A 可得 B。A ⇒ B: from A one may conclude B. |
本篇新增词汇New terms on this page
| 术语Term | 白话定义Plain definition |
|---|---|
| 导览(tour)guided tour | QEC-Bank 每个条目的七步脚本 + 通用播放器;只读构造器导出的数据,每步带出处标签。Each QEC-Bank entry's seven-step script plus a generic player; reads only constructor exports, each stop with a provenance label. |
| 超图积(HGP)hypergraph product | 把两个经典奇偶矩阵合成一个 CSS 量子码的构造;H_X = [H⊗I | I⊗Hᵀ],H_Z = [I⊗H | Hᵀ⊗I]。The construction fusing two classical parity matrices into one CSS quantum code; H_X = [H⊗I | I⊗Hᵀ], H_Z = [I⊗H | Hᵀ⊗I]. |
| 因子 A、Bfactors A, B | 超图积的两个输入经典码;本篇都是长度 3 的重复码。The two classical input codes of the product; both length-3 repetition codes here. |
| bit×bit / check×check 块bit×bit / check×check blocks | 超图积的两块量子比特:L² 个与 (L−1)² 个;L=3 时 q0–q8 与 q9–q12。The product's two qubit blocks, L² and (L−1)² of them; q0–q8 and q9–q12 at L=3. |
| 缺失的关联missing incidence | 开链端点比特只参与一条关系,Hᵀ 对应行只有一个 1;在格点上表现为三腿检查,即边界。An open-chain endpoint bit joins only one relation, so its row of Hᵀ has a single 1; on the lattice this is a three-leg check, i.e. the boundary. |
| 支撑support | 一条检查作用到的比特集合,即矩阵行中 1 的位置。The set of qubits a check acts on, i.e. the positions of the 1s in its row. |
| 行空间row space | 一张 0/1 矩阵若干行的模 2 和的全体;HX 的行空间就是全部 X 稳定子。判断一个串在不在里面,可以找一个与每行都对易、却与它反对易的证人。All mod-2 sums of rows of a 0/1 matrix; the row space of HX is the set of all X stabilizers. To show a string is not in it, find a witness that commutes with every row but anticommutes with the string. |
| 出处标签provenance label | QEC-Bank 对每条数据的来源分级;导览七步全为 verified(机器重算)。其他级别如 bounded、claimed 见参数与证书两个侧面。The QEC-Bank's grading of where each datum comes from; all seven tour stops are verified (machine-recomputed). Other grades such as bounded and claimed appear in the parameters and certificates facets. |
延伸阅读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)
超图积的原始论文;导览七步中六步引用它。QEC-Bank 键:tillich2009quantumThe original hypergraph-product paper, cited by six of the seven tour stops. QEC-Bank key: tillich2009quantum - A. Yu. Kitaev, “Fault-tolerant quantum computation by anyons” (2003)
环面码本体;第 ④ 步的环面兄弟引用它。QEC-Bank 键:kitaev2003faultThe toric code itself; cited at stop ④ for the toric sibling. QEC-Bank key: kitaev2003fault - E. Dennis, A. Kitaev, A. Landahl, J. Preskill, “Topological quantum memory” (2002)
边界、症状配对与阈值理论的奠基文;第 ④、⑤ 步引用。QEC-Bank 键:dennis2002topologicalThe founding paper for boundaries, syndrome matching and threshold theory; cited at stops ④ and ⑤. QEC-Bank key: dennis2002topological - S. B. Bravyi, A. Yu. Kitaev, “Quantum codes on a lattice with boundary” (1998)
通过格点边界引入平面 surface code 的文章。QEC-Bank 键:bravyi1998quantumThe paper introducing the planar surface code through lattice boundaries. QEC-Bank key: bravyi1998quantum - M. Lutz, “Toric code as a hypergraph product”
导览交互设计的灵感来源(tour.yaml 中注明);lutzm.ax。The acknowledged design inspiration for the tour's interaction (noted in tour.yaml); lutzm.ax.
本篇只讨论 QEC-Bank 构造器交付的未旋转平面族,且只展开 L=3;[[25,1,4]] 与 [[41,1,5]] 的坐标同一公式给出,未逐条列出。所有支撑、重叠计数与症状漫步都是静态检查矩阵上的结论,假设测量完美;辅助比特、CNOT 分层与钩子故障只在 5.2 的折叠盒里提及。「码距 3」本页未证明——L=3、4 的码距由 QEC-Bank 穷举验证(verified),L=5 为 bounded;证明与证书见参数与实例侧面。环面兄弟 [[18,2,3]] 的数字来自 toric.build(L=3)(verified),其闭链矩阵的秩分析是本篇按 QEC-Bank 的 HGP 页面复述的。
This page treats only the unrotated planar family shipped by the QEC-Bank constructor, and unfolds only L=3; [[25,1,4]] and [[41,1,5]] follow the same coordinate formula and are not listed. Every support, overlap count and syndrome walk is a statement about the static check matrices, assuming perfect measurement; ancillas, CNOT layers and hook faults are mentioned only in §5.2's fold-out. Distance 3 is not proved here — distances for L=3, 4 are exhaustively verified by the QEC-Bank (verified), L=5 is bounded; proofs and certificates live in the parameters facet. The toric sibling's [[18,2,3]] numbers come from toric.build(L=3) (verified); its closed-chain rank analysis is restated here from the QEC-Bank's HGP page.
条目总览 · 直觉 · 导览(本篇) · 表示阶梯 · 参数与实例 · 形式化 IR 与证书 · 译码器 · 逻辑操作 · 用例与实现 · 关系 · 推导与指南 · 参考文献 · 在 QEC-Bank 中查看此条目 →
Entry overview · Intuition · Guided tour (this page) · Representation ladder · Parameters & instances · Formal IR & certificates · Decoders · Logical operations · Use cases & realizations · Relations · Derivations & guides · References · Open in the QEC-Bank →