目录Contents
速查回顾:六条随身公式Express recap: six formulas to carry
《从高考数学到 Toric Code》的全部装备压缩成六条,分别出自该教程的 3.1 节(①)、3.2 节(②)、4.2 节(③)、4.3 节(④)、4.4 节(⑤)与 4.5 节(⑥);任何一条觉得生疏,点过去重修即可。正文里引用本教程内定义的橙色虚线点一下会原地弹出小卡片,引用环面码教程的地方则直接链到那一节;希腊字母与新符号(浅灰点线)点一下会告诉你它怎么读,页尾附符号读音表。打开《从高考数学到 Toric Code》→ The entire kit of “From High-School Math to the Toric Code” compressed to six lines, drawn from its §3.1 (①), §3.2 (②), §4.2 (③), §4.3 (④), §4.4 (⑤) and §4.5 (⑥); if any feels rusty, follow the link and revisit. Amber dashed citations of definitions made in this tutorial pop up a small in-place card; citations of the toric tutorial link straight to the section. Greek letters and novel symbols (faint grey dotted) click to reveal how they are read, with a full table at the end. Open “From High-School Math to the Toric Code” →
③ PQ = (−1)cQP (c = X↔Z 碰撞格数collision cells) · ④ P± = (I±S)/2, p± = |P±ψ|²
⑤ 编码态encoded states: Sψ = ψ (∀倒写的 A,读「对所有」:对清单上的每一条 S 都成立。An upside-down A, read “for all”: holds for every S on the list.S 于清单on the list), k = n − r (r = 独立检查的条数,k = 逻辑比特数,同 [[n, k, d]];前提:检查两两对易,且没有哪几条检查乘起来等于 −I,否则没有任何态能同时通过全部检查。本页的检查每条都是「全 X」或「全 Z」、前面都是 + 号:全 X 的检查乘起来仍是前面带 + 的全 X 串,全 Z 同理,两者再相乘只有两部分都是 I 时才等于单位,而那时符号是 +,所以 −I 永远乘不出来r = number of independent checks, k = number of logical qubits, as in [[n, k, d]]; provided the checks commute pairwise and no product of checks equals −I, otherwise no state passes all checks at once. On this page every check is all-X or all-Z with a + sign: a product of all-X checks is again an all-X string with a + sign, likewise for Z, and the two parts multiply to the identity only when both are I, with sign +; so −I can never come out) · ⑥ 警报 ⇔ 反对易alarm ⇔ anticommute
环面码速览:L×L 周期网格,边上比特(n = 2L²);星 Av = XXXX 与面 Bp = ZZZZ 因「角连两边」全体对易;∏A = ∏B = I 两条恒等式给 k = 2;Z-错误连成链,症状 = 链的端点(∂链);可收缩闭圈 = 面检查乘积 = 恒等,缠绕圈 = 逻辑算符 Z̄、X̄,交叉一次故反对易;码距 d = L。两副眼镜与沙盘,一分钟热身:
The toric code at a glance: an L×L periodic grid with qubits on edges (n = 2L²); stars Av = XXXX and plaquettes Bp = ZZZZ all commuting by “a corner touches two sides”; the identities ∏A = ∏B = I give k = 2; Z errors form chains with syndrome = endpoints (∂chain); contractible closed loops = products of plaquettes = identity, winding loops = the logicals Z̄, X̄, crossing once hence anticommuting; distance d = L. One minute of warm-up with the two lenses and the sandbox:
剪开环面Cutting the torus open
周期边界要求最右一列与最左一列直接连线——对平面芯片是工艺灾难。剪开是必然的;问题只在于剪开的代价,以及如何优雅地收边。 Periodic boundaries demand direct wiring from the rightmost column to the leftmost — a fabrication disaster on planar chips. Cutting is inevitable; the only questions are its price, and how to hem the cut elegantly.
代价清单先摆出来。环面的 k = 2 依赖两条恒等式 ∏Av = ∏Bp = I,而恒等式依赖「每条边恰被两颗星、两块面分享」的完美均匀——剪开边缘后立刻失效。此外边缘的检查会缺腿:是把缺腿检查扔掉、还是收编?三步手术看全程;注意第 ③ 步的收边分工——它不是美化,而是设计:
Price list first. The torus's k = 2 rested on the identities ∏Av = ∏Bp = I, which rested on the perfect uniformity “every edge shared by exactly two stars and two faces” — dead on arrival at a cut edge. Rim checks also lose legs: discard them or enlist them? Watch the three-step surgery, and mind step ③'s division of labour — it is design, not cosmetics:
两种边界,与一个完全平方Two boundaries, and one perfect square
收边方案:左右两侧保留悬挂半边、只截断面检查(毛/粗糙边界);上下两侧收干净、只截断星检查(光/光滑边界)。然后重新记账——答案是一个漂亮的完全平方。 The hemming plan: left/right keep dangling half-edges and truncate only faces (the rough boundary); top/bottom are hemmed clean and truncate only stars (the smooth boundary). Then redo the ledger — the answer is a perfect square.
对易定理安然无恙:「角连两边」是纯局部论证,三腿检查照样适用(可在下方开启检查显示逐对核验)。记账用尺寸参数 d:
The commutation theorem survives intact: “a corner touches two sides” is purely local and applies to three-leg checks unchanged (toggle the checks below and verify pair by pair). The ledger, with size parameter d:
补课 · 为什么平面上一条依赖都没有Catch-up · Why the plane has no dependency at all
论证与环面上相同(《从高考数学到 Toric Code》补课 5.A):一批星的乘积为 I,当且仅当每条边的两个端点同进同出这批星。悬边只有一个顶点端点(另一头伸出芯片),所以悬边上的星不能被挑;于是它的邻居也不能挑,扩散后一颗都不能挑。面同理:光边界上的横边只挨着一块面,那块面不能挑,扩散后一块都不能挑。星与面混挑时 X 与 Z 不会抵消。所以没有检查是其他检查的乘积,r = 2d(d − 1)。在下面的蓝图上走一遍:左上角的星腿是 1、2、10,1 号比特只属于它,它不能挑;其余 5 颗星依次被排除。
The argument is the torus one (Catch-up 5.A of “From Gaokao Math to the Toric Code”): a set of stars multiplies to I exactly when both endpoints of every edge are in the set or both out. A dangling edge has only one vertex endpoint (its other end leaves the chip), so the star at a dangler cannot be picked; then neither can its neighbours, and the spreading rules out every star. Faces likewise: a horizontal edge on a smooth boundary borders only one face, so that face cannot be picked, and none can. Mixing stars and faces cannot cancel X against Z. So no check is a product of others, and r = 2d(d − 1). Walk it on the blueprint below: the top-left star has legs 1, 2, 10; qubit 1 belongs to it alone, so it cannot be picked; the other 5 stars are then ruled out in turn.
下面是 d = 3 的完整蓝图:13 个比特全部编号,四条边界标了名字。点上下两排的顶点看三腿星(光边界),点最左、最右一列的方块看三腿面(毛边界);「显示 Z̄」「显示 X̄」给出第 3 章的逻辑串。
Below is the complete d = 3 blueprint: all 13 qubits numbered and the four boundaries named. Click a vertex in the top or bottom row for a three-legged star (smooth boundary), a square in the leftmost or rightmost column for a three-legged face (rough boundary); “Show Z̄” and “Show X̄” display the logical strings of Chapter 3.
环面的两条「白送恒等式」被边界没收,k 从 2 落到 1——但恰好落在 1 而非 0,对任何 d 成立。这块平面版图就是表面码:一块存单个逻辑比特、保护力随 d 增长的贴片。
The boundary confiscates the torus's two free identities and k falls from 2 to exactly 1 — never 0 — for every d. This planar patch is the surface code: a tile storing one logical qubit with protection growing in d.
对。再加 220 条检查各配一个辅助比特(第 4 章),一个 d=11 逻辑比特约需 441 个物理比特——「上千物理比特换一个好逻辑比特」的说法正是这样长出来的。(顺带:45° 旋转版图能省到 d² = 121 个数据比特,见尾声。)
Right. Add one ancilla per check (220 of them, Ch. 4) and a d=11 logical qubit costs ≈441 physical ones — exactly how “a thousand physical per good logical” claims arise. (Aside: the 45°-rotated layout thrifts to d² = 121 data qubits; see the epilogue.)
n = d² + (d−1)²,代入 d = 11。
n = d² + (d−1)² at d = 11.
终止在边界上的链,与横跨的逻辑串Chains dying on boundaries, and spanning logicals
环面上症状必然成对(∂链 有偶数个点)。平面打破了这条铁律:链的端点若落在合适的边界上,那里没有检查可报警——警报凭空少一个。这既改写译码规则,也给了逻辑算符新的形式。 On the torus, syndromes come in pairs (∂chain has even size). The plane breaks that law: let a chain end on the right kind of boundary and no check exists there to alarm — one alarm simply vanishes. This rewrites decoding, and re-houses the logical operators.
机理照旧是碰撞定理:Z-链的端点警报来自「被奇数次碰到的星」。让链一路画到左侧悬边并停在那里——悬边外侧本该有的下一颗星根本不存在,于是那一端零警报。分工严格:Z-链只能死在毛边界(左右);把端点搭到光边界的边上,那里的三腿星照样报警。X-链镜像:只能死在光边界(上下)。在沙盘里验证两种命运:
The mechanism is still the collision theorem: a Z-chain's endpoint alarm is “a star struck an odd number of times”. Draw the chain onto a left-side dangler and stop — the next star beyond the dangler's tip simply does not exist, so that end alarms nothing. The division is strict: Z-chains may die only on the rough boundary (left/right); land an endpoint on a smooth-boundary edge and its three-leg star alarms as usual. X-chains mirror: they die only on the smooth boundary (top/bottom). Verify both fates in the sandbox:
推到极端:两端都死在毛边界的 Z-串——从最左悬边横穿到最右悬边。零警报、通过全部检查;它是检查的乘积吗?用对易性审计:这条横跨串与竖跨的 X̄-串(上光边界到下光边界)恰好交叉一次,反对易;而任何面检查的乘积都与 X̄ 对易(X̄ 与每块面共享 0 或 2 边)。反对易 ≠ 对易——矛盾,故它不是乘积。按定义,它就是逻辑算符 Z̄;同一论证给出 X̄,且二者反对易——恰好一对,与 k = 1 吻合。最短横跨用 d 条边 ⇒ 码距 d(没有更短逻辑算符的理由见补课 3.A)。
Push to the extreme: a Z-string dying on the rough boundary at both ends — leftmost dangler clean across to a rightmost one. Zero alarms, passes every check; is it a product of checks? Audit with commutation: this spanning string crosses the vertical X̄-string (smooth top to smooth bottom) exactly once — anticommutes; yet any product of face checks commutes with X̄ (X̄ shares 0 or 2 edges with every face). Anticommuting ≠ commuting — contradiction, so it is no product. By definition it is the logical Z̄; the same argument yields X̄, and the two anticommute — exactly one pair, matching k = 1. The shortest crossing uses d edges ⇒ distance d (why no logical operator is shorter: Catch-up 3.A).
「有横跨串」还不等于「是逻辑算符」,要数奇偶。看两条平行的横跨串:第 1 行的 Z1Z2Z3 与第 2 行的 Z4Z5Z6(编号见第 2 章的蓝图)。每条单独看都从左毛边界走到右毛边界、零警报,都是 Z̄。两条一起做呢?把夹在它们中间的第 1 行 3 块面检查乘起来:Z1Z4Z10 · Z2Z5Z10Z11 · Z3Z6Z11,比特 10、11 各出现两次而抵消(Z·Z = I),剩下的恰好是 Z1Z2Z3Z4Z5Z6。所以两条横跨串合起来是检查的乘积,对编码态毫无作用:做两次 Z̄ 等于什么都没做。判据因此是奇偶:一条零警报的 Z 串与 X̄(比特 2、5、8)共享奇数个比特,它就是 Z̄(乘上若干面检查);共享偶数个,它就是面检查的乘积,无害。上面两条各与 X̄ 共享 1 个比特,合起来共享 2 个(比特 2 和 5),偶数。这个数为什么靠得住:每块面检查与 X̄ 共享 0 或 2 个比特,乘进来不改变奇偶,而 Z̄ 共享 1 个;零警报的 Z 串只有这两类(补课 3.A 末尾数了一遍)。按下「两条横跨串」看这个例子:
“Contains a spanning string” is not yet “is a logical operator”; you have to count parity. Take two parallel spanning strings: Z1Z2Z3 along row 1 and Z4Z5Z6 along row 2 (numbering as in Chapter 2's blueprint). Each on its own runs from the left rough boundary to the right one with zero alarms, and each is Z̄. What about both together? Multiply the 3 face checks of row 1 that sit between them: Z1Z4Z10 · Z2Z5Z10Z11 · Z3Z6Z11; qubits 10 and 11 appear twice and cancel (Z·Z = I), leaving exactly Z1Z2Z3Z4Z5Z6. So the two spanning strings together are a product of checks and do nothing to encoded states: applying Z̄ twice is the same as doing nothing. The criterion is therefore a parity: an alarm-free Z string that shares an odd number of qubits with X̄ (qubits 2, 5, 8) is Z̄ (times some face checks); one that shares an even number is a product of face checks and harmless. The two strings above share 1 qubit each with X̄, 2 together (qubits 2 and 5), which is even. Why this count can be trusted: every face check shares 0 or 2 qubits with X̄, so multiplying one in does not change the parity, while Z̄ shares 1; and alarm-free Z strings come in exactly these two kinds (counted at the end of Catch-up 3.A). Press “Two spanning strings” to see the example:
补课 · 为什么码距恰好是 dCatch-up · Why the distance is exactly d
取一条不触发任何星警报的 Z 串。每个顶点碰到偶数条串边,所以串边分成若干段:闭合圈,或两端停在悬边外端(没有顶点处)的路。① 闭合圈与 ② 两端落在同一侧毛边界的路,都与边界围出一块面,它们等于这块面里面检查的乘积(内部边成对抵消;贴毛边界的面在那一侧没有腿),对编码态恒等。③ 从左毛边界到右毛边界的路。只由 ①② 组成的串是面检查的乘积,所以一个真正的(不是检查乘积的)Z 型逻辑算符至少含一段 ③;含偶数段 ③ 时它仍可能是面检查的乘积,正文的两条横跨串就是例子,这里的下界只需要「至少一段」。③ 型路从横坐标 0 走到 d,每横移一格用一条横边,至少 d 条;第 2 行的直线串恰好 d 条。
Take a Z string that sets off no star alarm. Every vertex touches an even number of string edges, so the string splits into pieces: closed loops, or paths ending at the outer ends of danglers (where there is no vertex). ① A closed loop and ② a path with both ends on the same rough side each enclose, with the boundary, a patch of faces; they equal the product of that patch's face checks (interior edges cancel in pairs; faces against a rough boundary have no leg on that side), and act as the identity on encoded states. ③ A path from the left rough boundary to the right one. A string made only of pieces ① and ② is a product of face checks, so a genuine Z-type logical operator (one that is not a product of checks) contains at least one piece ③. With an even number of ③ pieces the string can still be a product of face checks, as the two spanning strings in the main text show; the lower bound here needs only “at least one”. A path of kind ③ goes from horizontal coordinate 0 to d, one horizontal edge per unit step, so at least d edges; the straight string along row 2 has exactly d.
X 串不能照抄「一定从上穿到下」:一颗星本身就是一条零面警报的 X 串,却哪儿也不横跨,比如中间的星 X4X5X10X12。要换一副「对偶」的眼光:每条边都被一条短的对偶线段横穿,这条线段连接边两侧的两块面;上下两排横边只挨着一块面,它们的对偶线段一头伸出芯片,落在光边界外。X 串不触发面警报,就是每块面碰到偶数条串边,于是串边的对偶线段同样分成三类:① 对偶闭圈,例如绕一个内部顶点一圈,就是上面那颗星;② 两端都伸出同一侧光边界的对偶路,例如左上角的星 X1X2X10(从上方穿过边 1 进入左上面,穿过边 10 进入中上面,再穿过边 2 回到上方);③ 从上光边界穿到下光边界的对偶路。①② 围住若干顶点,等于这些顶点上星的乘积。③ 型对偶路从上方外侧进入第 1 行面要穿过第 1 行的一条横边,每往下进入一行面又要穿过一行横边,最后穿过第 d 行的一条横边出去,所以每行至少一条,共 ≥ d 条;中间一列的 X̄ = X2X5X8 恰好 d 条。
For X strings you cannot simply say “it must run from top to bottom”: a star is itself an X string with no face alarm, yet it spans nothing, for example the middle star X4X5X10X12. Switch to the “dual” view: every edge is crossed by a short dual segment joining the two faces on either side of it; the top and bottom rows of horizontal edges touch only one face each, so their dual segments stick out of the chip, beyond the smooth boundary. An X string with no face alarm means every face touches an even number of string edges, so the dual segments of the string split into the same three kinds: ① dual closed loops, for example once around an interior vertex, which is the star above; ② dual paths with both ends leaving through the same smooth side, for example the top-left star X1X2X10 (in from above across edge 1 into the top-left face, across edge 10 into the top-middle face, and back out above across edge 2); ③ dual paths from the top smooth boundary to the bottom one. Pieces ① and ② enclose some vertices and equal the product of those vertices' stars. A dual path of kind ③ enters the first row of faces from outside by crossing a horizontal edge of row 1, crosses one more row of horizontal edges each time it moves down a row of faces, and leaves by crossing a horizontal edge of row d; so at least one per row, ≥ d in total. The middle-column X̄ = X2X5X8 uses exactly d.
最后是混合算符:某些比特上 X、某些上 Z、某些上 Y(同一比特上 X 与 Z 都有)。把它拆成 X 部分 PX 与 Z 部分 PZ。面检查全是 Z,只会和 PX 碰撞,所以整个算符不触发面警报 ⇔ PX 不触发;同理,不触发星警报 ⇔ PZ 不触发。两部分因此各自通过全部检查。如果 PX 是星的乘积、PZ 是面的乘积,整个算符就是检查的乘积再乘一个数(±1 或 ±i),在编码态上只是整体乘一个数,不是逻辑算符。所以一个真正的逻辑算符里,PX 与 PZ 至少有一个本身就是真正的逻辑算符,按上面两段它至少占 d 个比特;而整个算符在 PX 或 PZ 用到的每个比特上都不是 I,它的比特数不少于其中任一部分的比特数,也 ≥ d。故 dX = dZ = d,码距为 d。d = 2、3、4 的全部更短 Z 串已由计算机逐个枚举,没有一条是逻辑算符;d = 2、3 连同 X、Y、Z 混合的所有更短算符也逐个查过。
Finally, mixed operators: X on some qubits, Z on others, Y (both X and Z on the same qubit) on others. Split one into its X part PX and its Z part PZ. Face checks are all Z, so they collide only with PX: the whole operator sets off no face alarm ⇔ PX sets off none; likewise, no star alarm ⇔ PZ sets off none. So each part passes all checks on its own. If PX is a product of stars and PZ a product of faces, the whole operator is a product of checks times a number (±1 or ±i), which only multiplies encoded states by that number; it is not a logical operator. Hence in a genuine logical operator at least one of PX, PZ is itself a genuine logical operator, which by the two paragraphs above occupies at least d qubits; and the whole operator is not I on any qubit used by PX or PZ, so its weight is at least that of either part, again ≥ d. Hence dX = dZ = d, and the distance is d. For d = 2, 3, 4 every shorter Z string was enumerated by computer, and none is a logical operator; for d = 2, 3 every shorter operator mixing X, Y and Z was checked as well.
为什么奇偶是完整判据(正文第 3 章两条横跨串那一段的依据)。数一数零警报的 Z 串有多少条:13 个比特的 Z 串共 213 条,6 颗星彼此独立(补课 2.A),每颗星的「不报警」条件恰好筛掉一半,剩 213−6 = 27 = 128 条。面检查的乘积有 26 = 64 种(6 块面彼此独立,挑法各不相同),正好一半。Z̄ 不在这一半里(它与 X̄ 反对易),把 Z̄ 分别乘上这 64 种面乘积,得到另外 64 条,它们都与 X̄ 交叉奇数次。两半合起来正好 128 条,所以零警报的 Z 串只有这两类:与 X̄ 交叉偶数次的是面检查乘积,奇数次的是 Z̄ 乘面检查乘积。一般的 d 同样成立:n − d(d − 1) 与 d(d − 1) 恰好差 1(第 2 章的完全平方),零警报的串正好是面乘积的 2 倍。
Why parity is the whole criterion (the basis of the two-spanning-strings paragraph in Chapter 3). Count the alarm-free Z strings: there are 213 Z strings on 13 qubits; the 6 stars are independent (Catch-up 2.A), and each star's “no alarm” condition removes exactly half, leaving 213−6 = 27 = 128. Products of face checks number 26 = 64 (the 6 faces are independent, so different choices give different products), exactly half. Z̄ is not in that half (it anticommutes with X̄); multiplying Z̄ by each of the 64 face products gives another 64 strings, all crossing X̄ an odd number of times. Together that is all 128, so alarm-free Z strings come in exactly these two kinds: an even number of crossings with X̄ means a product of faces, an odd number means Z̄ times a product of faces. The same holds for every d: n − d(d − 1) exceeds d(d − 1) by exactly 1 (Chapter 2's perfect square), so there are exactly twice as many alarm-free strings as face products.
学名一瞥:相对同调A glimpse of the scholarly name: relative homology
环面上逻辑类按「绕不绕」分类(只看绕的圈数的奇偶),数学名叫一维同调 H₁。平面贴片上换成按「跨不跨」分类,数学名叫相对同调,写作 H₁(M, R; ℤ₂)。M 是整块贴片;R 是允许链端停靠、不报警的那部分边界,对 Z 串就是左右两条毛边界;ℤ₂ 表示每条边的系数只取 0 或 1(一条边用两次就抵消,正是 Z·Z = I)。「相对于 R」的意思是:链的端点落在 R 上不算端点。两条链若相差若干面检查的乘积,就算同一类。在这块贴片上结果恰好两类:与 X̄ 交叉偶数次的(面检查乘积,无害)和交叉奇数次的(Z̄ 那一类),对应一个逻辑比特;补课 3.A 末尾的计数就是这句话的算术版本。R 必须写明:如果把整圈边界都当作 R,任何一条两端落在边界上的链都能和一段边界一起围住若干面、被面挡回边界上,于是只剩一类,H₁ 等于 0,没有逻辑比特。X 串用对偶格做同一件事:每块面算一个点,每条边的对偶线段连接它两侧的面,R 换成上下两条光边界,得到的同样是两类,与 Z̄ 交叉偶数次或奇数次。表面码文献里的各种边界花样(多段毛/光边界、洞、缺角)都用这套记法描述。
On the torus, logical classes are sorted by winding (only the parity of the number of windings counts); the mathematical name is first homology, H₁. On the patch they are sorted by spanning, and the mathematical name is relative homology, written H₁(M, R; ℤ₂). M is the whole patch; R is the part of the boundary where chain ends may stop without an alarm, for Z strings the two rough sides, left and right; ℤ₂ says each edge carries a coefficient 0 or 1 (an edge used twice cancels, which is Z·Z = I). “Relative to R” means: an end lying on R does not count as an end. Two chains that differ by a product of face checks are in the same class. On this patch there are exactly two classes: an even number of crossings with X̄ (products of faces, harmless) and an odd number (the class of Z̄), one logical qubit; the count at the end of Catch-up 3.A is the arithmetic version of this sentence. R must be stated: if the whole boundary circle were taken as R, every chain with both ends on the boundary would enclose, together with a piece of the boundary, some faces and could be pushed back onto the boundary, leaving a single class; then H₁ is 0 and there is no logical qubit. X strings do the same thing on the dual lattice: each face becomes a point, each edge's dual segment joins the faces on either side, and R becomes the two smooth sides, top and bottom; again there are two classes, an even or odd number of crossings with Z̄. The surface-code literature describes all its boundary variations (several rough/smooth segments, holes, notches) in this notation.
对。「在边界上」不够,必须是己方边界:Z 对毛、X 对光。这个不对称正是两种边界存在的意义——否则逻辑串会被任意短链冒充。
Right. “On a boundary” is not enough — it must be the chain's own kind: Z↔rough, X↔smooth. That asymmetry is the whole point of having two boundary types — otherwise any short chain could impersonate a logical.
光边界处被截断的是星吗?不——那里星还在(三腿),Z-链端点照样撞响它。回看第 3 章的分工表。
Is the star what's missing at a smooth boundary? No — stars survive there (three-legged), and a Z endpoint still strikes one. Revisit Chapter 3's division of labour.
纠错循环,与真正去测量的那位The cycle, and the one who actually measures
装配成机器:出错 → 测全部检查 → 配对(允许配到边界)→ 修复,循环不休。再打开一直合着的黑盒:芯片上「测量一条检查」由谁执行、怎样执行。 Assembled as a machine: err → measure all checks → match (boundaries allowed) → repair, forever. Then we open the box kept shut: who on the chip performs “measuring a check”, and how.
先看整机。译码器现在多一种配法:把警报「嫁给」最近的己方边界(第 3 章的单警报正需要它)。修复后残留 = 错误⊕修复,闭合或贴边;它无害当且仅当它与 X̄ 交叉偶数次,也就是含偶数条横跨串(0 条也算偶数;两条横跨串合起来是面检查乘积,见第 3 章)。看四拍循环自动运转:
The whole machine first. The decoder gains one new move: marrying an alarm to the nearest boundary of its own kind (exactly what Chapter 3's lone alarms require). The residual = error ⊕ repair is closed or boundary-anchored; it is harmless iff it crosses X̄ an even number of times, that is, contains an even number of spanning strings (zero counts as even; two spanning strings together are a product of faces, see Chapter 3). Watch the four beats run:
谁去测 Bp = ZZZZ?没有仪器能一口气读四比特联合奇偶。工程答案:给每条检查配一个辅助比特ancilla:不存数据、专职收集一条检查的奇偶并被读出的量子比特。芯片上数据比特与辅助比特约一比一。。以 Z-检查为例:辅助比特制备为 |0⟩,与四个数据比特依次做一个「受控翻转」两比特门(CNOT,数据为控制端),最后单独测量辅助比特——它的 0/1 恰好携带四者的联合奇偶,而数据比特全程未被直接测量。
Who measures Bp = ZZZZ? No instrument reads a four-qubit joint parity in one gulp. Engineering's answer: give every check its own ancillaA qubit storing no data, dedicated to collecting one check's parity and being read out. Chips carry roughly one ancilla per data qubit.. For a Z-check: prepare the ancilla in |0⟩, apply a “controlled flip” two-qubit gate (CNOT, data as control) with each of the four data qubits in turn, then measure the ancilla alone — its 0/1 carries exactly the four-fold joint parity, while no data qubit is ever measured directly.
CNOT 的 4×4 矩阵,与「为什么净效果恰是 P±」CNOT's 4×4 matrix, and why the net effect is exactly P±
在基 {|00⟩,|01⟩,|10⟩,|11⟩}(控制位在前)下,CNOT 把 |10⟩↔|11⟩ 对调、其余不动:
In the basis {|00⟩,|01⟩,|10⟩,|11⟩} (control first), CNOT swaps |10⟩↔|11⟩ and fixes the rest:
四次 CNOT 后,辅助位读数 = 四个控制位之和 mod 2(逐分量核对即可)。对叠加态按线性逐分量作用:读出辅助位 = 按「奇偶 = 0 还是 1」把数据态分组取舍——这正是《从高考数学到 Toric Code》4.3 节投影测量的定义。一条值得记住的工程注脚:CNOT 顺序与布线若设计不当,辅助比特自己的错误会传播成数据上的关联错误(hook error)——真实芯片对 ①②③④ 的次序极其讲究。
After four CNOTs the ancilla's reading = the sum of the four control bits mod 2 (check component-wise). On superpositions everything acts linearly component by component, so reading the ancilla keeps the data components of one parity and discards the other — precisely the projective measurement of “From High-School Math to the Toric Code”, §4.3. One engineering footnote worth keeping: with careless CNOT ordering or wiring, the ancilla's own faults propagate into correlated data errors (“hook errors”) — real chips are fastidious about the ①②③④ order.
算一个两比特的小例子。把四条腿缩成两条,测 Z1Z2;道理与 Bp = Z1Z2Z3Z4 完全相同。任意数据态都可写成
A two-qubit worked example. Shrink the four legs to two and measure Z1Z2; the reasoning is identical for Bp = Z1Z2Z3Z4. Any data state can be written
① 分组就是 P±。每个基矢都是 Z1Z2 的本征态:|00⟩、|11⟩ 有偶数个 1,本征值 +1;|01⟩、|10⟩ 有奇数个 1,本征值 −1。于是 P+ = (I+Z1Z2)/2 作用在偶基矢上得 (1+1)/2 = 1 倍、在奇基矢上得 (1−1)/2 = 0 倍——它只保留偶组:P+|ψ⟩ = |ψ+⟩;同理 P−|ψ⟩ = |ψ−⟩。
① The grouping is P±. Each basis vector is an eigenvector of Z1Z2: |00⟩, |11⟩ have an even number of 1s, eigenvalue +1; |01⟩, |10⟩ an odd number, eigenvalue −1. So P+ = (I+Z1Z2)/2 multiplies an even basis vector by (1+1)/2 = 1 and an odd one by (1−1)/2 = 0 — it keeps only the even group: P+|ψ⟩ = |ψ+⟩; likewise P−|ψ⟩ = |ψ−⟩.
② CNOT 给每一组贴标签。辅助位从 |0⟩ 出发,每遇到一个值为 1 的控制位就翻一次,所以 |s⟩|0⟩ → |s⟩|s 的奇偶⟩。按线性逐项作用:
② The CNOTs label each group. Starting from |0⟩, the ancilla flips once per control bit equal to 1, so |s⟩|0⟩ → |s⟩|parity of s⟩. Acting linearly term by term:
数据比特本身一点没动;只是偶组绑上了辅助 |0⟩、奇组绑上了辅助 |1⟩。
The data qubits are untouched; the even group is merely tied to ancilla |0⟩ and the odd group to ancilla |1⟩.
③ 读辅助位 = 选一组。按玻恩规则,读到 0 的概率是 |a|²+|d|²,测后只剩与 |0⟩ 绑在一起的那项,数据态变成 (a|00⟩ + d|11⟩)/√(|a|²+|d|²);读到 1 的概率是 |b|²+|c|²,数据态变成 (b|01⟩ + c|10⟩)/√(|b|²+|c|²)。这与投影测量的定义逐字相同:结果 ± 的概率 = ‖P±|ψ⟩‖²,测后态 = P±|ψ⟩ 归一化。测完辅助位处于确定的 |0⟩ 或 |1⟩,不再与数据纠缠。
③ Reading the ancilla = picking a group. By the Born rule, outcome 0 has probability |a|²+|d|² and leaves only the term tied to |0⟩, so the data become (a|00⟩ + d|11⟩)/√(|a|²+|d|²); outcome 1 has probability |b|²+|c|² and leaves (b|01⟩ + c|10⟩)/√(|b|²+|c|²). This is word for word the definition of a projective measurement: probability of ± = ‖P±|ψ⟩‖², post-measurement state = P±|ψ⟩ normalized. Afterwards the ancilla sits in a definite |0⟩ or |1⟩, no longer entangled with the data.
关键在于:读到 0 之后,组内的 a 与 d(连同它们的相对相位)原封不动——我们只知道「偶数个 1」,不知道是 00 还是 11。若改为逐个测数据比特,就会得到 00 或 11 之一,叠加被毁。只学奇偶、不学内容,正是纠错需要的。
The point: after reading 0, a and d (and their relative phase) survive untouched inside the group — we learn “an even number of 1s”, not whether it is 00 or 11. Measuring the data qubits one by one would instead yield 00 or 11 and destroy the superposition. Learning the parity and not the content is exactly what error correction needs.
辅助比特与读出仪都会出错——症状本身可能是假警报。对策与其说新颖不如说执拗:连测 d 轮,把警报「在时间轴上的闪变」也当作链的端点,在空间×时间的三维格点上做同一个配对问题(《译码器 · 高中数学版》第 5 章专讲这件事)。无新思想,加一个维度;真实设备因此一轮接一轮地反复测量全部检查。(这也是文献里「circuit-level 阈值 约 1%,远低于本章理想值」:Raussendorf–Harrington,arXiv quant-ph/0610082,每种错误源 0.75%;Wang–Fowler–Hollenberg,arXiv 1009.3686,1.1%–1.4%的主因。)
Ancillas and readout err too — a syndrome can itself be a false alarm. The remedy is less novel than stubborn: measure d rounds in a row and treat alarms' flickers along the time axis as chain endpoints as well, solving the same matching problem on a 3-D space×time lattice (“Decoders · High-School Edition”, Chapter 5 is devoted to it). No new idea, one more dimension; hence real devices measure all checks round after round. (Also the main reason literature's “circuit-level threshold of about 1%” (Raussendorf–Harrington, arXiv quant-ph/0610082: 0.75% per error source; Wang–Fowler–Hollenberg, arXiv 1009.3686: 1.1%–1.4%) sits far below this chapter's idealized value.)
译码游戏 · 平面版The decoding game, planar
只见症状、不见链。两两配对,或把靠边的警报推给边界;清零即宣判:残留(错误 ⊕ 修复)与 X̄ 交叉奇数次则败,偶数次(包括两条横跨串)则胜。目标函数其实只有一个——总修复长度最短(最小重量完美匹配的直觉版)。 Syndromes only, chains unseen. Pair alarms, or push edge-huggers to the boundary; the verdict lands when alarms clear: the residual (error ⊕ repair) crossing X̄ an odd number of times = loss, an even number (two spanning strings included) = win. There is really one objective — minimize total repair length (the intuitive form of minimum-weight perfect matching).
调高 p 玩几轮,你会体感到两件事:警报密度随 p 线性涨,而「配错所酿成的横跨」增长得快得多——像在预演一条相变曲线。它就是下一章。
Raise p for a few rounds and two things become tactile: alarm density grows linearly in p, while spanning accidents from mispairing grow far faster — a rehearsal of a phase-transition curve. It is the next chapter.
阈值:先证一个下界,再当场实测The threshold: prove a bound, then measure it live
「码越大越好」有一条临界线。这一章先只用排列组合、二项式定理与等比数列,证出这条线确实存在并给出下界;然后打开蒙特卡洛,测出它在本页译码器与噪声设定下大约在哪里。这是全套教程数学上的最高峰——也完全在你的装备射程内。 “Bigger is better” has a critical line. This chapter first proves the line exists — with nothing but counting, the binomial theorem and geometric series — and pins a lower bound; then opens the Monte-Carlo and measures roughly where it sits for this page's decoder and noise model. The mathematical summit of the whole series — entirely within your kit's range.
6.1定理与证明The theorem and its proof
两件记号先备好:路径的长度用 ℓ 表示(花体小写 L,读「ell」,免得和 1、I 混淆);给某条具体路径起名用 γ(希腊字母,读「伽马」)。模型:每轮里每个比特独立以概率 p 遭 Z 错误;测症状,然后做最小重量修复:在所有能产生这组警报的 Z 串里挑边数最少的一条当修复(有几条并列时任取一条);残留 = 错误 ⊕ 修复若与 X̄ 交叉奇数次,本轮失败,记失败概率 PL(d, p)。定理:用最小重量修复时,p < 1/36 则 PL(d, p) 随 d 指数衰减。四步证明:
Two notations first: path length is written ℓ (a script lowercase L, read “ell”, so it can't be mistaken for 1 or I); a specific path gets the name γ (Greek, read “GAM-ma”). Model: each round every qubit independently suffers a Z error with probability p; syndromes are measured, followed by a minimum-weight repair: among all Z strings that produce the observed alarms, take one with the fewest edges (any one, if several tie). The round fails if the residual = error ⊕ repair crosses X̄ an odd number of times; call the probability PL(d, p). Theorem: with minimum-weight repair, for p < 1/36, PL(d, p) decays exponentially in d. Four steps:
② 计数:长 ℓ 的不回头横跨路径 ≤ d·3ℓ 条(起点 ≤ d 个,每步至多 3 个去向)② counting: non-backtracking spanning paths of length ℓ number ≤ d·3ℓ (≤ d starts, ≤ 3 continuations per step)
③ 单条路径:P(≥ ℓ/2 条边出错) ≤ C(ℓ,⌈ℓ/2⌉)·pℓ/2 ≤ 2ℓ pℓ/2 (⌈·⌉ = 向上取整;∑kC(ℓ,k) = 2ℓ,二项式定理)③ one path: P(≥ ℓ/2 edges errored) ≤ C(ℓ,⌈ℓ/2⌉)·pℓ/2 ≤ 2ℓ pℓ/2 (⌈·⌉ = round up; ∑kC(ℓ,k) = 2ℓ, the binomial theorem)
④ 全体路径求和(联合上界 + 等比数列):④ sum over all paths (union bound + geometric series):
PL ≤ ∑ℓ≥d d·3ℓ·2ℓ·pℓ/2 = d·∑ℓ≥d (6√p)ℓ = d·(6√p)d / (1 − 6√p) (当for 6√p < 1)
第 ① 步为什么成立。记错误为 E、修复为 C,都看成边的集合;残留 R = E ⊕ C 是一条零警报的 Z 串。失败时 R 与 X̄ 交叉奇数次,而闭圈和同侧两端的路都是面检查乘积、与 X̄ 交叉偶数次(补课 3.A),所以 R 里至少有一段从左毛边界到右毛边界的路;把其中绕回同一顶点的小圈剪掉,得到一条不重复经过顶点的横跨路径 γ,它的每条边都在 R 里,长 ℓ ≥ d。γ 两端都停在毛边界的悬边外端,本身零警报,所以 C ⊕ γ 与 C 产生同一组警报,也是一个合格的修复。C 是边数最少的修复,于是 |C ⊕ γ| ≥ |C|(|·| = 边数)。把 γ 的 ℓ 条边分成两类:在 C 里的 a 条,不在 C 里的 ℓ − a 条。C ⊕ γ 删掉前一类、添上后一类,边数是 |C| − a + (ℓ − a),所以 ℓ − a ≥ a。又因为 γ 的边都在 R = E ⊕ C 里,每条恰好属于 E、C 之一:不在 C 里的那 ℓ − a 条就是真出了错的边。所以 γ 上至少一半的边真出了错。小例子:d = 3,错误 E = Z4Z5 只在比特 6 左端的顶点报一次警,最短修复是 C = Z6(1 条边,配到右毛边界),残留 Z4Z5Z6 是 Z̄,本轮失败;γ = 第 2 行,3 条边里 2 条出了错,确实过半。在 d = 3 上,计算机把全部 213 种错误、每种错误的每个最短修复都试了一遍,每次失败都找得到这样的 γ。这一步只用了「C 最短」这一件事,所以下面的 1/36 只对总是给出最短修复的译码器成立。
Why step ① holds. Write the error as E and the repair as C, both as sets of edges; the residual R = E ⊕ C is an alarm-free Z string. On failure R crosses X̄ an odd number of times, while closed loops and paths with both ends on the same side are products of faces and cross X̄ an even number of times (Catch-up 3.A); so R contains at least one path from the left rough boundary to the right one. Cut out any small loop that returns to a vertex already visited, and you get a spanning path γ that visits no vertex twice, with every edge in R and length ℓ ≥ d. Both ends of γ stop at the outer ends of rough-boundary danglers, so γ itself sets off no alarm, and C ⊕ γ produces the same alarms as C: it is also a valid repair. C has the fewest edges of all repairs, so |C ⊕ γ| ≥ |C| (|·| = number of edges). Split the ℓ edges of γ in two: a of them lie in C, ℓ − a do not. C ⊕ γ removes the first kind and adds the second, so it has |C| − a + (ℓ − a) edges, hence ℓ − a ≥ a. And since every edge of γ lies in R = E ⊕ C, each belongs to exactly one of E and C: the ℓ − a edges not in C are exactly the edges that really erred. So at least half of γ's edges really erred. A small example: d = 3, the error E = Z4Z5 alarms only once, at the vertex at the left end of qubit 6; the shortest repair is C = Z6 (1 edge, matched to the right rough boundary); the residual Z4Z5Z6 is Z̄ and the round fails; γ = row 2, and 2 of its 3 edges erred, more than half. On d = 3 a computer tried all 213 errors with every shortest repair of each, and every failure has such a γ. This step uses only “C is shortest”, so the 1/36 below holds only for decoders that always return a shortest repair.
读结论:只要 6√p < 1,即 p < 1/36 ≈ 2.8%,括号 (6√p)d 就随 d 指数式坍塌——前面的因子 d 拦不住它。对最小重量修复、码容量噪声(只有数据比特出 Z 错误、测量完美),阈值存在,且至少 2.8%。证明里每件工具——不回头路径的计数、C(n,k) 的二项式和、公比小于 1 的等比数列——都来自你的高中书包。
Reading it: whenever 6√p < 1, i.e. p < 1/36 ≈ 2.8%, the factor (6√p)d collapses exponentially in d — the prefactor d cannot save it. For minimum-weight repair under code-capacity noise (only data qubits suffer Z errors, measurements are perfect), a threshold exists, and it is at least 2.8%. Every tool in the proof — counting non-backtracking paths, the binomial sum for C(n,k), a geometric series with ratio below 1 — comes from your high-school satchel.
两处坦白。① 这个证明只管总是给出最短修复的译码器:精确的最小重量完美匹配(允许配到边界)就是这样的译码器;别的译码器要另行论证(同类路径计数论证见 Dennis–Kitaev–Landahl–Preskill 2002)。② 联合上界大手大脚地重复计数,所以 1/36 只是下界;同一码容量噪声下,最小重量完美匹配的阈值 ≈ 10.3%(Wang、Harrington、Preskill,arXiv quant-ph/0207088:0.1031 ± 0.0001)。下界证明「存在」,实验测「位置」——这正是接下来要做的。
Two confessions. ① The proof covers only decoders that always return a shortest repair: exact minimum-weight perfect matching (boundaries allowed) is one; any other decoder needs its own argument (a path-counting argument of the same kind is in Dennis–Kitaev–Landahl–Preskill 2002). ② The union bound double-counts generously, so 1/36 is only a lower bound; under the same code-capacity noise, minimum-weight perfect matching has threshold ≈ 10.3% (Wang, Harrington, Preskill, arXiv quant-ph/0207088: 0.1031 ± 0.0001). The bound proves existence; experiment finds the location — which is next.
6.2当场实测Measure it now
左端曲线按 d=7 < d=5 < d=3 分层且间距近似等比——这正是压制律suppression law:阈值之下逻辑失败率随 d 指数下降的经验公式。 PL ≈ A一个与 d 无关的常数因子。·(p/pth阈值 threshold:诸尺寸失败曲线的交叉点;p 低于它,加大 d 才有益。)⌈d/2⌉ 的指纹:d 每增加 2,失败率乘一次同一因子 p/pth。交叉带即阈值。实验设定:只有数据比特出 Z 错误、测量完美(码容量噪声);译码器在警报不超过 14 个时做精确的最小重量完美匹配(可配到边界),更多时退为贪心,所以交叉点略低于 10.3% 的文献值。6.1 的 1/36 下界只覆盖精确配对的那部分;贪心不一定给出最短修复,第 ① 步对它不成立,本页没有给它证明。这条压制律就是造大规模量子计算机的全部经济学:p 压到 pth 之下若干倍后,逻辑错误率随 d 指数下降,而成本只随 d² 多项式上升。
The left-end curves stack d=7 < d=5 < d=3 with near-constant ratios — the fingerprint of the suppression lawThe empirical formula for how logical failure falls exponentially in d below threshold. PL ≈ AA constant prefactor independent of d.·(p/pthThe threshold: where the failure curves of different sizes cross; below it, growing d helps.)⌈d/2⌉: each +2 in d multiplies failure by the same factor p/pth. The crossing band is the threshold. The setting: only data qubits suffer Z errors and measurements are perfect (code-capacity noise); the decoder does exact minimum-weight perfect matching (boundaries allowed) up to 14 alarms and greedy matching beyond, so the crossing sits somewhat below the literature's 10.3%. The 1/36 bound of §6.1 covers only the exact-matching part; greedy matching need not return a shortest repair, step ① does not apply to it, and this page gives it no proof. This law is the entire economics of scalable quantum computing: push p a few-fold below pth, and logical errors fall exponentially in d while cost rises only polynomially, as d².
现实进展(截至本教程编写时):2023 年 Google 首次在硬件上验证 d=5 优于 d=3(每轮逻辑错误率 2.914% 对 3.028%,arXiv 2207.06431);2024 年底 Willow 芯片达成 d=7,d 每加 2 逻辑错误率降为 1/2.14(Λ = 2.14 ± 0.02),d = 7 时每轮 0.143%(arXiv 2408.13687)——首次明确运行在阈值之下。这些是电路级真实噪声与作者自己的译码器下的数字;随后中性原子、离子阱等平台相继展示低于阈值的行为,另有多个团队研发比表面码更省比特的 qLDPC 码。你刚在浏览器里画出的那族曲线,正在真实实验室里逐条落地。
Reality check (as of this writing): in 2023 Google first verified d=5 beating d=3 on hardware (logical error per round 2.914% versus 3.028%, arXiv 2207.06431); in late 2024 the Willow chip reached d=7, each +2 in d dividing the logical error rate by 2.14 (Λ = 2.14 ± 0.02), with 0.143% per round at d = 7 (arXiv 2408.13687) — the first clear below-threshold operation. These numbers come from real circuit-level noise and the authors' own decoders; neutral-atom and trapped-ion platforms have since shown below-threshold behaviour too, while several teams develop qLDPC codes thriftier than the surface code. The family of curves you just drew in a browser is landing, one by one, in real laboratories.
对:4⁵ = 1024 ≥ 1000。数据比特代价从 d² + (d−1)² 的量级看不过几百个——千倍纠错力换几百比特,这笔账正是表面码统治工程路线图的原因。
Right: 4⁵ = 1024 ≥ 1000. The data-qubit price, at the d² + (d−1)² scale, is a few hundred — a thousandfold protection for hundreds of qubits: the arithmetic behind the surface code's grip on engineering roadmaps.
压制律里 d 每 +2,整体乘一次 (p/p_th) = 1/4;解 (1/4)ᵏ ≤ 10⁻³。
In the law, each +2 in d multiplies once by (p/p_th) = 1/4; solve (1/4)ᵏ ≤ 10⁻³.
从环面到平面,与三条继续走的路From torus to plane, and three roads onward
从矩阵乘法那个不肯交换的 −1,到亲手证出并实测的阈值:你已握有稳定子纠错的完整语言——公设、投影、碰撞定理、同调类、配对译码、压制律。当代论文的三条延伸路:其一,更省的版图:把网格旋转 45° 裁边即「旋转表面码」,同码距只用 d² 个数据比特,是实验室的实际部署版。其二,逻辑门:存住只是仓库,还要运算——拼接与切分两块贴片的「格点手术」(lattice surgery)承担 CNOT 类操作,配合为顽固门准备的「魔法态蒸馏」构成通用计算,这是当前工程化的主战场。其三,更省的码:qLDPC 家族用更巧的检查图谱把编码率提升一个量级,是近年最活跃的理论前沿。入口文献均列于下。
From the −1 that refused to commute, to a threshold you proved and then measured: you now hold stabilizer error correction's full language — postulates, projectors, the collision theorem, homology classes, matching decoders, the suppression law. Three roads current papers extend: one, thriftier layouts — rotate the grid 45° and trim to get the “rotated surface code”, same distance from only d² data qubits, the version labs actually deploy. Two, logical gates — storage is a warehouse; computation merges and splits patches via “lattice surgery” for CNOT-class operations, joined by magic-state distillation for the stubborn gates: today's main engineering front. Three, thriftier codes — the qLDPC family lifts encoding rates by an order of magnitude with cleverer check graphs, the liveliest theory frontier of recent years. Entry points below.
前篇:《从高考数学到 Toric Code》→ 接着读:《译码器 · 高中数学版》→ 《格点手术 · 高中数学版》→ 《BB 码 · 高中数学版》→ 《qLDPC 码 · 高中数学版》→ 零基础版:《从 1+1 到 Toric Code》→ 《从 Toric Code 到 Surface Code》→
Before this: “From High-School Math to the Toric Code” → Read next: “Decoders · High-School Edition” → “Lattice Surgery · High-School Edition” → “BB Codes · High-School Edition” → “qLDPC Codes · High-School Edition” → No-prerequisites editions: “From 1+1 to the Toric Code” → “From Toric Code to Surface Code” →
符号与读法Symbols & how to read them
| 符号Symbol | 名称与读法Name & how to read it | 在本教程中的含义Meaning in this tutorial |
|---|---|---|
| ψ | 希腊字母,读「普西」(psai)Greek letter, read “psy” (rhymes with “sigh”) | 物理学的百年老习惯:用 ψ 给一个量子状态起名。|ψ⟩ 就是「名叫 ψ 的那个状态」——它不是未知数,只是个名字,相当于「小明」。A century-old physics habit: ψ names a quantum state. |ψ⟩ is “the state called ψ” — not an unknown, just a name. |
| γ | 希腊字母,读「伽马」(gamma)Greek letter, read “GAM-ma” | 这里用它给一条路径起名:「路径 γ」就是「这条名叫 γ 的路」。Used here to name a path: “the path γ” is just “the path called γ”. |
| Σ ∑ | 大写希腊字母,读「西格玛」(sigma)Capital Greek letter, read “SIG-ma” | 求和记号:把后面的各项全部加起来,下标注明从哪一项加到哪一项。∑ℓ≥d 即「对每个不小于 d 的 ℓ 各算一项,全部相加」。The summation sign: add up all the terms that follow; the subscript says which terms. ∑ℓ≥d means “one term for every ℓ ≥ d, all added”. |
| ∏ | 大写希腊字母 π,读「派」(pi)Capital Greek π, read “pie” | 连乘记号:把后面的东西全部乘起来——∑ 的乘法版。∏v Av 即「所有星形检查的乘积」。The product sign: multiply everything that follows — the multiplicative sibling of ∑. ∏v Av = “the product of all star checks”. |
| ∂ | 弯体 d,读「偏」(英文 partial 或 round-d)A curly d, read “partial” (or “round-d”) | 这里它表示「取边界」:∂p = 围住面 p 的那 4 条边;∂链 = 链的端点集。Here it means “take the boundary”: ∂p = the 4 edges rimming face p; ∂chain = the chain's endpoint set. |
| ⊕ | 圆圈加,读「异或」或「圆圈加」A circled plus, read “X-OR” or “o-plus” | 合并两组东西、成对相消:同一条边出现两次就抵消(因为 Z·Z = I);对 0/1 就是「模 2 加法」。Merge two collections with pairwise cancellation: anything appearing twice cancels (since Z·Z = I); on 0/1 it is addition mod 2. |
| ℓ | 花体小写 L,读「ell」A script lowercase L, read “ell” | 就是小写 l,写成花体只为不和数字 1、大写 I 混淆。这里表示一条路径的长度。Just the letter l, written in script so it can't be mistaken for 1 or I. Here: the length of a path. |
| ⌈ ⌉ | 直角括号,读「向上取整」(ceiling)Square-cornered brackets, read “ceiling” | ⌈x⌉ = 不小于 x 的最小整数:⌈2.1⌉ = 3、⌈3⌉ = 3。⌈d/2⌉ 即「d 的一半,不足则进一」。⌈x⌉ = the smallest integer not below x: ⌈2.1⌉ = 3, ⌈3⌉ = 3. So ⌈d/2⌉ is “half of d, rounded up”. |
| ∀ | 倒写的 A,读「对所有 / 任意」An upside-down A, read “for all” | ∀S 于清单:对检查清单上的每一条 S 都成立。∀S on the list: holds for every check S on the list. |
| # | 井号,读「…的个数」The hash sign, read “the number of” | #A = 星形检查的条数;k = n − #独立检查。#A = the number of star checks; k = n − #independent checks. |
| C(n, k) | 读「n 选 k」(组合数)Read “n choose k” (a binomial coefficient) | 从 n 件里选 k 件的选法数;∑k C(n,k) = 2n(二项式定理)。《从高考数学到 Toric Code》1.3 节有回炉。The number of ways to pick k items out of n; ∑k C(n,k) = 2n (the binomial theorem). Refreshed in “From High-School Math to the Toric Code”, §1.3. |
| PL(d, p) | 读「逻辑失败率」Read “logical failure rate” | 码距 d、物理错误率 p 时一轮纠错以逻辑错误收场的概率;第 6 章的主角。The probability that one correction round at distance d and physical error rate p ends in a logical error; the protagonist of Chapter 6. |
| pth | 读「p 阈值」(threshold)Read “p threshold” | 诸尺寸失败曲线的交叉点:p < pth 时加大 d 有益,PL ≈ A·(p/pth)⌈d/2⌉。Where the failure curves of different sizes cross: for p < pth growing d helps, PL ≈ A·(p/pth)⌈d/2⌉. |
| ∎ | 实心小方块,读「证毕」(Q.E.D.)A filled square, read “Q.E.D.” | 数学家在证明末尾盖的小方章:到此证完,无需再言。The mathematician's end-of-proof stamp: done, nothing more to say. |
| ⇒ | 双线箭头,读「推出 / 则」A double arrow, read “implies” | A ⇒ B:由 A 可以得出 B。A ⇒ B: from A one may conclude B. |
| ⇔ | 双向双线箭头,读「当且仅当」A two-way double arrow, read “if and only if” | A ⇔ B:A 与 B 同真同假,互为充要条件——是一条双向的「推出」。A ⇔ B: A and B stand or fall together — an implication running both ways. |
| X̄ Z̄ | 字母头上一横,读「X bar / Z bar」An overbar, read “X-bar / Z-bar” | 一横 = 「逻辑版」:X̄ 是作用在被保护的逻辑比特上的 X,由许多物理操作组成(这里 = 缠绕圈 / 横跨串)。The bar means “logical edition”: X̄ is the X acting on the protected logical qubit, built from many physical operations (here: winding loops / spanning strings). |
| ± | 读「正负」Read “plus-minus” | ±1 = 「+1 或 −1」两个可能取值;这里每条检查的答案都是这两个之一。±1 = the two possible values “+1 or −1”; every check here answers with one of them. |
| √ | 读「根号」Read “square root” | √A = 面积为 A 的正方形的边长;(√A)² = A;常客:1/√2 ≈ 0.71。√A = the side of a square of area A; (√A)² = A; frequent guest: 1/√2 ≈ 0.71. |
| |·⟩ | 竖线加右尖括号,读「刻特」(ket)A bar with a right angle bracket, read “ket” | |0⟩ = 「贴着标签 0 的状态」:给量子状态套的礼盒括号,本质是基向量的名字。|0⟩ = “the state labelled 0”: gift-wrap for quantum states — really just a basis vector's name. |
| ≈ | 读「约等于」Read “approximately equals” | 两边近似相等。The two sides are nearly equal. |
| ≠ | 读「不等于」Read “not equal” | 两边不相等。The two sides differ. |
| ≤ ≥ | 读「小于等于 / 大于等于」Read “at most / at least” | 不超过 / 不少于。No more than / no less than. |
本教程新增词汇New terms in this tutorial
| 术语Term | 定义Definition |
|---|---|
| [[n, k, d]] | n 个物理比特、k = n − r 个逻辑比特、码距 d;本页平面码 [[d² + (d−1)², 1, d]],d = 3 时 [[13, 1, 3]]。n physical qubits, k = n − r logical qubits, distance d; this page's planar code is [[d² + (d−1)², 1, d]], [[13, 1, 3]] for d = 3. |
| 码容量 / 现象学 / 电路级噪声code-capacity / phenomenological / circuit-level noise | 只有数据比特出错、测量完美 / 读数也会错 / 辅助比特、门、读出都会错;MWPM 阈值约 10.3% / 2.9% / 1% 量级。only data qubits err, perfect measurement / readouts err too / ancillas, gates and readout all err; MWPM thresholds about 10.3% / 2.9% / of order 1%. |
| 表面码surface code | 剪开环面、以两种边界收边的平面稳定子码;任意 d 存 1 个逻辑比特,d_X = d_Z = d。The planar stabilizer code hemmed by two boundary types; one logical qubit at any d, with d_X = d_Z = d. |
| 毛(粗糙)/ 光(光滑)边界rough / smooth boundary | 悬边+三腿面检查(左右)/ 无悬边+三腿星检查(上下);各自赦免 Z-链 / X-链的端点。Danglers + 3-leg faces (left/right) / no danglers + 3-leg stars (top/bottom); pardoning Z-chain / X-chain endpoints respectively. |
| 横跨串 / 相对同调spanning string / relative homology | 从一侧己方边界走到对面那侧己方边界的串(Z 串:左毛边界到右毛边界;X 串:上光边界到下光边界);两端落在同一侧不算横跨。一条零警报的 Z 串是逻辑算符 Z̄,当且仅当它与 X̄ 交叉奇数次,也就是含奇数条横跨串;两条横跨串合起来是面检查的乘积,无害。分类语言:H₁(M, R; ℤ₂),M = 贴片,R = 链端可以停靠的那两条边界(Z 串为两条毛边界,X 串在对偶格上取两条光边界),ℤ₂ = 系数只取 0、1。A string running from one boundary of its own kind to the opposite one (Z: left rough to right rough; X: top smooth to bottom smooth); both ends on the same side is not spanning. An alarm-free Z string is the logical Z̄ iff it crosses X̄ an odd number of times, i.e. contains an odd number of spanning strings; two spanning strings together are a product of faces, harmless. Classifying language: H₁(M, R; ℤ₂), M = the patch, R = the two sides where chain ends may stop (the rough sides for Z strings; for X strings, the smooth sides on the dual lattice), ℤ₂ = coefficients 0 or 1 only. |
| 辅助比特 / CNOTancilla / CNOT | 替一条检查收集奇偶的专职比特;CNOT 为其收集动作的两比特门(4×4 置换矩阵)。The qubit collecting one check's parity; CNOT is its collecting two-qubit gate (a 4×4 permutation matrix). |
| 阈值 pth / 压制律threshold pth / suppression law | 诸尺寸失败曲线的交点;其下 P_L ≈ A(p/p_th)^⌈d/2⌉,d 每 +2 乘一次 p/p_th。Where the size-curves cross; below it P_L ≈ A(p/p_th)^⌈d/2⌉ — each +2 in d multiplies by p/p_th. |
| 联合上界(Peierls 式论证)union bound (Peierls argument) | P(存在坏事) ≤ Σ P(单件坏事);配合路径计数与等比数列给出 p_th ≥ 1/36(最小重量修复、码容量噪声)。P(some bad event) ≤ Σ P(each); with path counting and geometric series it gives p_th ≥ 1/36 (minimum-weight repair, code-capacity noise). |
| 旋转表面码 / 格点手术 / qLDPCrotated code / lattice surgery / qLDPC | 三条去路:45° 省料版图;贴片拼切实现逻辑门;高编码率新码族。The three roads: the 45° thrifty layout; logical gates by patch merging; high-rate modern code families. |
延伸阅读Further reading
- E. Dennis, A. Kitaev, A. Landahl, J. Preskill, “Topological quantum memory” (2002)
6.1 节论证的严格版;时空配对与阈值理论的源头。arXiv: quant-ph/0110143The rigorous edition of §6.1; the source of spacetime matching and threshold theory. arXiv: quant-ph/0110143 - A. Fowler, M. Mariantoni, J. Martinis, A. Cleland, “Surface codes: Towards practical large-scale quantum computation” (2012)
工程全书:旋转版图、电路级噪声、hook error、开销核算。arXiv: 1208.0928The engineering compendium: rotated layouts, circuit-level noise, hook errors, overhead audits. arXiv: 1208.0928 - D. Horsman, A. Fowler, S. Devitt, R. Van Meter, “Surface code quantum computing by lattice surgery” (2012)
路二入口:贴片拼切做逻辑门(《格点手术 · 高中数学版》从这里出发)。arXiv: 1111.4022Road two's entrance: logical gates by merging patches (the starting point of “Lattice Surgery · High-School Edition”). arXiv: 1111.4022 - Google Quantum AI, Nature 2023 与 Nature 2024(Willow)
「加大更好」与「低于阈值」两座硬件里程碑的原始报告。The primary reports of the “bigger is better” and “below threshold” hardware milestones. - N. Breuckmann, J. Eberhardt, “Quantum low-density parity-check codes” (2021)
路三综述;《qLDPC 码 · 高中数学版》的入口。arXiv: 2103.06309Road three's survey; the entrance to “qLDPC Codes · High-School Edition”. arXiv: 2103.06309
全篇简化五项,一次结清:① 互动实验只演示实振幅切片(框架含复相位,结论不变);② 除第 4 章的讨论外假设测量完美(现实解法:d 轮时空配对);③ 页面译码器在警报稠密时退化为贪心(文献标准为 MWPM / Union-Find);④ 6.1 的 1/36 下界只对最小重量修复成立(证明完整),测试台在警报多于 14 个时的贪心回退不在证明范围内;⑤ 展示的是未旋转版图(部署版为 45° 旋转、d² 数据比特)。以上无一影响任何定性结论与所有数量级论断。
Five simplifications, settled in one bill: ① interactive benches show the real-amplitude slice (the framework carries complex phases; conclusions unchanged); ② measurements assumed perfect outside Ch. 4's discussion (reality: d rounds of spacetime matching); ③ this page's decoder degrades to greedy in dense-alarm regimes (literature standard: MWPM / Union-Find); ④ §6.1's 1/36 bound holds only for minimum-weight repair (the proof is complete); the bench's greedy fallback above 14 alarms is outside the proof; ⑤ the layout shown is unrotated (deployments rotate 45° for d² data qubits). None of these touches any qualitative conclusion or order-of-magnitude claim.