目录Contents
三个警报,配对失效Three alarms, and pairing fails
译码器的任务在任何码上都一样:看到症状,选一个修复,使残留不是逻辑算符。变的是症状长什么样。这一章先把「静态症状」写成一行矩阵乘法,再数清 gross 码里一个错误点亮哪三条检查,最后说明为什么表面码的配对结构在这里消失了——以及在 toric_L3 这个最小实例上它为什么还在。 A decoder's job is the same on every code: see the syndrome, choose a repair, and make sure the residual is not a logical operator. What changes is what the syndrome looks like. This chapter first writes the “static syndrome” as one line of matrix multiplication, then counts exactly which three checks one error lights in the gross code, and finally explains why the surface code's pairing structure vanishes here, and why it survives on the smallest instance, toric_L3.
1.1静态症状:一行矩阵乘法The static syndrome: one line of matrix multiplication
先约定测量是完美的(这叫「静态」;测量也会错的情形留到第 4 章)。QEC-Bank 的 syndrome-circuits-and-decoding.md 第 1 节只用一句话:「an X-type data error eX produces the Z-check syndrome HZeX; a Z-type error eZ produces HXeZ」。人话:把「哪些比特上有 X 错误」写成一列 0/1,用 Z 检查矩阵去乘它(模 2),结果那一列 0/1 就是哪些 Z 检查亮了。《从高考数学到 Toric Code》5.4 节用「链的端点」说过这件事;矩阵版本对任何 CSS 码都成立,gross 也不例外。
Assume for now that measurements are perfect (this is the “static” setting; measurements that can err wait until Chapter 4). Section 1 of the QEC-Bank file syndrome-circuits-and-decoding.md needs one sentence: “an X-type data error eX produces the Z-check syndrome HZeX; a Z-type error eZ produces HXeZ”. Plainly: write “which qubits carry an X error” as a column of 0/1, multiply it by the Z check matrix (mod 2), and the resulting column of 0/1 says which Z checks light up. Section 5.4 of “From Exam Maths to the Toric Code” said this with “endpoints of a chain”; the matrix version holds for every CSS code, gross included.
残留residual eX ⊕ c:HZ(eX ⊕ c) = 0
⇒ 要么是 X 检查的乘积(成功),要么是 X 逻辑算符(失败)either a product of X checks (success) or an X logical (failure)
记号:eX = 长度 n 的 0/1 列向量,第 j 位为 1 表示第 j 个数据比特上有 X 错误(gross:n = 144);HZ = Z 检查矩阵(gross:72 行 × 144 列,BB 教程 3.1 节的 [Bᵀ | Aᵀ]);s = 症状,长度 72 的 0/1 列,第 i 位为 1 表示第 i 条 Z 检查读到 −1;c = 候选修复,也是长度 n 的 0/1 列;⊕ = 逐位模 2 加(两个都有就抵消)。Z 错误与 X 检查的故事把字母对换即可。Notation: eX = a 0/1 column of length n whose j-th entry is 1 if data qubit j carries an X error (gross: n = 144); HZ = the Z check matrix (gross: 72 rows × 144 columns, the [Bᵀ | Aᵀ] of BB guide section 3.1); s = the syndrome, a 0/1 column of length 72 whose i-th entry is 1 if Z check i read −1; c = a candidate repair, also a 0/1 column of length n; ⊕ = entrywise addition mod 2 (two ones cancel). For Z errors and X checks, swap the letters.
第二行是整个译码问题的判决书。《译码器 · 高中数学版》1.1 节说译码是「在类之间二选一」:残留要么是检查的乘积(无事发生),要么含一条横跨的串(逻辑错误)。这里的稳定子就是若干条检查的乘积:它作用在码态上什么也不改变;逻辑算符是骗过全部检查、却不是检查乘积的算符,它悄悄改写了存储的信息。QEC-Bank 的原文接着提醒:「A correction needs the same syndrome and may differ from the actual error by a stabilizer」——修复不必等于真实错误,差一个稳定子就算成功。BB 码多了一个数字上的差别,可以直接数出来。gross 的 HZ 秩为 66,所以方程 HZc = s 的解(与症状相符的修复)有 2144 − 66 = 278 个。X 稳定子由 HX 的 66 个独立行相乘得到,共 266 ≈ 7.4 × 1019 个;两个修复相差一个稳定子就归为同一类,于是每类恰好 266 个彼此等价的修复,类的个数是 278 / 266 = 212 = 4096——每类对应 12 个逻辑比特各翻不翻的一种组合。表面码 k = 1,一个症状下只有 2 类;gross 的译码器要在 4096 类里押中真实错误所在的那一类。一个类里有 266 个同样正确的修复,这种现象叫退化degeneracy:许多不同的物理错误(互差一个稳定子)对应同一个逻辑效果。BB 码的退化度极高:gross 每一类含 266 个等价修复。它让「最可能的单个错误」与「最可能的类」分道扬镳。,第 2 章会看到它怎样为难置信传播。
The second line is the verdict of the whole decoding problem. Section 1.1 of “Decoders · High-School Edition” says decoding is “choosing one of two classes”: the residual is either a product of checks (nothing happened) or contains a spanning string (a logical error). A stabilizer here is any product of checks: acting on a code state it changes nothing. A logical operator passes every check without being a product of checks, and it silently rewrites the stored information. The QEC-Bank text then reminds us: “A correction needs the same syndrome and may differ from the actual error by a stabilizer”; the repair need not equal the true error, and differing by a stabilizer still counts as success. BB codes add a numerical difference, and it can be counted directly. HZ of gross has rank 66, so the equation HZc = s (repairs consistent with the syndrome) has 2144 − 66 = 278 solutions. The X stabilizers are the products of the 66 independent rows of HX, 266 ≈ 7.4 × 1019 of them; two repairs that differ by a stabilizer belong to the same class, so every class holds exactly 266 mutually equivalent repairs and the number of classes is 278 / 266 = 212 = 4096, one per combination of “flipped or not” across the 12 logical qubits. The surface code has k = 1, so one syndrome has only 2 classes; the gross decoder must bet on the class of the true error out of 4096. So many equally correct repairs in one class is called degeneracyMany different physical errors (differing by a stabilizer) have the same logical effect. BB codes are highly degenerate: each gross class contains 266 equivalent repairs. It makes “the most likely single error” and “the most likely class” part ways., and Chapter 2 shows how it troubles belief propagation.
1.2一个错误点亮哪三条检查Which three checks one error lights
参数与实例导读 2.2 节数过:gross 每个数据比特被 |A| = 3 条 X 检查和 |B| = 3 条 Z 检查碰到(写成 3 + 3,而不是「度 6」,因为两种检查在电路里的角色不同)。矩阵语言里:HZ 的每一列恰有 3 个 1。所以 eX 只有一个 1 时,s = HZeX 就是 HZ 的那一列,恰有 3 个 1:一个 X 错误点亮三条 Z 检查。具体是哪三条?按参数导读 1.3 节的编号(格子 (i, j) 编号 i·6 + j,左层 0–71,右层 72–143),对数据比特 1(左层格子 (0,1))本篇自己算了一遍:Z 检查在格子 (i, j) 的左层三条腿由 Bᵀ 给出,落在 (i, j−3)、(i−1, j)、(i−2, j);要让其中一条落在 (0,1),检查得在 (0,4)、(1,1) 或 (2,1),编号 4、7、13。同理,比特 1 上的 Z 错误点亮 X 检查 0、5、55(X 检查 0 的六条腿 [1, 2, 18, 75, 78, 84] 里确实有 1,可与参数导读转录的 reproduce.py 断言对照)。
Section 2.2 of the parameters guide counted it: every gross data qubit sits in |A| = 3 X checks and |B| = 3 Z checks (written 3 + 3 rather than “degree 6”, because the two kinds play different roles in the circuit). In matrix language: every column of HZ has exactly 3 ones. So when eX has a single 1, s = HZeX is that one column of HZ, with exactly 3 ones: one X error lights three Z checks. Which three? Using the numbering of section 1.3 of the parameters guide (site (i, j) is number i·6 + j, left layer 0–71, right layer 72–143), this guide worked it out for data qubit 1 (left-layer site (0,1)): the three left-layer legs of the Z check at site (i, j) come from Bᵀ and land on (i, j−3), (i−1, j), (i−2, j); for one of them to land on (0,1) the check must sit at (0,4), (1,1) or (2,1), numbers 4, 7, 13. Likewise a Z error on qubit 1 lights X checks 0, 5, 55 (the six legs of X check 0, [1, 2, 18, 75, 78, 84], do include 1; compare the reproduce.py assertion transcribed in the parameters guide).
toric_L3,比特 0 上一个 X 错误toric_L3, one X error on qubit 0: Z 检查 0、1 亮(只有两条)Z checks 0, 1 light (only two)
HZ[:, 1] = HZ 的第 1 列(列从 0 数起);toric_L3 的检查重量 2 + 2,每个比特只在 2 条 Z 检查里,所以只亮两条。两组编号均为本篇按构造器约定重算,不在 QEC-Bank 页面上。HZ[:, 1] = column 1 of HZ (columns counted from 0); toric_L3 has check weight 2 + 2 and each qubit lies in only 2 Z checks, hence only two alarms. Both sets of indices were recomputed by this guide under the constructor's convention; they are not on any QEC-Bank page.
1.3为什么「配对」没有意义了Why “pairing” no longer means anything
《译码器 · 高中数学版》2.1 节的症状图syndrome graph:顶点是警报,边是「一条错误链」;匹配译码在这张图上找总重量最小的完美配对。它成立的前提是每个基本错误恰好连接两个警报。是这样造出来的:X 错误和 Z 错误分开处理(Y = X 与 Z 同时出现,两张图各记一笔);码内部每个可能的单比特 X 错误恰好点亮两条 Z 检查,于是把它画成连接这两个警报的一条边;一批错误就是一批边,症状就是这些边的端点;译码 = 把亮着的端点两两配对(2.2 节的最小重量完美匹配)。平面表面码边界上的比特只在一条 Z 检查里,它的错误只点亮一个警报;做法是在图上添一个虚拟的「边界顶点」,把这个错误画成从那个警报连到边界顶点的一条边,边界顶点可以和任意多个警报配对。本页实验台的预设 surf13([[13,1,3]])就是这种码:它的 HZ 有 6 列只有一个 1。所以「两个」的确切说法是「每个基本错误最多点亮两个警报,只有一个时接到边界」。这个翻译依赖一个字:两。gross 码里单比特错误点亮三个警报,画出来不是一条边,而是一条连接三个顶点的超边hyperedge:连接三个或更多顶点的「边」。含超边的图叫超图;最小重量完美匹配是为普通图定义的,对超图没有多项式时间的对应算法。。「完美匹配」要求每个警报恰好属于一对;三个一组的结构下,「一对」这个词本身就用不上。BB 教程6.3 节那句「配对失去了意义」,展开就是这一段。
The syndrome graphVertices are alarms, edges are “one error chain”; the matching decoder finds the minimum-weight perfect pairing on this graph. It presupposes that every elementary error connects exactly two alarms. of section 2.1 of “Decoders · High-School Edition” is built like this: X errors and Z errors are handled separately (Y = X and Z together, recorded once in each graph); in the interior of the code every possible single-qubit X error lights exactly two Z checks, so draw it as an edge joining those two alarms; a set of errors is a set of edges, the syndrome is their endpoints, and decoding = pair up the lit endpoints (the minimum-weight perfect matching of section 2.2). A qubit on the boundary of the planar surface code lies in only one Z check, so its error lights a single alarm; the fix is to add a virtual “boundary vertex” to the graph and draw that error as an edge from its alarm to the boundary vertex, which may be paired with any number of alarms. The bench preset surf13 ([[13,1,3]]) on this page is such a code: 6 columns of its HZ contain a single 1. So the exact statement is “every elementary error lights at most two alarms, and when it lights one, that alarm is joined to the boundary”. This translation hinges on one word: two. In gross a single-qubit error lights three alarms; drawn out it is not an edge but a hyperedgeAn “edge” joining three or more vertices. A graph with hyperedges is a hypergraph; minimum-weight perfect matching is defined for ordinary graphs and has no polynomial-time counterpart on hypergraphs. joining three vertices. A “perfect matching” requires every alarm to belong to exactly one pair; with alarms coming in triples, the word “pair” itself does not apply. The sentence “pairing loses its meaning” in BB guide section 6.3 unfolds into this paragraph.
两个反例让边界更清楚。第一,toric_L3(A = 1 + x,B = 1 + y,BB 教程 5.1 节)检查重量 2 + 2,每个比特只在 2 条 Z 检查里,一个错误恰好亮两条:它就是环面码,匹配照常可用——所以「BB 码不能用匹配」这句话的精确版本是「检查重量 3 + 3 的 BB 码不能直接用匹配」。第二,第 3 章的第三条记录 sahay2026matching 正是只看 gross 的一部分检查(一组乘积为恒等的检查),在那里每个错误又只点亮两个警报,让匹配重新可用(3.4 节);它没有推翻本节,它绕过了本节。先到实验台上看两种情形的警报数:预设 toric_L3,按「新错误」几次,读数里「亮起的 Z 检查」大约是错误重量的两倍;下一章把预设切到 [[72,12,6]](与 gross 同一对多项式,6 × 6 环面),它接近三倍。
Two counter-examples sharpen the boundary. First, toric_L3 (A = 1 + x, B = 1 + y, BB guide section 5.1) has check weight 2 + 2, every qubit lies in only 2 Z checks, and one error lights exactly two: it is the toric code and matching works as usual, so the precise version of “BB codes cannot use matching” is “BB codes with check weight 3 + 3 cannot use matching directly”. Second, the third record of Chapter 3, sahay2026matching, does exactly this: it looks at only part of gross's checks (a set whose product is the identity), where every error again lights just two alarms, and so makes matching usable again (section 3.4); it does not overturn this section, it goes around it. Look at the alarm counts in both situations on the bench: with preset toric_L3, press “New error” a few times and the readout's “Z-checks lit” is about twice the error weight; in the next chapter switch to [[72,12,6]] (the same polynomial pair as gross on a 6 × 6 torus) and it approaches three times.
症状永远是 s = HZeX;变的是 HZ 每列有几个 1。环面码每列恰好 2 个,表面码内部的列 2 个、边界的列 1 个(接到虚拟的边界顶点),错误是「边」,译码是配对;gross 每列 3 个(比特 1 上的错误亮 Z 检查 4、7、13),错误是三端点的超边,配对无从谈起。加上 k = 12 带来的 4096 个类和每类 266 个等价修复,BB 需要的是一种不依赖「两个端点」的译码器——那就是下一章在整张 Tanner 图上传消息的置信传播。
The syndrome is always s = HZeX; what changes is how many ones each column of HZ has. The toric code has exactly 2 per column, the surface code 2 in the interior and 1 on the boundary (joined to a virtual boundary vertex); errors are “edges”, decoding is pairing; gross has 3 per column (an error on qubit 1 lights Z checks 4, 7, 13), errors are three-ended hyperedges, and pairing is off the table. Add the 4096 classes that k = 12 brings and the 266 equivalent repairs per class, and BB needs a decoder that does not rely on “two endpoints”: the belief propagation of the next chapter, which passes messages over the whole Tanner graph.
置信传播与 OSD:传消息、卡住、解方程Belief propagation and OSD: pass messages, stall, solve equations
置信传播(BP)让每个比特和每条检查在 Tanner 图上反复交换「你有多可能出错」。在没有圈的图上它给出精确答案;gross 的 Tanner 图最短的圈只有 6 步长,加上每类 266 个等价修复的退化,BP 会摇摆、给出不自洽的硬判决,或押错类。有序统计译码(OSD)在它卡住时接手:按可靠度排序,在最可能出错的比特上解线性方程组,保证交出一个清零症状的修复。这一章先在三四个比特的小图上把 BP 的两条规则和 OSD 的三步各手算一遍,每个数都能用穷举核对,然后在 [[72,12,6]] 上亲手跑。 Belief propagation (BP) lets every qubit and every check on the Tanner graph repeatedly exchange “how likely are you to be flipped”. On a graph without cycles it is exact; the gross Tanner graph has cycles as short as 6 steps, and with the degeneracy of 266 equivalent repairs per class BP may oscillate, hand back an inconsistent hard decision, or bet on the wrong class. Ordered-statistics decoding (OSD) takes over when it stalls: sort by reliability, solve a linear system on the most-likely-flipped qubits, and guarantee a repair that clears the syndrome. This chapter first works BP's two rules and OSD's three steps by hand on graphs of three or four qubits, where every number can be checked by enumeration, then runs them on [[72,12,6]].
2.1BP 算的是什么:两条规则,手算一遍What BP computes: two rules, worked by hand
本章在 gross 上讲 BP 与 OSD 做什么、为什么会卡住。这两步本身从零讲起、每一步都能手算核对的版本,见《BP-OSD 译码器 · 高中数学版》(那里把本章选出的主元列同样叫基集)。
This chapter shows what BP and OSD do on gross and why they stall. A from-scratch treatment of the two steps, with every step checkable by hand, is “The BP-OSD Decoder · High-School Edition” (it also calls the pivot columns chosen here the basis set).
先说 BP 想回答的问题。症状 s 已经读到了。对每个比特 j,我们想要一个数:已知症状是 s 时,比特 j 出错的概率,记作 P(ej = 1 | s)(竖线读作「在……的条件下」)。有了它,最自然的修复就是把出错概率超过一半的比特翻回来。精确地算它,要把所有与 s 相符的错误模式逐个列出、按各自的概率加权;gross 里与一个症状相符的模式有 278 ≈ 3 × 1023 种(1.1 节),列不完。置信传播belief propagation, BP:比特和检查在 Tanner 图上反复交换「某个比特有多可能出错」的消息,每个节点只听邻居的。图上没有圈时结果精确,有圈时是近似。(BP)是一个只用局部消息的近似算法:每个比特只和邻居交换一个数,每轮每条边算一次,一轮的工作量正比于边数。
First, the question BP is trying to answer. The syndrome s has been read. For every qubit j we want one number: the probability that qubit j is flipped, given that the syndrome is s, written P(ej = 1 | s) (the bar reads “given”). With it, the natural repair is to flip back every qubit whose flip probability exceeds one half. Computing it exactly means listing every error pattern consistent with s and weighting each by its probability; in gross one syndrome is consistent with 278 ≈ 3 × 1023 patterns (section 1.1), far too many to list. Belief propagationBP: qubits and checks on the Tanner graph repeatedly exchange “how likely is this qubit to be flipped”, each node listening only to its neighbours. Exact when the graph has no cycles, an approximation when it has. (BP) is an approximation that uses only local messages: every qubit exchanges one number with each neighbour, each edge is computed once per round, and one round costs work proportional to the number of edges.
消息沿 BB 教程 6.1 节画过的 Tanner 图检查矩阵的图形版:一侧是比特(gross 144 个),一侧是检查(HZ 的 72 条),H 的每个 1 是一条边。gross 的 Tanner(HZ) 有 72 × 6 = 432 条边。走:比特一侧、检查一侧,HZ 的每个 1 是一条边;gross 的 Tanner(HZ) 有 144 个比特点、72 个检查点、72 × 6 = 432 条边。《qLDPC 码 · 高中数学版》6.1 节把 BP 叫作「每个比特问邻居:我错了吗」。消息用的数是对数似然比log-likelihood ratio,LLR:L = ln[P(没错)/P(出错)]。正数 = 相信没错,负数 = 相信出错,绝对值越大越确信。反过来 P(出错) = 1/(1 + eL)。(LLR):L = ln[P(没错)/P(出错)]。记住三个值就够:出错概率 0.1 时 L = ln(0.9/0.1) = ln 9 ≈ 2.20;0.5 时 L = ln 1 = 0(完全拿不准);0.9 时 L ≈ −2.20。正数表示「相信没错」,负数表示「相信出错」,绝对值是把握的大小;反过来 P(出错) = 1/(1 + eL)。一开始,除了「每个比特独立地以概率 p 出错」之外没有任何信息,所以每个比特的 LLR 都是先验值 L0 = ln((1−p)/p)——正是《译码器 · 高中数学版》1.3 节那条边权重 w0;p = 0.06 时约 2.75。用对数而不用概率本身,是为了下面的规则一:独立的证据要相乘,取了对数就变成相加(补课 2.A)。
The messages travel on the Tanner graphThe graphical form of a check matrix: qubits on one side (144 for gross), checks on the other (the 72 rows of HZ), one edge per 1 in H. Gross's Tanner(HZ) has 72 × 6 = 432 edges. drawn in BB guide section 6.1: qubits on one side, checks on the other, one edge per 1 of HZ; gross's Tanner(HZ) has 144 qubit nodes, 72 check nodes and 72 × 6 = 432 edges. Section 6.1 of “qLDPC Codes · High-School Edition” calls BP “every bit asks its neighbours: am I wrong?”. The number in a message is a log-likelihood ratioLLR: L = ln[P(clean)/P(flipped)]. Positive = believed clean, negative = believed flipped, larger magnitude = more confident. Conversely P(flipped) = 1/(1 + eL). (LLR): L = ln[P(clean)/P(flipped)]. Three values are enough to remember: flip probability 0.1 gives L = ln(0.9/0.1) = ln 9 ≈ 2.20; 0.5 gives L = ln 1 = 0 (no idea at all); 0.9 gives L ≈ −2.20. Positive means “believed clean”, negative “believed flipped”, and the magnitude is the confidence; conversely P(flipped) = 1/(1 + eL). At the start the only information is “each qubit flips independently with probability p”, so every qubit's LLR is the prior L0 = ln((1−p)/p), which is exactly the edge weight w0 of section 1.3 of “Decoders · High-School Edition”; about 2.75 at p = 0.06. Logarithms rather than probabilities are used because of rule one below: independent pieces of evidence multiply, and after taking logs they add (catch-up 2.A).
规则一(比特汇总):总 LLR = 先验 + 所有邻居检查发来的消息。比特 j 回话给检查 i 时,用的是总 LLR 减去检查 i 自己刚发来的那一条:不把 i 的话再还给 i,否则 i 会把自己的意见当成新证据。
Rule one (a qubit sums up): total LLR = prior + every message from the neighbouring checks. When qubit j replies to check i, it sends the total minus the message that i itself just sent: i's own words are not handed back to i, or i would count its own opinion as new evidence.
规则二(检查发言):检查 i 告诉邻居 j,「按其他邻居现在的说法,再加上我亮没亮,你出错的可能有多大」。先手算一个例子。一条亮着的检查碰三个比特 a、b、c,每个比特独立地以 p = 0.1 出错,此外没有别的信息。「亮」的意思是 a + b + c 为奇数(mod 2),所以 a 出错 ⇔ b + c 为偶数。b + c 为奇数,要恰好一个出错:2 × 0.1 × 0.9 = 0.18;为偶数的概率就是 0.82。于是这条检查对 a 说:「按我的信息,你没错与出错之比是 0.18 : 0.82」,消息 m = ln(0.18/0.82) = −1.52。a 用规则一把它和先验相加:2.20 − 1.52 = 0.68 > 0,仍然倾向没错,出错概率 1/(1 + e0.68) ≈ 0.34。穷举核对:与「奇数」相符的四种模式 100、010、001、111,概率分别是 0.081、0.081、0.081、0.001;a 出错的是 100 和 111,(0.081 + 0.001)/0.244 ≈ 0.34,一致。这个例子还藏着一个教训:BP 在这里是精确的,可逐比特的判决却交不出修复。每个比特单独看都更可能没错(出错概率 0.34 < 0.5),于是判决是 (0, 0, 0),检查仍然亮着。「每个比特各自最可能的取值」拼起来,不一定满足检查;2.3 节的 OSD 补的就是这个缺口。
Rule two (a check speaks): check i tells neighbour j “given what my other neighbours say now, and whether I am lit, this is how likely you are to be flipped”. Work one example by hand first. A lit check touches three qubits a, b, c, each flipped independently with p = 0.1, and nothing else is known. “Lit” means a + b + c is odd (mod 2), so a is flipped ⇔ b + c is even. For b + c to be odd exactly one of the two must flip: 2 × 0.1 × 0.9 = 0.18, so even has probability 0.82. The check therefore tells a: “by my information, clean versus flipped is 0.18 : 0.82”, the message m = ln(0.18/0.82) = −1.52. With rule one, a adds it to the prior: 2.20 − 1.52 = 0.68 > 0, still leaning clean, with flip probability 1/(1 + e0.68) ≈ 0.34. Check by enumeration: the four patterns with odd parity, 100, 010, 001, 111, have probabilities 0.081, 0.081, 0.081, 0.001; a is flipped in 100 and 111, and (0.081 + 0.001)/0.244 ≈ 0.34, as found. The example hides a lesson too: BP is exact here, yet the qubit-by-qubit decision delivers no repair. Each qubit on its own is more likely clean (flip probability 0.34 < 0.5), so the decision is (0, 0, 0) and the check stays lit. “The most likely value of each qubit separately”, put together, need not satisfy the checks; that gap is what OSD in section 2.3 fills.
一般情形用「偏差」记账:一个比特的偏差 = 1 − 2 × P(出错),p = 0.1 时是 0.8,它恰好等于 tanh(L/2)。几个独立比特之和(mod 2)的偏差,等于各自偏差的乘积(补课 2.B 给出一行证明):0.8 × 0.8 = 0.64,对应 P(奇数) = (1 − 0.64)/2 = 0.18,和上面数出来的一样。所以规则二写成公式是下面第一行;gross 的每条检查有 6 个邻居,乘积里就有 5 个因子。
In general, keep the books in “bias”: a qubit's bias is 1 − 2 × P(flipped), 0.8 at p = 0.1, and it equals tanh(L/2). The bias of a sum (mod 2) of independent bits is the product of their biases (catch-up 2.B proves it in one line): 0.8 × 0.8 = 0.64, which means P(odd) = (1 − 0.64)/2 = 0.18, the number counted above. Rule two as a formula is therefore the first line below; every gross check has 6 neighbours, so the product has 5 factors.
Lj = L0 + Σi mi→j · Lj→i = Lj − mi→j
例:example: −2 artanh(0.8 × 0.8) = −1.52 · 2.20 − 1.52 = 0.68
min-sum 近似(2.3 节的 [[72,12,6]] 实验台用它)min-sum shortcut (used by the [[72,12,6]] bench in 2.3):
mi→j ≈ (−1)si · 0.8 · σ · minj′≠j |Lj′→i|
例:example: −0.8 × 2.20 = −1.76
记号:mi→j = 检查 i 发给比特 j 的消息(单位与 LLR 相同);Lj′→i = 比特 j′ 发给检查 i 的消息(它的总 LLR 减去 i 发来的那条);si = 检查 i 的症状位,亮为 1;∏j′≠j = 对检查 i 除 j 以外的邻居连乘;Σi = 对比特 j 的所有邻居检查求和;tanh 与 artanh 见符号卡片,artanh 是 tanh 的反函数,2 artanh δ = ln[(1 + δ)/(1 − δ)];min-sum = 用「最没把握的那个邻居」代替整个乘积,σ = 其他邻居的 LLR 符号之积(+1 或 −1),0.8 是把它往回拉的系数(补课 2.B)。Notation: mi→j = the message from check i to qubit j (in the same units as an LLR); Lj′→i = the message from qubit j′ to check i (its total LLR minus what i sent it); si = the syndrome bit of check i, 1 when lit; ∏j′≠j = the product over check i's neighbours other than j; Σi = the sum over all checks next to qubit j; tanh and artanh are on the symbol cards, artanh is the inverse of tanh, and 2 artanh δ = ln[(1 + δ)/(1 − δ)]; min-sum = replace the whole product by “the least confident neighbour”, σ = the product of the signs of the other neighbours' LLRs (+1 or −1), and 0.8 is the factor that pulls it back (catch-up 2.B).
补课 · 为什么独立证据的 LLR 直接相加,以及圈为什么破坏它Catch-up · Why the LLRs of independent evidence simply add, and why cycles break this
用「比」而不用概率来记账。比特 j 的「没错 : 出错」之比,一开始是先验比 (1−p) : p,p = 0.1 时是 9 : 1。来了一条证据 E(比如「检查 i 亮了」),贝叶斯公式说:新比 = 旧比 × [P(E | 没错) / P(E | 出错)]。后面这个因子叫这条证据的似然比:如果 j 没错,看到 E 的可能,是如果 j 出错时看到 E 的可能的几倍。上面三比特检查的例子里:若 a 没错,检查亮 ⇔ b + c 为奇,概率 0.18;若 a 出错,检查亮 ⇔ b + c 为偶,概率 0.82;似然比 0.18/0.82 ≈ 0.22。新比 = 9 × 0.22 ≈ 1.98,即 P(出错) = 1/(1 + 1.98) ≈ 0.34,与穷举一致。
Keep the books in odds rather than probabilities. Qubit j's odds “clean : flipped” start at the prior (1−p) : p, which is 9 : 1 at p = 0.1. When a piece of evidence E arrives (say “check i is lit”), Bayes' rule says: new odds = old odds × [P(E | clean) / P(E | flipped)]. The factor is the likelihood ratio of the evidence: how many times more likely E is if j is clean than if j is flipped. In the three-qubit check example: if a is clean, the check is lit ⇔ b + c is odd, probability 0.18; if a is flipped, the check is lit ⇔ b + c is even, probability 0.82; the likelihood ratio is 0.18/0.82 ≈ 0.22. New odds = 9 × 0.22 ≈ 1.98, so P(flipped) = 1/(1 + 1.98) ≈ 0.34, matching the enumeration.
两条证据 E1、E2,只要在「j 没错」与「j 出错」两种情形下各自都互相独立,它们的似然比就直接相乘:新比 = 先验比 × 似然比1 × 似然比2。取对数,乘法变加法:L = L0 + ln(似然比1) + ln(似然比2)。每条检查的消息 mi→j 就是 ln(似然比),这就是规则一。
Two pieces of evidence E1, E2 that are independent of each other both when j is clean and when j is flipped simply multiply their likelihood ratios: new odds = prior odds × ratio1 × ratio2. Take logs and multiplication becomes addition: L = L0 + ln(ratio1) + ln(ratio2). Each check's message mi→j is exactly ln(ratio), and that is rule one.
独立什么时候成立?在没有圈的图(树)上,j 的每条邻居检查背后各连着图上互不重叠的一片比特,不同片的错误彼此独立,所以成立;同样的理由一层层往外都成立,这就是树上 BP 精确的原因,下面三比特链的例子会看到它与穷举逐位相同。有圈时,两条检查背后的两片会在圈上相遇、共享同一批比特,两条证据有一部分是同一件事的复述。把它们相乘就是重复计数,像从两个人那里听到同一条传闻,却以为得到了两份独立的确认。2.2 节的四比特环会把这种重复计数算给你看。
When does independence hold? On a graph without cycles (a tree), each check next to j leads to its own, non-overlapping part of the graph, and errors in different parts are independent, so it holds; the same argument holds layer by layer outwards, which is why BP is exact on trees, and the three-qubit chain below matches the enumeration digit for digit. With cycles, the parts behind two checks meet somewhere on the cycle and share qubits, so the two pieces of evidence partly repeat the same fact. Multiplying them counts it twice, like hearing one rumour from two people and taking it as two independent confirmations. The four-qubit ring of section 2.2 computes this double counting for you.
补课 · 偏差相乘与 tanh:规则二的公式从哪来,min-sum 省掉了什么Catch-up · Multiplying biases, and tanh: where rule two comes from, and what min-sum drops
设比特 u 出错的概率是 q,定义它的偏差 δ = 1 − 2q = P(0) − P(1)。两个独立比特 u、v,u + v(mod 2)为奇数的概率是 qu(1 − qv) + qv(1 − qu) = qu + qv − 2quqv。它的偏差是 1 − 2qu − 2qv + 4quqv = (1 − 2qu)(1 − 2qv) = δuδv。所以两个比特之和的偏差是偏差之积;再加一个比特就再乘一个,任意多个独立比特之和的偏差等于全部偏差的乘积。例:两个 δ = 0.8 的比特,和的偏差 0.64,为奇数的概率 (1 − 0.64)/2 = 0.18。
Let qubit u be flipped with probability q and define its bias δ = 1 − 2q = P(0) − P(1). For two independent bits u, v, the probability that u + v (mod 2) is odd is qu(1 − qv) + qv(1 − qu) = qu + qv − 2quqv. Its bias is 1 − 2qu − 2qv + 4quqv = (1 − 2qu)(1 − 2qv) = δuδv. So the bias of a sum of two bits is the product of the biases; each further bit multiplies in one more factor, and the bias of a sum of any number of independent bits is the product of all their biases. Example: two bits with δ = 0.8 have a sum of bias 0.64, odd with probability (1 − 0.64)/2 = 0.18.
偏差和 LLR 的关系:eL = P(0)/P(1),所以 tanh(L/2) = (eL − 1)/(eL + 1) = (P(0) − P(1))/(P(0) + P(1)) = δ。核对 L = ln 9:(9 − 1)/(9 + 1) = 0.8。反过来,偏差 δ 对应 L = 2 artanh δ = ln[(1 + δ)/(1 − δ)]。
Bias and LLR: eL = P(0)/P(1), so tanh(L/2) = (eL − 1)/(eL + 1) = (P(0) − P(1))/(P(0) + P(1)) = δ. Check with L = ln 9: (9 − 1)/(9 + 1) = 0.8. Conversely, a bias δ corresponds to L = 2 artanh δ = ln[(1 + δ)/(1 − δ)].
规则二于是一步到位。检查 i 除 j 以外的邻居,它们之和的偏差是 B = ∏ tanh(Lj′→i/2)。检查亮(si = 1)时:若 j 没错,其他邻居之和必须为奇,概率 (1 − B)/2;若 j 出错,其他之和必须为偶,概率 (1 + B)/2。这条检查提供的是一个似然比 P(si = 1 | ej = 0) : P(si = 1 | ej = 1) = (1 − B) : (1 + B)。它还不是 j 的「没错 : 出错」赔率,因为 j 自己的先验没有算进去;按补课 2.A 的贝叶斯规则,后验赔率 = 先验赔率 × 各条检查的似然比,取对数就是相加。所以消息 ln[(1 − B)/(1 + B)] = −2 artanh B 只是这一条检查的那份证据;没亮时两边对调,符号相反。合起来就是 mi→j = (−1)si · 2 artanh B。核对 2.1 节的例子:B = 0.8 × 0.8 = 0.64,似然比 0.36 : 1.64 = 0.18 : 0.82 ≈ 0.22,消息 −1.52;乘上先验赔率 9,后验赔率 ≈ 1.98,ln 1.98 ≈ 0.68,出错概率 1/(1 + 1.98) ≈ 0.34,与 2.1 节相同。
Rule two now follows in one step. The sum of check i's neighbours other than j has bias B = ∏ tanh(Lj′→i/2). If the check is lit (si = 1): if j is clean, the others must sum to odd, probability (1 − B)/2; if j is flipped, they must sum to even, probability (1 + B)/2. What the check supplies is a likelihood ratio, P(si = 1 | ej = 0) : P(si = 1 | ej = 1) = (1 − B) : (1 + B). It is not yet j's “clean : flipped” odds, because j's own prior is not in it; by the Bayes rule of catch-up 2.A, posterior odds = prior odds × the likelihood ratio of every check, which in logarithms is a sum. So the message ln[(1 − B)/(1 + B)] = −2 artanh B is this one check's share of the evidence; if unlit, the two swap and the sign flips. Together: mi→j = (−1)si · 2 artanh B. Check against the example of section 2.1: B = 0.8 × 0.8 = 0.64, likelihood ratio 0.36 : 1.64 = 0.18 : 0.82 ≈ 0.22, message −1.52; times the prior odds 9 gives posterior odds ≈ 1.98, ln 1.98 ≈ 0.68, flip probability 1/(1 + 1.98) ≈ 0.34, as in section 2.1.
min-sum 的来历。B 是几个绝对值不超过 1 的数之积,绝对值不会超过其中最小的那个,所以 |mi→j| ≤ min |Lj′→i|:一条检查的把握不会超过它最没把握的那个邻居。min-sum 直接把「≤」当成「=」,省掉 tanh 与 artanh,也就系统地高估了把握,所以通常再乘一个小于 1 的系数(本页 2.3 节的实验台取 0.8)。例子里:精确值 −1.52,不乘系数的 min-sum 是 −2.20,乘 0.8 后 −1.76。
Where min-sum comes from. B is a product of numbers of magnitude at most 1, so its magnitude cannot exceed the smallest factor, hence |mi→j| ≤ min |Lj′→i|: a check is never more confident than its least confident neighbour. Min-sum simply turns “≤” into “=”, dropping tanh and artanh, and so systematically overstates confidence; it is therefore usually multiplied by a factor below 1 (0.8 on the bench of section 2.3). In the example: exact −1.52, plain min-sum −2.20, times 0.8 gives −1.76.
再看一个要传好几轮的例子。三个比特排成一行,检查 c1 = b1 + b2、c2 = b2 + b3,就是 BB 教程补课 0.A 的三比特重复码;b2 上有一个 X 错误,两条检查都亮;p = 0.1。每条检查只有两个邻居,乘积里只剩一个因子,规则二就变成「消息 = ± 另一个邻居发来的 LLR」(亮取负号)。第 1 轮,检查发言:每个比特发出的还是先验 2.20,所以四条消息都是 −2.20。比特汇总:b1 = 2.20 − 2.20 = 0,b2 = 2.20 − 2.20 − 2.20 = −2.20,b3 = 0。回话:b2 对 c1 说 −2.20 − (−2.20) = 0(只剩先验与 c2 的意见,两者抵消),b1 对 c1 说 0 − (−2.20) = 2.20。第 2 轮:c1 对 b1 说 −0 = 0,对 b2 说 −2.20;c2 同理。汇总:b1 = 2.20,b2 = −2.20,b3 = 2.20。
Next, an example that takes several rounds. Three qubits in a row with checks c1 = b1 + b2 and c2 = b2 + b3: the three-bit repetition code of BB guide catch-up 0.A. Qubit b2 has an X error, both checks are lit, p = 0.1. Each check has two neighbours, so the product has one factor and rule two becomes “message = ± the LLR the other neighbour sent” (minus when lit). Round 1, checks speak: every qubit is still sending its prior 2.20, so all four messages are −2.20. Qubits sum up: b1 = 2.20 − 2.20 = 0, b2 = 2.20 − 2.20 − 2.20 = −2.20, b3 = 0. Replies: b2 tells c1 −2.20 − (−2.20) = 0 (only its prior and c2's opinion remain, and they cancel), b1 tells c1 0 − (−2.20) = 2.20. Round 2: c1 tells b1 −0 = 0 and b2 −2.20; c2 likewise. Sums: b1 = 2.20, b2 = −2.20, b3 = 2.20.
最后一步叫硬判决hard decision:把实数 LLR 变成 0/1 的一步:Lj < 0 判为「出错」(cj = 1),否则判为「没错」。BP 的输出修复 c 就是全部比特的硬判决。:LLR 为负的比特判为出错,得到修复 c = (0, 1, 0)。它满足两条检查,即 HZc = s,这时说 BP 收敛。穷举核对:与症状相符的只有 010(概率 0.1 × 0.9² = 0.081)和 101(0.1² × 0.9 = 0.009);b2 出错的概率 0.081/0.090 = 0.9,LLR = ln(0.1/0.9) = −2.20;b1 出错的概率 0.1,LLR = +2.20。两轮之后,BP 的答案与精确答案逐位相同。这张图没有圈,b1 听到的每条消息来自图上互不重叠的一片,证据真的独立(补课 2.A);两轮足够让每个比特听到全图的消息。下面的手算台把每半步都放给你看:一次「下一步」要么是所有检查发言,要么是所有比特汇总,边上的数就是那一刻的消息,读数里有算式和穷举出的精确值。
The last step is the hard decisionThe step from a real LLR to 0/1: Lj < 0 is decided “flipped” (cj = 1), otherwise “clean”. BP's output repair c is the hard decision of every qubit.: qubits with negative LLR are declared flipped, giving the repair c = (0, 1, 0). It satisfies both checks, HZc = s, and BP is then said to have converged. Check by enumeration: only 010 (probability 0.1 × 0.9² = 0.081) and 101 (0.1² × 0.9 = 0.009) fit the syndrome; b2 is flipped with probability 0.081/0.090 = 0.9, LLR = ln(0.1/0.9) = −2.20; b1 with probability 0.1, LLR = +2.20. After two rounds BP's answer equals the exact answer qubit by qubit. The graph has no cycle, every message b1 hears comes from its own non-overlapping part of the graph, and the evidence really is independent (catch-up 2.A); two rounds are enough for every qubit to hear from the whole graph. The bench below plays every half-step: one press of “Next step” either lets every check speak or lets every qubit sum up, the numbers on the edges are the messages at that moment, and the readout shows the arithmetic and the exact value from enumeration.
先验prior L0 = ln((1−p)/p) = w0 · p = 0.1 ⇒ 2.20; p = 0.06 ⇒ 2.75
硬判决hard decision: cj = 1 ⇔ Lj < 0 · 收敛converged ⇔ HZ c = s
记号:Lj = 比特 j 的对数似然比,BP 想逼近的是右边这个「已知症状」的版本;ej = 比特 j 是否出错(0/1);ln = 自然对数;p = 每个比特独立出错的概率;w0 = 表面码译码器教程里的边权重,同一个数;cj = 修复 c 的第 j 位。Notation: Lj = the log-likelihood ratio of qubit j, and BP tries to approximate this “given the syndrome” version; ej = whether qubit j is flipped (0/1); ln = natural logarithm; p = the independent flip probability per qubit; w0 = the edge weight of the surface-code decoders guide, the same number; cj = bit j of the repair c.
2.2树上精确,圈里自欺:gross 的最短圈长 6Exact on trees, self-deceiving on cycles: gross's shortest cycle has length 6
QEC-Bank 原文:「On a tree, those local messages are exact. BB Tanner graphs are not trees: short cycles feed correlated information back into itself」。人话:如果图里没有圈,一条消息传出去就再也回不来,每个比特收到的三条消息来自三片互不相干的区域,把它们相加正是概率论里「独立证据相乘」的正确做法(补课 2.A);2.1 节的三比特链就是这样精确的。有圈就不同:比特 j 说的话经过几步又绕回 j,j 把自己的话当成了别人的证据,重复计数,越传越自信。圈越短,绕回来越快。本篇对 gross 的 Tanner(HZ) 算了一下:最短的圈长 6(3 个比特、3 条检查交替),例如 比特 1 → Z 检查 4 → 比特 64 → Z 检查 70 → 比特 67 → Z 检查 7 → 比特 1。也就是说,比特 1 在第 1 轮发出的消息,第 3 轮就以「检查 7 的意见」回到了自己手里。
这不是 gross 的特殊缺陷:只要 A 或 B 有三项,就一定有长 6 的圈,用平移一看便知。设 B 的三项是三步平移 b1、b2、b3(gross:B = y³ + x + x²,即「上 3 格」「右 1 格」「右 2 格」)。BB 教程 3.1 节说过,格子 g 的 Z 检查在左层的三条腿落在 g − b1、g − b2、g − b3。从检查 g 出发:沿 b1 腿到比特 g − b1;这个比特也是检查 g − b1 + b2 的 b2 腿;从那条检查沿 b3 腿到比特 g − b1 + b2 − b3;它又是检查 g + b2 − b3 的 b1 腿;从那里沿 b2 腿到比特 g − b3;而 g − b3 正是检查 g 自己的 b3 腿:六步回到起点。能闭合,全靠平移可以交换先后,三次「出去再进来」的位移 (b2 − b1) + (b1 − b3) + (b3 − b2) 加起来是 0。上面那个 gross 的圈就是这种走法(从检查 4 出发,依次用「右 2」「右 1」「上 3」三种腿)。反过来,环面码的 A = 1 + x、B = 1 + y 都只有两项,这个走法用不上:本篇算得 L = 4、5、6 的环面码 Tanner(HZ) 最短圈是 8;toric_L3 是 6,只因为 3 × 3 的环面太小,三个面沿一圈就绕回来了。环面码、表面码也有圈,它们不用 BP,是因为有配对结构可用。
The QEC-Bank text: “On a tree, those local messages are exact. BB Tanner graphs are not trees: short cycles feed correlated information back into itself”. Plainly: if the graph has no cycles, a message sent out never returns, the three messages a qubit receives come from three unrelated regions, and adding them is exactly the probabilist's correct “multiply independent evidence” (catch-up 2.A); the three-qubit chain of section 2.1 was exact for this reason. With cycles it differs: what qubit j said comes back to j after a few steps, j treats its own words as someone else's evidence, counts them twice, and grows more confident with every round. The shorter the cycle, the sooner it returns. This guide computed it for gross's Tanner(HZ): the shortest cycle has length 6 (3 qubits and 3 checks alternating), for example qubit 1 → Z check 4 → qubit 64 → Z check 70 → qubit 67 → Z check 7 → qubit 1. In other words, the message qubit 1 sends in round 1 is back in its own hands by round 3 as “check 7's opinion”.
This is no peculiar defect of gross: whenever A or B has three terms there is a cycle of length 6, and translations show why at a glance. Let the three terms of B be three moves b1, b2, b3 (gross: B = y³ + x + x², that is “up 3”, “right 1”, “right 2”). BB guide section 3.1 says the three left-layer legs of the Z check at site g land on g − b1, g − b2, g − b3. Start at check g: along leg b1 to qubit g − b1; that qubit is also the b2 leg of check g − b1 + b2; from there along leg b3 to qubit g − b1 + b2 − b3; which is the b1 leg of check g + b2 − b3; from there along leg b2 to qubit g − b3; and g − b3 is check g's own b3 leg: six steps and back at the start. It closes only because moves can be done in either order: the three “out and back in” displacements (b2 − b1) + (b1 − b3) + (b3 − b2) add up to 0. The gross cycle above is this walk (starting at check 4 and using the legs “right 2”, “right 1”, “up 3” in turn). Conversely, the toric code's A = 1 + x and B = 1 + y have only two terms each, so the walk is unavailable: this guide computed a shortest cycle of 8 in Tanner(HZ) for the toric codes with L = 4, 5, 6; toric_L3 has 6 only because a 3 × 3 torus is so small that three faces in a row wrap around. Toric and surface codes do have cycles; they avoid BP because a pairing structure is available instead.
下面的实验台不是 BB 的 Tanner 图,而是两张一般的图,用来把「树」和「圈」的直觉练熟:左边是一个 36 点的环(每点 2 个邻居),右边是一张随机 3-正则图(每点 3 个邻居,和 gross 每个比特连 3 条 Z 检查一样)。拖动半径,看从起点出发 r 步能到多少点:环上只有 2r + 1 个,第 18 步就绕回自己;随机图上大约每步翻倍,很多步之后才出现重复——前几轮消息传递看到的邻域几乎是一棵树。BB 的 Tanner 图介于两者之间:度像右图,但平移的规律性让圈像左图一样早早闭合。
The bench below is not a BB Tanner graph but two generic graphs for training the “tree versus cycle” intuition: on the left a 36-vertex cycle (2 neighbours each), on the right a random 3-regular graph (3 neighbours each, like every gross qubit meeting 3 Z checks). Drag the radius and watch how many vertices r steps reach from the start: on the cycle only 2r + 1, and by step 18 you are back at yourself; on the random graph the count roughly doubles each step and repeats appear only much later, so the neighbourhood seen by the first rounds of message passing is almost a tree. A BB Tanner graph sits between the two: degree like the right-hand picture, but the regularity of translations closes cycles early, like the left.
第二个敌人是 1.1 节的退化。QEC-Bank 原文:「quantum degeneracy means many errors represent the same logical coset. BP may oscillate, converge to an inconsistent hard decision, or settle on the wrong coset」。三种失败要分开听。摇摆(oscillate):LLR 的符号一轮正一轮负,永远不稳定。不自洽的硬判决:每个比特各自判了,但合起来的 c 不满足 HZc = s,症状没清零——这是 BP 特有的失败,匹配译码器永远不会交出一个不清零症状的答案。押错类(wrong coset):症状清零了,但残留是逻辑算符。退化加重前两种:两个等价的修复 c 与 c ⊕(某条检查)对症状同样有效,BP 在两者之间拿不定主意,就把概率摊开,结果哪个比特都不够负。《译码器 · 高中数学版》3.2 节讲过退化如何让匹配输给最大似然;这里它更进一步,让「逐比特表态」这个动作本身失灵。《qLDPC 码 · 高中数学版》6.2 节把这两个敌人合称「短圈与退化」,本节只是把它们落到 gross 的具体数字上。
The second enemy is the degeneracy of section 1.1. The QEC-Bank text: “quantum degeneracy means many errors represent the same logical coset. BP may oscillate, converge to an inconsistent hard decision, or settle on the wrong coset”. Hear the three failures separately. Oscillate: the sign of an LLR flips from round to round and never settles. Inconsistent hard decision: every qubit has decided, but the combined c does not satisfy HZc = s, the syndrome is not cleared; this failure is peculiar to BP, since a matching decoder never hands back an answer that leaves the syndrome lit. Wrong coset: the syndrome is cleared but the residual is a logical operator. Degeneracy aggravates the first two: two equivalent repairs c and c ⊕ (some check) are equally valid for the syndrome, BP cannot choose between them, spreads the probability across both, and no qubit ends up negative enough. Section 3.2 of “Decoders · High-School Edition” showed how degeneracy makes matching lose to maximum likelihood; here it goes further and breaks the very act of “deciding qubit by qubit”. Section 6.2 of “qLDPC Codes · High-School Edition” called these two enemies “short cycles and degeneracy”; this section only pins them to gross's actual numbers.
两个敌人一起出现的最小例子,可以手算。四个比特排成一个环,四条 Z 检查 c1 = b1 + b2、c2 = b2 + b3、c3 = b3 + b4、c4 = b4 + b1(BB 教程补课 0.D 里的那个环),再加一条 X 检查 X1X2X3X4,它和每条 Z 检查共享两个比特,所以都对易。Tanner 图就是一个长 8 的圈。p 仍取 0.1。
The smallest example with both enemies at once can be done by hand. Four qubits in a ring with four Z checks c1 = b1 + b2, c2 = b2 + b3, c3 = b3 + b4, c4 = b4 + b1 (the ring of BB guide catch-up 0.D), plus one X check X1X2X3X4, which shares two qubits with every Z check and so commutes with all of them. The Tanner graph is a single cycle of length 8. Again p = 0.1.
一个错误,放在 b4 上:c3、c4 亮。穷举的精确答案是 b4 的 LLR = −4.39(出错概率约 0.99),其他三个 +4.39。BP 第 1 轮就判对了,可它的把握越传越大:b4 在第 2 轮是 −6.59,第 3 轮 −10.99;之后有起有落,但每 4 轮净增约 −8.79,第 11 轮到了 −28.56,远超精确值 −4.39。这就是「重复计数」:b4 的意见沿环走一圈又回到自己手里,被当成新证据再加一遍。这里多出来的只是把握,判决没有错。
One error, on b4: c3 and c4 light. The exact answer from enumeration is LLR −4.39 for b4 (flip probability about 0.99) and +4.39 for the other three. BP decides correctly in round 1, but its confidence keeps growing: b4 is at −6.59 in round 2 and −10.99 in round 3; after that it rises and falls, but gains a net −8.79 every 4 rounds, reaching −28.56 in round 11, far beyond the exact −4.39. That is double counting: b4's opinion travels once round the ring, comes back to b4, and is added again as if it were new evidence. Here only the confidence is inflated; the decision is right.
两个错误,放在 b1、b2 上:亮的是 c2 和 c4。与症状相符的最轻修复有两个,{b1, b2} 和 {b3, b4},概率相同;它们相差 X1X2X3X4,正是那条 X 检查,所以两个都是正确答案——这就是退化。精确答案因此是每个比特出错的概率都恰好一半,四个 LLR 全为 0。BP 却在摇摆:四个比特的 LLR 一起走 +2.20、−2.20、−2.20、+2.20、+2.20、−2.20……,每两轮换一次符号,永远停不下来。硬判决要么是「全没错」,要么是「全出错」,两者都让 HZc = 0 ≠ s,症状没清零。两个正确答案摆在那里,BP 一个也交不出来。加阻尼(每轮只把消息更新一半)能让 LLR 停在 0,可是 0 就是「一半一半」,硬判决仍然是全没错。回到 2.1 节的手算台,切到「四比特环」的两个预设,按几下「下一步」就能看到这两种行为。
Two errors, on b1 and b2: c2 and c4 light. There are two lightest repairs consistent with the syndrome, {b1, b2} and {b3, b4}, equally likely; they differ by X1X2X3X4, which is the X check itself, so both are correct answers: this is degeneracy. The exact answer is therefore a flip probability of exactly one half for every qubit, all four LLRs 0. BP instead oscillates: the four LLRs move together through +2.20, −2.20, −2.20, +2.20, +2.20, −2.20, …, changing sign every two rounds and never settling. The hard decision is either “all clean” or “all flipped”, and both give HZc = 0 ≠ s: the syndrome is not cleared. Two correct answers are on the table and BP delivers neither. Damping (updating each message only halfway per round) makes the LLRs settle at 0, but 0 means “half and half”, and the hard decision is still all clean. Go back to the bench in section 2.1, switch to the two “four-qubit ring” presets and press “Next step” a few times to see both behaviours.
2.3OSD:卡住时按可靠度排序,解方程OSD: when stalled, sort by reliability and solve
先说为什么要在 BP 后面再接一步。前两节看到了两种「BP 没交出修复」的情形:一条检查、三个比特时,BP 算得完全精确,可逐比特判决是 (0, 0, 0),检查仍亮;四比特环有两个等价修复时,BP 摇摆不停,判决永远不满足症状。两种情形里 BP 的数并非没用:它们仍是一个排序,告诉我们谁更可能出错。缺的是一步保证「HZc = s」的操作,而这一步是纯线性代数,一次高斯消元就能做到。有序统计译码ordered-statistics decoding,OSD:按 BP 给出的 LLR 把比特排序,沿这个顺序挑出一组线性独立的列(基集),其余比特设为 0(或试几种小改动),在基集上解 H c = s。保证交出一个满足症状的修复。Panteleev 与 Kalachev 把它用到量子 LDPC 码上。(OSD)就是这样分工的:BP 负责排序,高斯消元负责保证症状清零。
First, why BP needs a further step. The previous two sections showed two ways in which BP hands back no repair: with one check on three qubits BP is exact, yet the qubit-by-qubit decision is (0, 0, 0) and the check stays lit; on the four-qubit ring with two equivalent repairs BP oscillates and its decision never satisfies the syndrome. In both cases BP's numbers are not useless: they are still a ranking of which qubits are more likely flipped. What is missing is a step that guarantees “HZc = s”, and that step is plain linear algebra, one Gaussian elimination. Ordered-statistics decodingOSD: rank the qubits by BP's LLRs, pick along this order a set of linearly independent columns (the basis set), set every other qubit to 0 (or try a few small changes), and solve H c = s on the basis set. It is guaranteed to return a repair that matches the syndrome. Panteleev and Kalachev brought it to quantum LDPC codes. (OSD) splits the work exactly so: BP ranks, Gaussian elimination guarantees a cleared syndrome.
在四比特环上手算一遍(错误在 b1、b2,亮 c2、c4)。HZ 与症状写成下表,每一列是一个比特碰到哪两条检查:
Work it once by hand on the four-qubit ring (errors on b1, b2; c2 and c4 lit). HZ and the syndrome as a table, each column saying which two checks a qubit touches:
| 检查check | b1 | b2 | b3 | b4 | 症状 ssyndrome s |
|---|---|---|---|---|---|
| c1 = b1 + b2 | 1 | 1 | 0 | 0 | 0 |
| c2 = b2 + b3 | 0 | 1 | 1 | 0 | 1 |
| c3 = b3 + b4 | 0 | 0 | 1 | 1 | 0 |
| c4 = b4 + b1 | 1 | 0 | 0 | 1 | 1 |
第一步,排序:按 BP 的 LLR 从小到大排,最可能出错的在前。这里四个 LLR 相等,按编号打破平局:b1, b2, b3, b4。第二步,挑列:沿这个顺序一列一列看,只要这一列不能由已经收下的列相加得到,就收下。b1 的列 (1, 0, 0, 1)、b2 的列 (1, 1, 0, 0)、b3 的列 (0, 1, 1, 0) 相继收下;b4 的列 (0, 0, 1, 1) 恰好等于前三列之和,跳过。收下的列数等于 rank HZ = 3,这组比特 I = {b1, b2, b3} 叫基集basis set:一组数量等于 rank H 的比特,H 在这些列上线性独立;一旦其余比特的取值定下,这些比特的取值由 H c = s 唯一解出。OSD 沿 BP 的排序挑,于是最可能出错的比特进入基集。(叫法说明:Roffe 等人把这组主元列叫「基集」(basis set),本篇沿用;经典 OSD(Fossorier 与 Lin)和 Panteleev、Kalachev 说的「信息集」恰好是它的补集,即 n − rank H 个最可靠的位置,这里是 {b4},所以他们的 OSD-w 是在那个补集里翻位。算法相同,只是名字不同。)。第三步,解方程:基集外的比特一律设为 0(b4 = 0),再在基集上解 HZc = s。因为收下的列线性独立,解是唯一的,一行一行代入:c3 给 b3 + 0 = 0,所以 b3 = 0;c2 给 b2 + b3 = 1,所以 b2 = 1;c1 给 b1 + b2 = 0,所以 b1 = 1;剩下的 c4 核对:b4 + b1 = 0 + 1 = 1,与症状一致。修复 c = {b1, b2},症状清零,而且正是真实错误。这就是0 阶 OSDOSD-0:只解一次线性方程(基集外全设 0),不尝试任何偏离。本页两个实验台都只实现这一阶。(OSD-0)。
Step one, sort: by BP's LLR, smallest first, so the most likely flipped come first. Here all four LLRs are equal and ties are broken by index: b1, b2, b3, b4. Step two, pick columns: go through the columns in this order and keep each one that is not a sum of columns already kept. The columns of b1 (1, 0, 0, 1), b2 (1, 1, 0, 0) and b3 (0, 1, 1, 0) are kept in turn; the column of b4 (0, 0, 1, 1) equals the sum of the first three and is skipped. The number kept equals rank HZ = 3, and this set of qubits I = {b1, b2, b3} is the basis setA set of rank-H qubits whose columns of H are linearly independent; once every other qubit's value is fixed, these are solved uniquely from H c = s. OSD picks it along BP's ranking, so the most-likely-flipped qubits enter it. (Naming: Roffe et al. call this set of pivot columns the basis set, and so does this page; the classical OSD of Fossorier and Lin and the paper of Panteleev and Kalachev use “information set” for the complementary set, the n − rank H most reliable positions, here {b4}, so their OSD-w flips positions of that complementary set. Same algorithm, different names.). Step three, solve: set every qubit outside the basis set to 0 (b4 = 0) and solve HZc = s on the basis set. Because the kept columns are independent the solution is unique; substitute row by row: c3 gives b3 + 0 = 0, so b3 = 0; c2 gives b2 + b3 = 1, so b2 = 1; c1 gives b1 + b2 = 0, so b1 = 1; the remaining c4 checks out: b4 + b1 = 0 + 1 = 1, as the syndrome says. The repair c = {b1, b2} clears the syndrome and is exactly the true error. This is order-0 OSDOSD-0: solve the linear system once (everything outside the basis set at 0) and try no deviations. Both benches on this page implement only this order. (OSD-0).
更高阶:OSD 阶数OSD order:允许在基集外同时设成 1 的比特数上限(以及试哪些组合的规则);阶数越高,尝试的组合越多、越慢、越准。它是第 3 章「译码器设置」限定项的一部分。为 1 时,再把基集外最不可靠的比特(这里只有 b4)试着设成 1,重新解:b4 = 1 推出 b3 = 1、b2 = 0、b1 = 0,得到 {b3, b4},重量也是 2。所有候选里取最可能的那个(独立噪声下就是最轻的),一样轻就保留先得到的。这里两个候选相差 X1X2X3X4,选哪个都成功。gross 的基集外有 78 个比特,阶数规定最多同时翻几个、试哪些组合:试得越多越准,也越慢。
Higher orders: with OSD orderThe maximum number of qubits outside the basis set that may be set to 1 at once (plus the rule for which combinations to try); higher order = more combinations tried, slower, more accurate. It is part of the “decoder settings” qualifier of Chapter 3. 1, also try setting the least reliable qubit outside the basis set (here only b4) to 1 and solve again: b4 = 1 forces b3 = 1, b2 = 0, b1 = 0, giving {b3, b4}, also of weight 2. Among all candidates keep the most likely (under independent noise, the lightest), and on a tie keep the first. Here the two candidates differ by X1X2X3X4, so either succeeds. In gross 78 qubits lie outside the basis set, and the order fixes how many of them may flip at once and which combinations are tried: more attempts, more accuracy, more time.
为什么要按 BP 排序:换成一个错误在 b4 上(亮 c3、c4)。BP 把 b4 排在最前(LLR 最负),b4 进了基集;基集外那个比特设为 0,解出 {b4},重量 1,正确。若不看 BP、按编号排,基集是 {b1, b2, b3},b4 被强行设成 0,解出 {b1, b2, b3}:也满足症状,却重了两个比特,概率只有 {b4} 的 p²/(1 − p)² = 1/81。在这个小环里两者相差 X1X2X3X4,碰巧仍算成功;在有逻辑算符的码里,这样的重解更容易落进错误的类。下面的手算台预设为上面手算的两个错误的环,按「OSD-0 收尾」即可亲手跑;切到「四比特环:一个错误」就是这一段的情形。OSD 用的是当时那一步的 LLR。
Why sort by BP: take one error on b4 instead (c3, c4 lit). BP ranks b4 first (most negative LLR), so b4 enters the basis set; the one qubit left outside is set to 0 and the solve gives {b4}, weight 1, correct. Ignore BP and sort by index instead, and the basis set is {b1, b2, b3}, b4 is forced to 0, and the solve gives {b1, b2, b3}: it matches the syndrome too, but is two qubits heavier and only p²/(1 − p)² = 1/81 as likely as {b4}. In this small ring the two differ by X1X2X3X4 and it happens to count as success; in a code with logical operators such a heavy solution is more likely to land in the wrong class. The bench below is preset to the two-error ring worked above; press “Finish with OSD-0” to run it yourself, and switch to “four-qubit ring: one error” for the case of this paragraph. OSD uses the LLRs of whatever step you are at.
现在再读 QEC-Bank 原文就句句有着落:「Ordered-statistics decoding uses the BP reliabilities to choose an information set, then solves the syndrome constraints while testing a controlled set of reliability-ordered deviations. Its contribution is not another syndrome formula; it is a global repair stage when local messages fail.」用 BP 的可靠度选一个信息集(QEC-Bank 的原话;本篇把这组主元列叫基集,见下面的术语说明):把 144 个比特按带符号的 Lj 从小到大排(最负的、也就是最可能出错的排前面;|Lj| 小只表示拿不准,不表示出错),从前往后挑出使 HZ 对应列线性独立的 66 列(66 = rank HZ)。解症状约束:其余 78 个比特全设为 0,方程 HZc = s 在这 66 个未知数上恰有唯一解,一次高斯消元就完。受控的一组按可靠度排序的偏离:更高阶的 OSD 把基集外最不可靠的几个比特试着设成 1,每种尝试重新解一次,取最好的解。不是另一条症状公式,而是全局修复阶段:OSD 没有改变「症状 = HZe」这件事,它只是在 BP 的局部消息失灵时,用一次全局的线性代数保证交出一个清零症状的答案。QEC-Bank 的 intuition.md(该条目的直觉说明页)补了代价:「OSD improves robustness but adds global, data-dependent latency」——高斯消元要同时看整张矩阵,耗时随症状而变,这对每微秒一轮的实时译码是真实的负担(《译码器 · 高中数学版》4.1 节解释过为什么吞吐与准确同样重要)。
Now the QEC-Bank text reads line by line: “Ordered-statistics decoding uses the BP reliabilities to choose an information set, then solves the syndrome constraints while testing a controlled set of reliability-ordered deviations. Its contribution is not another syndrome formula; it is a global repair stage when local messages fail.” Use the BP reliabilities to choose an information set (the QEC-Bank's wording; this page calls this set of pivot columns the basis set, see the naming note below): sort the 144 qubits by signed Lj from most negative upward (most likely flipped first; a small |Lj| only means uncertain, not flipped), and walking from the front pick 66 columns of HZ that are linearly independent (66 = rank HZ). Solve the syndrome constraints: set the other 78 qubits to 0, and HZc = s has exactly one solution in the 66 unknowns, one Gaussian elimination and done. A controlled set of reliability-ordered deviations: higher orders try setting a few of the least reliable qubits outside the basis set to 1, re-solve for each attempt, and keep the best solution. Not another syndrome formula but a global repair stage: OSD does not change the fact “syndrome = HZe”; it only guarantees, when BP's local messages fail, an answer that clears the syndrome by one global piece of linear algebra. The QEC-Bank file intuition.md (the entry's page of intuitions) adds the price: “OSD improves robustness but adds global, data-dependent latency”; Gaussian elimination looks at the whole matrix at once and its time depends on the syndrome, a real burden for real-time decoding at one round per microsecond (section 4.1 of “Decoders · High-School Edition” explained why throughput matters as much as accuracy).
cj = 0 (j 不在 I 中)(j not in I),解solve HZ[:, I] cI = s
gross: |I| = 66,其余 144 − 66 = 78 个比特设为 0the other 144 − 66 = 78 qubits set to 0
保证 HZc = s,不保证残留是稳定子guarantees HZc = s, not that the residual is a stabilizer
记号:I = 基集(一组比特的编号);|I| = 它的元素个数;HZ[:, I] = 只保留 I 那些列的子矩阵,72 × 66 且列满秩(再挑出 66 个独立的方程才成为可逆方阵);cI = 修复在 I 上的取值。Notation: I = the basis set (a set of qubit indices); |I| = its size; HZ[:, I] = the submatrix keeping only the columns in I, 72 × 66 with full column rank (choosing 66 independent equations makes it a square invertible system); cI = the repair restricted to I.
现在亲手跑。下面的实验台预设为 [[72,12,6]](BB 教程 5.3 节,与 gross 同一对多项式,6 × 6 环面,72 个数据比特,浏览器里跑得快),模型是码容量code-capacity model:每个数据比特独立以概率 p 出 X 错误,测量完美。这是第 3 章第一条记录里 memoryless Pauli 的一半(只有 X 一侧),也是 QEC-Bank 说的「the clean input for the BP-OSD baseline」。(只有 X 错误、完美测量)。按「新错误」,读数报出真实错误重量与亮起的 Z 检查数;按「BP 走一轮」几次,看每个比特的 LLR 柱子(柱子向上 = 相信没错,向下 = 相信出错;绿柱判对,品红柱判错;蓝色竖条是真实错误位置;横轴是比特编号),注意某些柱子一轮正一轮负。这个实验台的 BP 用 2.1 节的 min-sum 规则(系数 0.8);「BP 跑完」跑 30 轮,读数会说硬判决是否已匹配症状;若没有,按「OSD 收尾」,看它如何在最可能出错的比特上解方程把症状清零——然后看判定:清零后残留是稳定子(成功)还是逻辑算符(失败)。最后按「蒙特卡洛」,300 次随机错误里 BP 单独失败几次、其中几次连症状都没清零、BP + OSD 又失败几次(和标准的 BP-OSD 一样,OSD 只在 BP 30 轮未收敛时才调用):OSD 把「没答案」变成「有答案」,但答案对不对取决于退化程度和 OSD 阶数。
Now run it by hand. The bench below is preset to [[72,12,6]] (BB guide section 5.3, the same polynomial pair as gross on a 6 × 6 torus, 72 data qubits, fast in a browser), under the code-capacity modelEvery data qubit independently suffers an X error with probability p; measurements are perfect. This is half (the X side) of the memoryless Pauli setting of the first record in Chapter 3, and what the QEC-Bank calls “the clean input for the BP-OSD baseline”. (X errors only, perfect measurement). Press “New error”: the readout reports the true error weight and the number of lit Z checks. Press “One BP round” a few times and watch each qubit's LLR bar (bar up = believed clean, down = believed flipped; green bars are decided correctly, magenta wrongly; the blue band marks the true error; the horizontal axis is the qubit index), noticing bars that swing positive one round and negative the next. This bench runs BP with the min-sum rule of section 2.1 (factor 0.8). “Run BP to the end” does 30 rounds and the readout says whether the hard decision matches the syndrome; if not, press “Finish with OSD” and watch it clear the syndrome by solving on the most-likely-flipped qubits, then read the verdict: after clearing, is the residual a stabilizer (success) or a logical (failure)? Finally press “Monte-Carlo”: over 300 random errors, how often BP alone fails, how many of those never cleared the syndrome, and how often BP + OSD fails (as in standard BP-OSD, OSD is called only when BP has not converged within 30 rounds). OSD turns “no answer” into “an answer”, but whether the answer is right depends on the degeneracy and the OSD order.
[[72,12,6]] 实验台是教学版:码容量模型、只有 X 错误、min-sum BP(系数 0.8)最多 30 轮、OSD 只有 0 阶、没有阻尼和调度技巧、跑的是 72 比特的 [[72,12,6]] 而不是 144 比特的 gross。它演示的是机制,不复现任何文献数字。2.1 节的手算台则用精确的 tanh 规则,p 固定为 0.1,图小到可以穷举,所以它显示的「精确值」是真正的精确值。文献中的 BP-OSD(roffe2020decoding、panteleev2021degenerate)用更多轮数、更高阶数与更细的参数;QEC-Bank 说这些参数是结果的一部分,第 3 章会逐条列出。
The [[72,12,6]] bench is a teaching version: code-capacity model, X errors only, min-sum BP (factor 0.8) for at most 30 rounds, OSD of order 0 only, no damping or scheduling tricks, and it runs the 72-qubit [[72,12,6]] rather than the 144-qubit gross. It demonstrates the mechanism and reproduces no literature number. The hand bench of section 2.1 uses the exact tanh rule with p fixed at 0.1 on graphs small enough to enumerate, so the “exact values” it shows really are exact. The BP-OSD of the literature (roffe2020decoding, panteleev2021degenerate) uses more rounds, higher orders and finer parameters; the QEC-Bank says those parameters are part of the result, and Chapter 3 lists them one by one.
BP 算的是每个比特「已知症状时出错的概率」,用两条规则:比特把先验与邻居检查的消息相加,检查用偏差之积告诉每个邻居其他人的说法;负则判错。它在树上精确,但逐比特判决拼起来不一定满足症状;gross 的 Tanner 图有长 6 的圈,消息三轮就绕回自己,加上每类 266 个等价修复,BP 会摇摆、给出症状不清零的判决、或押错类。OSD 是「卡住就解方程」:按可靠度取 66 个比特为基集,解 HZc = s,保证清零,不保证成功,且要付全局的、随数据变化的延迟。BP-OSD 是这两步的合称,QEC-Bank 的两条主要记录都是它。
BP computes, for every qubit, “the probability it is flipped given the syndrome”, with two rules: a qubit adds its prior to its checks' messages, and a check uses the product of biases to tell each neighbour what the others say; negative means flipped. It is exact on trees, but the qubit-by-qubit decisions need not fit the syndrome together; gross's Tanner graph has cycles of length 6, a message returns to its sender in three rounds, and with 266 equivalent repairs per class BP may oscillate, hand back a decision that leaves the syndrome lit, or bet on the wrong class. OSD is “when stuck, solve”: take 66 qubits as a basis set by reliability, solve HZc = s, guaranteed to clear, not guaranteed to succeed, at the price of global, data-dependent latency. BP-OSD names the two steps together, and both main QEC-Bank records are it.
对。三种失败要分开:摇摆、不清零、押错类。OSD 针对的是前两种(BP 没有交出合法答案)。标准的 BP-OSD 只在 BP 没收敛时才调用 OSD(本页 [[72,12,6]] 实验台的蒙特卡洛也是这样),所以这一次 OSD 根本不会运行;即使强行运行,它也只保证症状清零,不保证选对类。要减少「押错类」,靠的是更高的 OSD 阶数、更好的 BP 参数,或利用对称性的译码器(第 3 章 3.4 节)。
Right. Keep the three failures apart: oscillation, uncleared syndrome, wrong coset. OSD targets the first two (BP produced no valid answer). Standard BP-OSD calls OSD only when BP has not converged (so does the Monte-Carlo of the [[72,12,6]] bench on this page), so here OSD would not even run; forced to run, it would still guarantee only a cleared syndrome, not the right class. Reducing “wrong coset” takes a higher OSD order, better BP parameters, or a symmetry-aware decoder (section 3.4 of Chapter 3).
回看 1.1 节的判决书:清零症状只说明残留在 HZ 的核里,核里既有稳定子也有逻辑算符。OSD 的保证是「HZc = s」,不是「残留是稳定子」。
Reread the verdict in section 1.1: a cleared syndrome only says the residual lies in the kernel of HZ, which contains both stabilizers and logicals. OSD's guarantee is “HZc = s”, not “the residual is a stabilizer”.
QEC-Bank 的三条译码记录,与它们各自的噪声模型The three QEC-Bank decoder records, each with its own noise model
QEC-Bank 的「译码器」侧面为 bivariate_bicycle 登记了三条记录:BP-OSD(码容量与现象学基准)、BP-OSD(深度 7 电路的探测器模型,0.8%)、匹配(柱面对称归约)。这一章逐字转录三条记录,说清每条的「噪声设定」字段、状态词、引文与登记状态,重点拆解 0.8% 的五个限定项,再说明柱面匹配为什么是一部词典而不是一个等价。 The QEC-Bank “Decoders” facet registers three records for bivariate_bicycle: BP-OSD (code-capacity and phenomenological benchmarks), BP-OSD (the detector model of the depth-7 circuit, 0.8%), and matching (the cylinder symmetry reduction). This chapter transcribes all three word for word, explains each record's “noise setting” field, status word, citations and registration state, takes the five qualifiers of 0.8% apart, and then explains why cylinder matching is a dictionary rather than an equivalence.
3.1三条记录一览The three records at a glance
下表逐字转录 card.yaml 的 decoders 字段(三条断言 atlas-assertion:bivariate_bicycle:decoders:0/1/2)与渲染出的 QEC-Bank 页面。三条的 applies_to 都是 eczoo-entity:qcga#collection——它们描述的是「BB 码这一族」,不是 gross 这一个实例。「状态」是 QEC-Bank 译码词表里的成熟度标签,原文 standard(标准基准)与 research-grade(研究级,尚非标准工具)。
The table transcribes the decoders field of card.yaml (the three assertions atlas-assertion:bivariate_bicycle:decoders:0/1/2) and the rendered QEC-Bank page verbatim. All three have applies_to = eczoo-entity:qcga#collection: they describe “the BB family”, not the single instance gross. “Status” is the maturity label of the QEC-Bank decoder vocabulary, verbatim standard (a standard benchmark) or research-grade (research grade, not yet a standard tool).
| # | 译码器 (id)Decoder (id) | 状态Status | 噪声设定(原文)Noise setting (verbatim) | card.yaml 的 refsrefs in card.yaml | 渲染页多出的引文Extra citation on the rendered page |
|---|---|---|---|---|---|
| 0 | BP + ordered-statistics bp-osd | standard | memoryless Pauli and phenomenological qLDPC benchmarks | roffe2020decoding, panteleev2021degenerate | — |
| 1 | BP + ordered-statistics bp-osd | research-grade | circuit detector model for the seven-CNOT-layer extraction schedule | bravyi2024bicycle | roffe2020decoding |
| 2 | Minimum-weight perfect matching mwpm | research-grade | BB symmetry reduction to toric-code-like cylinders | sahay2026matching | higgott2022pymatching |
最后两列值得一停。card.yaml 里记录 1 的 refs 只有 bravyi2024bicycle,记录 2 只有 sahay2026matching;渲染出的页面却分别多了 roffe2020decoding 与 higgott2022pymatching。对照可见,多出来的是 QEC-Bank 共享译码词表里 bp-osd、mwpm 两个类型各自的默认引文(BP-OSD 的基线论文、PyMatching 软件),渲染时附在每条记录后面。读引文时要分清哪条是这条记录自己的证据(card 里的),哪条是译码器类型的通用出处。登记状态(registry/refs.yaml,QEC-Bank 的参考文献登记表:一个键「已登记」表示题目、作者、arXiv 号等元数据已经录入):roffe2020decoding、panteleev2021degenerate、bravyi2024bicycle、higgott2022pymatching 四个键有完整元数据;sahay2026matching 在 QEC-Bank 参考文献页上显示「metadata pending」,题目与作者只能从文献扫描报告取——本篇引用时会标「登记待补」。
The last two columns deserve a pause. In card.yaml, record 1's refs contain only bravyi2024bicycle and record 2's only sahay2026matching; the rendered page shows an extra roffe2020decoding and higgott2022pymatching respectively. Comparing the two, the extras are the default citations of the types bp-osd and mwpm in the QEC-Bank's shared decoder vocabulary (the BP-OSD baseline paper, the PyMatching software), appended to each record at render time. When reading the citations, separate the record's own evidence (in the card) from the generic source of the decoder type. Registration state (registry/refs.yaml, the QEC-Bank's register of references: a key is “registered” when its title, authors, arXiv number and so on have been entered): the four keys roffe2020decoding, panteleev2021degenerate, bravyi2024bicycle, higgott2022pymatching have full metadata; sahay2026matching shows “metadata pending” on the QEC-Bank references page, so its title and authors can only be taken from the literature scout report, and this guide marks it “registration pending” whenever it is cited.
3.2记录 0:码容量与现象学基准Record 0: the code-capacity and phenomenological benchmark
记录 0 的「For this code」原文:「Belief propagation supplies soft reliabilities and ordered-statistics postprocessing repairs many failures caused by degeneracy and short Tanner-graph cycles. Performance belongs to the stated channel and stopping/OSD settings, not to the bare check matrix.」前半句是第 2 章;后半句是这条记录的重点。人话:BP-OSD 在 BB 码上的表现是某个噪声信道 + 某组停止条件与 OSD 设置下的表现,不是 HX、HZ 自己的属性。噪声设定里的两个词:「memoryless Pauli」= 每个比特独立地以概率 p 出一个 Pauli 错误、测量完美(第 2 章实验台的模型,加上 Z 一侧),也就是《译码器 · 高中数学版》阈值账本里「完美症状」那几行的模型;「phenomenological」= 再让每条检查的读数以概率 q 读反(同一教程 5.3 节:表面码在这个模型下阈值从约 10.3% 掉到约 2.9%)。QEC-Bank 的 syndrome-circuits-and-decoding.md 说这个码容量问题是「the clean input for the BP-OSD baseline of roffe2020decoding and its generalized-bicycle precursor panteleev2021degenerate」——Roffe、White、Burton、Campbell 2020 年那篇(“Decoding Across the Quantum Low-Density Parity-Check Code Landscape”)把 BP-OSD 确立为有限长 qLDPC 码的稳健基线;Panteleev 与 Kalachev(“Degenerate Quantum LDPC Codes With Good Finite Length Performance”,2021)在广义 bicycle 码上引入了它。状态 standard:它是这一族码默认的基准译码器。注意这条记录没有给出任何阈值数字——QEC-Bank 没有为码容量模型下的 BB 码登记阈值,本篇也不补。
Record 0's “For this code” text: “Belief propagation supplies soft reliabilities and ordered-statistics postprocessing repairs many failures caused by degeneracy and short Tanner-graph cycles. Performance belongs to the stated channel and stopping/OSD settings, not to the bare check matrix.” The first sentence is Chapter 2; the second is the point of this record. Plainly: how BP-OSD performs on a BB code is its performance under one noise channel plus one set of stopping conditions and OSD settings, not a property of HX, HZ themselves. The two words in the noise setting: “memoryless Pauli” = every qubit independently suffers a Pauli error with probability p and measurements are perfect (the model of the Chapter 2 bench plus the Z side), the model of the “perfect syndrome” rows of the threshold ledger in “Decoders · High-School Edition”; “phenomenological” = additionally each check's reading flips with probability q (section 5.3 of the same guide: the surface-code threshold drops from about 10.3% to about 2.9% under this model). The QEC-Bank file syndrome-circuits-and-decoding.md calls this code-capacity problem “the clean input for the BP-OSD baseline of roffe2020decoding and its generalized-bicycle precursor panteleev2021degenerate”: Roffe, White, Burton and Campbell (2020, “Decoding Across the Quantum Low-Density Parity-Check Code Landscape”) established BP-OSD as the robust baseline for finite-length qLDPC codes; Panteleev and Kalachev (“Degenerate Quantum LDPC Codes With Good Finite Length Performance”, 2021) introduced it on generalized bicycle codes. Status standard: it is the default benchmark decoder for this family. Note that this record gives no threshold number: the QEC-Bank registers no code-capacity threshold for BB codes, and this guide adds none.
3.3记录 1:0.8%,五个限定项逐一解释Record 1: 0.8%, the five qualifiers one by one
记录 1 的原文:「The original end-to-end study reports a 0.8% circuit-level threshold for its BB memory family under the standard circuit-noise model, depth-seven extraction, and BP-OSD. It is not a decoder-independent threshold of every BB construction: changing the family, CNOT order, detector model, noise normalization, or postprocessing defines a different threshold experiment.」状态 research-grade,引文 bravyi2024bicycle(Bravyi、Cross、Gambetta、Maslov、Rall、Yoder,“High-Threshold and Low-Overhead Fault-Tolerant Quantum Memory”,2024,已登记)。BB 教程 6.4 节列过五个限定项;《译码器 · 高中数学版》6.1 节说过为什么任何阈值都要带五项。这里把 BB 的五项各自展开成「它具体指什么、换了会怎样」。
Record 1's text: “The original end-to-end study reports a 0.8% circuit-level threshold for its BB memory family under the standard circuit-noise model, depth-seven extraction, and BP-OSD. It is not a decoder-independent threshold of every BB construction: changing the family, CNOT order, detector model, noise normalization, or postprocessing defines a different threshold experiment.” Status research-grade, citation bravyi2024bicycle (Bravyi, Cross, Gambetta, Maslov, Rall, Yoder, “High-Threshold and Low-Overhead Fault-Tolerant Quantum Memory”, 2024, registered). BB guide section 6.4 listed the five qualifiers; section 6.1 of “Decoders · High-School Edition” explained why every threshold must carry five. Here each BB qualifier is unfolded into “what exactly it refers to, and what changing it does”.
| # | 限定项Qualifier | 具体指什么What exactly it refers to | 换掉它会怎样What changing it does |
|---|---|---|---|
| ① | 标准电路级噪声模型standard circuit-noise model | 一轮症状提取电路里的每个位置——每个 CNOT、每个空闲比特、每次制备与读出——都是独立的出错位置,共用一个 p(《译码器 · 高中数学版》5.4 节)。QEC-Bank 的操作合同要求写明「data, measurement, reset, idle, and two-qubit fault probabilities」以及「whether X/Z correlations and leakage are present」。Every location in one round of the extraction circuit, every CNOT, every idle qubit, every preparation and readout, is an independent fault location sharing one p (section 5.4 of “Decoders · High-School Edition”). The QEC-Bank operational contract requires stating “data, measurement, reset, idle, and two-qubit fault probabilities” and “whether X/Z correlations and leakage are present”. | 换成码容量或现象学模型,数字会大得多(表面码:0.57%/步 对 2.9% 对 10.3%),且不可比。Switching to the code-capacity or phenomenological model gives a much larger, incomparable number (surface code: 0.57%/step versus 2.9% versus 10.3%). |
| ② | 深度 7 的提取电路depth-seven extraction | Bravyi 等人为两层耦合布局给出的 CNOT 调度:144 条六腿检查的 6 × 144 个 CNOT 排进 7 层(BB 教程 6.2 节)。QEC-Bank:「The number seven is a property of that schedule and layout, not of every weight-six matrix.」The CNOT schedule Bravyi et al. give for the two-layer coupling layout: the 6 × 144 CNOTs of the 144 weight-six checks arranged in 7 layers (BB guide section 6.2). QEC-Bank: “The number seven is a property of that schedule and layout, not of every weight-six matrix.” | 换 CNOT 顺序,hook 错误的传播方式随之变,电路码距与阈值都可能变(第 4 章)。Change the CNOT order and the way hook errors propagate changes with it, and so may the circuit distance and the threshold (Chapter 4). |
| ③ | 探测器构造detector construction | 把相邻两轮的读数异或成只报「变化」的探测器(《译码器 · 高中数学版》5.1 节),并规定边界轮、初始化、最终数据测量怎样进入探测器(QEC-Bank 第 3 节)。XOR adjacent rounds' readings into detectors that report only “change” (section 5.1 of “Decoders · High-School Edition”), and specify how boundary rounds, initialization and the final data measurement enter the detectors (QEC-Bank section 3). | 不同的探测器定义给译码器不同的图;同一电路可以定义出不同的实验。Different detector definitions hand the decoder different graphs; one circuit can define different experiments. |
| ④ | 噪声归一化noise normalization | p 是「每个电路位置」的概率。表面码账本里 Fowler 的 0.57% 也是每步,而 10.3% 是每比特每轮——同一个「%」单位不同(账本读法)。p is the probability “per circuit location”. In the surface-code ledger Fowler's 0.57% is also per step, while 10.3% is per qubit per round; the same “%” with different units (how to read the ledger). | 换归一化,数字整体平移,可以差好几倍。Change the normalization and the whole number shifts, by several-fold. |
| ⑤ | 译码器与估计方法decoder and estimator | BP-OSD,参数照论文(QEC-Bank 合同:「BP update rule, iteration limit, damping, and stopping condition; OSD order and candidate-selection rule」)。数字怎样得到,要看论文本身(arXiv 2308.07915,下一段细说):它为每一块码单独解 pL(p) = kp,得到这块码的伪阈值 p0;pL 在 p ≥ 10−3 处由 BP-OSD 模拟算出,更小的 p 用拟合公式外推。论文没有做「几块不同尺寸的码的曲线相交」那种分析。BP-OSD with the paper's parameters (QEC-Bank contract: “BP update rule, iteration limit, damping, and stopping condition; OSD order and candidate-selection rule”). How the number is obtained has to be read from the paper itself (arXiv 2308.07915, detailed in the next paragraph): it solves pL(p) = kp separately for each code, which gives that code's pseudo-threshold p0; pL is computed by BP-OSD simulation for p ≥ 10−3 and extrapolated to smaller p with a fitting formula. The paper does not analyse where the curves of several codes of different size cross. | 换译码器(第 2 章:阶数、轮数都算)、换码或换比较基准(kp 还是 p),p0 都会变。同一批五块码,论文 v1 与 v2 的表 1 给出的 p0 就不一样(下一段)。Change the decoder (Chapter 2: order and rounds count), the code, or the baseline (kp or p) and p0 changes. For the same five codes, Table 1 of the paper's v1 and v2 already gives different p0 (next paragraph). |
p = 每个电路位置的出错概率;q = 现象学模型里读数翻转的概率;hook 错误见第 4 章。表中表面码的三个数字(0.57%/步、2.9%、10.3%)来自《译码器 · 高中数学版》的账本,分属三种模型,只为说明「换模型数字就变」,不与 0.8% 直接比较。p = the fault probability per circuit location; q = the readout flip probability in the phenomenological model; hook errors are in Chapter 4. The three surface-code numbers in the table (0.57%/step, 2.9%, 10.3%) come from the ledger of “Decoders · High-School Edition”, belong to three different models, and appear only to show that changing the model changes the number; they are not compared directly with 0.8%.
QEC-Bank 的 syndrome-circuits-and-decoding.md 第 5 节接着列出 0.8% 不是什么,原文五条外加一条:「a code-capacity threshold; an asymptotic threshold proved for all BB choices; a property of BP-OSD independent of schedule; a hardware logical error rate; evidence that circuit distance equals static distance」;「It is also not a one-block pseudo-threshold against a physical baseline.」最后这一条与论文对不上,下面把论文的做法摆出来。
论文的量都按「一块码」算。一块码 = 一个 [[n, k, d]] 码加它的症状电路,gross 这块有 k = 12 个逻辑比特。做 Nc 轮症状测量(论文取 Nc = d),最后译码;只要 12 个逻辑比特里有任何一个被改写,就算这一块失败,概率记作 PL(Nc)。折成每轮:逻辑错误率 pL = 1 − (1 − PL)1/Nc ≈ PL/Nc。拿什么比?不编码时,12 个裸比特每轮至少一个出错的概率约为 12p(每个约 p,p 很小时相加)。所以论文的伪阈值pseudo-threshold:一块固定尺寸的码的「收支平衡点」。Bravyi 等人的定义:方程 pL(p) = kp 的解 p0,其中 pL = 整块(k 个逻辑比特任一出错)每轮的失败率,kp = k 个不编码比特至少一个出错的概率的近似。gross 的 k = 12,比的是 12p,不是 p。它是一块码的数,不是渐近阈值。定义为方程 pL(p) = kp 的解 p0:低于 p0,编码后的 12 个比特比不编码的 12 个比特更可靠。手算一个点:gross 在 v2 表 1 里 p0 = 0.0065,此时 kp = 12 × 0.0065 = 0.078,即 gross 的 pL 曲线在每轮 7.8% 这个高度与 12p 那条直线相交;若拿 p 本身作基准(0.0065),交点会落在别处。
0.8% 从哪来。论文 v1(2023 年 8 月)表 1 给五块 BB 码的 p0,印作 0.007(3) 到 0.008(3)(括号里那一位数字是什么意思,论文没有说明),正文说「observed pseudo-threshold is close to 0.008」,摘要写成 0.8%。v2(2024 年 2 月)重新给出表 1:0.0048([[72,12,6]])到 0.0069([[288,12,18]]),gross 0.0065,正文改说 144 与 288 比特两块码「close to 0.007」,摘要仍写 0.8%。Nature 发表版(2024 年 3 月)的摘要写「an error threshold of 0.7%」,正文说「BB codes offer a pseudo-threshold close to 0.7%」。所以 0.8% 是 v1 里几块码各自伪阈值的约数:估计方法是单块的 pL(p) = kp,不是多块曲线的交点,也不是渐近阈值。QEC-Bank 那句「It is also not a one-block pseudo-threshold against a physical baseline」照字面读与此不符,本篇照录原文,把不符记在这里和尾声的诚实账里。文献扫描报告的「负面结果」原文:「There is no decoder-independent 0.8% BB threshold.」这一句与论文一致。人话:0.8% 是一个实验的读数,五个限定项是这个实验的配置单;抽掉任何一项,剩下的数字不再有出处。
Section 5 of the QEC-Bank file syndrome-circuits-and-decoding.md then lists what 0.8% is not, five items verbatim plus one: “a code-capacity threshold; an asymptotic threshold proved for all BB choices; a property of BP-OSD independent of schedule; a hardware logical error rate; evidence that circuit distance equals static distance”; “It is also not a one-block pseudo-threshold against a physical baseline.” That last item does not match the paper, so here is what the paper does.
All the paper's quantities are per block. A block = one [[n, k, d]] code with its syndrome circuit; the gross block has k = 12 logical qubits. Run Nc rounds of syndrome measurement (the paper takes Nc = d), then decode; if any of the 12 logical qubits has been altered, the block has failed, with probability PL(Nc). Per round, the logical error rate is pL = 1 − (1 − PL)1/Nc ≈ PL/Nc. Compared with what? Unencoded, 12 bare qubits suffer at least one error per round with probability about 12p (about p each, added when p is small). So the paper's pseudo-thresholdThe break-even point of one fixed-size block. Bravyi et al. define it as the solution p0 of pL(p) = kp, where pL = the per-round failure rate of the whole block (any of its k logical qubits) and kp approximates the probability that at least one of k unencoded qubits fails. For gross k = 12, so the baseline is 12p, not p. It is a number for one block, not an asymptotic threshold. is the solution p0 of pL(p) = kp: below p0 the 12 encoded qubits are more reliable than 12 unencoded ones. One point by hand: gross has p0 = 0.0065 in Table 1 of v2, where kp = 12 × 0.0065 = 0.078, so gross's pL curve meets the straight line 12p at a height of 7.8% per round; with p itself (0.0065) as the baseline the crossing would be elsewhere.
Where 0.8% comes from. Table 1 of the paper's v1 (August 2023) gives p0 for five BB codes, printed 0.007(3) to 0.008(3) (the paper does not say what the digit in parentheses means); the text says “observed pseudo-threshold is close to 0.008” and the abstract says 0.8%. v2 (February 2024) gives a new Table 1: 0.0048 ([[72,12,6]]) to 0.0069 ([[288,12,18]]), gross 0.0065, and the text now says the 144- and 288-qubit codes are “close to 0.007”, while the abstract still says 0.8%. The abstract of the Nature version (March 2024) says “an error threshold of 0.7%”, and its text “BB codes offer a pseudo-threshold close to 0.7%”. So 0.8% is a round figure for the per-block pseudo-thresholds of v1: the estimator is the one-block pL(p) = kp, not a crossing of several blocks' curves and not an asymptotic threshold. Read literally, the QEC-Bank sentence “It is also not a one-block pseudo-threshold against a physical baseline” disagrees with this; this guide keeps the quotation and records the mismatch here and in the honesty ledger of the epilogue. The scout report's “negative result” reads “There is no decoder-independent 0.8% BB threshold.”, which agrees with the paper. Plainly: 0.8% is the reading of one experiment and the five qualifiers are that experiment's configuration sheet; remove any one and the remaining number has no source.
「BB 码阈值 0.8%,表面码阈值 1%,所以 BB 差一点」——这句话犯了账本规则的全部错误。两个数字的电路不同(深度 7 的六腿提取 对 表面码的四腿提取)、探测器构造不同、译码器不同(BP-OSD 对 匹配)、归一化未必相同、而且 0.8% 是论文 v1 里几块码各自伪阈值的约数(v2 与 Nature 版约 0.7%),比较基准是 12p,不是渐近阈值。QEC-Bank 在这条记录上只承诺一件事:bravyi2024bicycle 在它自己的配置下报告了 0.8%。要比较,必须把两种码放进同一个电路噪声模型、同一种归一化、各自最好的译码器里重新跑——那是另一个实验,QEC-Bank 没有登记它。
“BB threshold 0.8%, surface-code threshold 1%, so BB is slightly worse”: this sentence breaks every ledger rule at once. The two numbers use different circuits (depth-7 weight-six extraction versus the surface code's weight-four extraction), different detector constructions, different decoders (BP-OSD versus matching), not necessarily the same normalization, and 0.8% is a round figure for the per-block pseudo-thresholds of the paper's v1 (about 0.7% in v2 and the Nature version), measured against a 12p baseline, not an asymptotic threshold. On this record the QEC-Bank promises exactly one thing: bravyi2024bicycle reported 0.8% under its own configuration. To compare, both codes must be rerun in the same circuit-noise model, the same normalization, each with its best decoder; that is a different experiment, and the QEC-Bank has not registered it.
3.4记录 2:柱面匹配是一部词典,不是一个等价Record 2: cylinder matching is a dictionary, not an equivalence
记录 2 的原文:「A cylinder construction exposes matching subproblems and can be combined with BP and over-matching. Its certificate is the specific symmetry reduction; it does not turn every BB instance into independent toric codes.」状态 research-grade,引文 sahay2026matching——据文献扫描报告,Sahay、Williamson、Brown,“A Matching Decoder for Bivariate Bicycle Codes”(2026,arXiv 2602.22770),登记待补;扫描报告的概括是「Uses a toric-copy equivalence and a cylinder trick to apply MWPM, then improves it with BP and over-matching. This is the first dedicated symmetry-to-matching BB route.」
Record 2's text: “A cylinder construction exposes matching subproblems and can be combined with BP and over-matching. Its certificate is the specific symmetry reduction; it does not turn every BB instance into independent toric codes.” Status research-grade, citation sahay2026matching: from the scout report, Sahay, Williamson and Brown, “A Matching Decoder for Bivariate Bicycle Codes” (2026, arXiv 2602.22770), registration pending; the scout summary reads “Uses a toric-copy equivalence and a cylinder trick to apply MWPM, then improves it with BP and over-matching. This is the first dedicated symmetry-to-matching BB route.”
人话版本,按论文(arXiv 2602.22770 第 II.2–III.3 节)的步骤走。第 1 章说 gross 的一个错误点亮三条 Z 检查,画不成两端点的边。这条路线不改动错误,而是只看一部分检查,让错误在这一部分里重新变成两端点的边。
The plain version, following the steps of the paper (arXiv 2602.22770, sections II.2–III.3). Chapter 1 said one error in gross lights three Z checks and cannot be drawn as a two-ended edge. This route leaves the errors alone and looks at only part of the checks, chosen so that inside that part every error is again a two-ended edge.
第一步,找一个「对称」。论文所说的码的对称code symmetry(论文术语):一组检查,它们的乘积是恒等算符。等价说法:每个数据比特落在这组检查里的次数都是偶数,所以任何错误点亮这组检查的个数都是偶数。它与「平移对称」不是一回事。是一组乘积为恒等的检查。乘积为恒等 ⇔ 每个比特被这组里偶数条检查碰到(乘起来,每个比特上的 Z 两两抵消)。gross 的一个比特在 3 条 Z 检查里,偶数只能是 0 或 2,所以在这组检查里,每个单比特 X 错误要么一个也不点亮,要么恰好点亮两个。gross 的 Z 检查有 72 − rank HZ = 72 − 66 = 6 个独立的对称(本篇重算,与论文 II.2 节的「6 linearly independent symmetries」一致)。图 3.4(a) 画了其中一个,36 条检查:比特 1 的三个警报 4、7、13 里,4 和 7 在这组里,13 不在,所以只看这组检查时,比特 1 就是连接 4 与 7 的一条边。
Step one: find a “symmetry”. What the paper calls a code symmetryThe paper's term: a set of checks whose product is the identity operator. Equivalently, every data qubit lies in an even number of the set's checks, so any error lights an even number of them. It is not the same thing as translation symmetry. is a set of checks whose product is the identity. The product is the identity ⇔ every qubit is touched by an even number of the set's checks (multiply them and the Z's on each qubit cancel in pairs). A gross qubit lies in 3 Z checks, and an even number out of 3 can only be 0 or 2, so inside the set each single X error lights either nothing or exactly two checks. The Z checks of gross have 72 − rank HZ = 72 − 66 = 6 independent symmetries (recomputed here; section II.2 of the paper also reports “6 linearly independent symmetries”). Fig. 3.4(a) shows one of them, 36 checks: of qubit 1's three alarms 4, 7, 13, checks 4 and 7 are in the set and 13 is not, so seen through this set qubit 1 is an edge joining 4 and 7.
第二步,在对称图symmetry graph:顶点 = 一个对称里的检查;一个数据比特若点亮其中两条,就画一条连接它们的边(点亮 0 条的比特不出现)。这张图上每个错误都是两端点的边,所以可以做最小重量完美匹配。上匹配。对称图的顶点是这组检查,边是数据比特;把亮着的那几条检查两两配对,就是这张图上的最小重量完美匹配。代价是:对称以外的检查(比如 13)在这一步被忽略了。
Step two: match on the symmetry graphVertices = the checks of one symmetry; a data qubit that lights two of them becomes an edge joining those two (qubits that light none do not appear). Every error on this graph is a two-ended edge, so minimum-weight perfect matching applies.. Its vertices are the checks of the set and its edges are data qubits; pairing up the lit checks is minimum-weight perfect matching on this graph. The price: checks outside the set (13, for example) are ignored in this step.
第三步,柱面切口:从配对读出逻辑信息。修复要做对的,只是每条逻辑算符上错误个数的奇偶(奇偶对了,残留就是检查的乘积)。把环面沿两条线切成两个柱面 U、V(柱面 = 一个方向绕回、另一个方向有两条边界的圆筒面),把对称里的检查按位置分成 U 里的和 V 里的。U 里所有检查的乘积 P 只剩下两道切口附近的两条串 P1、P2(中间比特上的 Z 两两抵消),论文证明它们各自是一条逻辑算符(III.2.1 节、附录 D.3)。于是:配对里横过切口 1 的边数的奇偶,就是译码器对「真实错误在 P1 上有奇数个还是偶数个」给出的估计(III.2.2 节式 (19)),不是保证。估计会错的例子:在图 3.4(b) 的环面码上,一行横穿切口 1、绕环面一整圈的 X 错误本身就是一条逻辑算符,它不点亮任何检查,配对为空,横过切口的边数为 0,可它在 P1 上恰有 1 个。一般地,把配对当成一个修复:修复与真实错误合起来在 P1 上是偶数个,估计才对;合起来成了绕环面一圈的逻辑算符,就是译码失败。图 3.4(b) 在 4 × 4 环面码上演示(它的全部 Z 检查合起来就是一个对称):两个 X 错误点亮四条检查,配对后恰有一条边横过切口 1,所以译码器估计真实错误在 P1 上有奇数个;这个例子里估计是对的(真实错误在 P1 上恰有 1 个),修复照此在 P1 上放奇数个翻转。gross 有 6 个对称,每个横切一次、竖切一次,共读出 12 条逻辑算符的奇偶,正好对应 k = 12(III.2.4 节:k = 2K)。gross 的检查伸得远,论文指出这类小码切不出足够宽的柱面;办法是把格子在一个方向加倍,在加倍后的码上切,再折回原来的码(III.2.3 节)。
Step three: the cylinder cut, which reads logical information off the pairing. What a repair must get right is only the parity of the number of errors on each logical operator (with those parities right, the residual is a product of checks). Cut the torus along two lines into two cylinders U and V (a cylinder: a tube that wraps around in one direction and has two boundaries in the other), and split the checks of the symmetry by position into those in U and those in V. The product P of all checks in U leaves only two strings near the two cuts, P1 and P2 (the Z's on qubits in between cancel in pairs), and the paper proves each is a logical operator (section III.2.1, appendix D.3). Hence the parity of the number of pairing edges that cross cut 1 is the decoder's estimate of whether the true error has an odd or even number of flips on P1 (section III.2.2, Eq. (19)); it is an estimate, not a guarantee. An example where it is wrong: on the toric code of Fig. 3.4(b), a row of X errors that crosses cut 1 and runs once around the torus is itself a logical operator; it lights no check, so the pairing is empty and no edge crosses the cut, yet it has exactly 1 flip on P1. In general, treat the pairing as a repair: the estimate is right exactly when repair and true error together have an even number of flips on P1; when together they form a loop around the torus, a logical operator, decoding has failed. Fig. 3.4(b) shows this on the 4 × 4 toric code (all its Z checks together form a symmetry): two X errors light four checks, exactly one pair crosses cut 1, so the decoder estimates an odd number of flips on P1; in this example the estimate is right (the true error has exactly 1 flip on P1), and the repair accordingly puts an odd number of flips there. Gross has 6 symmetries; cutting each once horizontally and once vertically reads the parities of 12 logical operators, matching k = 12 (section III.2.4: k = 2K). Gross's checks reach far, and the paper notes that such small codes do not leave room for wide enough cylinders; the remedy is to double the lattice in one direction, cut the doubled code, and fold the answer back (section III.2.3).
BP 与过度匹配补什么。只在一个对称上匹配,会丢掉对称以外检查的信息;论文的两种补救都在匹配之外。一,BP 重定边权:先用完整的症状(包括对称以外的检查)跑 BP,得到每个比特的出错概率 pj,再用它给对称图的边定权重(独立同分布噪声下所有边同权)。匹配里的权重通常取 w = ln[(1 − p)/p],就是 2.1 节的先验 LLR:p = 0.1 时 2.20;BP 若把某个比特算到 0.5,它那条边的权重就降到 0,算到 0.01 就升到 4.60,于是配对优先走 BP 认为可能出错的边。二,过度匹配over-matching:在 6 个独立对称的全部 26 − 1 = 63 个非零组合上都做一次匹配;同一道切口读出的奇偶要满足 b1 ⊕ b2 = b1+2 这样的约束,违反了就说明某次匹配错了。论文把这 63 个结果当作一个经典 simplex 码来纠错(III.3 节、附录 E)。:多个对称给出的奇偶互相核对,查出并纠正个别错误的匹配。论文的数值都在码容量 bit-flip 噪声下(完美测量,只有 X 错误;论文图 1),不是电路级。
What BP and over-matching add. Matching on one symmetry discards the checks outside it; the paper's two remedies both sit outside the matching step. One, BP reweights the edges: run BP on the full syndrome (including checks outside the symmetry), take each qubit's flip probability pj, and use it to weight the symmetry graph's edges (under independent, identically distributed noise all edges weigh the same). The usual matching weight is w = ln[(1 − p)/p], the prior LLR of section 2.1: 2.20 at p = 0.1; if BP pushes a qubit to 0.5 its edge weight drops to 0, and at 0.01 it rises to 4.60, so the pairing prefers edges BP considers likely. Two, over-matchingRun matching on all 26 − 1 = 63 nonzero combinations of the 6 independent symmetries; parities read at the same cut must satisfy constraints like b1 ⊕ b2 = b1+2, and a violation shows that some matching went wrong. The paper decodes the 63 results as a classical simplex code (section III.3, appendix E).: the parities from many symmetries check one another, which exposes and corrects individual wrong matchings. The paper's numbers are all under code-capacity bit-flip noise (perfect measurement, X errors only; its Fig. 1), not circuit-level.
QEC-Bank 为什么强调「certificate is the specific symmetry reduction」?因为这个映射不是说「gross 码 = 几个独立的环面码」:它只承诺译码上的对应(原文:operational decoder equivalence is not global local-Clifford equivalence),不承诺两者是同一个码。「表示阶梯」侧面把同一件事登记为 R2 层的「toric-cylinder」表示,并注明它是「decoder dictionary, not phase equivalence」——译码用的词典,不是两种码在物理上等价。intuition.md 的原话:「That is a decoder reduction, not a global equivalence of phases.」
Why does the QEC-Bank stress “certificate is the specific symmetry reduction”? Because this mapping does not say “gross = a few independent toric codes”: it promises only a correspondence for decoding (verbatim: operational decoder equivalence is not global local-Clifford equivalence), not that the two are the same code. The “Representation ladder” facet registers the same fact as the R2-level “toric-cylinder” representation, annotated “decoder dictionary, not phase equivalence”: a dictionary for decoding, not a physical equivalence of two codes. In the words of intuition.md: “That is a decoder reduction, not a global equivalence of phases.”
两个边界说清。第一,toric_L3 是字面意义上的环面码(BB 教程 5.1 节),对它匹配不需要任何归约;柱面路线是为 gross 那样 3 + 3 的码设计的。第二,「it does not turn every BB instance into independent toric codes」——归约依赖对称性假设,QEC-Bank 说这些假设「are part of the decoder」:换一对多项式,柱面可能不存在或形状不同,词典要重新编。
Two boundaries, stated plainly. First, toric_L3 is literally the toric code (BB guide section 5.1) and matching needs no reduction there; the cylinder route is designed for 3 + 3 codes like gross. Second, “it does not turn every BB instance into independent toric codes”: the reduction rests on symmetry assumptions which the QEC-Bank says “are part of the decoder”; change the polynomial pair and the cylinders may not exist or may look different, and the dictionary must be recompiled.
3.5文献扫描里的其他路线(不在卡片上)Other routes in the literature scan (not on the card)
QEC-Bank 的规则:「The card includes only decoder identifiers already registered in the shared vocabulary. The deeper page records newer compound pipelines without pretending each is the same algorithm.」人话:卡片只收词表里已有的译码器类型(bp-osd、mwpm),新出现的复合流水线记在推导页与文献扫描报告里,不冒充成同一种算法。下面五条就是那些「更深一页」的路线,全部只是文献描述,QEC-Bank 没有为它们登记任何数字:
The QEC-Bank rule: “The card includes only decoder identifiers already registered in the shared vocabulary. The deeper page records newer compound pipelines without pretending each is the same algorithm.” Plainly: the card admits only decoder types already in the vocabulary (bp-osd, mwpm); newer compound pipelines are recorded on the derivation page and in the scout report without being passed off as the same algorithm. The five routes below are that “deeper page”, all literature descriptions only, with no number registered by the QEC-Bank for any of them:
| 键 · 登记状态Key · registration | 路线(QEC-Bank 原文的意思)Route (sense of the QEC-Bank text) | 属于结论的一部分Part of the claim |
|---|---|---|
| koutsioumpas2025autdec 已登记(Koutsioumpas、Sayginel、Webster、Browne,2025)registered (Koutsioumpas, Sayginel, Webster, Browne, 2025) | 自同构集成译码:把同一个症状换到码的几个对称帧里各译一遍,再合并候选。「The gain comes from moving a hard syndrome into different symmetry frames.」Automorphism ensemble decoding: decode the same syndrome in several symmetry frames of the code and combine candidates. “The gain comes from moving a hard syndrome into different symmetry frames.” | 用了哪些自同构(逻辑操作导读第 3 章讲平移就是一种)Which automorphisms are used (Chapter 3 of the logical-operations guide shows translations are one kind) |
| shaw2025morphing 登记待补(Shaw、Terhal,arXiv 2407.16336)pending (Shaw, Terhal, arXiv 2407.16336) | 变形电路:在一个周期中途改变码,把耦合度从 6 降到 5、用 6 轮 CNOT,针对一个相关的新家族。「The comparison changes both the hardware graph and the detector model.」Morphing circuits: change the code mid-cycle, lowering the coupling degree from 6 to 5 with 6 CNOT rounds, for a related new family. “The comparison changes both the hardware graph and the detector model.” | 硬件图与探测器模型都变了,不能与深度 7 直接比Both the hardware graph and the detector model change; not directly comparable with depth 7 |
| blue2026machine 登记待补(Blue、Avlani、He、Ziyin、Chuang,arXiv 2504.13043)pending (Blue, Avlani, He, Ziyin, Chuang, arXiv 2504.13043) | 在电路级症状历史上训练 transformer 译码器。A transformer decoder trained on circuit-level syndrome histories. | 「Its training distribution, calibration, and inference latency are part of the claim.」“Its training distribution, calibration, and inference latency are part of the claim.” |
| pakhunov2026convergence 登记待补(Pakhunov,arXiv 2604.07995)pending (Pakhunov, arXiv 2604.07995) | 预测 BP 会不会收敛(用症状缺陷数模列重量),作为分流层,省掉不必要的 OSD 调用;「not a complete correction rule」。Predicts whether BP will converge (from the defect count modulo column weight) as a triage layer, avoiding unnecessary OSD calls; “not a complete correction rule”. | 分类器的验证范围(五个 BB 码)The classifier's validation scope (five BB codes) |
| pakhunov2026peeling 登记待补(Pakhunov,arXiv 2604.11352)pending (Pakhunov, arXiv 2604.11352) | 贪心剥皮与两段式流式译码;扫描报告:在其基准里 p = 10−3 下比 BP 延迟低 330 倍、逻辑错误相同,另有一个两轮流式方案,用在论文记作 [[32,8,6]] 的码上(码距有疑问,见表下注)。Greedy peeling and two-shot streaming decoding; scout report: 330× lower latency than BP at p = 10−3 with equal logical error in its benchmark, plus a two-shot streaming scheme on a code the paper labels [[32,8,6]] (its distance is doubtful; see the note below the table). | 「Those gains do not transfer without the same channel, implementation, and accuracy target.」“Those gains do not transfer without the same channel, implementation, and accuracy target.” |
表中 p = 物理错误率;[[32,8,6]] 是该论文给这个码标的参数(32 个数据比特、8 个逻辑比特、码距 6),不是 QEC-Bank 的实例。论文第 VI 节写出的构造是 l = m = 4、A = B = x + y。本篇按这个构造重算:n = 32、k = 8 对得上,码距 6 对不上。原因一眼可见:A = B 时,任取一个格子 g,把左层 g 与右层 g 这两个比特一起翻(X 或 Z 都行),碰到它们的每条检查都恰好两个一起碰到,症状为零。这一对却不是检查的乘积:检查乘积的左层那一半一定落在 A 的列空间里,而 A 的每一列有两个 1,列空间里只有偶数重量的向量,单独一个比特(重量 1)不在其中。所以这个构造里有重量 2 的逻辑算符,码距至多 2(notes/decoders/verify_fixes.py 逐项核对)。可能是论文的多项式抄错了,也可能别处另有约定;本篇无法判断,只把参数当作论文的自报标签,不当作已确认的码距。「330 倍」是文献扫描报告转述的该论文自报数字,QEC-Bank 未登记。In the table p = the physical error rate; [[32,8,6]] is the label the paper gives this code (32 data qubits, 8 logical qubits, distance 6); it is not a QEC-Bank instance. Section VI of the paper states the construction l = m = 4, A = B = x + y. Recomputed from that construction here, n = 32 and k = 8 agree but distance 6 does not. The reason is visible at once: with A = B, pick any site g and flip the left-layer and right-layer qubits at g together (X or Z alike); every check touching them touches both, so the syndrome is zero. Yet this pair is not a product of checks: its left half would have to lie in the column space of A, and every column of A has two 1s, so that space holds only even-weight vectors. The construction therefore has weight-2 logical operators and distance at most 2 (checked step by step in notes/decoders/verify_fixes.py). Perhaps the paper's polynomials were mistyped, perhaps another convention is meant; this guide cannot tell, and treats the parameters as the paper's own label, not as a confirmed distance. “330×” is the paper's self-reported figure as relayed by the scout report, not registered by the QEC-Bank.
三条记录 = 三个不同的实验。记录 0 是码容量与现象学基准,标准工具,没有数字;记录 1 是深度 7 电路的探测器模型下的 BP-OSD,唯一的数字 0.8% 带五个限定项、六条「不是」;记录 2 是把对称性编成词典再用匹配,证书是那次归约本身。三条都描述 BB 这一族,不是 gross 一块;三条的表现都属于「信道 + 电路 + 探测器 + 译码器设置」,不属于矩阵。卡片之外的五条路线只是文献描述。
Three records = three different experiments. Record 0 is the code-capacity and phenomenological benchmark, a standard tool, no number; record 1 is BP-OSD under the detector model of the depth-7 circuit, whose single number 0.8% carries five qualifiers and six “is nots”; record 2 compiles symmetry into a dictionary and then matches, its certificate being that reduction itself. All three describe the BB family, not the single gross block; the performance of all three belongs to “channel + circuit + detectors + decoder settings”, not to the matrix. The five routes beyond the card are literature descriptions only.
电路码距:静态的 12 不是电路的 12Circuit distance: the static 12 is not the circuit's 12
前三章的症状都是「静态」的:测量完美,s = HZe。真实的一条六腿检查是一段电路:一个帮手比特、六个 CNOT、一次读出。帮手在电路中途出错,会沿后面的 CNOT 传到几个数据比特上,形成一种「相关」错误;读数本身也会错,于是要用探测器比较相邻两轮。这一章说清为什么 CNOT 的顺序有讲究、什么是探测器、QEC-Bank 为什么把「静态码距、电路码距、译码器找到的失败重量」当作三个不同的量,以及 bivariate_bicycle 条目明确不导出哪些东西。 The syndromes of the first three chapters were “static”: perfect measurement, s = HZe. A real weight-six check is a circuit: one helper qubit, six CNOTs, one readout. A helper that fails midway spreads through the later CNOTs onto several data qubits, forming a “correlated” error; readings themselves can be wrong, so detectors compare adjacent rounds. This chapter explains why the CNOT order matters, what a detector is, why the QEC-Bank treats “static distance, circuit distance, decoder-found failure weight” as three different quantities, and which things the bivariate_bicycle entry explicitly does not export.
4.1一条六腿检查是一段电路:顺序与 hook 错误A weight-six check is a circuit: order and hook errors
QEC-Bank 原文:「Measuring one stabilizer with an ancilla requires preparation, a sequence of entangling gates, measurement, and reset. The order of those entangling gates matters. An ancilla Pauli introduced early can propagate through later gates to several data qubits. Such a correlated ‘hook’ may align with a logical operator more efficiently than independent faults.」《Surface Code · 高中数学版》第 4 章打开过这个黑盒(四腿版),《译码器 · 高中数学版》5.4 节给了这种错误一个名字:hook 错误hook error:帮手比特在第 t 个 CNOT 之后出错,错误经由第 t+1 到第 6 个 CNOT 传到对应的数据比特上,一个故障变成多个数据比特的相关错误。传到哪几个比特由 CNOT 顺序决定。。人话:按常见的做法,测一条 gross 的 Z 检查,是让它的 6 个数据比特依次作控制端、帮手比特作目标端做 CNOT,最后读帮手。若帮手在第 2 个 CNOT 之后出了一个 Z 错误(相位翻转),后面每个 CNOT 都会把它「复印」一份到那一步的数据比特上,于是 4 个数据比特带上 Z 错误:一个故障、四个错误。图 4.1 用 Z 检查 4 的六条腿(比特 1、64、70、74、75、130)把这一过程画成时间线。这四个错误乘上那条检查本身(六条腿上全是 Z),就等于只剩另外两条腿上的错误,对码来说两者等价。一般地,第 t 个 CNOT 之后的钩子留下 6 − t 个错误,也等价于 t 个,所以一个故障最多相当于 min(t, 6 − t) 个数据错误,最多 3 个(t = 3 时)。这就是危险所在:一条重量 12 的逻辑算符,原则上可以由少于 12 个故障拼出来;若每个故障都是最坏的钩子、而且恰好对齐,4 个就够。能不能对齐,要看钩子留下的腿是否正好落在某条逻辑算符上,这就是「align with a logical operator more efficiently than independent faults」。CNOT 顺序决定复印到哪几条腿,所以顺序决定这件坏事会不会发生。
The QEC-Bank text: “Measuring one stabilizer with an ancilla requires preparation, a sequence of entangling gates, measurement, and reset. The order of those entangling gates matters. An ancilla Pauli introduced early can propagate through later gates to several data qubits. Such a correlated ‘hook’ may align with a logical operator more efficiently than independent faults.” Chapter 4 of “Surface Code · High-School Edition” opened this box (the weight-four version), and section 5.4 of “Decoders · High-School Edition” named the error: the hook errorThe helper qubit fails after the t-th CNOT and the error travels through CNOTs t+1 to 6 onto the corresponding data qubits, turning one fault into a correlated error on several data qubits. Which qubits depends on the CNOT order.. Plainly: in the usual construction, measuring a gross Z check means CNOTs with its 6 data qubits in turn as controls and the helper as target, then reading the helper. If the helper suffers a Z error (a phase flip) after the 2nd CNOT, each later CNOT “photocopies” it onto the data qubit of that step, so 4 data qubits end up with Z errors: one fault, four errors. Fig. 4.1 draws this as a timeline on the six legs of Z check 4 (qubits 1, 64, 70, 74, 75, 130). Multiplying those four by the check itself (Z on all six legs) leaves errors on only the other two legs, and to the code the two are equivalent. In general a hook after the t-th CNOT leaves 6 − t errors, equivalent to t, so one fault is worth at most min(t, 6 − t) data errors, at most 3 (at t = 3). That is the danger: a weight-12 logical can in principle be assembled from fewer than 12 faults; if every fault is a worst-case hook and they line up exactly, 4 would do. Whether they line up depends on whether the legs the hooks leave fall on some logical operator: that is “align with a logical operator more efficiently than independent faults”. The CNOT order decides which legs receive the copies, so the order decides whether this bad thing can happen.
深度 7 由此有了准确的地位。QEC-Bank:「bravyi2024bicycle gives a seven-CNOT-layer extraction for its two-layer connectivity. The number seven is a property of that schedule and layout, not of every weight-six matrix.」每条检查 6 个 CNOT,X 检查和 Z 检查共 144 条同时进行,每个数据比特要和 6 个帮手各做一次 CNOT,所以至少要 6 层;论文的调度用 7 层完成,并选定了一种顺序。shaw2025morphing(登记待补)走另一条路:电路中途改变码,把每个比特的耦合度从 6 降到 5,用 6 轮 CNOT,但那是「a related family」,且「The comparison changes both the hardware graph and the detector model」——不能把它的 6 和这里的 7 当同一把尺子。
Depth 7 thereby gets its precise standing. QEC-Bank: “bravyi2024bicycle gives a seven-CNOT-layer extraction for its two-layer connectivity. The number seven is a property of that schedule and layout, not of every weight-six matrix.” Six CNOTs per check, 144 X and Z checks running together, every data qubit doing one CNOT with each of 6 helpers, so at least 6 layers are needed; the paper's schedule finishes in 7 and fixes one particular order. shaw2025morphing (registration pending) takes another road: change the code mid-circuit, lowering each qubit's coupling degree from 6 to 5 with 6 CNOT rounds, but that is “a related family” and “The comparison changes both the hardware graph and the detector model”; its 6 and this 7 are not the same ruler.
4.2从读数到探测器From readings to detectors
QEC-Bank 原文:「With noisy repeated extraction, one does not decode raw syndrome bits in isolation. Detector events compare measurements across time so that a measurement fault produces a recognizable spacetime pattern. The boundary rounds, initialization, final data measurement, and which products of measurement results are deterministic all enter the detector definition.」《译码器 · 高中数学版》5.1 节给了公式:探测器 D(i, t) = s(i, t) ⊕ s(i, t−1),同一条检查相邻两轮读数不同才亮。人话:读错一次只影响一轮,下一轮读数变回去,于是探测器在时间方向上亮成一对(图 4.2(a))。数据错误若落在两轮测量之间,它碰到的检查从下一轮起一直读反,每条只在那一轮亮一次:gross 上一个 X 错误就是同一轮的 3 个探测器(图 4.2(b))。若错误发生在某一轮电路的中途,这一轮里已经和该比特做完 CNOT 的检查要到下一轮才看得见它,3 个探测器就分在相邻两轮(图 4.2(c));帮手上的故障(包括 4.1 节的 hook 错误)也会这样跨轮。探测器的个数也要先讲清假设。T 轮读数两两相邻比较,只得到 144 × (T − 1) 个。第 1 轮能不能也算探测器,取决于开头是否知道每条检查的值:从一个所有检查都为 +1 的码态出发,第 1 轮读数与这个已知值比较即可,共 144 × T 个;若数据比特从 |0…0⟩ 出发,只有 72 条 Z 检查的首轮值是确定的,X 检查的首轮读数是随机的,不能当探测器。结尾若在 Z 基直接测全部数据比特,就能从读数算出每条 Z 检查的值,再多一层比较。Bravyi 等人(arXiv 2308.07915 第 6 节)的做法:每条检查的读数序列 (m1, …, mNc) 换成 (m1, m2 ⊕ m1, …, mNc ⊕ mNc−1),即以全 0 为起点,共 144 Nc 行,再加上最终数据错误的症状 144 行,译码矩阵共 144 (Nc + 1) 行。译码器面对的是这张时空探测器图,不是第 1 章那 72 位的 s。QEC-Bank 的操作合同因此要求写明「the exact extraction schedule and detector construction」——两者缺一,同一个电路就可能定义出两个不同的实验(第 3 章限定项 ③)。
The QEC-Bank text: “With noisy repeated extraction, one does not decode raw syndrome bits in isolation. Detector events compare measurements across time so that a measurement fault produces a recognizable spacetime pattern. The boundary rounds, initialization, final data measurement, and which products of measurement results are deterministic all enter the detector definition.” Section 5.1 of “Decoders · High-School Edition” gave the formula: detector D(i, t) = s(i, t) ⊕ s(i, t−1), lit only when the same check's readings differ between adjacent rounds. Plainly: a single misread affects one round and the reading returns next round, so the detector lights as a pair along the time direction (Fig. 4.2(a)). A data error that lands between two rounds of measurement makes the checks it touches read flipped from the next round on, so each lights once, in that round: one X error in gross gives 3 detectors in the same round (Fig. 4.2(b)). If the error happens in the middle of a round's circuit, the checks that have already done their CNOT with that qubit this round only see it next round, and the 3 detectors split over two adjacent rounds (Fig. 4.2(c)); faults on ancillas (including the hook errors of section 4.1) straddle rounds in the same way. Counting detectors also needs stated assumptions. Comparing T rounds of readings pairwise gives only 144 × (T − 1). Whether round 1 has detectors too depends on whether the check values are known at the start: starting from a code state in which every check is +1, compare round 1 with that known value, for 144 × T in all; if the data qubits start in |0…0⟩, only the 72 Z checks have a determined first value, while the X checks' first readings are random and cannot serve as detectors. If at the end every data qubit is measured in the Z basis, the readings give every Z check's value and one more layer of comparison. What Bravyi et al. do (arXiv 2308.07915, section 6): each check's reading sequence (m1, …, mNc) becomes (m1, m2 ⊕ m1, …, mNc ⊕ mNc−1), i.e. all-zero is the starting reference, giving 144 Nc rows, plus 144 rows for the syndrome of the final data error: 144 (Nc + 1) rows in the decoding matrix. The decoder faces this spacetime detector graph, not the 72-bit s of Chapter 1. The QEC-Bank operational contract therefore demands “the exact extraction schedule and detector construction”: without either, one circuit can define two different experiments (qualifier ③ of Chapter 3).
读错一次one misread ⇒ D(i, t) = D(i, t+1) = 1
第 t−1 与 t 轮之间的数据错误data error between rounds t−1 and t ⇒ 它碰到的 3 条检查在第 t 轮各亮一次its 3 checks light once each in round t
gross, T 轮读数rounds of readings: 相邻比较adjacent comparisons 144 × (T − 1);首轮与结尾另计,取决于制备与读出; the first round and the end add more, depending on preparation and readout
记号:s(i, t) = 第 i 条检查在第 t 轮的读数(0/1);D(i, t) = 对应的探测器;T = 重复测量的轮数;⊕ = 模 2 加。Notation: s(i, t) = the reading (0/1) of check i in round t; D(i, t) = the corresponding detector; T = the number of repeated rounds; ⊕ = addition mod 2.
4.3三个距离,不许混用Three distances, never to be conflated
QEC-Bank 用一张表把三个容易混的量分开(原文照录):
The QEC-Bank separates three easily confused quantities in one table (reproduced verbatim):
| 对象(原文)Object (verbatim) | 最小事件(原文)Minimal event (verbatim) | 人话In plain words | gross 的值Value for gross |
|---|---|---|---|
| static code distance | nontrivial logical Pauli on data | 能骗过全部检查、又不是检查乘积的最轻数据比特错误;只看矩阵。The lightest error on data qubits that fools every check and is not a product of checks; matrix only. | 12 bounded (参数导读 3.3 节)(parameters guide 3.3) |
| circuit distance | undetected fault set causing a logical failure | 在具体电路里,最少几个「电路位置的故障」(含帮手比特与读出)能不触发任何探测器却造成逻辑错误;hook 错误让它可能小于 12。In a specific circuit, the fewest “faults at circuit locations” (helpers and readouts included) that trigger no detector yet cause a logical failure; hook errors can make it smaller than 12. | 未登记not recorded |
| decoder-found failure weight | smallest failure found under a specific search or decoder | 某次搜索或某个译码器实际找到的最轻失败;「没找到更轻的」不等于「不存在更轻的」。The lightest failure a specific search or decoder actually found; “found nothing lighter” is not “nothing lighter exists”. | 未登记not recorded |
QEC-Bank 紧接着的两句话是这一章的核心:「A static distance of 12 is compatible with a smaller circuit distance under a bad schedule. Conversely, observing no low-weight decoder failures does not prove circuit distance.」第一句往下:矩阵说 12,坏的 CNOT 顺序可以让电路只要 8 个、6 个故障就出逻辑错误——参数导读 5.3 节转述账本时说「minimum undetectable fault set can be smaller」,就是这件事。第二句往上:跑了一百万次模拟没见到重量小于 12 的失败,只说明这个译码器在这些样本里没找到,不构成电路码距 = 12 的证明——和参数导读 3.3 节「随机搜索只给上界」是同一个逻辑,换到了时空里。文献扫描报告把这一点单列为「Circuit-distance warning」:「The seven-layer schedules in arXiv:2308.07915 are fast but not generically distance preserving. Schedule, detector construction, and decoder must be versioned together.」人话:调度、探测器、译码器三件东西要像软件一样标同一个版本号,改一个就重新验证。
The two sentences the QEC-Bank adds next are the heart of this chapter: “A static distance of 12 is compatible with a smaller circuit distance under a bad schedule. Conversely, observing no low-weight decoder failures does not prove circuit distance.” The first goes downward: the matrix says 12, yet a bad CNOT order can let the circuit produce a logical error from only 8 or 6 faults; when section 5.3 of the parameters guide relayed the ledger's “minimum undetectable fault set can be smaller”, this is what it meant. The second goes upward: a million simulated shots without a failure below weight 12 show only that this decoder, on these samples, found none, and are no proof that the circuit distance is 12; the same logic as “a random search gives only an upper bound” in section 3.3 of the parameters guide, moved into spacetime. The literature scout report singles this out as a “Circuit-distance warning”: “The seven-layer schedules in arXiv:2308.07915 are fast but not generically distance preserving. Schedule, detector construction, and decoder must be versioned together.” Plainly: schedule, detectors and decoder must carry one version number like software, and changing any one means re-verifying.
4.4QEC-Bank 明确不导出什么,以及一份「操作合同」What the QEC-Bank explicitly does not export, and an “operational contract”
bivariate_bicycle 条目的构造器只导出静态的检查关联。QEC-Bank 说明这是有意为之:「The QEC-Bank constructor exports only static check incidence. It intentionally does not manufacture a schedule from row support: support does not determine CNOT order, ancilla assignment, reset placement, or detector definitions.」人话:知道一条检查碰哪 6 个比特,推不出这 6 个 CNOT 该按什么顺序做、帮手放在哪、何时复位、探测器怎么定义——所以 QEC-Bank 宁可不给,也不从矩阵「制造」一份调度冒充论文的调度。第 7 节列出条目尚未包含的五项:「no ancilla coordinates; no seven-layer gate order; no reset or measurement operations; no detector definitions; no circuit-distance witness.」补上它们「requires an engine-supported circuit/schedule representation and a source-faithful transcription」——需要引擎支持电路/调度的表示,并忠实转录论文原文。所以格点浏览器「shows exactly what it owns—data coordinates and stabilizer supports—and no more」。
The constructor of the bivariate_bicycle entry exports only the static check incidence. The QEC-Bank states that this is deliberate: “The QEC-Bank constructor exports only static check incidence. It intentionally does not manufacture a schedule from row support: support does not determine CNOT order, ancilla assignment, reset placement, or detector definitions.” Plainly: knowing which 6 qubits a check touches does not tell you in what order to do the 6 CNOTs, where the helper sits, when to reset, or how detectors are defined; so the QEC-Bank prefers to give nothing rather than “manufacture” a schedule from the matrix and pass it off as the paper's. Section 7 lists the five things the entry does not yet contain: “no ancilla coordinates; no seven-layer gate order; no reset or measurement operations; no detector definitions; no circuit-distance witness.” Adding them “requires an engine-supported circuit/schedule representation and a source-faithful transcription”. Hence the lattice explorer “shows exactly what it owns—data coordinates and stabilizer supports—and no more”.
反过来,QEC-Bank 给读者一份读论文用的清单,叫「操作合同」(operational contract),原文六项:「data, measurement, reset, idle, and two-qubit fault probabilities; whether X/Z correlations and leakage are present; the exact extraction schedule and detector construction; BP update rule, iteration limit, damping, and stopping condition; OSD order and candidate-selection rule; latency and throughput constraints.」结语一句:「Without these, ‘decoded with BP-OSD’ is incomplete.」人话:一篇论文说「我们用 BP-OSD 译码」,你至少要在正文或附录里找到这六项;找不到,那个阈值或错误率就无法复现,也无法与别人比较。这六项正是第 3 章五个限定项的逐项展开,加上最后一项——延迟与吞吐——它不改变数字,却决定这个译码器能否装进每微秒一轮的机器(《译码器 · 高中数学版》4.1 节)。
Conversely, the QEC-Bank hands the reader a checklist for reading papers, the “operational contract”, six items verbatim: “data, measurement, reset, idle, and two-qubit fault probabilities; whether X/Z correlations and leakage are present; the exact extraction schedule and detector construction; BP update rule, iteration limit, damping, and stopping condition; OSD order and candidate-selection rule; latency and throughput constraints.” It closes: “Without these, ‘decoded with BP-OSD’ is incomplete.” Plainly: when a paper says “we decoded with BP-OSD”, you should find at least these six items in the text or appendix; if not, that threshold or error rate can be neither reproduced nor compared. The six are the itemised form of Chapter 3's five qualifiers, plus the last, latency and throughput, which does not change the number but decides whether the decoder fits into a machine running one round per microsecond (section 4.1 of “Decoders · High-School Edition”).
QEC-Bank 的 provenance 段落原文:「Static syndrome algebra is recomputed from the constructor. BP-OSD behavior and the seven-layer circuit/threshold estimate are literature claims from roffe2020decoding, panteleev2021degenerate, and bravyi2024bicycle. Morphing, automorphism ensembles, matching, learned decoding, convergence prediction, and peeling are scoped to their respective registered sources.」对照本篇:第 1 章的 s = HZe 与「每列 3 个 1」是机器重算范围内的事(具体编号 4、7、13 是本篇自己算的);第 2 章 BP-OSD 的行为、第 3 章的 0.8% 与深度 7、第 4 章的 hook 与电路码距,全是文献声明;QEC-Bank 没有登记 gross 的电路码距、也没有登记任何码容量阈值。
The QEC-Bank provenance paragraph, verbatim: “Static syndrome algebra is recomputed from the constructor. BP-OSD behavior and the seven-layer circuit/threshold estimate are literature claims from roffe2020decoding, panteleev2021degenerate, and bravyi2024bicycle. Morphing, automorphism ensembles, matching, learned decoding, convergence prediction, and peeling are scoped to their respective registered sources.” Mapped onto this guide: Chapter 1's s = HZe and “3 ones per column” fall within what the machine recomputes (the specific indices 4, 7, 13 are this guide's own); Chapter 2's BP-OSD behaviour, Chapter 3's 0.8% and depth 7, Chapter 4's hooks and circuit distance are all literature claims; the QEC-Bank records no circuit distance for gross and no code-capacity threshold.
对。三个距离各是各的:静态 12(bounded)是矩阵的事;电路码距要对所有不触发探测器的故障集做排除,模拟只能抽样;「没找到」是译码器找到的失败重量的陈述。而且第三个选项反了:QEC-Bank 说静态 12「is compatible with a smaller circuit distance under a bad schedule」。
Right. The three distances are each their own thing: the static 12 (bounded) is about the matrix; the circuit distance requires excluding every undetected fault set, while simulation only samples; “found none” is a statement about the decoder-found failure weight. And the third option is backwards: the QEC-Bank says the static 12 “is compatible with a smaller circuit distance under a bad schedule”.
回看 4.3 节的表:第三行「smallest failure found under a specific search or decoder」正是这篇论文报告的东西,它不是第二行。
Reread the table in section 4.3: the third row, “smallest failure found under a specific search or decoder”, is exactly what this paper reports, and it is not the second row.
三个警报,一张图,三条记录,三个距离Three alarms, one graph, three records, three distances
回放一遍。静态症状是 s = HZeX;gross 的 HZ 每列 3 个 1,比特 1 上的一个 X 错误点亮 Z 检查 4、7、13,错误是三端点的超边,表面码的配对结构消失;k = 12 让一个症状下有 4096 类,每类 266 个等价修复(第 1 章)。BP 在 Tanner 图上传对数似然比,先验 ln((1−p)/p);gross 的最短圈长 6,消息三轮绕回自己,加上退化,BP 会摇摆、给出不清零的判决或押错类;OSD 按可靠度取 66 个比特为基集解 HZc = s,保证清零,不保证成功,代价是全局延迟(第 2 章)。QEC-Bank 登记三条记录:BP-OSD 码容量/现象学基准(standard,无数字)、BP-OSD 深度 7 探测器模型(research-grade,0.8% 带五个限定项与六条「不是」)、柱面对称归约后匹配(research-grade,词典而非等价);卡片之外五条路线只是文献(第 3 章)。六腿检查是一段电路,CNOT 顺序决定 hook 错误传到哪里;探测器 D(i,t) = s(i,t) ⊕ s(i,t−1);静态码距、电路码距、译码器找到的失败重量是三个量,静态 12 与更小的电路码距相容,没见到低重失败不证明电路码距;QEC-Bank 不导出调度、帮手坐标、探测器与电路码距见证,而给出六项操作合同(第 4 章)。
Replay. The static syndrome is s = HZeX; every column of gross's HZ has 3 ones, one X error on qubit 1 lights Z checks 4, 7, 13, errors are three-ended hyperedges, and the surface code's pairing structure is gone; k = 12 gives 4096 classes per syndrome, 266 equivalent repairs each (Chapter 1). BP passes log-likelihood ratios on the Tanner graph with prior ln((1−p)/p); gross's shortest cycle has length 6, a message returns to its sender in three rounds, and with degeneracy BP oscillates, leaves the syndrome lit, or bets on the wrong class; OSD takes 66 qubits by reliability as a basis set and solves HZc = s, guaranteed to clear, not to succeed, at the price of global latency (Chapter 2). The QEC-Bank registers three records: BP-OSD code-capacity/phenomenological benchmark (standard, no number), BP-OSD under the depth-7 detector model (research-grade, 0.8% with five qualifiers and six “is nots”), matching after a cylinder symmetry reduction (research-grade, a dictionary not an equivalence); five further routes are literature only (Chapter 3). A weight-six check is a circuit whose CNOT order decides where hook errors land; detectors D(i,t) = s(i,t) ⊕ s(i,t−1); static distance, circuit distance and decoder-found failure weight are three quantities, the static 12 is compatible with a smaller circuit distance, and seeing no low-weight failures proves no circuit distance; the QEC-Bank exports no schedule, helper coordinates, detectors or circuit-distance witness, and states a six-item operational contract (Chapter 4).
符号与读法Symbols & how to read them
| 符号Symbol | 名称与读法Name & how to read it | 在本篇中的含义Meaning in this guide |
|---|---|---|
| eX, eZ, e | 读「X 错误向量」Read “the X error vector” | 长度 n 的 0/1 列,标出哪些数据比特有 X(或 Z)错误;gross n = 144。A 0/1 column of length n marking which data qubits carry an X (or Z) error; gross n = 144. |
| HX, HZ | 读「X、Z 检查矩阵」Read “the X and Z check matrices” | gross 各 72 × 144;HZ 每列 3 个 1(每个比特在 3 条 Z 检查里),每行 6 个 1。Each 72 × 144 for gross; every column of HZ has 3 ones (each qubit in 3 Z checks), every row 6. |
| s, s(i, t) | 读「症状」Read “the syndrome” | s = HZeX(模 2),长度 72;s(i, t) = 第 i 条检查第 t 轮的读数。s = HZeX (mod 2), length 72; s(i, t) = the reading of check i in round t. |
| c, cj, cI | 读「修复」Read “the repair” | 候选修复向量;合法 ⇔ HZc = s;cj 是第 j 位,cI 是限制在基集 I 上的部分。A candidate repair vector; valid ⇔ HZc = s; cj is bit j, cI its restriction to the basis set I. |
| ⊕ | 圆圈加,读「异或」Circled plus, read “XOR” | 逐位模 2 加;残留 = e ⊕ c;探测器 = 相邻两轮读数的 ⊕。Entrywise addition mod 2; residual = e ⊕ c; a detector is the ⊕ of adjacent rounds. |
| Lj, LLR | 读「对数似然比」Read “log-likelihood ratio” | ln[P(比特 j 没错)/P(错了)];正 = 相信没错;先验值 ln((1−p)/p)。ln[P(qubit j clean)/P(flipped)]; positive = believed clean; prior ln((1−p)/p). |
| mi→j, Lj→i | 读「检查 i 给比特 j 的消息」「比特 j 给检查 i 的消息」Read “message from check i to qubit j”, “message from qubit j to check i” | 都以 LLR 为单位;mi→j = (−1)si·2 artanh ∏ tanh(Lj′→i/2);Lj→i = Lj − mi→j。例:亮着的三比特检查、p = 0.1 时 m = −1.52。Both in LLR units; mi→j = (−1)si·2 artanh ∏ tanh(Lj′→i/2); Lj→i = Lj − mi→j. Example: a lit three-qubit check at p = 0.1 gives m = −1.52. |
| δ, tanh, artanh | 读「偏差」「双曲正切」「反双曲正切」Read “bias”, “tanch”, “inverse tanch” | δ = 1 − 2P(出错) = tanh(L/2);独立比特之和的偏差 = 偏差之积;2 artanh δ = ln[(1 + δ)/(1 − δ)] 把偏差换回 LLR。δ = 1 − 2P(flipped) = tanh(L/2); the bias of a sum of independent bits is the product of biases; 2 artanh δ = ln[(1 + δ)/(1 − δ)] turns a bias back into an LLR. |
| p, q | 读「p、q」Read “p, q” | p = 每比特(码容量)或每电路位置(电路级)的出错概率;q = 现象学模型里读数翻转的概率。p = fault probability per qubit (code capacity) or per circuit location (circuit level); q = readout flip probability in the phenomenological model. |
| w0, ln | 读「w 零」「自然对数」Read “w nought”, “natural log” | w0 = ln((1−p)/p),表面码译码器教程的边权重,等于 BP 的先验 LLR;p = 0.06 时约 2.75。w0 = ln((1−p)/p), the edge weight of the surface-code decoders guide, equal to BP's prior LLR; about 2.75 at p = 0.06. |
| I, |I|, HZ[:, I] | 读「基集」Read “the basis set” | OSD 按可靠度选出的 rank HZ = 66 个比特;HZ[:, I] 是只留这些列的 72 × 66 列满秩子矩阵;选出 66 个独立方程后才是可逆方阵。The rank HZ = 66 qubits OSD picks by reliability; HZ[:, I] is the 72 × 66 full-column-rank submatrix (square and invertible once 66 independent rows are chosen) of those columns. |
| 2k, 266 | 读「2 的 k 次方」Read “2 to the k” | 一个症状下的类数 212 = 4096;每类的等价修复数 2rank HX = 266。Classes per syndrome 212 = 4096; equivalent repairs per class 2rank HX = 266. |
| D(i, t), T | 读「探测器」「轮数」Read “detector”, “rounds” | D(i, t) = s(i, t) ⊕ s(i, t−1);T = 重复测量的轮数,gross 每轮 144 条检查。D(i, t) = s(i, t) ⊕ s(i, t−1); T = number of repeated rounds, 144 checks per round for gross. |
| ⇔ ⇒ ≈ | 读「当且仅当」「推出」「约等于」Read “iff”, “implies”, “approximately” | 逻辑推导与近似。Logical derivation and approximation. |
本篇新增词汇New terms in this guide
| 术语Term | 白话定义Plain definition |
|---|---|
| 静态症状static syndrome | 测量完美时 s = HZeX;QEC-Bank 机器重算的范围。s = HZeX under perfect measurement; the part the QEC-Bank machine recomputes. |
| 超边hyperedge | 连接三个以上顶点的「边」;gross 的单比特错误点亮 3 条检查,是超边,匹配不适用。An “edge” joining three or more vertices; a gross single-qubit error lights 3 checks, a hyperedge, so matching does not apply. |
| 退化 / 类degeneracy / class | 互差稳定子的修复等价;gross 一个症状下 4096 类,每类 266 个等价修复。Repairs differing by a stabilizer are equivalent; gross has 4096 classes per syndrome, 266 repairs each. |
| 置信传播(BP)/ 硬判决 / 收敛belief propagation (BP) / hard decision / convergence | 近似计算每个比特「已知症状时出错的概率」:比特汇总(先验加消息)、检查发言(偏差之积),在 Tanner 图上来回传 LLR;LLR < 0 判为错;硬判决满足 HZc = s 叫收敛。树上精确。Approximates each qubit's “probability of being flipped given the syndrome”: qubits sum up (prior plus messages), checks speak (product of biases), LLRs go back and forth on the Tanner graph; LLR < 0 is decided flipped; a hard decision with HZc = s is convergence. Exact on trees. |
| 偏差 / tanh 规则 / min-sumbias / tanh rule / min-sum | 偏差 = 1 − 2P(出错);检查的消息由其他邻居偏差之积算出(精确的 tanh 规则);min-sum 用最没把握的那个邻居代替乘积,省计算但高估把握,常乘 0.8 之类的系数。Bias = 1 − 2P(flipped); a check's message is computed from the product of the other neighbours' biases (the exact tanh rule); min-sum replaces the product by the least confident neighbour, cheaper but overconfident, and is usually scaled by a factor such as 0.8. |
| 重复计数double counting | 有圈时,一个比特的意见沿圈绕回自己,被当成新证据再加一遍;四比特环上 BP 给出 −10.99,精确值只有 −4.39。With cycles, a qubit's own opinion travels round the cycle and is added again as new evidence; on the four-qubit ring BP reaches −10.99 where the exact value is −4.39. |
| 有序统计译码(OSD)/ 基集 / 阶数ordered-statistics decoding (OSD) / basis set / order | 按可靠度取 66 个比特解方程保证清零;阶数 = 允许在基集外翻转的比特数。Solve on 66 qubits chosen by reliability to guarantee clearing; order = qubits outside the set allowed to flip. |
| 码容量 / 现象学 / 电路级code-capacity / phenomenological / circuit-level | 只有数据错误、测量完美 / 再加读数翻转 q / 电路每个位置独立出错;三个不同的实验。Data errors only with perfect measurement / plus readout flips q / every circuit location fails independently; three different experiments. |
| 协议阈值 / 伪阈值protocol threshold / pseudo-threshold | QEC-Bank 对 0.8% 的称呼:只在指定电路、探测器、归一化、译码器下成立的阈值读数 / 一块码的收支平衡点:pL(p) = kp 的解,pL = 整块每轮失败率,k = 逻辑比特数(gross 比的是 12p)。Bravyi 等人的 0.8%(v1)与 0.7%(v2、Nature 版)就是这种单块伪阈值的约数。The QEC-Bank's name for 0.8%: a threshold reading valid only under a specified circuit, detectors, normalization and decoder / the break-even point of one block: the solution of pL(p) = kp, with pL = the whole block's per-round failure rate and k = the number of logical qubits (gross is compared with 12p). The 0.8% (v1) and 0.7% (v2, Nature version) of Bravyi et al. are round figures for such per-block pseudo-thresholds. |
| 柱面归约 / 过度匹配cylinder reduction / over-matching | 在一个「对称」(一组乘积为恒等的检查)的对称图上做匹配,再把环面切成两个柱面,数横过切口的配对边的奇偶,作为一条逻辑算符上错误个数奇偶的估计(错误 ⊕ 修复与这条逻辑算符重叠奇数个比特时,估计就错);证书是那次具体的对称选择(3.4 节、图 3.4)/ 在所有对称组合上都匹配,用结果之间的奇偶约束查出并纠正个别错误的匹配。Matching on the symmetry graph of one “symmetry” (a set of checks whose product is the identity), then cutting the torus into two cylinders and counting, mod 2, the pairing edges that cross a cut, as an estimate of the parity of errors on one logical operator (the estimate is wrong exactly when error ⊕ repair overlaps that logical operator on an odd number of qubits); certified by that specific choice of symmetry (section 3.4, Fig. 3.4) / matching on every combination of symmetries and using parity constraints among the results to detect and correct individual wrong matchings. |
| hook 错误hook error | 帮手比特中途出错,沿后续 CNOT 复印到多个数据比特;CNOT 顺序决定落点。A helper fails midway and is copied by later CNOTs onto several data qubits; the CNOT order decides where. |
| 探测器detector | 同一检查相邻两轮读数的异或;边界轮、初始化、最终测量都进入其定义。The XOR of one check's adjacent readings; boundary rounds, initialization and the final measurement enter its definition. |
| 静态码距 / 电路码距 / 译码器找到的失败重量static distance / circuit distance / decoder-found failure weight | 矩阵的 12(bounded)/ 具体电路中最小不可探测故障集的大小(可以更小,未登记)/ 某次搜索实际找到的最轻失败。The matrix's 12 (bounded) / the size of a specific circuit's minimum undetected fault set (can be smaller, not recorded) / the lightest failure a search actually found. |
| 操作合同operational contract | QEC-Bank 列出的六项,缺一则「decoded with BP-OSD」不完整。The six items the QEC-Bank lists; without any one, “decoded with BP-OSD” is incomplete. |
延伸阅读Further reading
- J. Roffe, D. R. White, S. Burton, E. Campbell, “Decoding Across the Quantum Low-Density Parity-Check Code Landscape” (2020, arXiv 2005.07016)
roffe2020decoding(已登记;别名 roffe2020bposd)。记录 0 的基线论文:BP 给软可靠度,OSD 在退化与短圈导致不收敛时找出症状一致的修复。roffe2020decoding (registered; alias roffe2020bposd). The baseline paper of record 0: BP supplies soft reliabilities, OSD finds a syndrome-consistent repair when degeneracy or short cycles prevent convergence. - P. Panteleev, G. Kalachev, “Degenerate Quantum LDPC Codes With Good Finite Length Performance” (2021, arXiv 1904.02703)
panteleev2021degenerate(已登记)。记录 0 的「广义 bicycle 前身」:在广义 bicycle 码上引入 BP-OSD。panteleev2021degenerate (registered). The “generalized-bicycle precursor” of record 0: BP-OSD introduced on generalized bicycle codes. - S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, T. J. Yoder, “High-Threshold and Low-Overhead Fault-Tolerant Quantum Memory” (2024, arXiv 2308.07915)
bravyi2024bicycle(已登记)。记录 1 的出处:深度 7 提取电路、探测器模型、BP-OSD;0.8% 是 v1 表 1 各块码伪阈值 p0(pL(p) = kp 的解)的约数,v2 表 1 为 0.0048–0.0069,Nature 版(2024,vol. 627,778–782 页)摘要写 0.7%。bravyi2024bicycle (registered). The source of record 1: depth-7 extraction, detector model, BP-OSD; 0.8% is a round figure for the per-block pseudo-thresholds p0 (solutions of pL(p) = kp) in Table 1 of v1; Table 1 of v2 gives 0.0048–0.0069, and the abstract of the Nature version (2024, vol. 627, pp. 778–782) says 0.7%. - O. Higgott, “PyMatching: A Python package for decoding quantum codes with minimum-weight perfect matching” (2022, arXiv 2105.13082)
higgott2022pymatching(已登记)。渲染页附在记录 2 后的 mwpm 类型默认引文;匹配软件本身。higgott2022pymatching (registered). The default mwpm-type citation appended to record 2 on the rendered page; the matching software itself. - K. Sahay, D. J. Williamson, B. J. Brown, “A Matching Decoder for Bivariate Bicycle Codes” (2026, arXiv 2602.22770)
sahay2026matching——据文献扫描报告,登记待补(QEC-Bank 参考文献页显示 metadata pending)。记录 2 的出处:环面复制等价与柱面技巧后做 MWPM,再以 BP 与过度匹配改进。sahay2026matching: from the scout report, registration pending (the QEC-Bank references page shows metadata pending). The source of record 2: toric-copy equivalence and a cylinder trick before MWPM, improved with BP and over-matching. - S. Koutsioumpas, H. Sayginel, M. Webster, D. E. Browne, “Automorphism Ensemble Decoding of Quantum LDPC Codes” (2025, arXiv 2503.01738)
koutsioumpas2025autdec(已登记)。3.5 节的自同构集成译码;不在卡片上。koutsioumpas2025autdec (registered). The automorphism ensemble decoding of section 3.5; not on the card. - QEC-Bank: syndrome circuits and decoding
codes/bivariate_bicycle/pedagogy/syndrome-circuits-and-decoding.md。本篇逐段引用的原文:静态症状、六腿电路、探测器、三个距离、BP-OSD 的作用、0.8% 的限定、对称性路线、未导出项、操作合同。codes/bivariate_bicycle/pedagogy/syndrome-circuits-and-decoding.md. The text quoted throughout: static syndrome, the weight-six circuit, detectors, three distances, what BP-OSD does, the qualification of 0.8%, symmetry routes, unexported items, the operational contract.
机器重算过的(QEC-Bank):静态症状代数,即 s = HZe 与 HZ 每列 3 个 1、每行 6 个 1。本篇自己算的、QEC-Bank 页面上没有的数:比特 1 上的错误点亮 Z 检查 4、7、13 与 X 检查 0、5、55;toric_L3 比特 0 亮 Z 检查 0、1;gross、bb72、toric_L3 的 Tanner(HZ) 最短圈长 6 及那条经 1→4→64→70→67→7 的圈,L = 4、5、6 的环面码最短圈长 8;2.1–2.3 节的四个小例子(三比特检查、三比特链、四比特环的两种症状)的全部 BP 数字、穷举精确值、阻尼后停在 0、OSD-0 与 OSD-1 的解;4096 = 212 与 266 的类计数;OSD 基集大小 66 = rank HZ;p = 0.06 时 w0 ≈ 2.75;「渲染页多出的引文来自译码器类型的默认引文」是对照 card.yaml 与渲染页得出的观察。文献声明(QEC-Bank 转录,未重算):BP-OSD 的行为、深度 7、0.8% 及其限定、柱面归约、hook 错误与电路码距、3.5 节的五条路线及其自报数字。QEC-Bank 未登记、本篇也未给出的:BB 的码容量阈值、gross 的电路码距、任何硬件逻辑错误率。[[72,12,6]] 实验台是教学版(码容量、只有 X 错误、30 轮 min-sum BP、0 阶 OSD、[[72,12,6]] 而非 gross),其读数不对应任何文献数字;手算台用精确的 tanh 规则,显示的精确值由浏览器穷举得到;「扩展图」实验台是两张一般图,不是 BB 的 Tanner 图。写作时没有在本机运行 reproduce.py 或验证器;QEC-Bank 的数字抄自仓库文件,本篇自算的数字用一段独立的 Python 按构造器约定重算。修订时(2026-09-24)另外核对并新算了:gross 的 6 个独立对称与图 3.4 那个 36 条检查的对称(每个比特与它的重叠只有 0 或 2);4 × 4 环面码的切口算符 P1 是逻辑算符;按 l = m = 4、A = B = x + y 构造的码有重量 2 的逻辑算符;Z 检查 4 的六条腿与 hook 等价重量 1、2、3、2、1;surf13 的 HZ 有 6 列只含一个 1;四比特环第 14 轮 b4 = −32.96(手算台已改用不饱和的精确规则)。直接读过原文的文献:Bravyi 等 arXiv 2308.07915 的 v1 与 v2(表 1、第 6 节)及 Nature 版摘要与正文;Sahay 等 arXiv 2602.22770v1 第 II–III 节;Pakhunov arXiv 2604.11352v1 摘要与第 VI 节。3.3 节指出的不符(QEC-Bank 称 0.8% 不是单块伪阈值,而论文的数正是单块伪阈值)与 3.5 节的码距疑问,都照原样记录,没有替任何一方改数。
Recomputed by machine (QEC-Bank): the static syndrome algebra, i.e. s = HZe with 3 ones per column and 6 per row of HZ. Computed by this guide and absent from QEC-Bank pages: an error on qubit 1 lights Z checks 4, 7, 13 and X checks 0, 5, 55; toric_L3 qubit 0 lights Z checks 0, 1; the shortest Tanner(HZ) cycle of gross, bb72 and toric_L3 has length 6, with the explicit cycle 1→4→64→70→67→7, and that of the toric codes with L = 4, 5, 6 has length 8; every BP number of the four small examples in sections 2.1–2.3 (the three-qubit check, the three-qubit chain, the two syndromes on the four-qubit ring), their exact values by enumeration, the damped run settling at 0, and the OSD-0 and OSD-1 solutions; the class counts 4096 = 212 and 266; the OSD information-set size 66 = rank HZ; w0 ≈ 2.75 at p = 0.06; and “the extra citations on the rendered page are the decoder types' default citations” is an observation from comparing card.yaml with the rendered page. Literature claims (transcribed by the QEC-Bank, not recomputed): BP-OSD behaviour, depth 7, 0.8% and its qualifiers, the cylinder reduction, hook errors and circuit distance, the five routes of section 3.5 and their self-reported numbers. Not registered by the QEC-Bank and not supplied here: a code-capacity threshold for BB, the circuit distance of gross, any hardware logical error rate. The [[72,12,6]] bench is a teaching version (code capacity, X errors only, 30 rounds of min-sum BP, order-0 OSD, [[72,12,6]] rather than gross) whose readouts correspond to no literature number; the hand bench uses the exact tanh rule, and the exact values it shows are enumerated in the browser; the “expanders” bench shows two generic graphs, not a BB Tanner graph. Neither reproduce.py nor the verifier was run on this machine while writing; QEC-Bank numbers are copied from repository files, and the guide's own numbers were recomputed by a separate Python script under the constructor's convention. During the revision (2026-09-24) the following were also checked or newly computed: the 6 independent symmetries of gross and the 36-check symmetry of Fig. 3.4 (every qubit overlaps it in 0 or 2 checks); the cut operator P1 of the 4 × 4 toric code is a logical operator; the code built from l = m = 4, A = B = x + y has weight-2 logical operators; the six legs of Z check 4 and the hook-equivalent weights 1, 2, 3, 2, 1; 6 columns of surf13's HZ contain a single 1; b4 = −32.96 at round 14 on the four-qubit ring (the hand bench now uses the exact rule without saturation). Literature read in the original: Bravyi et al. arXiv 2308.07915 v1 and v2 (Table 1, section 6) and the abstract and text of the Nature version; Sahay et al. arXiv 2602.22770v1, sections II–III; Pakhunov arXiv 2604.11352v1, abstract and section VI. The mismatch of section 3.3 (the QEC-Bank says 0.8% is not a one-block pseudo-threshold, while the paper's number is exactly that) and the distance doubt of section 3.5 are recorded as found; no number was changed on anyone's behalf.
BB 码 · 条目总览 · 直觉 · 导览 · 表示阶梯 · 参数与实例 · 形式化 IR 与证书 · 译码器(本篇) · 逻辑操作 · 用例与实现 · 关系 · 推导与指南 · 参考文献 · 表面码的同一侧面 · 在 QEC-Bank 中查看此条目 →
BB codes · Entry overview · Intuition · Guided tour · Representation ladder · Parameters & instances · Formal IR & certificates · Decoders (this guide) · Logical operations · Use cases & realizations · Relations · Derivations & guides · References · The same facet for the surface code · Open in the QEC-Bank →