目录Contents
速查回顾:五条随身事实Quick recap: five facts to carry
这一篇只依赖 Toric Code 教程里的五件事。每一条都给出原处的链接;记不清就点回去,读完再回来。 This guide relies on five things from the toric-code guide. Each comes with a link to where it was taught; if one is hazy, follow the link and come back.
| # | 事实Fact | 原处Where it was taught |
|---|---|---|
| 1 | 一条奇偶检查问「这几个比特里有奇数个还是偶数个 1」(两个比特时就是「一样吗」),答案是 +1 或 −1(本篇写成 0 或 1);变成 1 叫警报。A parity check asks “is the number of 1s among these bits odd or even?” (for two bits: “are they the same?”); the answer is +1 or −1 (written 0 or 1 in this guide); a 1 is an alarm. | 2.3 节section 2.3 |
| 2 | 两条泡利串反对易,当且仅当「两边都不是 I 且字母不同」的位置有奇数个;反对易的两条检查不能同时被满足。Two Pauli strings anticommute exactly when the positions where both are non-identity and the letters differ are odd in number; two anticommuting checks cannot be satisfied at once. | 4.2 节section 4.2 |
| 3 | 一个稳定子码是一份两两对易的检查清单;逻辑算符与所有检查对易,却不是检查的乘积。A stabilizer code is a list of pairwise commuting checks; a logical operator commutes with every check yet is not a product of checks. | 4.4 节section 4.4 |
| 4 | 环面码里一串 Z 错误是一条链;报警的星恰是链的端点。闭合的链不报警。In the toric code a run of Z errors is a chain; the stars that fire are exactly its endpoints. A closed chain fires nothing. | 5.4 节section 5.4 |
| 5 | L × L 环面码:n = 2L²,k = 2;绕环面一圈的链是逻辑算符,最短的长 L,所以码距 d = L。L = 3 时 [[18, 2, 3]]。The L × L toric code: n = 2L², k = 2; a chain winding around the torus is a logical operator, the shortest has length L, so the distance d = L. For L = 3, [[18, 2, 3]]. | 5.3 节section 5.3 · 5.8 节section 5.8 |
记号:n = 物理量子比特数,k = 逻辑量子比特数,d = 码距,L = 环面的边长;[[n, k, d]] 读「n k d 码」。本篇和 QEC-Bank 一样,k 直接记逻辑比特数。「时间表」一词的 QEC-Bank 定义(Schedule(n, rounds))已在两张测量时间表篇 1.2 节给出,本篇 1.2 节会用到。
Notation: n = number of physical qubits, k = number of logical qubits, d = distance, L = side length of the torus; [[n, k, d]] reads “an n k d code”. Here, as in the QEC-Bank, k counts logical qubits directly. The QEC-Bank definition of a “schedule” (Schedule(n, rounds)) was given in section 1.2 of the schedule-equivalence guide and is used in section 1.2 here.
这个问题用人话说是什么:在一部电影里数故障The problem in plain words: counting faults inside a film
三个比特、六轮测量。先让每一轮问同样的两个问题(静态码),再让问题按时间表轮换(动态码),亲手算出每一轮的读数、每一个「探测器」的值,再数「最少几个故障能既不被发现、又改写信息」。最后给这些东西命名,念板上的原文。 Three bits, six rounds of measurement. First let every round ask the same two questions (a static code), then rotate the questions on a schedule (a dynamical code); compute by hand each round's reading and each “detector” value, then count “the fewest faults that both escape detection and rewrite the information”. Finally name these things and read the board's wording.
1.1静态码:每一轮问同样的问题A static code: the same questions every round
取三个经典比特 b1, b2, b3,约定「合法状态」是三个都相等(000 或 111,这就是 3 比特重复码;Toric Code 教程 2.2 节)。两条检查:c1 = b1 ⊕ b2,c2 = b2 ⊕ b3。静态码的意思是:每一轮 t = 0, 1, 2, … 都把 c1、c2 各测一次。从 000 出发,若第 1 轮之前 b2 翻成了 1,读数表是:
Take three classical bits b1, b2, b3 and agree that the “legal states” are the three equal (000 or 111: the 3-bit repetition code, section 2.2 of the toric-code guide). Two checks: c1 = b1 ⊕ b2, c2 = b2 ⊕ b3. A static code means: every round t = 0, 1, 2, … measures both c1 and c2 once. Starting from 000, if b2 flips to 1 before round 1, the table of readings is:
| 轮次 tRound t | 0 | 1 | 2 |
|---|---|---|---|
| 状态 b1b2b3state b1b2b3 | 000 | 010 | 010 |
| c1 = b1 ⊕ b2 | 0 | 1 | 1 |
| c2 = b2 ⊕ b3 | 0 | 1 | 1 |
| 探测器 D1(t) = c1(t) ⊕ c1(t−1)detector D1(t) = c1(t) ⊕ c1(t−1) | — | 1 | 0 |
| 探测器 D2(t) = c2(t) ⊕ c2(t−1)detector D2(t) = c2(t) ⊕ c2(t−1) | — | 1 | 0 |
记号:⊕ = 模 2 加(0⊕0 = 0,0⊕1 = 1,1⊕1 = 0);bi = 第 i 个比特的值;cj(t) = 第 j 条检查在第 t 轮的读数;Dj(t) = 对应的探测器。表是本篇手算的。
Notation: ⊕ = addition mod 2 (0⊕0 = 0, 0⊕1 = 1, 1⊕1 = 0); bi = the value of bit i; cj(t) = the reading of check j in round t; Dj(t) = the corresponding detector. The table was computed by hand for this guide.
最后两行是探测器detector:同一条检查相邻两次读数的异或,只在「答案变了」时为 1。《译码器 · 高中数学版》5.1 节引入它是为了对付读数本身出错:读错一次只影响一轮,探测器会在时间上亮成一对;真实的比特翻转让读数从那一轮起持续改变,探测器只亮一次。:不问「读数是几」,只问「和上次比,答案变了吗」(《译码器 · 高中数学版》5.1 节)。为什么要这样问?因为真实的测量会读错:假如第 1 轮 c1 本该读 0 却读成 1、比特其实没动,那么 D1(1) = 1、D1(2) = 1——读数在下一轮弹回来,探测器在时间方向上亮成一对;而一个真正的比特翻转让读数从那一轮起一直是 1,探测器只在翻转那一轮亮一次。人话:探测器把「比特错了」和「读错了」变成两种形状不同的图案。
The last two rows are detectorsThe XOR of two consecutive readings of the same check, equal to 1 only when “the answer changed”. Section 5.1 of “Decoders · High-School Edition” introduced it to cope with readings that are themselves wrong: a single misread affects one round and lights a pair of detectors in time; a real bit flip changes the reading from that round onward and lights the detector once.: they do not ask “what is the reading” but “did the answer change since last time” (section 5.1 of “Decoders · High-School Edition”). Why ask this way? Because real measurements can be misread: if in round 1 c1 should read 0 but reads 1 while the bits did not move, then D1(1) = 1 and D1(2) = 1; the reading bounces back next round and the detector lights as a pair along time, whereas a genuine flip keeps the reading at 1 from then on and lights the detector once, in the round of the flip. In plain words: detectors turn “a bit went wrong” and “a reading went wrong” into two patterns of different shape.
1.2动态码:问题按时间表轮换A dynamical code: the questions rotate on a schedule
现在改规则:每一轮只问一个问题,而且按表轮换——第 0 轮问 c1 = b1 ⊕ b2,第 1 轮问 c2 = b2 ⊕ b3,第 2 轮问 c3 = b1 ⊕ b3,第 3 轮回到 c1,周期 3。用 QEC-Bank 的写法(时间表 = Schedule(n, rounds)):n = 3,rounds = [ [c1], [c2], [c3] ]。「答案变了吗」这个问题现在要和三轮前比——上一次问同一个问题是三轮前:S(t) = c(t) ⊕ c(t−3)。同样让 b2 在第 2 轮之前翻转,六轮的读数是:
Now change the rules: each round asks only one question, rotating on a schedule: round 0 asks c1 = b1 ⊕ b2, round 1 asks c2 = b2 ⊕ b3, round 2 asks c3 = b1 ⊕ b3, round 3 returns to c1, period 3. In QEC-Bank notation (a schedule is Schedule(n, rounds)): n = 3, rounds = [ [c1], [c2], [c3] ]. The question “did the answer change” must now compare with three rounds ago, the last time the same question was asked: S(t) = c(t) ⊕ c(t−3). Let b2 flip before round 2 again; the six rounds read:
| 轮次 tRound t | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| 问的检查check asked | c1 | c2 | c3 | c1 | c2 | c3 |
| 状态 b1b2b3state b1b2b3 | 000 | 000 | 010 | 010 | 010 | 010 |
| 读数 c(t)reading c(t) | 0 | 0 | 0 | 1 | 1 | 0 |
| 探测器 S(t) = c(t) ⊕ c(t−3)detector S(t) = c(t) ⊕ c(t−3) | — | — | — | 1 | 1 | 0 |
记号:S(t) = 第 t 轮的读数与三轮前同一条检查读数的异或;「—」= 还没有可比的上一次。表是本篇手算的,并用一段 30 行的脚本穷举核对过(见诚实总账)。
Notation: S(t) = the XOR of round t's reading with the reading of the same check three rounds earlier; “—” = no earlier reading to compare with yet. Computed by hand for this guide and cross-checked by a 30-line exhaustive script (see the honesty ledger).
三件事值得看。一、翻转发生在第 2 轮之前,但第 2 轮问的是 c3 = b1 ⊕ b3,它不含 b2,读数仍是 0;第 3 轮才有 c1 看见它。动态码里一个故障要等到下一次「相关的问题」被问到才暴露,延迟由时间表决定。二、探测器亮了两个(S(3)、S(4)),恰是含 b2 的两条检查各亮一次——像环面码里一条链的两个端点(第 0 章事实 4),只是「端点」分布在不同时刻。三、若不是比特翻转而是第 4 轮读错了一次,则 c(4) = 1 而别的都是 0,S(4) = 1;三轮之后 S(7) 也会是 1——那一对的另一半落在这张六轮表的外面。人话:同一个故障在静态码和动态码里画出的图案不同;图案的形状由时间表决定,图案能不能被看全由观察窗口决定。
Three things to notice. One: the flip happens before round 2, but round 2 asks c3 = b1 ⊕ b3, which does not involve b2, so the reading stays 0; only round 3's c1 sees it. In a dynamical code a fault stays hidden until the next “relevant question” is asked, with a delay set by the schedule. Two: two detectors light (S(3), S(4)), exactly one for each of the two checks containing b2, like the two endpoints of a chain in the toric code (fact 4 of Chapter 0), except that the “endpoints” sit at different times. Three: if instead of a flip the reading of round 4 were wrong once, then c(4) = 1 with everything else 0, S(4) = 1, and three rounds later S(7) would be 1 too; the other half of that pair falls outside this six-round table. In plain words: the same fault draws different patterns in a static and in a dynamical code; the schedule fixes the pattern's shape, and the observation window decides whether the whole pattern can be seen.
这个玩具是经典的:c1、c2、c3 三条检查两两对易,先问哪条都不会破坏别的答案,「轮换」只是节省了每轮的测量次数。真正的 Floquet 码不是这样。QEC-Bank 蜂窝码条目(honeycomb,本条 yaml 里 related 的唯一一项)的卡片描述原文:“A period-three dynamical stabilizer memory made only from weight-two Pauli measurements on a honeycomb torus. Edge operators are fixed as XX, YY, or ZZ by direction, while a plaquette three-coloring partitions them into three perfect-matching rounds. The code is the ordered schedule and its outcome-dependent instantaneous stabilizer group, not any one static set of mutually commuting edge checks; after startup that group carries two toric-code logical qubits.” 关键在于不同轮的检查反对易(第 0 章事实 2):测了这一轮,上一轮的一部分答案就被抹掉,「此刻状态满足哪些检查」这份清单——瞬时稳定子群ISG, instantaneous stabilizer group:此刻状态满足的全部检查(含乘积)。每测一条新串就按规则更新。两张测量时间表篇 1.2 节给出了更新规则与蜂窝码 L3x3 的秩序列 9, 12, 14, 16, 16, …(ISG)——每轮都在变。它的 n = 2·L1·L2,L3x3 实例 n = 18,稳定后独立检查 16 条,剩 k = 2(两张测量时间表篇 1.2 节照抄了 QEC-Bank 推导页的秩序列 9, 12, 14, 16)。本篇不重复这部分;玩具只负责演示「读数分布在时间里、探测器要跨轮比较」这一件事,这一件事在经典玩具和蜂窝码里是一样的。
This toy is classical: the three checks c1, c2, c3 commute pairwise, asking one never spoils another's answer, and “rotating” merely saves measurements per round. Real Floquet codes are not like that. The card description of the QEC-Bank honeycomb entry (honeycomb, the only item under related in this yaml) reads: “A period-three dynamical stabilizer memory made only from weight-two Pauli measurements on a honeycomb torus. Edge operators are fixed as XX, YY, or ZZ by direction, while a plaquette three-coloring partitions them into three perfect-matching rounds. The code is the ordered schedule and its outcome-dependent instantaneous stabilizer group, not any one static set of mutually commuting edge checks; after startup that group carries two toric-code logical qubits.” The crux is that checks of different rounds anticommute (fact 2 of Chapter 0): measuring this round erases part of last round's answers, and the list “which checks does the state satisfy right now”, the instantaneous stabilizer groupISG: all checks (and products) the current state satisfies, updated by a rule at every new measured string. Section 1.2 of the schedule-equivalence guide gives the update rule and the rank profile 9, 12, 14, 16, 16, … of honeycomb L3x3. (ISG), changes every round. Its n = 2·L1·L2; the L3x3 instance has n = 18, 16 independent checks once settled, leaving k = 2 (section 1.2 of the schedule-equivalence guide copies the rank profile 9, 12, 14, 16 from the QEC-Bank derivation page). This guide does not repeat that part; the toy's only job is to show “readings are spread over time and detectors compare across rounds”, which is the same in the classical toy and in the honeycomb code.
对。第 1 轮问 c2 = b2 ⊕ b3,不含 b1,读 0;第 2 轮 c3 读 1,但按本篇的规则 S(2) 还没有可比的上一次(表里是「—」);第 3 轮 c1 读 1,S(3) = 1 ⊕ 0 = 1。如果规定「第一次读数与制备时的已知值 0 比较」,那么 S(2) = c3(2) ⊕ 0 = 1 就会在第 2 轮亮——探测器在窗口边界上怎么定义,直接改变答案。第 4 章会回到这一点。
Right. Round 1 asks c2 = b2 ⊕ b3, which lacks b1, reading 0; round 2's c3 reads 1, but under this guide's rule S(2) has no earlier reading to compare with (a “—” in the table); round 3's c1 reads 1 and S(3) = 1 ⊕ 0 = 1. Had we ruled “compare the first reading with the known prepared value 0”, S(2) = c3(2) ⊕ 0 = 1 would light in round 2: how detectors are defined at the window's edge changes the answer. Chapter 4 returns to this.
再想:先看每一轮问的是哪条检查、它是否含 b1;再看探测器 S(t) 需要「三轮前的同一条检查」,前三轮没有。
Think again: first see which check each round asks and whether it contains b1; then recall that S(t) needs “the same check three rounds ago”, which the first three rounds lack.
1.3在电影里数故障:空间型与时间型Counting faults in the film: spacelike and timelike
静态码的码距问:最轻的「骗过所有检查、又改写信息」的错误有多重。把它搬进电影里,先约定什么叫一个故障fault:电影里的一个基本坏事件。本篇只允许两种:某个比特在某一轮之前翻转(记 (d, i, t));某一轮的读数被读反(记 (m, t))。每个故障算 1。:要么「第 t 轮之前比特 bi 翻转」,要么「第 t 轮的读数读反」,各算 1。一组故障未被发现,指整部电影里所有探测器都是 0;一组故障改写了信息,指电影结束时把三个比特读出来、按多数票译码,得到 1 而不是制备时的 0。这里要分清两样东西:比特的物理状态可能是 110 这种不合法的状态(既不是 000 也不是 111),而译码输出只看多数票,110 译成 1,所以也算改写了信息;失败看的是译码输出,不要求物理状态恰好落到 111。故障距离fault distance:所有「未被发现且改写信息」的故障集合中最小的故障数。它是电影里的量,依赖时间表、探测器定义和观察窗口;静态码距是它在「一轮、完美读数」这个特例下的值。就是这类集合里最少的故障数。两种方向的故障画在同一张时空图上:
The distance of a static code asks how heavy the lightest error is that “fools every check yet rewrites the information”. To carry this into the film, first agree what a faultOne elementary bad event in the film. This guide allows two kinds: bit b_i flips before round t (written (d, i, t)); the reading of round t is inverted (written (m, t)). Each counts 1. is: either “bit bi flips before round t” or “the reading of round t is inverted”, each counting 1. A set of faults is undetected if every detector in the whole film is 0; it rewrites the information if, when the three bits are read out at the end of the film and decoded by majority vote, the result is 1 instead of the prepared 0. Keep two things apart here: the bits' physical state may be an illegal one such as 110 (neither 000 nor 111), while the decoded output looks only at the majority, and 110 decodes to 1, so it still counts as rewritten; failure is judged by the decoded output, not by the physical state landing exactly on 111. The fault distanceThe smallest number of faults over all sets that are “undetected and rewrite the information”. It is a quantity of the film, depending on schedule, detector definitions and observation window; the static distance is its value in the special case “one round, perfect readings”. is the smallest number of faults over all such sets. The two directions of fault are drawn on one spacetime grid:
图注:三条横线是三个比特随时间延伸;六条竖虚线是六轮;底行的圆圈是每轮的一个读数(下方标着问的是哪条检查)。琥珀色 × = 比特翻转故障,蓝色方块 = 读反故障。读数上方的 1 0 0 1 0 0 是只有时间型那两次读反时,六轮各自的读数。
Caption: the three horizontal lines are the three bits extended in time; the six dashed verticals are the six rounds; the circles in the bottom row are each round's reading (the check asked is labelled beneath). Amber × = a bit-flip fault, blue square = a misread fault. The 1 0 0 1 0 0 above the readings are the six readings when only the two timelike misreads happen.
空间型(spacelike)故障集合:在同一时刻翻三个比特(图中琥珀色)。之后每条检查的读数都不变(1 ⊕ 1 = 0 ⊕ 0 = 0),所有探测器为 0,而 000 变成了 111——多数票翻了。3 个故障,未被发现且改写信息。有没有更少的?翻两个比特,第三个就和它们不同,含第三个比特的两条检查迟早会被问到并读出 1,所以不行——前提是窗口两头都「封口」:开头的读数和制备值 000 比较,结尾把三个比特读出来和最后的读数比较。不封口时会有漏洞:在第 0 轮之前翻 b1、b2(等于一开始就制备成了 110),读数从头到尾都不变,没有任何探测器可比;结尾读出 110,多数票译成 1,2 个故障就溜过去并改写了信息;在最后一两轮之前翻转,相关的问题再也等不到,也是 2 个就够(见下面的记号段)。空间型故障距离 = 3,等于重复码的静态码距——不奇怪,这类故障就是「某一帧里的一条静态错误」。
Spacelike fault sets: flip all three bits at one moment (amber in the figure). Every check's reading is unchanged afterwards (1 ⊕ 1 = 0 ⊕ 0 = 0), every detector is 0, and 000 has become 111: the majority flipped. 3 faults, undetected and rewriting. Any fewer? Flip two bits and the third differs from them; the two checks containing the third bit will sooner or later be asked and read 1, so no — provided both ends of the window are “sealed”: the first readings are compared with the prepared 000, and at the end the three bits are read out and compared with the last readings. Unsealed, there are loopholes: flip b1 and b2 before round 0 (as if 110 had been prepared) and the readings never change, so no detector has anything to compare; the final readout 110 decodes to 1, and 2 faults slip through and rewrite the information; flip bits before the last round or two and the relevant question never comes, again 2 suffice (see the notation paragraph below). Spacelike fault distance = 3, equal to the repetition code's static distance, unsurprisingly, since such a fault set is “a static error in one frame”.
时间型(timelike)故障集合:只碰读数,不碰比特(图中蓝色)。在轮换时间表里,把 c1 在 t = 0 和 t = 3 两次都读反:c(0) = 1,c(3) = 1,S(3) = 1 ⊕ 1 = 0,六轮里没有任何探测器亮。2 个故障就没被发现。同样的窗口换成 1.1 节的静态码:要让 D1(1) 到 D1(5) 全为 0,c1 的六次读数必须全部读反——6 个故障。同一部电影的长度,时间表不同,时间方向上「溜过去」的代价从 6 降到 2。(这里轮换表用的是 1.2 节的 S 探测器;4.3 节会看到 S 漏了一条约束,把探测器找全后轮换表的数是 4,仍然小于 6。)这类故障集合改写的不是比特,而是从读数得出的推断。在 Floquet 码里,量子信息始终编码在数据比特上,不在读数里;但读出逻辑值要用的逻辑算符带一个 ± 号,这个号由此前的测量结果决定。Hastings 与 Haah(arXiv:2107.02194,1.4 节)写明:外逻辑算符(把 honeycomb 码看成子系统码时,不属于它的稳定子群的那一组逻辑算符)的符号取决于检查结果的历史,必须把这些符号记下来,才能正确推断逻辑值(卡片也说瞬时稳定子群是 “outcome-dependent”,即依赖测量结果的)。读反一次,记下的符号就可能是错的,逻辑值的推断跟着错,所以它们可能是逻辑故障——推导页把未被探测的故障分成三种情形,只有「改变逻辑类」那一种才算,另一种只是改写了读数与稳定子代表元(「此刻这组检查各自答 +1 还是 −1」的记录)而没动编码信息,分辨它们需要一次可观测量的计算;在经典玩具里比特没动、多数票不变,它们只演示「未被发现」这一半——这是玩具替代不了的部分,本篇只做描述。
Timelike fault sets: touch only readings, never bits (blue in the figure). In the rotating schedule, misread c1 at both t = 0 and t = 3: c(0) = 1, c(3) = 1, S(3) = 1 ⊕ 1 = 0, and no detector lights in six rounds. 2 faults go undetected. The same window with the static code of 1.1: for D1(1) through D1(5) to be all 0, all six readings of c1 must be inverted, 6 faults. Same film length, different schedule, and the cost of “slipping through” along time drops from 6 to 2. (The rotating schedule here uses the S detectors of 1.2; section 4.3 shows that S misses one constraint, and with a complete detector set the rotating number is 4, still below 6.) What such sets rewrite is not a bit but the inference drawn from the readings. In a Floquet code the quantum information stays encoded in the data qubits, not in the readings; but the logical operators used to read out the logical value carry a ± sign fixed by earlier measurement outcomes. Hastings and Haah (arXiv:2107.02194, section 1.4) state that an outer logical operator (one of the logical operators that is not in the stabilizer group of the honeycomb code viewed as a subsystem code) carries a sign that depends on the history of check outcomes, and that these signs must be recorded to infer the logical value correctly (the card, too, calls the instantaneous stabilizer group “outcome-dependent”). One misread can make a recorded sign wrong, and the inferred logical value goes wrong with it, so they can be logical faults there — the derivation page sorts undetected faults into three cases, and only the one that flips a logical class counts; another merely rewrites outcomes and stabilizer representatives (the record of “which of the current checks answer +1 and which −1”) without touching the encoded information, and telling them apart needs an observable calculation; in the classical toy the bits do not move and the majority stands, so they only illustrate the “undetected” half. This is the part the toy cannot replace, and this guide only describes it.
时间型,最少几个读反能不被发现(片段两头都不封口):轮换表 2,静态表 6Toy (six rounds): spacelike fault distance 3 (both ends sealed: start compared with 000, bits read out at the end)
timelike, fewest misreads that go undetected (clip unsealed at both ends): rotating 2, static 6
记号:三个数都是本篇算的,并用脚本穷举核对。空间型的 3 要求两头封口。只封开头、结尾不读出比特:在第 4 轮之前翻 b1、第 5 轮之前翻 b3:第 4 轮问的 c2 = b2 ⊕ b3 不含 b1,读 0;第 5 轮问的 c3 = b1 ⊕ b3 两个比特都翻了,仍读 0;窗口就此结束,比特停在 101,多数票译成 1,2 个故障就够。只封结尾、开头不比 000:上面那个「第 0 轮之前翻两个」的例子,也是 2 个。时间型的 2、6 不是故障距离:在经典玩具里读反不改动比特,多数票不变,它们只数出了「最少几个读反能不被发现」。时间型的 2 与 6 要求窗口两端都不与已知值比较——一段从长电影中剪出的片段;若开头与制备值 0 比较、结尾与读出的比特比较,则任何读反都会在窗口的一端暴露,2 与 6 都消失。同一张时间表,边界规则不同,数字就不同;第 4 章解释这为什么恰好是 QEC-Bank 清单里的一项。
Notation: all three numbers were computed for this guide and cross-checked by an exhaustive script. The spacelike 3 requires both ends sealed. Seal only the start and skip the final readout: flip b1 before round 4 and b3 before round 5: round 4 asks c2 = b2 ⊕ b3, which does not contain b1, and reads 0; round 5 asks c3 = b1 ⊕ b3 with both bits flipped, and still reads 0; the window ends there with the bits at 101, which decodes to 1, and 2 faults suffice. Seal only the end and skip the comparison with 000: the “flip two before round 0” example above, again 2. The timelike 2 and 6 are not fault distances: in the classical toy a misread moves no bit and the majority stands, so they count only “the fewest misreads that go undetected”. The timelike 2 and 6 require a window compared with known values at neither end, a clip cut from a long film; if the start is compared with the prepared value 0 and the end with the read-out bits, every misread is exposed at one end of the window and both 2 and 6 vanish. Same schedule, different boundary rule, different number; Chapter 4 explains why this is exactly one item on the QEC-Bank list.
下面的部件就是这个玩具。每个格子可以放一个故障:× 是「这一轮之前这个比特翻转」,■ 是「这一轮的读数读反」;两头封口可以分别打开或关掉。四个「例」按钮摆出本节的四个例子,并把两头的封口一起设成该例所要求的状态。也可以自己试着在两头封口的电影里用 2 个故障既不被发现、又把多数票翻成 1(做不到)。只求不被发现倒是做得到:在第 0 轮和第 1 轮之前各翻一次 b3,翻过去又翻回来,什么都没改,多数票仍是 0。再关掉一头试试。
The widget below is this toy. Each cell can hold a fault: × is “this bit flips just before this round”, ■ is “this round's reading is inverted”; the seal at each end can be switched on or off. The four “Example” buttons set up the four examples of this section, and set the two seals to what each example requires. You can also try, in a film sealed at both ends, to use 2 faults that go undetected and flip the final majority to 1 (impossible). Merely going undetected is possible: flip b3 before round 0 and again before round 1; it flips and flips back, nothing changes, and the majority stays 0. Then unseal one end and try again.
floquet-fault-distance · “Floquet fault distance under a named schedule” · status: open · difficulty: hard-engineering · related: [honeycomb]
“Detector design + fault-distance computation for dynamical codes (timelike vs spacelike kept separate); beyond-graphlike DEM search.”
floquet-fault-distance · “Floquet fault distance under a named schedule” · status: open · difficulty: hard-engineering · related: [honeycomb]
“Detector design + fault-distance computation for dynamical codes (timelike vs spacelike kept separate); beyond-graphlike DEM search.”
逐词翻译。under a named schedule:答案属于一张写明的时间表,换表就换答案(1.3 节:2 对 6)。Detector design:先决定「比什么、和几轮前比、边界上怎么比」,1.2 节的 S(t) 是最简单的一种设计。fault-distance computation for dynamical codes:在电影里数 1.3 节那个最小数。timelike vs spacelike kept separate:时间方向与空间方向的两个数分开报,不许合成一个。beyond-graphlike DEM search:DEMdetector error model,探测器错误模型:一张清单,列出电影里每一种基本故障会点亮哪些探测器、是否改写逻辑信息、概率多大。译码器和码距搜索都以它为输入。 = 探测器错误模型,即「每种故障点亮哪几个探测器」的清单;graphlike图状:每种故障至多点亮两个探测器,于是 DEM 是一张普通的图(故障 = 边,探测器 = 点),最小重量完美匹配可用。表面码的时空探测器图就是图状的(《译码器 · 高中数学版》5.2 节)。(图状)指每种故障至多亮两个探测器,像 1.2 节里 b2 翻转亮 S(3)、S(4) 两个;beyond-graphlike 指有的故障亮三个以上(BB 译码器教程 1.3 节「一个错误点亮三盏灯」的时空版),这时找最轻的未被发现的故障集合就不再是配对问题,而是大码的码距篇 1.3 节那种「排除所有更轻候选」的搜索。人话:要的是一台机器:给它一张时间表,它设计探测器、建 DEM、分别算出空间型和时间型的最小故障数,并在故障不成对时也能搜。
Word by word. under a named schedule: the answer belongs to one written-down schedule; change the schedule and the answer changes (1.3: 2 versus 6). Detector design: first decide “compare what, with how many rounds ago, and how at the boundaries”; the S(t) of 1.2 is the simplest design. fault-distance computation for dynamical codes: counting the minimum of 1.3 inside the film. timelike vs spacelike kept separate: the two numbers for the time and space directions are reported apart, never merged into one. beyond-graphlike DEM search: a DEMDetector error model: a list stating, for every elementary fault in the film, which detectors it lights, whether it rewrites the logical information, and with what probability. Both decoders and distance searches take it as input. is a detector error model, the list of “which detectors each fault lights”; graphlikeEvery fault lights at most two detectors, so the DEM is an ordinary graph (faults = edges, detectors = vertices) and minimum-weight perfect matching applies. The surface code's spacetime detector graph is graphlike (section 5.2 of “Decoders · High-School Edition”). means every fault lights at most two detectors, as b2's flip lit S(3) and S(4) in 1.2; beyond-graphlike means some faults light three or more (the spacetime version of “one error lights three lamps” in section 1.3 of the BB decoders guide), and then finding the lightest undetected fault set is no longer a pairing problem but a search of the kind in section 1.3 of the distance-for-large-codes guide, “exclude every lighter candidate”. In plain words: what is wanted is a machine that, given a schedule, designs the detectors, builds the DEM, computes the spacelike and timelike minimum fault counts separately, and can still search when faults do not come in pairs.
QEC-Bank 现在是怎么凑合的:验证结构,留空 dHow the QEC-Bank copes today: verify the structure, leave d blank
蜂窝码卡片上 n、k、dynamic_k 都是 verified,d 那一栏是一个问号。这一章逐字读卡片和条目页,说明问号不是疏忽,而是一条写进推导页的纪律:不给错误的对象贴机器的确定性。 On the honeycomb card n, k and dynamic_k are all verified, and the d column holds a question mark. This chapter reads the card and the entry page word for word to show that the question mark is not an oversight but a discipline written into the derivation page: no machine certainty for the wrong object.
“ISG structure verified (dynamic_k); d omitted or claimed(ref).”
“ISG structure verified (dynamic_k); d omitted or claimed(ref).”
2.1蜂窝码卡片上 d 那一栏The d column of the honeycomb card
先看 codes/honeycomb/instances.yaml 的原文,两个实例,逐字:
First the text of codes/honeycomb/instances.yaml, two instances, verbatim:
| 实例Instance | 参数params | claims(原文)claims (verbatim) | 条目页的 d 栏d column on the entry page |
|---|---|---|---|
| L3x3 | {L1: 3, L2: 3} | n: 18, verified · k: 2, verified · css: false, verified · dynamic_k: 2, verified | d=? |
| L6x6 | {L1: 6, L2: 6} | n: 72, verified · k: 2, verified · css: false, verified · dynamic_k: 2, verified | d=? |
记号:L1、L2 = 蜂窝环面的行数与列数(卡片要求都是 3 的倍数,以便六边形三染色);n = 2·L1·L2;css: false = 检查不是分成纯 X 族与纯 Z 族的(蜂窝码的边算符是 XX、YY、ZZ);dynamic_k = 时间表反复放映、秩序列重复后的 n − 秩。条目页 exports/site/entries/honeycomb.html 的 “Reference instances” 表把没有 d 记录的实例渲染成 d=?。
Notation: L1, L2 = rows and columns of the honeycomb torus (the card requires both to be multiples of 3 so the hexagons can be three-coloured); n = 2·L1·L2; css: false = the checks do not split into a pure-X and a pure-Z family (the honeycomb's edge operators are XX, YY, ZZ); dynamic_k = n minus the rank once the schedule has been replayed until its rank profile repeats. The “Reference instances” table of the entry page exports/site/entries/honeycomb.html renders an instance without a d record as d=?.
claims 里没有 d 这一项,条目页因此显示 d=?——这就是板上 “d omitted” 的意思。卡片并非忘了:card.yaml 里有一个字段 claim_gaps,原文 [{property: d, target: wanted:floquet-fault-distance}],把「d 缺席」明确登记为一个缺口,并指向本条 Wanted 项。板上原文的另一半 “or claimed(ref)” 说的是另一种被允许的做法:照抄一篇论文的数字并标 claimed。我们检查了 QEC-Bank 里另一个 Floquet 型条目 da_color_2d(标准译码器篇 2.1 节见过它):同样 d=?,同样 claim_gaps 指向本条。也就是说,在我们查到的两个 Floquet 条目上,QEC-Bank 都选了「留空」而非「照抄」。人话:结构(几个比特、几个逻辑比特、时间表放完还剩几个)机器算过并写 verified;码距一栏宁可空着,也不填一个来源不对的数。
The claims contain no d item, so the entry page shows d=?; that is what “d omitted” on the board means. The card did not forget: card.yaml has a field claim_gaps, verbatim [{property: d, target: wanted:floquet-fault-distance}], registering “d absent” explicitly as a gap and pointing at this Wanted item. The other half of the board's wording, “or claimed(ref)”, describes the other permitted practice: copy a paper's number and mark it claimed. We checked the QEC-Bank's other Floquet-type entry, da_color_2d (met in section 2.1 of the standard-decoders guide): likewise d=?, likewise claim_gaps pointing here. So on both Floquet entries we found, the QEC-Bank chose “leave blank” over “copy”. In plain words: the structure (how many qubits, how many logical qubits, how many survive the whole schedule) has been computed by machine and marked verified; the distance column stays empty rather than hold a number of the wrong provenance.
2.2卡片在别处怎么谈码距How the card speaks of distance elsewhere
卡片没有 d 记录,却在三处谈到了码距,每处都带证据词。第一处,views 第 0 条(origin: derived,即由构造器机器导出):“After the declared startup, the constructor exports independent sign-free Pauli generators for one instantaneous stabilizer group as a symplectic CheckMatrix. This is the universal R1 snapshot for rank and commutation; it does not determine the protocol's spacetime distance.” 人话:机器导出的是某一轮的快照矩阵,能算秩、能验对易,但它不决定时空码距。第二处,views 第 3 条(origin: curated,ref blackwell2025distance):“Plaquette information is assembled from measurement outcomes at different times. Faults are classified by the detector events they create and by whether an undetectable spacetime history is benign, so circuit fault distance cannot be read from one instantaneous snapshot.” 这一条正是 1.3 节的定义在蜂窝码上的版本:故障按「点亮哪些探测器」和「未被发现的历史是否无害benign:一段未点亮任何探测器、也不改变编码信息的故障历史。Blackwell–Haah 的码距只数「未被发现且非无害」的历史;无害历史构成一个等价类,是「电影里的检查乘积」。」分类。第三处,decoders 第 0 条:mwpm,status standard,ref gidney2021fault,noise “periodic honeycomb detector graphs with repeated parity-measurement faults”,notes “Plaquette changes populate two interleaved spacetime matching graphs. Correlation-aware matching uses the named parity-measurement circuit and its edge probabilities; the reported threshold range therefore belongs to that circuit/noise/decoder triple, not to the abstract schedule.”
The card has no d record, yet speaks of distance in three places, each with an evidence word. First, views item 0 (origin: derived, i.e. exported by the constructor machine): “After the declared startup, the constructor exports independent sign-free Pauli generators for one instantaneous stabilizer group as a symplectic CheckMatrix. This is the universal R1 snapshot for rank and commutation; it does not determine the protocol's spacetime distance.” In plain words: what the machine exports is one round's snapshot matrix, good for ranks and commutation, and it does not determine the spacetime distance. Second, views item 3 (origin: curated, ref blackwell2025distance): “Plaquette information is assembled from measurement outcomes at different times. Faults are classified by the detector events they create and by whether an undetectable spacetime history is benign, so circuit fault distance cannot be read from one instantaneous snapshot.” This is exactly the definition of 1.3 in its honeycomb form: faults classified by “which detectors they light” and by whether an undetected history is benignA fault history that lights no detector and does not change the encoded information. The Blackwell–Haah distance counts only “undetected and non-benign” histories; benign histories form an equivalence class, the “products of checks inside the film”.. Third, decoders item 0: mwpm, status standard, ref gidney2021fault, noise “periodic honeycomb detector graphs with repeated parity-measurement faults”, notes “Plaquette changes populate two interleaved spacetime matching graphs. Correlation-aware matching uses the named parity-measurement circuit and its edge probabilities; the reported threshold range therefore belongs to that circuit/noise/decoder triple, not to the abstract schedule.”
第三处告诉我们一件有点意外的事:蜂窝码有标准译码器(时空匹配),有人对具体电路算过阈值,可它仍然没有 d。因为那些数字属于「那个电路 + 那种噪声 + 那个译码器」三元组,不属于抽象的时间表;卡片的 realizations 里还登记了 wootton2022plaquettes(status demonstrated:“It did not demonstrate a protected logical memory, distance scaling, or logical error suppression.”)和 claes2025dynamic(status proposed:“…improve timelike distance. The result is a simulated circuit proposal with a different detector model.”)——后者直接用了 “timelike distance” 这个词,也直接说明换探测器模型就是另一个对象。
The third place tells us something slightly surprising: the honeycomb code has a standard decoder (spacetime matching) and thresholds have been computed for explicit circuits, yet it still has no d. Because those numbers belong to the triple “that circuit + that noise + that decoder”, not to the abstract schedule; the card's realizations also register wootton2022plaquettes (status demonstrated: “It did not demonstrate a protected logical memory, distance scaling, or logical error suppression.”) and claes2025dynamic (status proposed: “…improve timelike distance. The result is a simulated circuit proposal with a different detector model.”); the latter uses the very words “timelike distance” and states directly that a different detector model is a different object.
2.3为什么不能把快照的码距填进去Why the snapshot's distance must not be filled in
最直接的诱惑是:任取稳定后的一轮,把那一帧的 16 条检查当作一个静态码,算它的码距,填进 d。卡片的 views 第 2 条(origin: curated,ref hastings2021dynamically)甚至说了这一帧是什么:“Contract every edge measured in the latest round into an effective qubit. The resulting instantaneous stabilizer group is locally Clifford-equivalent to a toric code, which explains the two logical qubits without identifying the full spacetime protocol with a static toric memory.” 每一帧都「局部等价于一个环面码」——所以两个逻辑比特有了解释;但句子后半段立刻收回:不能把整部电影等同于一个静态的环面码记忆。QEC-Bank 的推导页 codes/honeycomb/pedagogy/spacetime-detectors-distance.md 用一张表把三个量分开(原文照录):
The most direct temptation: take any settled round, treat its 16 checks as a static code, compute that code's distance, fill it into d. The card's views item 2 (origin: curated, ref hastings2021dynamically) even says what that frame is: “Contract every edge measured in the latest round into an effective qubit. The resulting instantaneous stabilizer group is locally Clifford-equivalent to a toric code, which explains the two logical qubits without identifying the full spacetime protocol with a static toric memory.” Every frame is “locally equivalent to a toric code”, which explains the two logical qubits; but the second half of the sentence takes it straight back: the whole film must not be identified with a static toric memory. The QEC-Bank derivation page codes/honeycomb/pedagogy/spacetime-detectors-distance.md separates three quantities in one table (transcribed verbatim):
| quantity(原文)quantity | formal input(原文)formal input | question answered(原文)question answered | 人话In plain words |
|---|---|---|---|
| snapshot k | one steady ISG | how many logical qubits exist in this frame? | 某一帧还剩几个逻辑比特;L3x3:18 − 16 = 2。Logical qubits left in one frame; L3x3: 18 − 16 = 2. |
| dynamic_k | repeated ideal schedule | how many logical qubits survive continued measurement? | 整部电影放完还剩几个;L3x3:2。两者相等是一致性检查。How many survive the whole film; L3x3: 2. Their equality is a consistency check. |
| circuit fault distance | full noisy spacetime protocol | what is the lightest undetectable non-benign fault history? | 1.3 节的那个最小数,在有噪声的完整电影里。未登记。The minimum of 1.3, in the full noisy film. Not registered. |
推导页紧接着的三句是这一章的核心(原文):“The current QEC-Bank engine recomputes the first two. It has no generic spacetime benign-error quotient, so the third remains an honest gap. Recording a static exact distance under property d would attach machine certainty to the wrong object.” 人话:引擎能算前两行;第三行需要一个「哪些故障历史是无害的」的通用判定,引擎没有;若把某一帧的静态码距填进 d,等于给一个不是码距的数字盖上 verified 的章。这就是问号的来历。推导页还举了三种情形说明为什么快照会答错问题:一段低重量的错误可能(1)点亮探测器而被看见,(2)被吸收进读数或稳定子代表元的变化而不改编码信息,(3)不点亮任何探测器却搬运或翻转逻辑类——只有第三种是逻辑故障,而快照矩阵的最小化把三种混在一起数。
The derivation page's next three sentences are the heart of this chapter (verbatim): “The current QEC-Bank engine recomputes the first two. It has no generic spacetime benign-error quotient, so the third remains an honest gap. Recording a static exact distance under property d would attach machine certainty to the wrong object.” In plain words: the engine can compute the first two rows; the third needs a general rule for “which fault histories are benign”, which the engine lacks; filling one frame's static distance into d would stamp verified on a number that is not the distance. That is where the question mark comes from. The page also lists three cases for why a snapshot answers the wrong question: a low-weight error may (1) create detectors and be seen, (2) be absorbed into changes of readings or of stabilizer representatives without changing the encoded information, (3) create no detector yet transport or flip a logical class; only the third is a logical fault, and minimizing over a snapshot matrix counts all three together.
「局部 Clifford 等价于环面码」「无害错误的商」是超出高中数学的对象,本篇只说它们是什么,不推导全貌。后者是把「电影里的检查乘积」全部视为零的一种等价类划分。前者不只是逐个比特换一下基,而是两步:先把刚测过的每一对比特看成一个有效比特(测过 ZZ 之后,这两个比特只能处在一个二维子空间里,只剩一个比特的自由度);再在每条刚测过的边上做一个两比特的Clifford 门把每个泡利算符变成另一个泡利算符的量子门,例如 CNOT、Hadamard。它只是把检查「改写成另一套记号」,不改变码能做什么。(xx 或 zz 边用一个 CNOT,yy 边用一个受控 YY 门;Hastings 与 Haah,arXiv:2107.02194,1.4 节),把每一对里的一个比特解成一个固定的状态,然后去掉它。去掉之后剩下的检查就是一个更粗格子上的环面码检查(卡片 relations 一条的原话:“contracting the just-measured matching and applying a depth-one local Clifford change of basis maps the instantaneous stabilizer group to toric-code stabilizers on a coarser lattice”)。下图是一条 zz 边上的这一步。同样,蜂窝码里不同轮的检查反对易、瞬时稳定子群如何更新,本篇引用两张测量时间表篇 1.2 节而不重推。foundations/schedules-isg/intuition.md 是一个存根,一句话:“Dynamical codes are sequences of measured Pauli products; the ISG is the state's instantaneous stabilizer.” 它还写明了机器边界:“Lean Complete v1 checks ordered commuting rounds, the declared finite snapshot, and periodic row-space recurrence where required. It does not formalize spacetime distance or dynamic logical transport.”
“Locally Clifford-equivalent to a toric code” and “the benign-error quotient” are objects beyond high-school mathematics; this guide says what they are and does not derive them in full. The latter is a partition into equivalence classes that treats every “product of checks inside the film” as zero. The former is more than a change of basis on each qubit; it has two steps. First, each pair of qubits just measured is regarded as one effective qubit (after ZZ is measured, the two qubits can only be in a two-dimensional subspace, which leaves the freedom of one qubit). Second, a two-qubit Clifford gateA quantum gate that turns every Pauli operator into another Pauli operator, such as CNOT or Hadamard. It only rewrites the checks in another notation and does not change what the code can do. is applied on every edge just measured (one CNOT for an xx or zz edge, one controlled-YY for a yy edge; Hastings and Haah, arXiv:2107.02194, section 1.4), which turns one qubit of each pair into a fixed state, and that qubit is removed. What remains are the checks of a toric code on a coarser lattice (the card's relations item: “contracting the just-measured matching and applying a depth-one local Clifford change of basis maps the instantaneous stabilizer group to toric-code stabilizers on a coarser lattice”). The figure below shows this step on one zz edge. Likewise, why checks of different rounds anticommute in the honeycomb and how the instantaneous stabilizer group updates are cited from section 1.2 of the schedule-equivalence guide, not rederived. foundations/schedules-isg/intuition.md is a stub, one line: “Dynamical codes are sequences of measured Pauli products; the ISG is the state's instantaneous stabilizer.” It also states the machine boundary: “Lean Complete v1 checks ordered commuting rounds, the declared finite snapshot, and periodic row-space recurrence where required. It does not formalize spacetime distance or dynamic logical transport.”
图注:一条 zz 边上的「一对比特变成一个有效比特」。① 测过 ZaZb 且结果为 +1 后,状态只能是 α|00⟩ + β|11⟩;② 做一个 CNOT(a 为控制、b 为目标:a 为 1 时翻转 b),|00⟩ 不变,|11⟩ 变成 |10⟩,状态变成 (α|0⟩ + β|1⟩)a|0⟩b;③ b 与信息无关,可以去掉,α、β 全留在 a 上。结果为 −1 时 b 停在 |1⟩,其余相同。底下两行是各个算符经过 CNOT 后变成什么,可以用「CNOT 把 Zb 变成 ZaZb、把 Xa 变成 XaXb、其余不变」自己核对(脚本核对见 notes/floquet-fault-distance/pair_contraction_check.py)。每条刚测过的边都这样处理,剩下的有效比特上的检查就是环面码的检查。琥珀色 = 有效比特,灰色虚线 = 被去掉的比特。
Caption: “one pair becomes one effective qubit” on a zz edge. ① After ZaZb is measured with outcome +1, the state can only be α|00⟩ + β|11⟩; ② apply a CNOT (a control, b target: flip b when a is 1): |00⟩ stays, |11⟩ becomes |10⟩, and the state becomes (α|0⟩ + β|1⟩)a|0⟩b; ③ b carries none of the information and can be removed, with α and β all left on a. With outcome −1, b ends in |1⟩ and the rest is the same. The bottom two lines say what each operator becomes under the CNOT; check them with “CNOT turns Zb into ZaZb and Xa into XaXb and leaves the others alone” (script check in notes/floquet-fault-distance/pair_contraction_check.py). Do this on every edge just measured, and the checks left on the effective qubits are toric-code checks. Amber = the effective qubit, grey dashed = the removed qubit.
为什么我们想要答案:一个问号挡住了什么Why we want the answer: what one question mark blocks
板上给的理由是一句话。这一章说清它挡住了哪些比较、答案来了以后卡片上哪个词会翻成哪个词、以及今天一个 QEC-Bank 用户想做而做不到的三件事。 The board gives a one-sentence reason. This chapter spells out which comparisons it blocks, which word on the card flips to which once the answer exists, and three things a user of the QEC-Bank wants to do today and cannot.
“Honeycomb and all Floquet entries show d = ? until this exists.”
“Honeycomb and all Floquet entries show d = ? until this exists.”
3.1d 是 QEC-Bank 用来比较码的第三个数d is the third number the QEC-Bank compares codes by
QEC-Bank 给每个码一张名片 [[n, k, d]]。n 和 k 说「花多少、存多少」,d 说「扛多少」——没有 d,名片只剩一半。表面码 L3 是 [[13, 1, 3]],环面码 L3 是 [[18, 2, 3]],蜂窝码 L3x3 是 [[18, 2, ?]]:同样 18 个比特、同样 2 个逻辑比特,它比环面码强还是弱?今天答不了。更要紧的是,蜂窝码存在的理由恰恰在电影里:它只用两比特的测量(卡片:“made only from weight-two Pauli measurements”),代价是「syndrome information is spread over time」(QEC-Bank 直觉页原话)。这笔账划不划得来,只有把时间方向的故障也数进去才知道——这正是板上坚持 “timelike vs spacelike kept separate” 的原因。人话:蜂窝码的卖点和代价都在时间方向上,而现在时间方向上只有针对一个指定协议的数字(交付的 3 × 3 电路下时间型 3),还没有条目级的数字。
The QEC-Bank gives every code a calling card [[n, k, d]]. n and k say “how much is spent, how much is stored”; d says “how much it withstands”; without d the card is half blank. Surface L3 is [[13, 1, 3]], toric L3 is [[18, 2, 3]], honeycomb L3x3 is [[18, 2, ?]]: same 18 qubits, same 2 logical qubits, is it stronger or weaker than the toric code? Today there is no answer. More to the point, the honeycomb code's reason to exist lives in the film: it uses only two-qubit measurements (card: “made only from weight-two Pauli measurements”), at the price that “syndrome information is spread over time” (the QEC-Bank intuition page's words). Whether that bargain pays can only be judged by counting faults along time too, which is exactly why the board insists on “timelike vs spacelike kept separate”. In plain words: the honeycomb's selling point and its price both lie along the time direction, and today there is along that direction there is so far only a protocol-level number (timelike 3 for the shipped 3 × 3 circuit), no entry-level one.
3.2答案来了,哪个词翻成哪个词When the answer arrives, which word flips to which
| 今天Today | 答案之后After the answer | 在哪里能看到Where it would show |
|---|---|---|
| honeycomb L3x3、L6x6:d=?honeycomb L3x3, L6x6: d=? | 两个数(空间型、时间型),各带证据词:机器穷举到的写 verified,只搜到见证的写 bounded;并注明「属于哪张电路、哪个观察窗口」Two numbers (spacelike, timelike), each with an evidence word: verified if exhausted by machine, bounded if only a witness was found; annotated with “which circuit, which observation window” | codes/honeycomb/instances.yaml · entries/honeycomb.html |
| claim_gaps: [{property: d, target: wanted:floquet-fault-distance}]claim_gaps: [{property: d, target: wanted:floquet-fault-distance}] | 删去Removed | codes/honeycomb/card.yaml |
| views 第 3 条「spacetime-detector」:curatedviews item 3, “spacetime-detector”: curated | 探测器与 DEM 由引擎生成:derivedDetectors and DEM generated by the engine: derived | codes/honeycomb/card.yaml |
| da_color_2d:d=?,译码器一栏 none-known(noise 里写着 “boundary docking faults”)da_color_2d: d=?, decoder field none-known (its noise names “boundary docking faults”) | 同样得到两个数;但它的 none-known 行还要等边界探测器设计完(标准译码器篇 2.2 节的折叠框)Likewise two numbers; but its none-known row also waits for the boundary detectors to be finished (the folded box in section 2.2 of the standard-decoders guide) | codes/da_color_2d/card.yaml |
| foundations 存根:“It does not formalize spacetime distance”foundations stub: “It does not formalize spacetime distance” | 不变:算出数字是一回事,Lean 里形式化是另一回事(证书篇)Unchanged: computing the number is one thing, formalizing it in Lean another (the certificate guide) | foundations/schedules-isg/intuition.md |
记号:verified / bounded / claimed / curated / derived 是 QEC-Bank 的证据词,含义见大码的码距篇第 2 章。第一行「两个数」是本篇按 statement 的 “kept separate” 推断的登记形状,不是 QEC-Bank 已定的格式。
Notation: verified / bounded / claimed / curated / derived are QEC-Bank evidence words, explained in Chapter 2 of the distance-for-large-codes guide. The “two numbers” of the first row is this guide's inference from the statement's “kept separate” about the shape of the record, not a format the QEC-Bank has fixed.
3.3今天一个 QEC-Bank 用户做不到的三件事Three things a user of the QEC-Bank cannot do today
一、按 d 给动态码排序或筛选——Floquet 条目在 d 上全是问号,任何「d ≥ 5 的码」的查询都会漏掉它们。二、核对一篇论文说的「蜂窝码在某电路下时间型码距为多少」——QEC-Bank 的可重跑引擎(qeclib/floquet.py)只覆盖一个指定协议:对 QEC-Bank 登记的一张 L3x3 电路和一个观察窗口(范围见下面的记号段),它算出空间型 2、时间型 3,两个数都标 verified;论文换一个电路或窗口它就对不上,条目级的 d 仍只能留空。三、判断「两比特测量省下的硬件,够不够抵消时间方向上多出的故障」——需要蜂窝码与表面码在同一层级(电路级)下各自的两个数,今天一边有条目级的数(表面码账本),一边只有协议级的数(2 与 3),还凑不成一个 d。人话:QEC-Bank 能告诉你蜂窝码怎么运转、存几个比特,但对「它扛多少」只能沉默。
One: sort or filter dynamical codes by d; Floquet entries are all question marks in d, so any query “codes with d ≥ 5” silently drops them. Two: check a paper's claim “the honeycomb's timelike distance under such-and-such circuit is so much”; the QEC-Bank's rerunnable engine (qeclib/floquet.py) covers one named protocol: for one registered L3x3 circuit and one observation window (scope in the notation note below) it certifies spacelike 2 and timelike 3, both marked verified; a paper's different circuit or window cannot be replayed, and the entry-level d stays blank. Three: judge “does the hardware saved by two-qubit measurements pay for the extra faults along time?”; that needs both numbers for honeycomb and surface at the same level (circuit-level), and today one side has entry-level numbers (the surface-code ledger) and the other only protocol-level ones (2 and 3) that do not yet roll up into a d. In plain words: the QEC-Bank can tell you how the honeycomb runs and how many qubits it stores, but on “how much it withstands” it must stay silent.
记号(2 与 3 的适用范围,取自 QEC-Bank 仓库):电路 honeycomb-l3x3-floquet-pair-memory 第 1 版(codes/honeycomb/floquet_pair_memory_l3x3.yaml)。窗口:6 个周期,每周期 3 轮、每轮 9 次两比特测量。边界:第 0、1 周期是启动段,第 4、5 周期是收尾段,都假定没有故障;探测器是相邻两个周期里同一块六边形面(共 9 块)的奇偶比较;逻辑帧以第 1 周期为起点、第 5 周期为终点比较。故障字母表与权重:故障只放在中间的第 2、3 周期,每次两比特测量之后一个位置,共 2 × 3 × 9 = 54 个位置,每个出错的位置算 1;空间型故障 = 刚测过的两个比特上出现 15 种非恒等两比特泡利之一,与刚测的那个泡利相乘后相同的两种算一种(刚测的泡利作用在测后状态上不起作用),剩 7 种;时间型故障 = 这次测量报告的结果被读反;两类分开搜索,不混在一起。搜索:重量 1 与 2 的全部故障历史都穷举了(空间型 378 与 70 119 种,时间型 54 与 1 431 种);空间型在重量 1 没有「未被发现且非无害」的历史,在重量 2 有;时间型在重量 1、2 都没有,并在重量 3 给出一个见证,所以两个数都是精确值。出处:QEC-Bank 测试 tests/test_floquet_distance.py 的 test_complete_layers_and_independent_witnesses_squeeze_both_sectors_exactly,结果文件 computed/floquet_distances/honeycomb-l3x3-floquet-fault-distance.json。本篇核对了结果文件里的数字和各层计数(54 = 位置数,1 431 = 从 54 个位置里选 2 个的组合数,378 = 54 × 7,70 119 = 1 431 × 7 × 7),没有重跑搜索;2 与 3 是 QEC-Bank 的结果。
Notation (the scope of the 2 and 3, taken from the QEC-Bank repository): circuit honeycomb-l3x3-floquet-pair-memory version 1 (codes/honeycomb/floquet_pair_memory_l3x3.yaml). Window: 6 periods, each of 3 rounds of 9 two-qubit measurements. Boundaries: periods 0 and 1 are start-up and periods 4 and 5 are wind-down, both assumed fault-free; a detector compares the parity of the same hexagonal face (9 faces in all) in two adjacent periods; the logical frame is compared from period 1 to period 5. Fault alphabet and weights: faults sit only in the middle periods 2 and 3, at one location after each two-qubit measurement, 2 × 3 × 9 = 54 locations, each faulty location counting 1; a spacelike fault is one of the 15 non-identity two-qubit Paulis on the pair just measured, with two Paulis counted as one if they differ by the measured Pauli (which does nothing to the post-measurement state), leaving 7 kinds; a timelike fault is a flip of the reported outcome of that measurement; the two kinds are searched separately, never mixed. Search: every fault history of weight 1 and 2 was enumerated (spacelike 378 and 70,119, timelike 54 and 1,431); spacelike has no “undetected and non-benign” history at weight 1 and has one at weight 2; timelike has none at weights 1 and 2 and a witness at weight 3, so both numbers are exact. Source: the QEC-Bank test test_complete_layers_and_independent_witnesses_squeeze_both_sectors_exactly in tests/test_floquet_distance.py, result file computed/floquet_distances/honeycomb-l3x3-floquet-fault-distance.json. This guide checked the numbers in the result file and the layer counts (54 = number of locations, 1,431 = ways to choose 2 of the 54 locations, 378 = 54 × 7, 70,119 = 1,431 × 7 × 7) but did not rerun the search; the 2 and 3 are the QEC-Bank's results.
合格的答案长什么样,为什么难What a qualifying answer looks like, and why it is hard
QEC-Bank 的推导页已经列出一个可重放的码距工件必须包含的七项。这一章逐项对到 3 比特玩具上,再解释难度词 hard-engineering——「知道怎么做,但要做很多」——以及玩具就能演示的三个难处。 The QEC-Bank derivation page already lists the seven things a replayable distance artifact must contain. This chapter maps each onto the 3-bit toy, then explains the difficulty word hard-engineering, “known how, but much to build”, and three difficulties the toy alone already exhibits.
4.1什么算解决:一份七项清单What counts as solved: a seven-item list
codes/honeycomb/pedagogy/spacetime-detectors-distance.md 的一节标题是 “What a replayable fault-distance artifact needs”,原文:“A future verifier must receive at least:” 然后是七项。逐字转录,并在右栏说明玩具里对应的东西:
A section of codes/honeycomb/pedagogy/spacetime-detectors-distance.md is titled “What a replayable fault-distance artifact needs”; it reads “A future verifier must receive at least:” followed by seven items. Transcribed word for word, with the toy's counterpart in the right column:
| # | 原文Verbatim | 在 3 比特玩具里是什么In the 3-bit toy |
|---|---|---|
| 1 | preparation and final-readout conventions | 开头是 000;结尾读出三个比特并与最后的读数对照。1.3 节看到:没有这两条,空间型是 2 而不是 3,时间型的 2 与 6 才会出现。Start at 000; at the end read out the three bits and compare with the last readings. Section 1.3 showed: without these two, spacelike is 2 not 3, and the timelike 2 and 6 only then appear. |
| 2 | the physical measurement circuit for every ideal parity operator | 「问 c1」在硬件上是几步操作、哪一步可能出错。玩具把它压成一个「读反」故障;真实电路里一次测量有多个可出错的位置(《译码器 · 高中数学版》5.4 节)。How many hardware steps “ask c1” takes and which may fail. The toy compresses it into one “misread” fault; in a real circuit one measurement has several fault locations (section 5.4 of “Decoders · High-School Edition”). |
| 3 | a named fault alphabet and location weights | 允许哪些故障(本篇:比特翻转、读反)、各算几分(本篇:都算 1)。Which faults are allowed (here: bit flip, misread) and how much each counts (here: 1 each). |
| 4 | detector definitions, including temporal boundaries | S(t) = c(t) ⊕ c(t−3),以及前三轮和结尾怎么比——第 1 章检查站和 1.3 节的记号段都撞上了这一项。S(t) = c(t) ⊕ c(t−3), plus how the first three rounds and the end are compared; both the Chapter 1 checkpoint and the notation note of 1.3 ran into this item. |
| 5 | logical observables in the chosen input/output frames | 「改写了信息」看什么:玩具看结尾的多数票;Floquet 码里量子信息在数据比特上,读数决定所跟踪的逻辑算符带 + 号还是 − 号,逻辑值要连同这些符号一起推断;输入帧与输出帧可以不同。What “rewrote the information” is judged by: the toy looks at the final majority; in a Floquet code the quantum information sits in the data qubits, the readings fix whether each tracked logical operator carries a + or a − sign, and the logical value is inferred together with those signs; input and output frames may differ. |
| 6 | benign generators or an equivalent quotient rule | 哪些「未被发现」的故障历史是无害的(2.2 节)。玩具里:同时翻三个比特再同时翻回来。蜂窝码里这条规则还没有通用算法——推导页原话 “no generic spacetime benign-error quotient”。Which “undetected” fault histories are benign (2.2). In the toy: flip all three bits and flip them all back. For the honeycomb this rule has no general algorithm yet: the page's words, “no generic spacetime benign-error quotient”. |
| 7 | an exact or bounded search with a replayable witness | 穷举(写 verified)或只找到一个见证(写 bounded),附上别人能重跑的记录——与大码的码距篇 1.2 节「上界 = 一个例子」同一套纪律。Exhaustion (verified) or a witness only (bounded), with a record others can rerun; the same discipline as “an upper bound = one example” in section 1.2 of the distance-for-large-codes guide. |
推导页最后一句规定了答案的形状:“The result should be keyed by circuit and observation window, not placed as a family-wide scalar on the honeycomb check matrix.” 人话:答案不是一个挂在「蜂窝码」名下的数,而是「这张电路、这个窗口 → 这两个数」的一条条记录。合格的答案 = 一台接受上面七项输入、输出这种记录的引擎,加上它在蜂窝码 L3x3、L6x6 上跑出的记录。
The page's last sentence fixes the shape of the answer: “The result should be keyed by circuit and observation window, not placed as a family-wide scalar on the honeycomb check matrix.” In plain words: the answer is not one number hung under the name “honeycomb” but records of the form “this circuit, this window → these two numbers”. A qualifying answer = an engine that takes the seven inputs above and emits such records, plus the records it produces on honeycomb L3x3 and L6x6.
4.2难度词:hard-engineering,「知道怎么做,但要做很多」The difficulty word: hard-engineering, “known how, but much to build”
Wanted 板只用两个难度词:open-research(没人知道怎么做,例如标准译码器篇)和 hard-engineering。本条是后者,理由在卡片和推导页上都能读到:定义有了——blackwell2025distance(Blackwell 与 Haah,“The code distance of Floquet codes”,2025)给出了「最轻的未被发现且非无害的时空错误」这个定义;具体电路算过——gidney2021fault 为明确的电路构造了周期探测器图和匹配问题,卡片把它列为 standard 译码器;结构验证有了——QEC-Bank 引擎已经能算 snapshot k 和 dynamic_k,Lean Complete v1(在机器证明检查器 Lean 里的一套核对)能核对每一轮内的检查两两对易,以及「行空间复现」:从空的稳定子群出发重放时间表,过了启动阶段、在某个快照时刻(不晚于第六个周期末)记下当时的瞬时稳定子群,再放一个周期,回到周期里的同一位置时,它能乘出的全部检查与快照时是同一个集合。比较时不看 ± 号:带正号还是负号取决于每次的测量结果,每个周期都可能不同,所以带符号的稳定子并不重复,重复的只是去掉符号后的那张清单(「行空间」就是把每条检查写成一行 0/1、不记符号后,这些行能加出的全部行)。Blackwell 与 Haah(arXiv:2510.05549)也是这样处理的:他们把 S 与 −S 视为一类来讨论周期性,并证明这种周期性只在启动阶段之后成立。缺的是把这些接成一台通用引擎:从时间表生成电路(第 2 项)、生成探测器与 DEM(第 4 项)、实现无害商(第 6 项)、在非图状的 DEM 上搜索(第 7 项),并对每张电路、每个窗口重跑。人话:路线图是清楚的,每一步都有人做过局部版本;难在把七项全部做成机器、做通用、做到能重放。
The board uses two difficulty words only: open-research (nobody knows how, e.g. the standard-decoders guide) and hard-engineering. This item is the latter, for reasons readable on the card and the derivation page: the definition exists: blackwell2025distance (Blackwell and Haah, “The code distance of Floquet codes”, 2025) defines “the lightest undetectable non-benign spacetime error”; explicit circuits have been analysed: gidney2021fault built the periodic detector graphs and matching problem for explicit circuits, and the card lists it as the standard decoder; structural verification exists: the QEC-Bank engine already computes snapshot k and dynamic_k, and Lean Complete v1 (a suite of checks in the proof checker Lean) verifies that the checks within each round commute, and “row-space recurrence”: replay the schedule starting from the empty stabilizer group, record the instantaneous stabilizer group at a snapshot time after the start-up stage (no later than the end of the sixth period), run one more period, and at the same point of the cycle the set of all checks it can multiply out is the same set as at the snapshot. Signs are ignored in the comparison: whether a check carries + or − depends on each round's measurement outcomes and can differ from period to period, so the signed stabilizers do not repeat; only the list with signs stripped does (the “row space” is what you get by writing each check as a row of 0s and 1s, with no sign, and taking every row those rows can add up to). Blackwell and Haah (arXiv:2510.05549) treat it the same way: they discuss periodicity with S and −S counted as one, and prove that this periodicity holds only after the start-up stage. What is missing is wiring these into one general engine: circuits from schedules (item 2), detectors and DEM (item 4), the benign quotient (item 6), search over non-graphlike DEMs (item 7), rerun per circuit and per window. In plain words: the roadmap is clear and every step has a partial version somewhere; the difficulty is making all seven items into a machine, general, and replayable.
4.3玩具就能演示的三个难处Three difficulties the toy alone already exhibits
一、答案依赖探测器有没有找全。把 1.2 节的探测器换成 T(t) = c(t) ⊕ c(t+1) ⊕ c(t+2)——三轮连读的异或,因为 c1 ⊕ c2 ⊕ c3 = (b1 ⊕ b2) ⊕ (b2 ⊕ b3) ⊕ (b1 ⊕ b3) = 0 恒成立,这也是一条合法的探测器。用它,1.3 节那对读反(t = 0 与 t = 3)会被抓住(T(0) = T(1) = T(2) = T(3) = 1),不封口窗口里最轻的未被发现的读反集合变成 4 个(例如 t = 0, 1, 3, 4)。同一张时间表、同一个窗口,S 型探测器给 2,T 型给 4。T 为什么多抓到东西?因为 T(t) ⊕ T(t+1) = c(t) ⊕ c(t+3) = S(t+3):每条 S 都是两条相邻 T 的异或,S 能查出的,T 全都查得出;反过来,T(0) = c(0) ⊕ c(1) ⊕ c(2) 不是任何几条 S 的异或,是 S 漏掉的一条约束。可以数出来:比特不动时,六次读数只能是 000000、101101、110110、011011 四种之一(由三个比特是什么决定),这四种构成 6 位里一个 2 维的集合,所以读数之间一共有 6 − 2 = 4 条独立约束;T(0) 到 T(3) 正是这 4 条,S(3) 到 S(5) 只占其中 3 条。探测器找全时,一组读反不被发现,当且仅当它本身就像上面某一种合法的读数序列,而最轻的非零一种有 4 个 1,这就是 4 的来历。所以 2 对 4 不是「同一组约束换个写法,码距就变了」(换一组能互相异或出来的探测器,这个数不会变),而是 S 型探测器漏了一条约束,给出的 2 偏低。板上把 “Detector design” 写在最前面,是因为探测器要先找全,算出的码距才可信。
One: the answer depends on whether the detector set is complete. Replace the detector of 1.2 with T(t) = c(t) ⊕ c(t+1) ⊕ c(t+2), the XOR of three consecutive readings; since c1 ⊕ c2 ⊕ c3 = (b1 ⊕ b2) ⊕ (b2 ⊕ b3) ⊕ (b1 ⊕ b3) = 0 always, this is a legitimate detector too. With it, the misread pair of 1.3 (t = 0 and t = 3) is caught (T(0) = T(1) = T(2) = T(3) = 1), and the lightest undetected set of misreads in the unsealed window becomes 4 (e.g. t = 0, 1, 3, 4). Same schedule, same window: S-type detectors give 2, T-type give 4. Why does T catch more? Because T(t) ⊕ T(t+1) = c(t) ⊕ c(t+3) = S(t+3): every S is the XOR of two neighbouring T's, so whatever S detects, T detects too; conversely T(0) = c(0) ⊕ c(1) ⊕ c(2) is not the XOR of any S's, so it is a constraint S misses. You can count it: with the bits left alone, the six readings can only be one of 000000, 101101, 110110, 011011 (depending on what the three bits are), a 2-dimensional set inside the 6-bit strings, so the readings obey 6 − 2 = 4 independent constraints; T(0) to T(3) are exactly those 4, while S(3) to S(5) cover only 3 of them. With a complete detector set, a set of misreads goes undetected exactly when it looks like one of those legitimate reading sequences itself, and the lightest nonzero one has four 1s: that is where the 4 comes from. So 2 versus 4 is not “the same constraints written another way changed the distance” (swapping to detectors that are XORs of each other leaves the number unchanged); the S-type detectors miss one constraint, and their 2 is too low. That is why the board writes “Detector design” first: the detector set must be complete before the distance means anything.
二、答案依赖窗口和边界。1.3 节的记号段:加上「开头与 0 比较、结尾读出比特」,时间型的 2 和 6 都消失;去掉结尾读出,空间型从 3 掉到 2。这就是第 1 项和第 4 项里 “conventions” 与 “temporal boundaries” 的分量,也是推导页坚持 “keyed by circuit and observation window” 的原因。
Two: the answer depends on the window and its boundaries. The notation note of 1.3: add “compare the start with 0, read out the bits at the end” and the timelike 2 and 6 vanish; drop the final readout and spacelike falls from 3 to 2. That is the weight carried by “conventions” and “temporal boundaries” in items 1 and 4, and the reason the page insists on “keyed by circuit and observation window”.
三、搜索会撞上同一堵墙。玩具的六轮窗口里有 3 × 6 = 18 个可能的翻转故障和 6 个读反故障,共 24 个,故障集合有 224 ≈ 1.7 × 107 种,本篇的核对脚本按重量从小到大穷举到 4 就停了,没有问题。蜂窝码 L3x3 一个周期只有 27 次两比特测量,但电路级的故障字母表里每次测量有多个位置,再乘上窗口长度,候选数很快回到大码的码距篇 1.4 节那种 2n 的增长;而 DEM 一旦不是图状的(有的故障亮三个以上探测器),就没有匹配那样的多项式捷径。人话:玩具上一秒钟能穷举完的事,在真实电路上重新变成「排除所有更轻候选」的老问题。
Three: the search hits the same wall. The toy's six-round window has 3 × 6 = 18 possible flip faults and 6 misread faults, 24 in all, hence 224 ≈ 1.7 × 107 fault sets; this guide's check script enumerated by increasing weight and stopped at 4 without trouble. Honeycomb L3x3 has only 27 two-qubit measurements per period, but a circuit-level fault alphabet has several locations per measurement, multiplied by the window length, and the candidate count soon returns to the 2n growth of section 1.4 of the distance-for-large-codes guide; and once the DEM is not graphlike (some faults light three or more detectors) there is no polynomial shortcut like matching. In plain words: what a toy exhausts in a second becomes, on a real circuit, the old problem of “exclude every lighter candidate”.
记号:T(t) = 第 t、t+1、t+2 三轮读数的异或;224 = 24 个故障各「有或无」的组合总数;27 = 蜂窝码 L3x3 一个周期内的测量次数(3 轮 × 9 条,出自两张测量时间表篇 1.2 节的公式行)。「4 个」与「1.7 × 107」是本篇算的。
Notation: T(t) = the XOR of the readings of rounds t, t+1, t+2; 224 = all “present or absent” combinations of 24 faults; 27 = measurements per period of honeycomb L3x3 (3 rounds × 9, from the formula line of section 1.2 of the schedule-equivalence guide). The “4” and “1.7 × 107” were computed for this guide.
从这里出发能做什么:两个手算练习、一个沙盘、几条路What you can do from here: two hand exercises, one sandbox, a few roads
练习 1 把 1.3 节时间型的 2 与 6 亲手验证一遍;练习 2 验证 4.3 节 T 型探测器给 4。然后在环面码沙盘上体会「静态码 = 周期 1 的时间表」。最后是相关条目与教程。 Exercise 1 verifies by hand the timelike 2 and 6 of 1.3; exercise 2 verifies that the T-type detectors of 4.3 give 4. Then feel “a static code = a period-1 schedule” on the toric sandbox. Finally, related entries and guides.
5.1练习 1:2 与 6Exercise 1: 2 and 6
窗口 t = 0…5,两头不封口,比特始终 000。(a)轮换表:把 c1 在 t = 0 和 t = 3 读反,写出六个读数 [1, 0, 0, 1, 0, 0],算 S(3)、S(4)、S(5),确认全为 0。再证明 1 个读反不可能不被发现:若读反在 t ≤ 2,S(t+3) = 1;若在 t ≥ 3,S(t) = 1。(b)静态表:两条检查每轮都问,探测器 Dj(t) = cj(t) ⊕ cj(t−1),t = 1…5。证明要让 D1(1) 到 D1(5) 全为 0,c1 的六个读数必须相同,于是要么 0 个读反、要么 6 个。(c)把窗口加长到 W 轮,两种表的最少读反数各是多少?提示:探测器只比较同一条检查相邻两次被问到的读数,所以一组不被发现的读反,对每条检查来说要么把它在窗口里的每次读数都读反,要么一次也不碰。答案:轮换表 ⌊W/3⌋,挑窗口内被问得最少的那条检查全部读反;静态表 W。W = 6 时就是上面的 2 与 6;W = 9 时轮换表变成 3,因为 S(6) = c(6) ⊕ c(3) 会抓住只反了 t = 0、3 的那一对。
Window t = 0…5, unsealed at both ends, bits always 000. (a) Rotating schedule: misread c1 at t = 0 and t = 3, write the six readings [1, 0, 0, 1, 0, 0], compute S(3), S(4), S(5) and confirm all are 0. Then show that 1 misread cannot go unnoticed: if it is at t ≤ 2 then S(t+3) = 1; if at t ≥ 3 then S(t) = 1. (b) Static schedule: both checks asked every round, detectors Dj(t) = cj(t) ⊕ cj(t−1), t = 1…5. Show that for D1(1) through D1(5) to be all 0 the six readings of c1 must be equal, hence either 0 misreads or 6. (c) Lengthen the window to W rounds: what is the minimum number of misreads for each schedule? Hint: a detector only compares two consecutive readings of the same check, so an undetected set of misreads must, for each check, either invert every one of its readings in the window or none. Answer: rotating ⌊W/3⌋, by inverting every reading of the check asked least often in the window; static W. For W = 6 these are the 2 and 6 above; for W = 9 the rotating answer becomes 3, because S(6) = c(6) ⊕ c(3) catches the pair inverted only at t = 0 and 3.
记号:⌊x⌋ 读「x 向下取整」,⌈x⌉ 读「x 向上取整」;W = 窗口的轮数(用 W 而不用 T,免得和 4.3 节的探测器 T(t) 混淆)。(c) 的两个答案是本篇算的,并对 W = 3 到 12 穷举核对过:轮换表里三条检查在 W 轮中各被问 ⌈W/3⌉ 或 ⌊W/3⌋ 次,被问最少的那条要全部读反,共 ⌊W/3⌋ 次;静态表里每条检查被问 W 次。
Notation: ⌊x⌋ reads “x rounded down”, ⌈x⌉ “x rounded up”; W = the number of rounds in the window (W rather than T, to avoid a clash with the detector T(t) of 4.3). The two answers of (c) were computed for this guide and checked exhaustively for W = 3 to 12: in the rotating schedule each of the three checks is asked ⌈W/3⌉ or ⌊W/3⌋ times in W rounds, and the one asked least must be misread every time, ⌊W/3⌋ misreads; in the static schedule every check is asked W times.
5.2练习 2:换探测器,2 变 4Exercise 2: change the detectors, 2 becomes 4
用 T(t) = c(t) ⊕ c(t+1) ⊕ c(t+2),t = 0…3。(a)对读数 [1, 0, 0, 1, 0, 0] 算 T(0) 到 T(3),确认全是 1——练习 1 里溜过去的那一对被抓住了。(b)对读数 [1, 1, 0, 1, 1, 0](读反 t = 0, 1, 3, 4)算 T(0) 到 T(3),确认全是 0。(c)说明为什么 3 个读反不可能让四个 T 全为 0:四个窗口 {0,1,2}, {1,2,3}, {2,3,4}, {3,4,5} 各要偶数个读反,把三个读反的位置分类讨论。这一题不需要脚本,纸上十分钟。
Use T(t) = c(t) ⊕ c(t+1) ⊕ c(t+2), t = 0…3. (a) For the readings [1, 0, 0, 1, 0, 0] compute T(0) through T(3) and confirm all are 1: the pair that slipped through in exercise 1 is caught. (b) For the readings [1, 1, 0, 1, 1, 0] (misreads at t = 0, 1, 3, 4) compute T(0) through T(3) and confirm all are 0. (c) Explain why 3 misreads cannot make all four T equal 0: each of the windows {0,1,2}, {1,2,3}, {2,3,4}, {3,4,5} needs an even number of misreads; sort the positions of three misreads into cases. No script needed, ten minutes on paper.
5.3沙盘:周期 1 的时间表Sandbox: a period-1 schedule
下面是 L = 3 的环面码沙盘。它就是 Schedule(18, [ 全部 18 条检查 ])——周期 1,每一轮问同样的 18 个问题(两张测量时间表篇 1.2 节的第一条公式行)。点几条边放 Z 错误,看星检查亮起;想象每一轮都重测一遍,探测器只在你点击的那一轮亮一次。再想象蜂窝码:同样 18 个比特,每轮只问 9 个两比特的问题,而且三轮的问题互相反对易——沙盘做不到这件事,这正是 Floquet 码与静态码的分界。
Below is the toric-code sandbox with L = 3. It is Schedule(18, [ all 18 checks ]): period 1, the same 18 questions every round (the first formula line of section 1.2 of the schedule-equivalence guide). Click a few edges to place Z errors and watch the star checks light; imagine remeasuring every round, with detectors lighting once, in the round you clicked. Now imagine the honeycomb: the same 18 qubits, but only 9 two-qubit questions per round, and the three rounds' questions anticommuting with one another; the sandbox cannot do that, and that is exactly the divide between Floquet and static codes.
5.4往哪里走Where to go next
相关条目:honeycomb(exports/site/entries/honeycomb.html,本条 yaml 里 related 的唯一一项;它的推导页 codes/honeycomb/pedagogy/spacetime-detectors-distance.md 是本篇第 2、4 章的主要来源);da_color_2d(同样 d=?,缺口同样指向本条)。时间表这个对象本身:两张测量时间表是不是同一回事——两张表等价时,它们的故障距离应当相同,那一篇的开放问题与本篇互为前提。探测器与时空译码:《译码器 · 高中数学版》第 5 章(假警报、探测器、时空图、电路级噪声);BB 译码器教程第 4 章(hook 错误、探测器、静态码距 ≠ 电路码距)。搜索这一半:大码的码距篇。本条 yaml 没有 working_repo。
Related entries: honeycomb (exports/site/entries/honeycomb.html, the only item under related in this yaml; its derivation page codes/honeycomb/pedagogy/spacetime-detectors-distance.md is the main source of Chapters 2 and 4 here); da_color_2d (likewise d=?, gap likewise pointing here). The schedule as an object: Are two measurement schedules the same thing?; equivalent schedules should have equal fault distances, so that guide's open problem and this one presuppose each other. Detectors and spacetime decoding: Chapter 5 of “Decoders · High-School Edition” (false alarms, detectors, the spacetime graph, circuit-level noise); Chapter 4 of the BB decoders guide (hook errors, detectors, static distance ≠ circuit distance). The search half: the distance-for-large-codes guide. This yaml has no working_repo.
一部电影、两个方向、七项输入、一个问号One film, two directions, seven inputs, one question mark
回放一遍。静态码每轮问同样的问题,码距是一帧里的数;动态码按时间表轮换问题,「码」是整部电影,故障要在电影里数。探测器问「和上次比变了吗」,把比特翻转与读反画成不同形状。故障距离是「未被发现且改写信息」的最小故障数,空间型与时间型分开报:3 比特玩具里空间型 3(两头封口);时间型方向玩具只能数「最少几个读反不被发现」,在不封口的六轮窗口里轮换表 2、静态表 6,换成三轮探测器则 4。QEC-Bank 的蜂窝码卡片 n、k、dynamic_k 都是 verified,d 是问号并登记为指向本条的 claim_gap,因为推导页写明「快照的码距是错误的对象」。合格的答案是一台接受七项输入、按电路和窗口输出两个数的引擎;难度是 hard-engineering,因为定义(blackwell2025distance)、具体电路的探测器(gidney2021fault)、结构验证(dynamic_k)都已存在,缺的是把它们接成通用、可重放的机器。
Replay. A static code asks the same questions every round and its distance is a number in one frame; a dynamical code rotates its questions on a schedule, “the code” is the whole film, and faults must be counted inside it. Detectors ask “did the answer change since last time” and draw bit flips and misreads as different shapes. The fault distance is the smallest number of faults that are “undetected and rewrite the information”, reported separately for the spacelike and timelike directions: in the 3-bit toy, spacelike 3 (both ends sealed); in the timelike direction the toy can only count “the fewest misreads that go undetected”: in an unsealed six-round window, rotating 2 and static 6, or 4 with three-round detectors. On the QEC-Bank honeycomb card n, k and dynamic_k are verified while d is a question mark registered as a claim_gap pointing at this item, because the derivation page states that “the snapshot's distance is the wrong object”. A qualifying answer is an engine taking seven inputs and emitting two numbers per circuit and window; the difficulty is hard-engineering, since the definition (blackwell2025distance), detectors for explicit circuits (gidney2021fault) and structural verification (dynamic_k) all exist, and what is missing is wiring them into a general, replayable machine.
符号与读法Symbols & how to read them
| 符号Symbol | 名称与读法Name & how to read it | 在本篇中的含义Meaning in this guide |
|---|---|---|
| [[n, k, d]] | 双方括号,读「n k d 码」Double brackets, read “an n k d code” | n 个物理比特、k 个逻辑比特、码距 d;蜂窝码 L3x3 是 [[18, 2, ?]]。n physical qubits, k logical qubits, distance d; honeycomb L3x3 is [[18, 2, ?]]. |
| L, L1, L2 | 读「L」Read “L” | 环面码的边长(n = 2L²);蜂窝环面的行数与列数(n = 2·L1·L2)。Side length of the toric code (n = 2L²); rows and columns of the honeycomb torus (n = 2·L1·L2). |
| bi, cj, c(t) | 读「比特 i、检查 j、第 t 轮的读数」Read “bit i, check j, the reading of round t” | 玩具的三个比特;三条检查 c1 = b1 ⊕ b2,c2 = b2 ⊕ b3,c3 = b1 ⊕ b3;轮换表里第 t 轮唯一的读数。The toy's three bits; the three checks c1 = b1 ⊕ b2, c2 = b2 ⊕ b3, c3 = b1 ⊕ b3; the single reading of round t in the rotating schedule. |
| ⊕ | 读「异或」或「模 2 加」Read “XOR” or “add mod 2” | 0⊕0 = 1⊕1 = 0,0⊕1 = 1;「一样吗」的算术形式。0⊕0 = 1⊕1 = 0, 0⊕1 = 1; the arithmetic form of “are they the same?”. |
| t, W | 读「轮次、窗口长度」Read “round, window length” | t = 0, 1, 2, … 是轮次;W 是观察窗口的轮数(本篇 6;不叫 T,因为 T(t) 是 4.3 节的探测器)。t = 0, 1, 2, … is the round; W is the number of rounds in the observation window (6 here; not called T, since T(t) is the detector of 4.3). |
| Dj(t), S(t), T(t) | 读「探测器」Read “detector” | Dj(t) = cj(t) ⊕ cj(t−1)(静态表);S(t) = c(t) ⊕ c(t−3)(轮换表,同一条检查);T(t) = c(t) ⊕ c(t+1) ⊕ c(t+2)(轮换表,三轮连读)。理想电影里全为 0。Dj(t) = cj(t) ⊕ cj(t−1) (static); S(t) = c(t) ⊕ c(t−3) (rotating, same check); T(t) = c(t) ⊕ c(t+1) ⊕ c(t+2) (rotating, three consecutive readings). All 0 in an ideal film. |
| (d, i, t), (m, t) | 读「翻转故障、读反故障」Read “flip fault, misread fault” | 第 t 轮之前比特 bi 翻转;第 t 轮的读数被读反。各算 1。Bit bi flips before round t; the reading of round t is inverted. Each counts 1. |
| sp(t), Dp(t) = sp(t) sp(t−Δ) | 读「六边形 p 的推断符号,与它的探测器」Read “the inferred sign of hexagon p, and its detector” | QEC-Bank 推导页里蜂窝码探测器的写法:sp(t) 由若干轮的边读数乘出,Δ(读「德尔塔」)是与几轮前比较的延迟。是本篇 S(t) 的蜂窝码版本。The QEC-Bank derivation page's form of the honeycomb detector: sp(t) is a product of edge readings from several rounds, Δ (read “delta”) the delay compared with. The honeycomb version of this guide's S(t). |
| dynamic_k, r | 读「动态 k、秩」Read “dynamic k, rank” | r = 某轮结束时瞬时稳定子群里独立检查的条数(L3x3:9, 12, 14, 16, 16, …);dynamic_k = n − 稳定后的 r = 2。r = independent checks in the ISG at the end of a round (L3x3: 9, 12, 14, 16, 16, …); dynamic_k = n − the settled r = 2. |
| d = ? | 读「d 未登记」Read “d not registered” | 条目页对「claims 里没有 d」的写法;蜂窝码两个实例都是。The entry page's rendering of “no d among the claims”; both honeycomb instances. |
| ⌊W/3⌋, 224 | 读「W 除以 3 向下取整、2 的 24 次方」Read “W over 3 rounded down, 2 to the 24” | 练习 1(c) 的答案;玩具窗口里故障集合的总数 ≈ 1.7 × 107。The answer of exercise 1(c); the number of fault sets in the toy window, ≈ 1.7 × 107. |
本篇新增词汇New terms in this guide
| 术语Term | 白话定义Plain definition |
|---|---|
| 静态码 / 动态码(Floquet 码)static / dynamical (Floquet) code | 每轮问同样的检查 / 按时间表轮换检查,整部电影才是码。The same checks every round / checks rotating on a schedule, the whole film being the code. |
| 时间表(schedule)schedule | Schedule(n, rounds):n 个比特加一份逐轮的检查清单;静态码是周期 1 的特例。Schedule(n, rounds): n qubits plus a round-by-round list of checks; a static code is the period-1 special case. |
| 瞬时稳定子群(ISG)instantaneous stabilizer group (ISG) | 此刻状态满足的全部检查;每测一条新串就更新。All checks the current state satisfies; updated at every new measurement. |
| 探测器(detector)detector | 若干次读数的异或,理想电影里恒为 0;「和上次比变了吗」。An XOR of several readings, always 0 in an ideal film; “did it change since last time?”. |
| 故障(fault)fault | 电影里的一个基本坏事件:比特翻转或读数读反。One elementary bad event in the film: a bit flip or a misread. |
| 故障距离(fault distance)fault distance | 「未被发现且改写信息」的故障集合的最小大小;依赖时间表、探测器、窗口。The smallest size of an “undetected and rewriting” fault set; depends on schedule, detectors, window. |
| 空间型 / 时间型(spacelike / timelike)spacelike / timelike | 故障集合的两个方向:某一时刻翻比特 / 沿时间读反。板上要求分开报。The two directions of a fault set: bits flipped at one moment / misreads along time. The board requires them reported apart. |
| 无害(benign)历史benign history | 未点亮探测器、也不改变编码信息的故障历史;码距只数非无害的。A fault history lighting no detector and changing no encoded information; the distance counts only non-benign ones. |
| 探测器错误模型(DEM)detector error model (DEM) | 「每种故障点亮哪些探测器、是否改写逻辑、概率多大」的清单。The list of “which detectors each fault lights, whether it rewrites the logical, with what probability”. |
| 图状 / 非图状(graphlike / beyond-graphlike)graphlike / beyond-graphlike | 每种故障至多亮两个探测器(可用匹配)/ 有的亮三个以上(要搜索)。Every fault lights at most two detectors (matching applies) / some light three or more (search needed). |
| 时间边界(temporal boundaries)temporal boundaries | 窗口开头与制备值、结尾与读出比特怎么比较;两头都比较叫「两头封口」。改变它就改变数字。How the window's start compares with the prepared value and its end with the read-out bits; comparing at both ends is called “sealing both ends”. Changing it changes the number. |
| 快照码距(snapshot distance)snapshot distance | 把某一帧当静态码算出的码距;QEC-Bank 拒绝把它填进 d。The distance of one frame treated as a static code; the QEC-Bank refuses to file it under d. |
| claim_gapsclaim_gaps | 卡片字段:登记某个属性缺席并指向负责的 Wanted 项。A card field registering an absent property and pointing at the responsible Wanted item. |
| open-research / hard-engineeringopen-research / hard-engineering | Wanted 板的两种难度:没人知道怎么做 / 知道怎么做但要做很多。本条是后者。The board's two difficulty grades: nobody knows how / known how but much to do. This item is the latter. |
延伸阅读Further reading
- M. B. Hastings, J. Haah, “Dynamically Generated Logical Qubits” (2021)
hastings2021dynamically(QEC-Bank 已登记,arXiv 2107.02194)。蜂窝码的奠基论文;卡片「局部 Clifford 等价于环面码」一条的引文。本篇只核对了它的 1.4 节(把测过的一对比特当作一个有效比特、用两比特门解开;外逻辑算符的符号取决于检查结果的历史),没有读其余证明。hastings2021dynamically (registered in the QEC-Bank, arXiv 2107.02194). The founding honeycomb paper; cited by the card's “locally Clifford-equivalent to a toric code” item. This guide checked only its section 1.4 (a measured pair treated as one effective qubit and disentangled by two-qubit gates; the sign of an outer logical operator depends on the history of check outcomes) and did not read its other proofs. - K. Blackwell, J. Haah, “The code distance of Floquet codes” (2025)
blackwell2025distance(已登记,arXiv 2510.05549)。「最轻的未被发现且非无害的时空错误」这一定义的出处;卡片 spacetime-detector 视图与推导页引用它。本篇转述定义,并核对了它 1.2 节对符号的处理(周期性按「S 与 −S 算一类」讨论)和「周期性只在启动阶段之后成立」的命题(命题 3.3)。blackwell2025distance (registered, arXiv 2510.05549). Source of the definition “the lightest undetectable non-benign spacetime error”; cited by the card's spacetime-detector view and the derivation page. This guide restates the definition and checked its treatment of signs in section 1.2 (periodicity is discussed with S and −S counted as one) and the statement that periodicity holds only after the start-up stage (Proposition 3.3). - “A Fault-Tolerant Honeycomb Memory” (2021)
gidney2021fault(据条目记载,登记待补:refs.yaml 只有键名,题目与 arXiv 2108.10457 取自推导页)。为明确电路构造周期探测器图与匹配问题;卡片 standard 译码器行的引文。gidney2021fault (cited by the entry, registration pending: refs.yaml holds only the key; title and arXiv 2108.10457 taken from the derivation page). Constructs periodic detector graphs and the matching problem for explicit circuits; cited by the card's standard decoder row. - J. R. Wootton, “Measurements of Floquet code plaquette stabilizers” (2022)
wootton2022plaquettes(已登记,arXiv 2210.13154)。卡片 realizations 里唯一 demonstrated 的一条;原文明说未演示码距标度。wootton2022plaquettes (registered, arXiv 2210.13154). The only demonstrated item under the card's realizations; states that no distance scaling was demonstrated. - QEC-Bank: the Wanted item and its data
wanted/floquet-fault-distance.yaml(六个字段原文)、codes/honeycomb/card.yaml(描述、claim_gaps、views 0/2/3、decoders、realizations)、codes/honeycomb/instances.yaml(L3x3、L6x6)、codes/honeycomb/intuition.md(秩序列与「spread over time」)、codes/honeycomb/pedagogy/spacetime-detectors-distance.md(三个量的表、七项清单、三句核心话)、codes/da_color_2d/{card,instances}.yaml、foundations/schedules-isg/intuition.md(存根与机器边界)、registry/refs.yaml。wanted/floquet-fault-distance.yaml (the six fields verbatim), codes/honeycomb/card.yaml (description, claim_gaps, views 0/2/3, decoders, realizations), codes/honeycomb/instances.yaml (L3x3, L6x6), codes/honeycomb/intuition.md (the rank profile and “spread over time”), codes/honeycomb/pedagogy/spacetime-detectors-distance.md (the three-quantity table, the seven-item list, the three key sentences), codes/da_color_2d/{card,instances}.yaml, foundations/schedules-isg/intuition.md (the stub and the machine boundary), registry/refs.yaml.
状态原文:open;难度原文:hard-engineering;related 原文:[honeycomb]。逐字引用的:statement、why_it_matters、current_proxy(第 1、2、3 章的框),蜂窝码卡片的描述、claim_gaps、views 第 0/2/3 条、decoders 第 0 条、两条 realizations 的原句,instances.yaml 的两个实例,推导页的三个量表、七项清单与三句核心话,foundations 存根的两句。本篇自己算的、QEC-Bank 页面上没有的:3 比特玩具的全部内容——两张读数表、S(t) 与 T(t) 的值、空间型 3、时间型 2/6/4、边界规则的影响、练习 1(c) 的 ⌊W/3⌋ 与 W、224 ≈ 1.7 × 107;这些数字用一段穷举脚本(24 个故障、按重量到 4 或 6)核对过,脚本不在 QEC-Bank 里;这次修订重跑时发现空间型的 3 需要两头封口(只封结尾时,第 0 轮之前翻两个比特就能溜过去),正文已改。「两个数、各带证据词」的登记形状是本篇按 statement 推断的。只描述、未推导的:蜂窝码不同轮检查的反对易与 ISG 更新(引用两张测量时间表篇)、局部 Clifford 等价、无害错误的商、Blackwell–Haah 定义的形式化陈述、gidney2021fault 的探测器图构造。本篇没有运行 QEC-Bank 引擎或 Lean 检查器,没有阅读所引论文正文,没有为蜂窝码补任何码距数字。经典玩具里「时间型故障改写信息」这一半玩具演示不了,本篇明说了。
Status verbatim: open; difficulty verbatim: hard-engineering; related verbatim: [honeycomb]. Quoted word for word: statement, why_it_matters, current_proxy (the boxes of Chapters 1, 2, 3), the honeycomb card's description, claim_gaps, views items 0/2/3, decoders item 0, sentences from two realizations, the two instances of instances.yaml, the derivation page's three-quantity table, seven-item list and three key sentences, two sentences of the foundations stub. Computed for this guide and absent from QEC-Bank pages: everything about the 3-bit toy, the two reading tables, the values of S(t) and T(t), spacelike 3, timelike 2/6/4, the effect of boundary rules, ⌊W/3⌋ and W in exercise 1(c), 224 ≈ 1.7 × 107; these were cross-checked by an exhaustive script (24 faults, by weight up to 4 or 6) that is not part of the QEC-Bank; the recheck for this revision found that the spacelike 3 needs both ends sealed (with only the end sealed, two flips before round 0 already slip through), and the text now says so. The record shape “two numbers, each with an evidence word” is this guide's inference from the statement. Described only, not derived: the anticommutation of checks across honeycomb rounds and the ISG update (cited from the schedule-equivalence guide), local Clifford equivalence, the benign-error quotient, the formal statement of the Blackwell–Haah definition, the detector-graph construction of gidney2021fault. No QEC-Bank engine or Lean checker was run for this guide, no cited paper was read in full, and no distance number was added for the honeycomb. The half “timelike faults rewrite information” cannot be shown by the classical toy, as the guide states.
开放问题总览 · 大码的码距:便宜的上界,昂贵的下界 · 一张机器能核对的「没有更轻逻辑算符」证书 · 同一个码穿不同的衣服 · 拓扑替我们算出门 · 有些码还没有「标准译码器」 · 用费米子的语言写电路 · 检查每一轮都在变,码距该怎么数(本篇) · 从理想症状到真实电路 · 两张测量时间表是不是同一回事 · 不在乎的比特,与穿了衣服的码距 · 在 Wanted 板上查看 →
All open problems · Distance for large codes: cheap upper bounds, expensive lower bounds · A machine-checkable certificate that nothing lighter exists · The same code in different clothes · Topology computes the gates · Some codes still have no standard decoder · Writing circuits in the language of fermions · When the checks change every round, how do you count distance? (this guide) · From ideal syndromes to real circuits · Are two measurement schedules the same thing? · Don't-care qubits and the dressed distance · See it on the Wanted board →
Surface Code · 条目总览(译码器 5.1:探测器 · 5.2:一张时空图 · 5.4:电路级噪声 · 形式化 1.2:Lean Complete v1 是什么,不是什么) · BB 码 · 条目总览(译码器 4.2:从读数到探测器 · 4.3:三个距离) · 《从高考数学到 Toric Code》4.2:泡利串与碰撞定理 · 两张测量时间表篇 1.2:什么是一张测量时间表
Surface Code · Entry overview (Decoders 5.1: detectors · 5.2: one spacetime graph · 5.4: circuit-level noise · Formal 1.2: what Lean Complete v1 is and is not) · BB Codes · Entry overview (Decoders 4.2: from readings to detectors · 4.3: three distances) · “From Exam Maths to the Toric Code” 4.2: Pauli strings and the collision theorem · Schedule-equivalence guide 1.2: what a measurement schedule is