目录Contents
速查回顾:四条随身公式Express recap: four formulas to carry
本教程只用《从高考数学到 Toric Code》与《Surface Code · 高中数学版》的四件东西:贴片的账本、两条横跨串、测一条泡利串的投影公式、以及「对易的检查可以一起测」。任何一条觉得生疏,就回表面码教程对应章节重修;橙色虚线点一下弹出定义卡片,浅灰点线的符号点一下告诉你怎么读。打开《Surface Code · 高中数学版》→ This tutorial uses four things from “From High-School Math to the Toric Code” and “The Surface Code · High-School Edition”: the patch ledger, the two spanning strings, the projector formula for measuring a Pauli string, and “commuting checks can be measured together”. If any feels rusty, revisit its chapter in the surface-code tutorial; amber dashed citations pop up a definition card, faint dotted symbols tell you how they are read. Open “The Surface Code · High-School Edition” →
② Z̄ = 毛→毛的 Z 串,X̄ = 光→光的 X 串;交叉一次,反对易;长度 da Z-string rough→rough, X̄ = an X-string smooth→smooth; they cross once, anticommute; length d
记号:d = 码距,也是贴片的尺寸参数(《Surface Code · 高中数学版》第 2 章);n = 数据比特数;k = 逻辑比特数(《从高考数学到 Toric Code》4.4 节的 n − k 里那个「剩下的」数,这里直接记作 k)。
Notation: d = the code distance, which is also the patch size parameter (“The Surface Code · High-School Edition”, Chapter 2); n = number of data qubits; k = number of logical qubits (the “remaining” count n − k of “From High-School Math to the Toric Code”, §4.4, written directly as k here).
④ 两两对易的检查可以同时测;乘积的本征值 = 本征值的乘积mutually commuting checks can be measured together; the product's eigenvalue = the product of eigenvalues
四条里第③条是《从高考数学到 Toric Code》4.3 节的投影测量,第④条是稳定子清单(同一教程 4.4 节)能成立的前提。本教程的全部新内容,就是把这两条从单个比特上的检查提升到整块贴片上的逻辑算符。先在《Surface Code · 高中数学版》第 3 章的沙盘里重画一次两条横跨串,确认 Z̄ 从毛边到毛边、X̄ 从光边到光边——合并时缝合的是哪一种边界,决定测的是 Z̄Z̄ 还是 X̄X̄。
Item ③ is the projective measurement of “From High-School Math to the Toric Code”, §4.3; item ④ is what makes a stabilizer list work (§4.4 there). Everything new in this tutorial lifts these two from checks on single qubits to logical operators on whole patches. First redraw the two spanning strings in the sandbox of “The Surface Code · High-School Edition”, Chapter 3 and confirm that Z̄ runs rough-to-rough and X̄ smooth-to-smooth — which boundary gets stitched decides whether a merge measures Z̄Z̄ or X̄X̄.
格点手术 = 用一排局域检查的乘积,去测一个非局域的逻辑算符 Z̄AZ̄B下标 A、B 是贴片的名字:Z̄AZ̄B 是两块贴片各自逻辑 Z̄ 的乘积,本征值 +1 / −1 表示两个逻辑比特相同 / 不同;X̄AX̄B 同理。(或 X̄AX̄B),测完把检查撤掉。奇偶测量不读内容(第 2 章),缝合线让它局域可测(第 3 章),拆开只需记账(第 4 章),两次奇偶测量凑成 CNOT(第 5 章),维持 d 轮以防读错(第 6 章)。
Lattice surgery = measuring one nonlocal logical operator Z̄AZ̄BThe subscripts A, B name the patches: Z̄AZ̄B is the product of the two patches' logical Z̄, eigenvalue +1 / −1 meaning the two logical qubits agree / differ; likewise X̄AX̄B. (or X̄AX̄B) as the product of a row of local checks, then withdrawing the checks. A parity measurement reads no content (Ch. 2), the seam makes it locally measurable (Ch. 3), splitting needs only bookkeeping (Ch. 4), two parity measurements compose a CNOT (Ch. 5), and holding for d rounds guards against misreads (Ch. 6).
存住不等于计算Storage is not computation
一块贴片是一个仓库。要算,必须对逻辑比特做门——尤其是两个逻辑比特之间的门。这一章先说清需要哪些门,再看平面芯片上有哪三条路可走,最后交代一条天花板:为什么其中一个门注定做不到,只能靠「魔法」。 A patch is a warehouse. To compute, we must apply gates to logical qubits — above all, gates between two of them. This chapter states which gates are needed, surveys the three roads open on a planar chip, and ends with a ceiling: why one gate is out of reach and must come from “magic”.
1.1需要哪些门Which gates are needed
量子计算机的任何运算都能拆成单比特门加一种两比特门——CNOT(受控翻转:控制位为 1 时翻转目标位,《Surface Code · 高中数学版》第 4 章用它给检查收集奇偶)。为了纠错,人们只用一组有限的单比特门:H(交换 0/1 眼镜与 ± 眼镜)、S(给 |1⟩ 乘 i)与 T(给 |1⟩ 乘复数相位 eiπ/4,eiθ欧拉公式:eiθ = cos θ + i sin θ,模长为 1 的复数;θ = π/4 时是「转 45°」的相位,乘上它不改变 0/1 基下的测量概率(在 ± 基下会改变)。)。H、S、CNOT 合称 Clifford 门Clifford gates:把泡利串映成泡利串的门(H、S、CNOT 及其组合)。它们在稳定子形式化里可以完全用「算符怎么变」来追踪,但单靠它们不能通用计算。——它们把泡利串变成泡利串,因此在稳定子的语言里可以完全追踪;再加一个 T 门,就通用了。T 不是 Clifford 门:直接算矩阵可得 T X T† = (X + Y)/√2,不是一个泡利串(† 读「dagger」,对这里的门就是求逆)。另外 T·T = S,所以 S 是两个 T。
Any quantum computation decomposes into single-qubit gates plus one two-qubit gate — CNOT (controlled flip: flip the target when the control is 1; “The Surface Code · High-School Edition”, Chapter 4 used it to collect parities). For error correction one restricts to a finite set of single-qubit gates: H (swap the 0/1 lens for the ± lens), S (multiply |1⟩ by i) and T (multiply |1⟩ by the complex phase eiπ/4, eiθEuler's formula: eiθ = cos θ + i sin θ, a complex number of modulus 1; θ = π/4 is a 45° phase, and multiplying by it leaves the 0/1-basis measurement probabilities unchanged (those in the ± basis do change).). H, S and CNOT together are the Clifford gatesGates that map Pauli strings to Pauli strings (H, S, CNOT and their compositions). In the stabilizer formalism they can be tracked entirely by “how operators transform”, but on their own they are not universal. — they map Pauli strings to Pauli strings and can be tracked completely in stabilizer language; add one T gate and the set is universal. T is not a Clifford gate: multiplying out the matrices gives T X T† = (X + Y)/√2, which is not a Pauli string († is read “dagger”; for these gates it is the inverse). Also T·T = S, so S is two T gates.
于是问题是:芯片上的两块贴片,只能沿边界贴着,怎么做一个逻辑 CNOT?
So the question: two patches on a chip can only touch along an edge — how do we perform a logical CNOT?
1.2三条路Three roads
横向 CNOT。把两块一样的贴片叠在一起,对每一对对应的物理比特做一次 CNOT(A 的第 j 个比特控制 B 的第 j 个比特)。这恰好实现了逻辑 CNOT,而且所有 CNOT 可以同时做,一步完成(「深度为 1」),理由见下面的补课;但它要求两块贴片重叠。可移动的中性原子阵列真能把两块贴片搬到一起(2023 年已在 d = 3 到 7 的表面码上演示),固定布线的超导芯片做不到。
Transversal CNOT. Stack two identical patches and apply one CNOT to each corresponding pair of physical qubits (qubit j of A controls qubit j of B). This implements a logical CNOT, and all the CNOTs can run at once, in a single step (“depth one”); the catch-up below shows why. But it requires the two patches to overlap. Movable neutral-atom arrays can literally carry one patch onto another (demonstrated in 2023 on surface codes from d = 3 to 7); a superconducting chip with fixed wiring cannot.
补课 · 为什么逐比特做 CNOT 就是逻辑 CNOTCatch-up · Why qubit-by-qubit CNOTs make a logical CNOT
先看两个普通比特。CNOT 对泡利算符的作用可以一条条验算(写出 4 × 4 矩阵相乘即可核对):控制位上的 X 会被「复制」到目标位,Xc → XcXt;目标位上的 Z 会被「复制」回控制位,Zt → ZcZt;控制位的 Z 和目标位的 X 不变。直观地看:控制位翻了(Xc),CNOT 会把翻转传给目标;目标位的相位(Zt)也会反过来传给控制。
Start with two ordinary qubits. CNOT’s action on Pauli operators can be checked rule by rule (multiply out the 4 × 4 matrices): an X on the control is “copied” onto the target, Xc → XcXt; a Z on the target is “copied” back onto the control, Zt → ZcZt; a Z on the control and an X on the target are unchanged. Intuitively: if the control is flipped (Xc), CNOT passes the flip to the target; the target’s phase (Zt) is passed back to the control.
现在让 A 的第 j 个比特控制 B 的第 j 个比特,对所有 j 同时做。A 的一条 X 星检查(X 放在 A 的一组比特 S 上)被映成「A 上 S 处的 X」乘「B 上 S 处的 X」,也就是 A 的这条检查乘 B 的同一位置的检查——仍是两块贴片检查的乘积,编码态照样满足它。B 的 Z 面检查同理被映成 B 的这条乘 A 的同位置那条;A 的 Z 检查和 B 的 X 检查不变。所以检查的集合整体保持,码空间被映回码空间。逻辑算符也一样:X̄A(A 上一列 X)→ X̄AX̄B,Z̄B(B 上一排 Z)→ Z̄AZ̄B,Z̄A、X̄B 不变——正好是上面单比特 CNOT 的四条规则,只是每个字母上多了一横。关键在于两块贴片的检查一模一样、比特一一对应;一块贴片里的比特之间不做任何门,所以一个物理错误最多传到另一块贴片的对应位置上一个,不会在同一块贴片里扩散。
Now let qubit j of A control qubit j of B, for all j at once. An X star check of A (X on a set S of A’s qubits) is mapped to “X on S in A” times “X on S in B”, i.e. this check of A times the check of B at the same position — still a product of the two patches’ checks, still satisfied by every encoded state. Likewise a Z plaquette of B is mapped to itself times A’s plaquette at the same position; A’s Z checks and B’s X checks are unchanged. The set of checks is preserved as a whole, so the code space is mapped onto the code space. The same goes for logical operators: X̄A (a column of X in A) → X̄AX̄B, Z̄B (a row of Z in B) → Z̄AZ̄B, and Z̄A, X̄B unchanged — exactly the four single-qubit CNOT rules above, each letter now wearing a bar. What makes it work is that the two patches have identical checks and matching qubits. No gate acts between two qubits of the same patch, so a physical error spreads to at most one qubit, at the matching position of the other patch, never within a patch.
编织缺陷。在一块大贴片上关掉一些检查,挖出「洞」。洞有两种。关掉 Z 面检查挖出的洞,X 串可以在洞沿上结束而不被发现(结束处本该亮起的 Z 检查已经关了),所以洞沿与光边同型;关掉 X 星检查挖出的洞,Z 串可以在上面结束,洞沿与毛边同型。文献把前者叫 Z-cut、后者叫 X-cut。一个逻辑比特用一对同种的洞编码。让 Z-cut 比特的一个洞沿闭合路径绕着 X-cut 比特的一个洞走一圈,效果是逻辑 CNOT:Z-cut 比特是控制,X-cut 比特是目标。两个同种比特互相绕,得不到 CNOT;同种比特之间的 CNOT 要借一个另一种的辅助比特,做三次编织和两次测量。(Fowler、Mariantoni、Martinis 与 Cleland 2012 年的综述 arXiv:1208.0928 第 XIV 节。)它只需要邻居连接,但一个洞绕一圈要走的路不短。
Braiding defects. Switch off some checks in one large patch to punch “holes”. Holes come in two kinds. At the rim of a hole made by switching off Z plaquettes, an X string can end unseen (the Z check that would have lit up there is off), so that rim behaves like a smooth edge; at the rim of a hole made by switching off X stars, a Z string can end, so it behaves like a rough edge. The literature calls them Z-cut and X-cut holes. One logical qubit is encoded in a pair of holes of the same kind. Moving one hole of a Z-cut qubit along a closed loop around one hole of an X-cut qubit implements a logical CNOT, with the Z-cut qubit as control and the X-cut qubit as target. Two qubits of the same kind braided around each other give no CNOT; a CNOT between two same-kind qubits borrows an ancilla of the other kind and takes three braids and two measurements. (Fowler, Mariantoni, Martinis and Cleland, the 2012 review arXiv:1208.0928, Sec. XIV.) Braiding needs only neighbour connections, but a full circuit around a hole is a long walk.
格点手术。2012 年 Horsman、Fowler、Devitt 与 Van Meter 提出的第三条路:不移动、不绕圈,只在两块贴片之间加一排检查测几轮,再撤掉。它测的是乘积算符 Z̄AZ̄B 或 X̄AX̄B,而第 5 章会证明两次这样的测量恰好凑成一个 CNOT。它是今天固定布线芯片上的主流方案,本教程的其余部分都讲它。
Lattice surgery. The third road, proposed in 2012 by Horsman, Fowler, Devitt and Van Meter: no moving, no circling — just add a row of checks between two patches, measure for a few rounds, then remove them. What gets measured is the product operator Z̄AZ̄B or X̄AX̄B, and Chapter 5 proves that two such measurements compose exactly one CNOT. It is today's mainstream scheme for fixed-wiring chips, and the rest of this tutorial is about it.
1.3一条天花板:Bravyi–KönigA ceiling: Bravyi–König
三条路都只做到 Clifford 门,但理由分两种。对横向门,有一条定理:2012 年 Bravyi 与 König 证明,在二维拓扑稳定子码上,一个几何局域的酉电路(每个门只作用在彼此相邻的几个比特上;酉 = 可逆、不含测量),只要它的深度不随码距增长,能实现的逻辑门就只有 Clifford 门;T 门不在其中。横向 CNOT 就是这样的电路(深度 1)。格点手术与编织不在定理的假设之内:它们靠测量和依读数的修正,而且要持续约 d 轮。它们只做到 Clifford 门是另一个原因:它们测的全是泡利乘积,补的全是泡利修正,这样的操作把稳定子态始终变成稳定子态,全程都能用「算符怎么变」追踪(第 5 章末尾的折叠就这样追踪了一遍),合起来只能是 Clifford 门。「Clifford 层级」是一把按「多难追踪」给门分级的尺子:第一层是泡利算符本身;第二层是 Clifford 门,把每个泡利算符映成泡利算符;第三层的门把每个泡利算符映成一个 Clifford 门——T 就在这里(上面算过,T X T† = (X + Y)/√2 不是泡利串,而它是一个 Clifford 门)。Bravyi–König 定理Bravyi–König theorem(arXiv:1206.1609,2012;PRL 2013):二维拓扑稳定子码上,几何局域、深度不随码距增长的酉电路只能实现 Clifford 群(Clifford 层级第二层)里的逻辑门。T 属于第三层,故被排除。含测量的方案(格点手术、编织)不在它的假设之内。划出了平面上「便宜的门」的边界。T 门的解法是另一种资源:先制备一个带噪的「魔法态」(例如 T 作用在 |+⟩ 上得到的态 (|0⟩ + eiπ/4|1⟩)/√2,它本身就「装着」一个 T 门),用 Clifford 操作和测量把许多份有噪的魔法态「蒸馏」成更少但更干净的几份,再通过「门传送」用掉一份:把魔法态与目标比特做一个 CNOT、测一次、按读数补一个 Clifford 门,效果就是对目标做了 T。蒸馏是今天逻辑计算里最贵的部分,本教程不展开,只在尾声给出入口。
All three roads reach only Clifford gates, for two different reasons. For transversal gates there is a theorem: in 2012 Bravyi and König proved that on a two-dimensional topological stabilizer code, a geometrically local unitary circuit (each gate acts on a few mutually neighbouring qubits; unitary = reversible, no measurements) whose depth does not grow with the code distance can implement only Clifford logical gates; T is not among them. Transversal CNOT is such a circuit (depth one). Lattice surgery and braiding lie outside the theorem's assumptions: they use measurements and outcome-dependent corrections, and they last about d rounds. They reach only Clifford gates for another reason: everything they measure is a product of Paulis and every correction is a Pauli, and such operations always turn stabilizer states into stabilizer states, so the whole run can be tracked as “how the operators change” (the fold at the end of Chapter 5 tracks one), and the net effect can only be a Clifford gate. The “Clifford hierarchy” is a ruler that grades gates by how hard they are to track: level one is the Pauli operators themselves; level two is the Clifford gates, which map every Pauli operator to a Pauli operator; a level-three gate maps every Pauli operator to a Clifford gate — T lives there (as computed above, T X T† = (X + Y)/√2 is not a Pauli string, but it is a Clifford gate). The Bravyi–König theorem(arXiv:1206.1609, 2012; PRL 2013.) On 2D topological stabilizer codes, geometrically local unitary circuits whose depth does not grow with the code distance implement only logical gates in the Clifford group (level two of the Clifford hierarchy). T lives at level three and is excluded. Schemes that use measurements (lattice surgery, braiding) lie outside its assumptions. draws the boundary of “cheap gates” on the plane. T is supplied by another resource: prepare a noisy “magic state” (for example the state T gives when acting on |+⟩, (|0⟩ + eiπ/4|1⟩)/√2, which “stores” one T gate), use Clifford operations and measurements to “distil” many noisy copies into fewer, cleaner ones, then spend one copy by “gate teleportation”: a CNOT between the magic state and the target qubit, one measurement, and a Clifford correction chosen by the outcome together act as T on the target. Distillation is the most expensive part of logical computation today; this tutorial leaves it aside and only gives entry points in the epilogue.
平面芯片上的逻辑 CNOT 不是通过「搬动量子比特」实现的,而是通过测量实现的:测两次乘积算符、读一次辅助贴片,再记一笔账。格点手术解决的是「怎样用局域的操作测一个非局域的算符」这个技术问题,其余全是《从高考数学到 Toric Code》就有的投影测量代数。
A logical CNOT on a planar chip is realised not by moving qubits but by measuring: measure two product operators, read out one ancilla patch, book one correction. Lattice surgery solves the technical problem of measuring a nonlocal operator with local operations; everything else is the projective-measurement algebra of “From High-School Math to the Toric Code”.
对。CNOT 与 H 都是 Clifford 门,有局域的实现(格点手术、横向 H 加重新标记)。T 是唯一被定理排除的,也因此成了整个架构里最贵的东西。
Right. CNOT and H are Clifford gates with local implementations (lattice surgery; transversal H plus relabelling). T is the one gate the theorem excludes, which is why it became the most expensive item in the whole architecture.
回看 1.1 节:H、S、CNOT 是 Clifford 门;定理排除的是 Clifford 之外的门。
Look back at §1.1: H, S and CNOT are Clifford gates; the theorem excludes what lies beyond Clifford.
测乘积算符:学到奇偶,不学到内容Measuring a product operator: learn the parity, not the content
格点手术的核心动作是「测 Z̄AZ̄B」。这一章先在两个比特的层面把这件事算透:它只告诉你两者是否相同,绝不告诉你各是什么;同奇偶的成分整体保留。《从高考数学到 Toric Code》的两比特实验台原封不动地搬回来,因为把物理比特换成整块贴片,代数一个字不改。 The core move of lattice surgery is “measure Z̄AZ̄B”. This chapter works it out fully on two qubits: it reveals only whether the two agree, never what each is; same-parity components survive as a whole. The two-qubit bench of “From High-School Math to the Toric Code” returns unchanged, because swapping physical qubits for whole patches changes not one symbol of the algebra.
2.1四个振幅,两组Four amplitudes, two groups
两个逻辑比特的状态是四个振幅:|ψ⟩ = a|0̄0̄⟩头上一横 = 逻辑版:|0̄0̄⟩ 是「两块贴片都处于逻辑 0」的基向量;四个基向量 |0̄0̄⟩、|0̄1̄⟩、|1̄0̄⟩、|1̄1̄⟩ 与两个普通比特的一模一样。 + b|0̄1̄⟩ + c|1̄0̄⟩ + d|1̄1̄⟩(这一章里 d 只是第四个振幅的名字,不是码距;振幅都取实数,复数时把 a² 换成 |a|²)。算符 S = Z̄1Z̄2 给「两位相同」的成分乘 +1、「两位不同」的成分乘 −1,所以它的本征值只有 ±1,本征空间就是这两组。按《从高考数学到 Toric Code》的投影公式 P± = (I ± S)/2:测到 +1 的概率是 a² + d²,测后状态只留 (a, 0, 0, d) 再归一;测到 −1 的概率是 b² + c²,只留 (0, b, c, 0)。
Two logical qubits carry four amplitudes: |ψ⟩ = a|0̄0̄⟩The bar means “logical edition”: |0̄0̄⟩ is the basis state “both patches in logical 0”; the four basis states |0̄0̄⟩, |0̄1̄⟩, |1̄0̄⟩, |1̄1̄⟩ behave exactly like those of two ordinary qubits. + b|0̄1̄⟩ + c|1̄0̄⟩ + d|1̄1̄⟩ (in this chapter d is just the name of the fourth amplitude, not the code distance; amplitudes are taken real — for complex ones replace a² by |a|²). The operator S = Z̄1Z̄2 multiplies “equal” components by +1 and “different” ones by −1, so its eigenvalues are ±1 and its eigenspaces are these two groups. By the projector formula of “From High-School Math to the Toric Code” P± = (I ± S)/2: outcome +1 has probability a² + d² and leaves (a, 0, 0, d) renormalised; outcome −1 has probability b² + c² and leaves (0, b, c, 0).
p+ = a² + d², p− = b² + c²
同奇偶的成分之间的比例不变ratios within a parity group are untouched
关键在最后一句:测量后 a 与 d 的比例原样保留。它没有问「第一个比特是 0 还是 1」——那会把 a 与 c 分开,破坏叠加;它只问「两个一样吗」。《从高考数学到 Toric Code》4.3 节的两道例题在这里原样成立:对 |+̄+̄⟩两块贴片都编码成逻辑加态 |+̄⟩ = (|0̄⟩ + |1̄⟩)/√2。(四个振幅各 1/2)测 Z̄Z̄,一半概率得 +1,测后是贝尔态 (|0̄0̄⟩ + |1̄1̄⟩)/√2——两块贴片被一次不读内容的提问织成了纠缠。到实验台上把两个「物理比特」当成两块贴片重做一遍:
The last line is the point: after the measurement the ratio of a to d is preserved. It never asked “is the first qubit 0 or 1” — that would separate a from c and destroy the superposition; it only asked “are the two equal”. The two worked examples of “From High-School Math to the Toric Code”, §4.3 hold verbatim: measuring Z̄Z̄ on |+̄+̄⟩Both patches encoded in the logical plus state |+̄⟩ = (|0̄⟩ + |1̄⟩)/√2. (four amplitudes of 1/2 each) gives +1 half the time and leaves the Bell state (|0̄0̄⟩ + |1̄1̄⟩)/√2 — two patches woven into entanglement by one question that read no content. Redo it on the bench, reading the two “physical qubits” as two patches:
2.2为什么它算一种「门」Why this counts as a gate
单看,一次奇偶测量是随机的:+1 或 −1 各有概率。但结果已知——我们读到了它。于是它不是噪声,而是一个带标签的投影:测到 −1 时,只要事先约定「这种情况下后面要多做一个 X̄」,两种结果就都能记账后继续使用。单独一次奇偶测量仍不是一个确定的酉门(unitary gate:量子力学里的门都是这种可逆、保持向量长度的变换,给定输入就给出唯一确定的输出);但几次这样的测量加上依结果的修正,合起来可以是。这种「测量 + 依结果修正」的做法叫基于测量的门measurement-based gate:用若干次投影测量加上依读数选择的 Pauli 修正,实现一个确定的酉门。修正通常不必真的施加,记在 Pauli 帐上即可(第 4 章)。。第 5 章将证明:先测 Z̄CZ̄A、再测 X̄AX̄T、最后读掉辅助贴片 A,恰好是一个 CNOT。
Taken alone, one parity measurement is random: +1 or −1 with their probabilities. But the outcome is known — we read it. So it is not noise but a labelled projection: whenever −1 comes up, an agreed “apply an extra X̄ afterwards in that case” lets both outcomes be booked and carried forward. A single parity measurement is still not a deterministic unitary gate (the kind of transformation every quantum gate is: reversible and length-preserving, a unique output for each input); several such measurements plus outcome-dependent corrections together can be. This “measure, then correct by outcome” pattern is a measurement-based gateA deterministic unitary gate realised by a few projective measurements plus outcome-dependent Pauli corrections. The corrections rarely need applying — they go on the Pauli frame (Ch. 4).. Chapter 5 proves that measuring Z̄CZ̄A, then X̄AX̄T, then reading out the ancilla patch A is exactly a CNOT.
2.3难点在哪里Where the difficulty lies
代数已经讲完了,难点是物理:Z̄AZ̄B 是一个横跨两块贴片、长 2d 的算符,而芯片上没有任何仪器能一口气读出 2d 个比特的联合奇偶。《Surface Code · 高中数学版》第 4 章测一条四腿检查时,办法是给它配一个辅助比特、做四个 CNOT——对 2d 个腿这样做,辅助比特要跑遍两块贴片,一个错误就会沿路传染。格点手术的答案是:不要直接测 Z̄AZ̄B,而是加一排新的四腿检查,让它们的乘积等于 Z̄AZ̄B。每条新检查仍是局域的四腿,各自用辅助比特照常测;乘积由经典计算得出。这就是下一章。
The algebra is done; the difficulty is physical: Z̄AZ̄B is an operator of length 2d spanning two patches, and no instrument on a chip reads the joint parity of 2d qubits in one go. “The Surface Code · High-School Edition”, Chapter 4 measured a four-leg check with one ancilla and four CNOTs — doing that for 2d legs would drag an ancilla across both patches, spreading any single fault along the way. Lattice surgery's answer: do not measure Z̄AZ̄B directly; add a row of new four-leg checks whose product equals Z̄AZ̄B. Each new check is still a local four-leg check measured with its own ancilla as usual; the product is computed classically. That is the next chapter.
测 Z̄AZ̄B 只区分「同奇偶」与「异奇偶」两组振幅,组内比例原样保留——它是逻辑层面的「不偷看的检查」。一次这样的测量加上按读数记账,就是一个确定的操作;剩下的问题是如何用局域检查把它测出来。
Measuring Z̄AZ̄B only separates the “same parity” and “different parity” groups of amplitudes, preserving ratios within each — the “check that never peeks”, at the logical level. One such measurement plus outcome bookkeeping is a deterministic operation; the remaining problem is how to measure it with local checks.
对。p+ = a² + d² = 0.36 + 0.64 = 1,P+ψ = ψ。这个状态本来就是 Z̄Z̄ 的 +1 本征态,测量什么也不改变,0.6 与 0.8 的比例毫发无损——若测的是单个 Z̄1,它就会坍缩成 |0̄0̄⟩ 或 |1̄1̄⟩,叠加被毁。
Right. p+ = a² + d² = 0.36 + 0.64 = 1 and P+ψ = ψ. The state is already a +1 eigenstate of Z̄Z̄, so the measurement changes nothing and the 0.6 : 0.8 ratio survives intact — whereas measuring Z̄1 alone would collapse it to |0̄0̄⟩ or |1̄1̄⟩ and destroy the superposition.
套公式:p+ = a² + d²,其中 a = 0.6、d = 0.8、b = c = 0。
Apply the formula: p+ = a² + d² with a = 0.6, d = 0.8, b = c = 0.
合并:缝合线上的新检查Merge: new checks on the seam
把两块贴片沿光边界对齐,在中间加一排数据比特和一排 Z 面检查。这些检查每条都是普通的四腿检查,可以像《Surface Code · 高中数学版》第 4 章那样各自测量;而它们全部连乘之后,缝合比特成对抵消,剩下的恰好是 Z̄AZ̄B。然后重新记账:n、检查数、k、d 各是多少。 Align two patches along their smooth boundaries and insert one row of data qubits and one row of Z-plaquettes between them. Each new check is an ordinary four-leg check, measurable as in “The Surface Code · High-School Edition”, Chapter 4; multiply them all together and the seam qubits cancel in pairs, leaving exactly Z̄AZ̄B. Then redo the ledger: n, the number of checks, k and d.
3.1几何:哪条边贴哪条边Geometry: which edge meets which
《Surface Code · 高中数学版》第 3 章的版图里,Z̄ 是从左毛边到右毛边的一排 Z;X̄ 是从上光边到下光边的一列 X。要让乘积出 Z̄AZ̄B,缝合线必须与 Z̄ 平行,也就是把 A 的下光边与 B 的上光边贴在一起——上下叠放。缝合线上放 d−1 个新数据比特(缝合比特seam qubits:合并时插在两块贴片之间的一列数据比特,制备在 |+⟩。它们让原来的三腿光边星变回四腿,也让新的缝合检查有腿可放。,制备在 |+⟩),以及 d 条新的 Z 面检查(缝合检查seam checks:缝合线上新加的 Z 面检查,每条四腿:A 最后一排的一个比特、B 第一排的一个比特、两侧各一个缝合比特(边上的三腿)。),每条的四条腿是:A 贴着缝合线的一个比特、B 贴着缝合线的一个比特、左右各一个缝合比特(最边上的两条只有三腿)。同时,A 与 B 原来在光边上只有三腿的星检查,各自多出一条腿伸到缝合比特上,变回四腿。
In the layout of “The Surface Code · High-School Edition”, Chapter 3, Z̄ is a row of Z from the left rough boundary to the right; X̄ is a column of X from the top smooth boundary to the bottom. For the product to come out as Z̄AZ̄B, the seam must run parallel to Z̄ — so A's bottom smooth boundary is placed against B's top smooth boundary, stacked vertically. On the seam go d−1 new data qubits (the seam qubitsThe column of data qubits inserted between the two patches during a merge, prepared in |+⟩. They give the former three-leg smooth-boundary stars their fourth leg back and give the new seam checks legs to stand on., prepared in |+⟩) and d new Z-plaquettes (the seam checksThe new Z-plaquettes on the seam, four legs each: one qubit of A's last row, one of B's first row, and one seam qubit on either side (three legs at the two ends).), each with legs on one qubit of A hugging the seam, one qubit of B hugging it, and a seam qubit on either side (the two end checks have three legs). Meanwhile the stars that sat on A's and B's smooth boundaries with three legs each gain a leg on a seam qubit and are four-legged again.
3.2连乘:缝合比特成对抵消Multiply: the seam qubits cancel in pairs
把 d 条缝合检查全部乘起来。每个缝合比特恰好属于左右相邻的两条缝合检查,Z·Z = I,全部抵消;剩下的 Z 只在两侧:A 贴着缝合线的那一排全部比特,和 B 贴着缝合线的那一排全部比特。《Surface Code · 高中数学版》第 3 章证过,一块贴片里任意一排从左毛边连到右毛边的 d 个 Z 都是 Z̄ 的一个代表元(相邻两排差一个面检查的乘积)。所以:
Multiply all d seam checks. Each seam qubit belongs to exactly the two neighbouring seam checks, Z·Z = I, and they all cancel; the surviving Z's lie only on the two sides — every qubit of A's row hugging the seam and every qubit of B's row hugging the seam. “The Surface Code · High-School Edition”, Chapter 3 proved that any row of d Z’s running from the left rough edge to the right one is a representative of Z̄ (neighbouring rows differ by a product of plaquettes). Therefore:
既然每条缝合检查都是局域的四腿检查,就都能照《Surface Code · 高中数学版》第 4 章的办法用一个辅助比特测出 ±1;把 d 个读数相乘,就得到 Z̄AZ̄B 的本征值——第 0 章第④条:乘积的本征值等于本征值的乘积。一个长 2d 的非局域算符,被拆成 d 条局域检查加一次经典乘法。到实验台上按 ①②③ 顺序看。读图:这里的画法把三种东西都放在同一张方格上——小灰点是数据比特,橙色圆圈是 X 星检查,蓝色方块是 Z 面检查,每条检查用细线连到它的腿(相邻的数据比特)。A 在上、B 在下;每块贴片的上下两条边是光边(边上的星只有三条腿),左右两条是毛边(边上的面检查只有三条腿);Z̄ 就是一排横着的、夹着星检查的 d 个数据比特上的 Z(这样的排隔一排出现一次;中间夹着面检查的那排只有 d − 1 个数据比特,两端够不到毛边,不是 Z̄)。①里 A 的下光边与 B 的上光边隔着一条缝相对;②把缝合比特(红点)和加粗的缝合检查放进这条缝;③显示连乘的结果。
Since every seam check is a local four-leg check, each can be measured to ±1 with one ancilla exactly as in “The Surface Code · High-School Edition”, Chapter 4; multiply the d readouts and you hold the eigenvalue of Z̄AZ̄B — Chapter 0, item ④: the product's eigenvalue is the product of the eigenvalues. A nonlocal operator of length 2d has been split into d local checks plus one classical multiplication. Step through ①②③ on the bench. How to read it: the picture puts all three kinds of object on one square grid — small grey dots are data qubits, amber circles are X star checks, blue squares are Z plaquettes, and thin lines join each check to its legs (neighbouring data qubits). A is on top, B below; the top and bottom sides of each patch are smooth edges (their stars have only three legs), the left and right sides are rough edges (their plaquettes have only three legs); Z̄ is Z on a horizontal row of d data qubits, the kind of row that alternates with star checks (such rows come every other row; the rows in between, which alternate with plaquettes, hold only d − 1 data qubits, do not reach the rough edges, and are not Z̄). In ① A’s lower smooth edge faces B’s upper smooth edge across a gap; ② puts the seam qubits (red dots) and the bold seam checks into that gap; ③ shows the product.
为什么单条缝合检查的读数是随机的,乘积却有意义?Why is each seam check's readout random while the product is meaningful?
缝合比特制备在 |+⟩,即每个缝合比特的 X 值确定为 +1。一条缝合检查含有缝合比特上的 Z,按《从高考数学到 Toric Code》的碰撞定理,它与那个 X 反对易——所以第一次测它时读数五五开,完全随机。可乘积里缝合比特的 Z 已经成对抵消,只剩 A 与 B 上的 Z:它与所有缝合比特的 X 都对易,与两块贴片原有的全部检查也对易(它就是 Z̄AZ̄B)。所以乘积的值不是缝合比特带来的随机数,而是对两块贴片逻辑态奇偶的一次真正测量(按逻辑态的振幅分布取 ±1)。单条读数的随机性被记进新的稳定子清单里(记下每条缝合检查这一轮的符号),不影响任何结论。
Seam qubits are prepared in |+⟩, so each has X fixed at +1. A seam check contains Z on seam qubits and, by the collision theorem of “From High-School Math to the Toric Code”, anticommutes with that X — so its first readout is a fair coin, completely random. In the product, however, the seam Z's have cancelled in pairs, leaving only Z on A and B: it commutes with every seam qubit's X and with every pre-existing check of both patches (it is Z̄AZ̄B). The product's value is therefore not seam-qubit noise; it is a genuine measurement of the two patches' logical parity (±1 with the probabilities set by the logical state). The randomness of the individual readouts is absorbed into the new stabilizer list (record each seam check's sign this round) and affects no conclusion.
3.3重新记账:n、检查、k、dRedo the ledger: n, checks, k, d
以 d = 3 为例。合并前两块贴片各 13 个数据比特、12 条检查,共 26 个比特、24 条检查、k = 2。合并加入 2 个缝合比特和 3 条缝合检查:n = 28,检查 27 条。平面版图上检查全部独立(本页在 GF(2)只有 0 和 1 两个数、按 1 + 1 = 0 运算的数域;「mod 2 算术」的正式名字。 上重算了秩rank:一组检查里线性独立的条数——把每条检查写成 0/1 向量,高斯消元后剩下的非零行数。:正好 27),所以 k = 28 − 27 = 1。少掉的那一个自由度,正是被测掉的奇偶 Z̄AZ̄B:合并后的大贴片只存一个逻辑比特,它的 Z̄ 是 Z̄A(也等于 Z̄B 乘上已测定的奇偶)。一般地,n = 2(2d² − 2d + 1) + (d − 1),检查 4d(d − 1) + d,相减恒为 1。
Take d = 3. Before the merge the two patches hold 13 data qubits and 12 checks each: 26 qubits, 24 checks, k = 2. The merge adds 2 seam qubits and 3 seam checks: n = 28, 27 checks. On a planar layout all checks are independent (this page recomputed the rankThe number of linearly independent checks: write each check as a 0/1 vector; the non-zero rows left after Gaussian elimination. over GF(2)The number system with only 0 and 1, where 1 + 1 = 0; the formal name of mod-2 arithmetic.: exactly 27), so k = 28 − 27 = 1. The vanished degree of freedom is precisely the measured parity Z̄AZ̄B: the merged patch stores one logical qubit whose Z̄ is Z̄A (equivalently Z̄B times the measured parity). In general n = 2(2d² − 2d + 1) + (d − 1) and checks 4d(d − 1) + d; the difference is always 1.
码距呢?合并后的贴片是一个 d × 2d 的矩形:横跨长边的 X̄ 变长到 2d,但横跨短边的 Z̄ 仍是 d,所以码距仍为 d(d = 3 时,本页用穷举验证了 d = 3)。合并没有削弱空间方向的保护,只是把两个逻辑比特的奇偶读了出来。
And the distance? The merged patch is a d × 2d rectangle: the X̄ spanning the long side grows to 2d, but the Z̄ spanning the short side stays at d, so the distance remains d (for d = 3 this page verified d = 3 by exhaustive search). The merge does not weaken spacelike protection; it only reads out the parity of the two logical qubits.
一般general: n − 检查checks = [4d² − 4d + 2 + d − 1] − [4d² − 4d + d] = 1
合并 = 加一排局域检查,使其乘积等于目标乘积算符。测量这些检查就测量了 Z̄AZ̄B,k 恰好减 1,d 不变。拓扑把一个非局域的观测量变成了一排可以同时测的局域检查——这是 Horsman 等人 2012 年论文的全部内容,也是它优雅的原因。
Merge = add a row of local checks whose product is the target product operator. Measuring those checks measures Z̄AZ̄B, k drops by exactly 1, d is unchanged. Topology turns a nonlocal observable into a row of simultaneously measurable local checks — the whole content of Horsman et al.'s 2012 paper, and the reason it is elegant.
对。缝合比特有 d − 1 = 4 个,缝合检查有 d = 5 条。检查总数 40 + 40 + 5 = 85,k = 86 − 85 = 1。
Right. There are d − 1 = 4 seam qubits and d = 5 seam checks. Total checks 40 + 40 + 5 = 85, so k = 86 − 85 = 1.
每块 d = 5 贴片有 25 + 16 = 41 个数据比特;缝合线上是 d − 1 个比特、d 条检查。
Each d = 5 patch has 25 + 16 = 41 data qubits; the seam carries d − 1 qubits and d checks.
分裂与 Pauli 帐Split and the Pauli frame
测完奇偶,要把两块贴片拆回去。分裂只做两件事:停掉缝合检查,把缝合比特按 X 测掉。读数会让贴缝的几颗星读出 −1——那不是错误,是可以记账消掉的已知相位。这一章说清这本账怎么记,再给出光边合并的对偶版:毛边合并测 X̄X̄。 Once the parity is measured, the two patches must be taken apart. Splitting does two things: stop the seam checks and measure the seam qubits in X. The readouts make a few stars along the seam read −1 — not errors, but known signs that bookkeeping removes. This chapter explains the bookkeeping, then gives the dual of the smooth merge: the rough merge that measures X̄X̄.
4.1分裂的两个动作The two moves of a split
合并维持了若干轮(几轮才够,第 6 章说),乘积 Z̄AZ̄B 的本征值已经读到手。现在:停掉 d 条缝合检查,不再测量它们;测掉 d−1 个缝合比特——每个单独在 X 基上测量,读数 mj = ±1,然后把它们从码里移出。A 与 B 贴缝的星回到三腿,两块贴片各自恢复 k = 1。已测得的奇偶不会丢:它是一个经典比特,记在纸上。实验台的 ④ 画出分裂后的读数和因此读 −1 的星,⑤ 画出怎样修复、帐上记什么(4.2 节细讲)。
The merge has been held for some rounds (how many, Chapter 6 says), and the eigenvalue of Z̄AZ̄B is in hand. Now: stop the d seam checks, measuring them no more; measure out the d−1 seam qubits — each alone in the X basis, readout mj = ±1 — and remove them from the code. The stars along the seam in A and B return to three legs, and each patch is again k = 1. The measured parity is not lost: it is a classical bit, written down. On the bench, ④ shows the split readouts and the stars that now read −1, and ⑤ shows the repair and what goes into the frame (explained in §4.2).
4.2读数 −1 意味着什么What a −1 readout means
合并期间,A 贴缝的每颗星是四腿的:原来的三条腿加一个缝合比特。它的值 +1 是三腿部分与缝合比特 X 值的乘积。分裂时测出缝合比特的 X 值为 mj,于是三腿星的值只能是 mj——读数为 −1 的缝合比特,让 A 与 B 各一颗贴缝的星「亮起」−1。它们不是错误,是完全已知的符号。处理它们不必施加任何量子操作,但必须记下来。办法是沿贴缝那一排,用 Z 把 −1 的星成对连起来(《Surface Code · 高中数学版》第 5 章的配对,只是这次我们知道答案);若 −1 的个数是奇数,剩下的一颗要连到左边或右边的毛边界——两种选法相差整整一排 Z,也就是相差一个 Z̄。这些修复用的 Z 不必真做:把它们作为物理层的记录写进 Pauli 帐(4.3 节),写明「哪几个数据比特上欠一个 Z」;等价的写法是把这几颗星的参考值改记成 −1,以后各轮拿读数和 −1 比。两种写法说的是同一件事:以后若在 X 基读这些比特,读数要翻号;译码时这几颗星读 −1 才算正常。剩下的问题是逻辑层要不要多记一个 Z̄。这是否意味着要猜?不用。关键是:有一个逻辑算符在合并和分裂中谁都没碰过——X̄AX̄B,取成最左边那一列(从 A 的顶一直到 B 的底,一列 X;它不经过任何缝合比特,与所有缝合检查都对易,也与缝合比特的 X 测量对易)。两块贴片原来的 X̄AX̄B 值必须原样保留,所以修复的 Z 串不能改变它。每个缝合比特点亮的是镜像位置上的两颗星:A 缝边上的一颗和 B 缝边上正对着的一颗。对 A 和 B 做镜像对称的修复(同样的配对、奇数时连到同一侧的毛边界),两条 Z 串要么都碰最左那一列、要么都不碰,碰到的次数是偶数,X̄AX̄B 不变,逻辑层不用多记 Z̄(物理层那几个 Z 照记)。如果两块贴片选了不同的一侧,两者差一排 Z,就在逻辑层多记一个 Z̄(记在哪一块上都一样:合并已经测出 Z̄AZ̄B 的值,Z̄A 与 Z̄B 只差这个已知的符号)。
例:d = 3,有 2 个缝合比特,读数 (+1, −1)。A 缝边上第 2 颗星和 B 缝边上第 2 颗星亮 −1。−1 只有一个,是奇数,A 的那颗用一个 Z 连到右毛边:这个 Z 落在 A 贴缝一排(d = 3 个数据比特,从左数)的第 3 个、也就是最右端那个比特上,它只碰这一颗星;B 同理,Z 落在 B 贴缝一排的第 3 个比特上。帐上记下的是:物理层,「Z 作用在 A 贴缝一排第 3 个比特、B 贴缝一排第 3 个比特」(或等价地:「A、B 缝边第 2 颗星的参考值为 −1」);逻辑层,两边镜像对称,不多记 Z̄。实验台第 ⑤ 步画的就是这些记录。这条规则在 d = 3、5、7 的坐标上逐一核对过:判断两个算符是否对易,只需数它们重叠的比特数的奇偶。
During the merge each of A's stars along the seam has four legs: its original three plus a seam qubit. Its value +1 is the product of the three-leg part and the seam qubit's X value. The split reads that X value as mj, so the three-leg star's value must be mj — every seam qubit that read −1 makes one star in A and one in B “light up” with −1. They are not errors; they are fully known signs. Dealing with them needs no quantum operation, but they must be recorded. Along the seam row, connect the −1 stars in pairs with Z (the pairing of “The Surface Code · High-School Edition”, Chapter 5, except this time we know the answer); if their number is odd, the last one connects to the left or right rough boundary — and the two choices differ by a whole row of Z, that is, by one Z̄. These repair Z’s need not be applied: they go into the Pauli frame (§4.3) as physical-level records, “these data qubits owe one Z”; an equivalent record sets the reference value of those stars to −1, and later rounds compare their readouts with −1. Both say the same thing: a later X-basis readout of those qubits is flipped, and for the decoder those stars reading −1 is normal. What remains is whether an extra Z̄ goes on the logical ledger. Does that mean guessing? No. The key is that one logical operator is touched by nothing during merge and split: X̄AX̄B, taken as the leftmost column (one column of X from the top of A to the bottom of B; it passes through no seam qubit, commutes with every seam check, and commutes with the X measurements of the seam qubits). The two patches’ original value of X̄AX̄B must be kept, so the correcting Z strings must not change it. Each seam qubit lights two stars at mirror positions: one on A’s seam edge and the one facing it on B’s. Correct A and B mirror-symmetrically (the same pairing, and, if odd, toward the same side), and the two Z strings either both touch the leftmost column or both miss it; an even number of touches leaves X̄AX̄B unchanged, and no extra Z̄ goes on the logical ledger (the physical Z’s are still recorded). If the two patches were corrected toward different sides, they differ by one row of Z, and one extra Z̄ is booked at the logical level (on either patch: the merge has already measured Z̄AZ̄B, so Z̄A and Z̄B differ only by that known sign).
Example: d = 3, two seam qubits, readouts (+1, −1). The second star on A’s seam edge and the second on B’s light up −1; there is a single −1, an odd count, so A’s lit star is joined by one Z to the right rough edge: that Z sits on the 3rd, rightmost, of the d = 3 data qubits in A’s seam-facing row (counted from the left), and it touches only this star; likewise on B, a Z on the 3rd qubit of B’s seam-facing row. What gets recorded: at the physical level, “Z on qubit 3 of A’s seam-facing row and on qubit 3 of B’s” (or, equivalently, “the reference value of star 2 on A’s and on B’s seam edge is −1”); at the logical level, the two sides are mirror images, so no extra Z̄. Step ⑤ of the bench draws exactly these records. The rule has been checked on the coordinates for d = 3, 5 and 7: whether two operators commute only needs the parity of the number of qubits they share.
4.3Pauli 帐The Pauli frame
这本账有个名字:Pauli 帐Pauli frame:一份经典记录,写着「此刻应当再施加哪些泡利算符才是真实状态」:物理层是某些数据比特上的 X 或 Z,逻辑层是某些逻辑比特上的 X̄ 或 Z̄。这些修正不必施加,只在之后解读测量结果时折算进去;每次新的读数都可能更新它。(Pauli frame)。所有由测量结果决定的修正——分裂后修复用的物理 Z 串(4.2 节)、可能多出的 X̄ 或 Z̄、以及第 5 章里 CNOT 协议按三个读数定下的修正——都不必真的施加:它们都是泡利算符,把它们记在帐上,之后每次测量的结果按帐折算即可。这样做有两个好处:省掉一整层物理操作,也避免在施加修正时引入新错误。文献里把这些依读数而定的修正叫副产物算符byproduct operator:基于测量的门里,由随机读数决定的额外 Pauli 算符。记入 Pauli 帐即可抵消。。
The ledger has a name: the Pauli frameA classical record stating which Pauli operators would still have to be applied to obtain the true state: at the physical level, X or Z on certain data qubits; at the logical level, X̄ or Z̄ on certain logical qubits. They are never applied; later measurement results are reinterpreted through the frame, and each new readout may update it.. Every correction dictated by measurement outcomes — the physical Z strings that repair a split (§4.2), a possible extra X̄ or Z̄, and the corrections that Chapter 5's CNOT protocol derives from its three readouts — need never be applied: they are all Pauli operators, so they are booked, and every later measurement result is reinterpreted through the books. Two benefits: a whole layer of physical operations disappears, and no fresh errors are introduced while applying corrections. The literature calls these outcome-dependent corrections byproduct operatorsThe extra Pauli operators determined by random outcomes in a measurement-based gate. Booking them in the Pauli frame cancels them..
4.4对偶:毛边合并测 X̄X̄The dual: a rough merge measures X̄X̄
把本教程里的 X 与 Z 互换、毛边与光边互换,每一句话仍然成立。于是有第二种合并:两块贴片左右并排,贴在一起的是毛边界;缝合比特制备在 |0⟩(Z 值为 +1);缝合检查是 d 条 X 星检查。它们的乘积中缝合比特的 X 成对抵消,剩下 A 贴缝的一列 X 与 B 贴缝的一列 X——各是一个 X̄ 的代表元。所以毛边合并测的是 X̄AX̄B;分裂时把缝合比特按 Z 测掉,读数 −1 让贴缝的面检查亮 −1,用 X 串修掉;和 4.2 节一样,修复用的物理 X 串记进帐里;两块贴片镜像对称地修,逻辑层就不必多记 X̄,两边连向不同的光边时才多记一个 X̄。
Swap X with Z and rough with smooth throughout this tutorial, and every sentence still holds. Hence a second kind of merge: the two patches sit side by side, rough boundaries touching; seam qubits are prepared in |0⟩ (Z value +1); the seam checks are d X-stars. In their product the seam qubits' X's cancel in pairs, leaving a column of X on A's seam side and one on B's — each a representative of X̄. So a rough merge measures X̄AX̄B; the split measures the seam qubits in Z, a −1 readout lights a plaquette along the seam, X-strings repair it; as in §4.2, the repairing physical X strings are recorded in the frame; mirror-symmetric repairs of the two patches need no extra X̄ at the logical level, and only if the two sides go to different smooth edges is an extra X̄ booked.
| 光边合并smooth merge | 毛边合并rough merge | |
|---|---|---|
| 贴合的边界boundaries joined | 光边(上下叠放)smooth (stacked vertically) | 毛边(左右并排)rough (side by side) |
| 缝合比特制备seam qubits prepared in | |+⟩ | |0⟩ |
| 缝合检查seam checks | d 条 Z 面检查d Z-plaquettes | d 条 X 星检查d X-stars |
| 测得的乘积product measured | Z̄AZ̄B | X̄AX̄B |
| 分裂时缝合比特测于split measures seam qubits in | X | Z |
| 帐上照记(物理层)always recorded (physical level) | 修复用的 Z 串the repairing Z strings | 修复用的 X 串the repairing X strings |
| 逻辑层可能多记possible extra logical entry | Z̄(仅当两边修向不同侧)Z̄ (only if the two sides were repaired toward different edges) | X̄(同上)X̄ (likewise) |
分裂不是合并的逆操作:它恢复两块贴片各自的几何(各自的检查与边界),但撤不回合并时的那次投影——「Z̄AZ̄B 等于测得的那个 ±1」这条约束留在状态里,这正是我们要的。分裂多出来的只有随机读数,而随机读数的全部后果都是泡利算符,泡利算符可以记账而不必施加。合并、分裂、记账三件事合起来,就是「测一次 Z̄AZ̄B(或 X̄AX̄B),其余不动」——第 2 章的逻辑层奇偶测量,现在有了平面芯片上的实现。
A split is not the inverse of a merge: it restores each patch’s own geometry (its own checks and boundaries) but cannot undo the merge’s projection — the constraint “Z̄AZ̄B equals the measured ±1” stays in the state, which is exactly what we want. What the split adds is only random readouts, and every consequence of a random readout is a Pauli operator, which can be booked instead of applied. Merge, split and bookkeeping together amount to “measure Z̄AZ̄B (or X̄AX̄B) once, leaving everything else alone” — Chapter 2's logical parity measurement, now implemented on a planar chip.
对。X̄ 是从光边到光边的 X 串,与毛边界平行;缝合线必须与它平行,所以贴合的是毛边。缝合检查是 X 型,才能连乘出 X̄X̄。(第三个选项原则上也行——横向 H 加重新标记把 Z̄ 变成 X̄——但那是绕远路。)
Right. X̄ is an X-string smooth-to-smooth, parallel to the rough boundaries; the seam must be parallel to it, so rough edges meet. The seam checks are X-type so that their product is X̄X̄. (The third option would work in principle — transversal H plus relabelling turns Z̄ into X̄ — but it is a detour.)
看 4.4 的对照表:测的乘积由缝合检查的类型决定,缝合线必须与被测的串平行。
See §4.4's table: the measured product is set by the seam checks' type, and the seam must run parallel to the measured string.
两次合并做一个 CNOTTwo merges make one CNOT
控制贴片 C、目标贴片 T,中间放一块制备成 |+̄⟩ 的辅助贴片 A。测 Z̄CZ̄A,再测 X̄AX̄T,最后读掉 A。三个随机的 ±1 落下来,按一条固定的规则记账,结果恰好是 CNOT——本章用 8 个振幅的代数把这件事从头证一遍,再让你在实验台上看每一步。 A control patch C, a target patch T, and between them an ancilla patch A prepared in |+̄⟩. Measure Z̄CZ̄A, then X̄AX̄T, then read A out. Three random ±1's land, one fixed rule books the corrections, and the result is exactly a CNOT — this chapter proves it from scratch with the algebra of 8 amplitudes, then lets you watch every step on the bench.
5.1布局与协议Layout and protocol
三块贴片摆成一个「L」(下面的图 5.1逐步画出):A 放在 C 的正下方(两者的光边相对,可做光边合并测 Z̄Z̄),T 放在 A 的右侧(两者的毛边相对,可做毛边合并测 X̄X̄)。A 制备在 |+̄⟩——把整块贴片编码成 X̄ 的 +1 本征态。协议四步:
Three patches form an “L” (drawn step by step in Fig. 5.1 below): A directly below C (their smooth edges face each other, ready for a smooth merge measuring Z̄Z̄), T to the right of A (rough edges facing, ready for a rough merge measuring X̄X̄). A is prepared in |+̄⟩ — the whole patch encoded as the +1 eigenstate of X̄. Four steps:
② MX̄AX̄T → m2
③ MZ̄A → m3
④ 记帐book: Z̄C[m2 = −1] · X̄T[m1 ≠ m3]
①与②各是一次合并加分裂(第 3、4 章),读数是缝合检查的乘积;③把 A 的全部数据比特按 Z 基读出,再取一排从左毛边连到右毛边的 d 个数据比特,把它们的读数相乘,就是 Z̄A 的值(3.2 节说过:这样的排隔一排出现一次;夹在中间、只有 d − 1 个比特的那种排两端够不到毛边,不是 Z̄)——A 用完即弃。④里的方括号是「命题成立记 1,否则记 0」:m2 = −1 时给 C 记一个 Z̄,m1 与 m3 不同时给 T 记一个 X̄。规则只有这两句。
① and ② are each a merge plus a split (Chapters 3 and 4), the readout being the product of the seam checks; ③ reads out all of A's data qubits in the Z basis and multiplies the readouts of one row of d data qubits running from the left rough edge to the right rough edge to get Z̄A (as §3.2 said, such rows occur every other row; the rows in between hold only d − 1 qubits, do not reach the rough edges and are not Z̄) — A is then discarded. The square brackets in ④ mean “1 if the statement holds, else 0”: book a Z̄ on C when m2 = −1, and an X̄ on T when m1 and m3 differ. Those two sentences are the entire rule.
5.2证明:跟着一个基态走三步Proof: follow one basis state through three steps
先取最简单的输入:C 处于 |c⟩、T 处于 |t⟩(c、t 各是 0 或 1),A 处于 |+⟩ = (|0⟩ + |1⟩)/√2。整个状态是 |c⟩(|0⟩ + |1⟩)|t⟩/√2。先证基态,最后再说为什么这就够了。
Start with the simplest inputs: C in |c⟩, T in |t⟩ (c, t each 0 or 1), A in |+⟩ = (|0⟩ + |1⟩)/√2. The whole state is |c⟩(|0⟩ + |1⟩)|t⟩/√2. We prove it for basis states first and say at the end why that suffices.
第①步,测 Z̄CZ̄A。它问「C 与 A 相同吗」。A 的两个成分里,|a = c⟩ 属于 +1 组,|a = 1−c⟩ 属于 −1 组,各占一半。读到 m1 后 A 坍缩到唯一的一个成分:a = c 若 m1 = +1,a = 1−c 若 m1 = −1。写成一行:a = c ⊕ [m1 = −1]。状态变为 |c⟩|a⟩|t⟩。
Step ①, measure Z̄CZ̄A. It asks “are C and A equal?”. Of A's two components, |a = c⟩ lies in the +1 group and |a = 1−c⟩ in the −1 group, half each. After reading m1, A collapses to a single component: a = c if m1 = +1, a = 1−c if m1 = −1. In one line: a = c ⊕ [m1 = −1]. The state is now |c⟩|a⟩|t⟩.
第②步,测 X̄AX̄T。X̄AX̄T 同时翻转 a 与 t。它的本征态是 e± = (|a, t⟩ ± |1−a, 1−t⟩)/√2,本征值 ±1。两式相加再除以 √2,得 |a, t⟩ = (e+ + e−)/√2:两个本征态的系数都是 1/√2,所以读数 m2 各半概率,测后状态为 |c⟩(|a, t⟩ + m2|1−a, 1−t⟩)/√2。
Step ②, measure X̄AX̄T. X̄AX̄T flips a and t together. Its eigenstates are e± = (|a, t⟩ ± |1−a, 1−t⟩)/√2 with eigenvalues ±1. Adding the two and dividing by √2 gives |a, t⟩ = (e+ + e−)/√2: both eigenstates carry coefficient 1/√2, so m2 comes up ±1 with equal probability, and the post-state is |c⟩(|a, t⟩ + m2|1−a, 1−t⟩)/√2.
第③步,测 Z̄A。A 坍缩到 |a′⟩(a′读「a 撇」:读出后 A 的新取值,另起一个名字以区别于第①步的 a。),a′ = [m3 = −1]。若 a′ = a,剩下 |c⟩|t⟩;若 a′ = 1−a,剩下 m2·|c⟩|1−t⟩。所以目标翻转当且仅当 a′ ≠ a,即 [m3 = −1] ≠ c ⊕ [m1 = −1],整理得:
Step ③, measure Z̄A. A collapses to |a′⟩ (a′Read “a prime”: A's new value after the readout, given a fresh name to tell it from step ①'s a.) with a′ = [m3 = −1]. If a′ = a we are left with |c⟩|t⟩; if a′ = 1−a, with m2·|c⟩|1−t⟩. So the target flips iff a′ ≠ a, i.e. [m3 = −1] ≠ c ⊕ [m1 = −1], which rearranges to:
相位phase = m2[翻转flip] = m2c · m2[m1 ≠ m3]
读这两条。翻转条件里多出的 [m1 ≠ m3] 与 c 无关:在 T 上补一个 X̄[m1 ≠ m3] 就把它抵消,剩下「目标翻转 ⇔ c = 1」——这正是 CNOT。相位里,m2[m1 ≠ m3] 对所有 c、t 相同,是可以扔掉的整体符号;而 m2c = (−1)c·[m2 = −1] 恰好是「m2 = −1 时对 C 施加 Z̄」的效果——在 C 上补一个 Z̄[m2 = −1] 就把它抵消。两个修正正是5.1 节的第④步。∎
为什么证基态就够了。把三步里每一步留下的系数乘起来:第①步留下 A 的两个成分之一,系数 1/√2;第②步的投影 (I ± X̄AX̄T)/2 把 |a, t⟩ 变成 (|a, t⟩ ± |1−a, 1−t⟩)/2;第③步再留下其中一项。所以对每一组读数 (m1, m2, m3),任何一个输入基态 |c, t⟩ 最后都只剩一项,系数的大小都是 1/√2 × 1/2 = 1/(2√2),只差一个 ± 号。每组读数出现的概率就是 (1/(2√2))² = 1/8,与 c、t 无关——三个读数不泄露任何关于输入的信息。对固定的一组读数,整个过程是一个线性映射,它对四个基态做的事都是「同一个常数 × 带修正的 CNOT」,所以对它们的任何叠加也是;这就是「证完基态就证完了所有叠加」的确切含义。
例。c = 1、t = 0,读数 (m1, m2, m3) = (−1, +1, +1)。第①步 a = 1 ⊕ 1 = 0;第②步得 (|0, 0⟩ + |1, 1⟩)/√2(a、t 两位);第③步读到 a′ = 0 = a,剩 |c = 1⟩|t = 0⟩,目标没翻。规则:m1 ≠ m3,记一个 X̄T,t 变成 1;m2 = +1,不记 Z̄C。结果 |1⟩|1⟩ = CNOT|1⟩|0⟩。
Read the two lines. The extra [m1 ≠ m3] in the flip condition does not depend on c: an X̄[m1 ≠ m3] on T cancels it, leaving “target flips ⇔ c = 1” — exactly CNOT. In the phase, m2[m1 ≠ m3] is the same for all c, t — a global sign to be dropped — while m2c = (−1)c·[m2 = −1] is exactly the effect of “apply Z̄ to C when m2 = −1” — a Z̄[m2 = −1] on C cancels it. The two corrections are precisely step ④ of §5.1. ∎
Why basis states suffice. Multiply the coefficients each step leaves behind: step ① keeps one of A’s two components, coefficient 1/√2; step ②’s projector (I ± X̄AX̄T)/2 turns |a, t⟩ into (|a, t⟩ ± |1−a, 1−t⟩)/2; step ③ keeps one of those terms. So for every outcome triple (m1, m2, m3), each input basis state |c, t⟩ ends as a single term of magnitude 1/√2 × 1/2 = 1/(2√2), differing only by a sign. Each triple therefore occurs with probability (1/(2√2))² = 1/8, independent of c and t — the three readouts leak nothing about the input. For a fixed triple the whole process is a linear map that does “the same constant × a corrected CNOT” to all four basis states, hence to any superposition of them; that is the exact sense of “proving it on basis states proves it for all superpositions”.
Example. c = 1, t = 0, outcomes (m1, m2, m3) = (−1, +1, +1). Step ①: a = 1 ⊕ 1 = 0; step ②: (|0, 0⟩ + |1, 1⟩)/√2 (bits a, t); step ③ reads a′ = 0 = a, leaving |c = 1⟩|t = 0⟩, target not flipped. The rule: m1 ≠ m3, book X̄T, so t becomes 1; m2 = +1, no Z̄C. Result |1⟩|1⟩ = CNOT|1⟩|0⟩.
实验台把三块贴片的逻辑层状态用 8 个振幅画出来(顺序 |c a t⟩),每按一次就做一次测量,读数随机抽取;最后按规则记帐,并与直接对输入做 CNOT 的结果比较。换几种输入态、多按几次:无论三个硬币怎么落,重合度都是 1。
The bench draws the logical-level state of the three patches as 8 amplitudes (ordered |c a t⟩); each press performs one measurement with a randomly drawn outcome; at the end it books the corrections by the rule and compares with a direct CNOT on the input. Try several inputs and many presses: however the three coins fall, the overlap is 1.
学名一瞥:从算符的角度看(Heisenberg 图景)A glimpse of the scholarly view: operators instead of states (the Heisenberg picture)
论文里通常不追踪振幅,而追踪算符:一个门 U 把每个泡利算符 P 变成 UPU†† 读「dagger」:共轭转置——先转置,再把每个元素取复共轭;对酉矩阵 U,U† 就是 U 的逆。。CNOT 的特征是四条变换:X̄C → X̄CX̄T(控制位的翻转会传给目标)、Z̄T → Z̄CZ̄T(目标位的相位会传回控制)、Z̄C → Z̄C、X̄T → X̄T。验证一个手术协议是 CNOT,就是验证它把这四个算符恰好这样变。为此要知道一次测量怎样改写算符。
Papers usually track operators rather than amplitudes: a gate U sends every Pauli operator P to UPU†The dagger † is the conjugate transpose: transpose, then complex-conjugate every entry; for a unitary U, U† is its inverse.. CNOT is characterised by four transformations: X̄C → X̄CX̄T (a flip of the control propagates to the target), Z̄T → Z̄CZ̄T (a phase on the target propagates back to the control), Z̄C → Z̄C, X̄T → X̄T. Verifying that a surgery protocol is a CNOT means verifying that it transforms these four operators exactly so. For that we need to know how one measurement rewrites operators.
一次测量怎样改写清单。一个状态用一张「清单」描述:它通过的检查(稳定子生成元,例如 |+⟩ 的清单是「X = +1」),外加我们关心的逻辑算符。测一个泡利算符 M、读到 m = ±1 时,若 M 与清单上的某一条 g 反对易,按三步改写:① 选定这样的一条 g;② 清单上其余与 M 反对易的检查,以及与 M 反对易的每个逻辑算符,都乘上 g;③ 把 g 从清单上划掉,换成 m·M。为什么乘 g 而不是乘 M:第②步要的新算符必须同时满足两点,一是在测量前的状态上取值不变,所以只能乘一个状态已经通过的检查(g 的值确定);二是与 M 对易,才能在测量后继续有确定的含义。两个都与 M 反对易的泡利算符相乘,结果与 M 对易(《从高考数学到 Toric Code》的碰撞定理:数反对易的位置,偶数个就对易)。乘 M 不行:M 与自己对易,乘上它之后仍与 M 反对易。
How one measurement rewrites the list. A state is described by a “list”: the checks it passes (stabilizer generators; the list for |+⟩ is “X = +1”), plus the logical operators we care about. When a Pauli operator M is measured with outcome m = ±1 and M anticommutes with some entry g of the list, rewrite in three steps: ① pick one such g; ② every other check on the list that anticommutes with M, and every logical operator that anticommutes with M, is multiplied by g; ③ strike g from the list and enter m·M instead. Why multiply by g and not by M: the new operator of step ② must satisfy two things. It must keep its value on the state before the measurement, so it may only be multiplied by a check the state already passes (g has a definite value); and it must commute with M, so that it still has a definite meaning after the measurement. The product of two Pauli operators that both anticommute with M commutes with M (the collision theorem of “From High-School Math to the Toric Code”: count the anticommuting positions; an even count means they commute). Multiplying by M fails: M commutes with itself, so the product still anticommutes with M.
两比特的例子,可以手算。比特 1 装着数据 a|0⟩ + b|1⟩,逻辑算符是 X1、Z1;比特 2 是制备在 |+⟩ 的辅助比特,清单是「X2 = +1」。测 M = Z1Z2。与 M 反对易的是检查 X2 和逻辑算符 X1;Z1 与 M 对易。若把 X1 乘上 M:X1·Z1Z2 在比特 1 上是 X·Z(相差一个相位就是 Y),与 M 在比特 1 上反对易,在比特 2 上都是 Z、对易——只有一个反对易位置,所以它仍与 M 反对易,没用。按规则乘 g = X2:X1 → X1X2,两个位置都反对易,与 M 对易。清单变成「Z1Z2 = m」,逻辑算符是 X1X2 与 Z1。核对:m = +1 时测后状态是 a|00⟩ + b|11⟩,X1X2 把它变成 b|00⟩ + a|11⟩,正是逻辑翻转;取 a = 0.6、b = 0.8,测前 X1 的平均值是 2ab = 0.96,测后 X1X2 的平均值也是 0.96(m = −1 时状态是 a|01⟩ + b|10⟩,结论相同)。
A two-qubit example you can check by hand. Qubit 1 holds the data a|0⟩ + b|1⟩, with logical operators X1, Z1; qubit 2 is an ancilla prepared in |+⟩, list “X2 = +1”. Measure M = Z1Z2. The check X2 and the logical operator X1 anticommute with M; Z1 commutes. Multiply X1 by M: X1·Z1Z2 is X·Z on qubit 1 (Y up to a phase), which anticommutes with M's Z there, while on qubit 2 both are Z and commute — one anticommuting position, so it still anticommutes with M; useless. Following the rule, multiply by g = X2: X1 → X1X2, with two anticommuting positions, so it commutes with M. The list becomes “Z1Z2 = m”, and the logical operators are X1X2 and Z1. Check: for m = +1 the state after the measurement is a|00⟩ + b|11⟩, and X1X2 turns it into b|00⟩ + a|11⟩, exactly a logical flip; with a = 0.6, b = 0.8 the average of X1 before is 2ab = 0.96, and the average of X1X2 after is also 0.96 (for m = −1 the state is a|01⟩ + b|10⟩ and the conclusion is the same).
用到手术 CNOT 上。开始时清单是「X̄A = +1」(A 在 |+̄⟩)。Z̄C 和 X̄T 与三个被测算符都对易,一路不变;要追踪的是 X̄C 与 Z̄T:
Applied to the surgery CNOT. The list starts as “X̄A = +1” (A in |+̄⟩). Z̄C and X̄T commute with all three measured operators and never change; the ones to track are X̄C and Z̄T:
| 步骤step | 选定的 gchosen g | 清单list | X̄C 的代表X̄C becomes | Z̄T 的代表Z̄T becomes |
|---|---|---|---|---|
| 开始start | — | X̄A | X̄C | Z̄T |
| ① 测 Z̄CZ̄A① measure Z̄CZ̄A | X̄A | m1Z̄CZ̄A | X̄CX̄A | Z̄T(对易,不变)Z̄T (commutes, unchanged) |
| ② 测 X̄AX̄T② measure X̄AX̄T | m1Z̄CZ̄A | m2X̄AX̄T | X̄CX̄A(对易,不变)X̄CX̄A (commutes, unchanged) | m1Z̄CZ̄AZ̄T |
| ③ 测 Z̄A③ measure Z̄A | m2X̄AX̄T | m3Z̄A | m2X̄CX̄T | m1m3Z̄CZ̄T(再乘清单上的 m3Z̄A,把 A 消掉)m1m3Z̄CZ̄T (times the list entry m3Z̄A, removing A) |
读最后一行:输入上 X̄C 的值,现在要在输出上读 m2X̄CX̄T;输入上 Z̄T 的值,现在要读 m1m3Z̄CZ̄T。去掉符号,正是 CNOT 的 X̄C → X̄CX̄T、Z̄T → Z̄CZ̄T。符号就是副产物:m2 = −1 时补 Z̄C(它与 X̄CX̄T 反对易,把符号翻回来,而与 Z̄CZ̄T 对易);m1m3 = −1,即 m1 ≠ m3 时补 X̄T(它只与 Z̄CZ̄T 反对易)。这与 5.1 节第④步的规则一字不差,而这里没有用到任何振幅。(这张表已用数值对全部 8 组读数逐一核对。)Clifford 门之所以能被完整追踪,正因为它们把泡利串变成泡利串。
Read the last row: the value X̄C had on the input is now read on the output as m2X̄CX̄T; the value Z̄T had is now read as m1m3Z̄CZ̄T. Without the signs these are exactly CNOT's X̄C → X̄CX̄T and Z̄T → Z̄CZ̄T. The signs are the byproducts: when m2 = −1, apply Z̄C (it anticommutes with X̄CX̄T, flipping that sign back, and commutes with Z̄CZ̄T); when m1m3 = −1, that is m1 ≠ m3, apply X̄T (it anticommutes only with Z̄CZ̄T). This is word for word the rule of step ④ in §5.1, obtained without a single amplitude. (This table has been checked numerically for all 8 outcome triples.) Clifford gates can be tracked completely precisely because they map Pauli strings to Pauli strings.
CNOT = 两次奇偶测量加一次读出。随机读数的所有后果都是 X̄ 或 Z̄,记账即可抵消。这就是为什么固定布线的芯片不需要移动任何量子比特也能做两比特逻辑门:门被拆成了测量,而测量只需要局域的缝合检查。
CNOT = two parity measurements plus one readout. Every consequence of the random readouts is an X̄ or a Z̄, cancelled by bookkeeping. That is why a fixed-wiring chip performs two-qubit logical gates without moving a single qubit: the gate is decomposed into measurements, and measurements need only local seam checks.
对。X̄T 由 m1 与 m3 是否相同决定,Z̄C 只由 m2 决定。这里 m1 = −1 说明 A 坍缩到了与 C 相反的值,而 m3 = +1 又读出 a′ = 0:两者不一致,目标多翻了一次,记一个 X̄T 抵消。
Right. X̄T is decided by whether m1 and m3 agree; Z̄C by m2 alone. Here m1 = −1 says A collapsed to the value opposite to C, while m3 = +1 reads a′ = 0: the mismatch flipped the target once too often, and an X̄T on the ledger cancels it.
套第④步:Z̄C[m₂ = −1] · X̄T[m₁ ≠ m₃]。
Apply step ④: Z̄C[m₂ = −1] · X̄T[m₁ ≠ m₃].
为什么要维持 d 轮,以及它花多少Why hold for d rounds, and what it costs
第 3 章把 Z̄AZ̄B 的值说成「缝合检查读数的乘积」。可读数会错。一次读错就是一次错误的 m1,就是一次错误的记账,就是一次逻辑错误。解法与《Surface Code · 高中数学版》第 4 章一样:重复测 d 轮。但「d 轮」不是简单的多数表决,而是时空译码;最后算一算,一个逻辑 CNOT 到底占用多少时空。 Chapter 3 defined the value of Z̄AZ̄B as “the product of the seam-check readouts”. Readouts can be wrong. One misread is one wrong m1, one wrong ledger entry, one logical error. The remedy is that of “The Surface Code · High-School Edition”, Chapter 4: repeat for d rounds. But “d rounds” is not a bare majority vote — it is spacetime decoding; and at the end we tally how much spacetime one logical CNOT occupies.
6.1一次读错就够了One misread is enough
d 条缝合检查的读数相乘得到 m1。任何一条读反,乘积就反,记帐就反,目标贴片就多(或少)翻一次——一次无声的逻辑错误。设每条检查各自独立地以概率 q1 读错。乘积读错,当且仅当读错的条数是奇数,这个概率是 q = [1 − (1 − 2q1)d]/2(d = 2 时可以手算核对:恰好一条错的概率 2q1(1 − q1),展开正是这个式子)。当 d·q1 ≪ 1,两条以上同时读错可以忽略,q ≈ d·q1;例如 d = 5、q1 = 1% 时 q ≈ 4.8%,而 d·q1 = 5%。下面把这个「一轮乘积读错的概率」记作 q。这和存储时的情形一样糟:单轮症状不可信。于是合并要维持下去:缝合检查连续测 T 轮,再决定 m1。取 T 为奇数(偶数时可能平票,还得另定规则;实验台只用奇数 T)。若每轮读错彼此独立,多数表决(取 T 轮里出现次数多的那个值)就把出错概率压成二项分布的尾巴。例:q = 5%、T = 3,表决错需要至少 2 轮读错,概率 3·q²(1−q) + q³ ≈ 0.73%,比单轮的 5% 小了约 7 倍:
Multiplying the d seam-check readouts gives m1. If any one is misread, the product flips, the ledger flips, and the target patch flips once too often (or too few) — a silent logical error. Suppose each check is misread independently with probability q1. The product is wrong exactly when an odd number of checks are misread, which has probability q = [1 − (1 − 2q1)d]/2 (check it by hand at d = 2: exactly one wrong has probability 2q1(1 − q1), which is what the formula expands to). When d·q1 ≪ 1, two or more simultaneous misreads are negligible and q ≈ d·q1; for example, at d = 5 and q1 = 1%, q ≈ 4.8% against d·q1 = 5%. Call this “probability that one round’s product is wrong” q from here on. As bad as in storage: a single round of syndrome cannot be trusted. So the merge must be held: the seam checks are measured for T consecutive rounds before m1 is decided. Take T odd (an even T can tie and would need an extra rule; the bench uses odd T only). If misreads are independent across rounds, a majority vote (take the value that appears in most of the T rounds) squeezes the failure probability into the tail of a binomial distribution. Example: q = 5%, T = 3; the vote fails only if at least 2 rounds are wrong, probability 3·q²(1−q) + q³ ≈ 0.73%, about 7 times smaller than the single-round 5%:
T 为奇数;每多两轮,约再乘一次 qT odd; every two extra rounds cost about another factor of q
6.2真相:不是表决,是时空译码The truth: not a vote, but spacetime decoding
上面的玩具模型假设「每轮独立读错」。真实电路里还有另一种事件:合并期间某个数据比特出了 X 错误。它不会只影响一轮,而是让某条(Z 型的)缝合检查(以及相邻的普通检查)从那一轮起持续翻转——多数表决会把这种持续的翻转当成真相。《译码器 · 高中数学版》5.1 节的探测器正是为此而生:把读数换成读数的变化,数据错误成为同一时刻横向的一对事件,测量错误成为同一检查纵向的一对事件,合并期间整块贴片的探测器历史被当作一个时空图一起译码。m1 不是「多数票」,而是译码器对整段历史推断出的乘积值。时间方向的码距timelike distance:不留任何痕迹地把 m₁ 弄反,最少需要多少次读错。只有读错的玩具模型里它等于轮数 T;T = d 时与空间方向的码距 d 相同。也由此而来。先在只有读错的玩具模型里数:要把 m1 弄反而不留痕迹,T 轮必须全部读错——这时相邻两轮的读数都一样,探测器一个也不亮。所以时间方向的码距是 T,与空间方向的码距 d 是同一个意思:一个不被察觉的逻辑错误最少由几个错误组成。骗过译码器则只要一半多:超过一半的轮读错,多数表决(或按最少错误来猜的译码器)就判错,T 为奇数时是 ⌈T/2⌉ 次。例:T = 3,码距 3,但 2 次读错就能让表决判错。空间方向完全一样:码距 d 的贴片,⌈d/2⌉ 个错误就可能让译码器修反。维持 T = d 轮,时间方向的码距就与空间方向相同。
The toy model above assumes independent misreads each round. A real circuit has another kind of event: a data qubit suffers an X error during the merge. That affects not one round but flips some (Z-type) seam check (and the adjacent ordinary checks) persistently from then on — and a majority vote would take that persistent flip for the truth. The detectors of “Decoders · High-School Edition”, §5.1 exist for exactly this: replace readouts by their changes, so a data error becomes a horizontal pair of events at one time and a measurement error a vertical pair on one check, and the whole merged patch's detector history over the merge is decoded together as one spacetime graph. m1 is not a majority vote but the decoder's inference of the product value from the entire history. The timelike distanceThe fewest misreads that flip m₁ without leaving any trace. In the misread-only toy model it equals the number of rounds T; at T = d it equals the spacelike distance d. comes from here too. Count first in the misread-only toy model: to flip m1 without a trace, all T rounds must be misread — then every two consecutive readouts agree and no detector lights. So the timelike distance is T, in the same sense as the spacelike distance d: the fewest faults that make up an undetected logical error. Fooling the decoder takes only a little over half of that: once more than half of the rounds are misread, the majority vote (or a decoder that guesses the fewest faults) decides wrongly, which for odd T is ⌈T/2⌉ misreads. Example: T = 3 gives distance 3, yet 2 misreads already make the vote wrong. The spatial direction is exactly the same: in a distance-d patch, ⌈d/2⌉ errors can make the decoder correct the wrong way. Holding for T = d rounds makes the timelike distance equal to the spacelike one.
上面的实验台只算「独立读错的多数表决」,它给出的数字是时间方向保护的量级直觉,不是真实系统的失败率。真实的合并由时空译码器处理,还要考虑分裂前后的边界、缝合比特制备的错误、以及《译码器 · 高中数学版》5.4 节提到的电路级相关错误。文献里对这一切的严格处理见 Horsman 等人 2012 年的原文和 Vuillot 等人 2018 年的「码变形与格点手术都是规范固定」。
The bench above computes only “majority vote over independent misreads”; its numbers give the order of magnitude of timelike protection, not a real system's failure rate. A real merge is handled by a spacetime decoder and must also account for the boundaries before and after the split, errors in preparing the seam qubits, and the circuit-level correlated faults mentioned in “Decoders · High-School Edition”, §5.4. The rigorous treatment is in Horsman et al. (2012) and in Vuillot et al. (2018), “Code deformation and lattice surgery are gauge fixing”.
6.3代价:时空体积The cost: spacetime volume
现在可以算账了。一个手术 CNOT 包含两次合并(各维持 d 轮)、两次分裂与一次读出,外加一块辅助贴片:粗略地说,占用 3 块贴片 × 约 2d 轮 ≈ 6d 个「贴片·轮」的时空体积spacetime volume:逻辑操作占用的「空间 × 时间」,是比较不同协议开销的通用单位。按「贴片 × 轮」计,一个手术 CNOT 约 6d;按「物理比特 × 轮」计,还要乘上每块贴片的物理比特数 (2d − 1)²,随 d³ 增长。。以贴片计它只随 d 线性增长;但每块贴片本身也随 d 变大:d² + (d − 1)² 个数据比特,加上每条检查配一个辅助比特(《Surface Code · 高中数学版》第 4 章的测法)共 2d(d − 1) 个,合计 (2d − 1)² 个物理比特。所以按「物理比特 × 轮」计,体积约 6d·(2d − 1)²,随 d³ 增长;d = 7 时约 42 贴片·轮,即约 7100 物理比特·轮。真实芯片每轮约 1 微秒(例如 Google 2024 年的 Willow 芯片,一轮 1.1 微秒),按 2d 轮算,d = 7 时一个 CNOT 约需 14 微秒,d = 25 时约 50 微秒。再加上给 T 门蒸馏魔法态所需的额外贴片与轮数——那一项通常主导总开销。把这些体积在一张二维时间表上排布,使总时间最短,是 Litinski 所谓「表面码的游戏」;Fowler 与 Gidney 的「低开销」方案则把每次手术的贴片数与轮数进一步压缩。
Now the bill. One surgery CNOT contains two merges (each held for d rounds), two splits and one readout, plus an ancilla patch: roughly 3 patches × about 2d rounds ≈ 6d “patch-rounds” of spacetime volumeThe “space × time” a logical operation occupies — the common currency for comparing protocol overheads. Counted in patches × rounds, a surgery CNOT is about 6d; counted in physical qubits × rounds, multiply by each patch’s (2d − 1)² physical qubits, which grows like d³.. Counted in patches it grows only linearly in d; but each patch also grows with d: d² + (d − 1)² data qubits plus one ancilla per check (the measurement scheme of “The Surface Code · High-School Edition”, Chapter 4), 2d(d − 1) of them, for (2d − 1)² physical qubits in all. So in physical qubits × rounds the volume is about 6d·(2d − 1)², growing like d³; at d = 7 that is about 42 patch-rounds, or about 7,100 qubit-rounds. A real chip runs about one round per microsecond (Google’s 2024 Willow chip, for instance, takes 1.1 µs per round); counting 2d rounds, a CNOT takes about 14 µs at d = 7 and about 50 µs at d = 25. Add the extra patches and rounds needed to distil magic states for T gates — usually the dominant term. Arranging these volumes on a two-dimensional schedule to minimise total time is Litinski's “game of surface codes”; Fowler and Gidney's “low overhead” scheme squeezes the patches and rounds per surgery further.
d = 7, 1 μs/轮round ⇒ ≈ 14 μs
≈ 6d 贴片·轮patch-rounds ≈ 6d·(2d − 1)² 物理比特·轮physical-qubit-rounds ∝ d³
合并维持 d 轮,是为了让时间方向的保护追上空间方向:单次读错不再能翻转 m1;时间方向的码距是 d,译码器要碰上约一半(d 为奇数时 ⌈d/2⌉ 次)读错才会判错。代价是逻辑门以「d 轮」为时间单位、以「贴片」为空间单位计价——这就是为什么逻辑计算机的速度不由物理门决定,而由码距与译码器的实时性决定。
A merge is held for d rounds so that timelike protection catches up with spacelike protection: one misread no longer flips m1; the timelike distance is d, and the decoder errs only once about half of that (⌈d/2⌉ misreads for odd d) coincide. The price is that logical gates are priced in “d rounds” of time and “patches” of space — which is why a logical computer's speed is set not by its physical gates but by the code distance and the decoder's real-time throughput.
对。时间随 d 线性增长(2d 轮量级),空间随 d² 增长(每块贴片 (2d − 1)² 个物理比特),所以按「物理比特 × 轮」计的时空体积随 d³(按「贴片 × 轮」计则只是约 6d)。这也是为什么「把 d 翻倍」在逻辑层面是一件昂贵的事。
Right. Time grows linearly in d (of order 2d rounds), space quadratically ((2d − 1)² physical qubits per patch), so the spacetime volume counted in physical qubits × rounds grows like d³ (counted in patches × rounds it is only about 6d). That is why “doubling d” is expensive at the logical level.
每次合并要维持约 d 轮,一个 CNOT 有两次合并。
Each merge is held for about d rounds, and a CNOT has two merges.
从仓库到计算机,与三条继续走的路From warehouse to computer, and three roads onward
复盘整条推理链:计算需要 Clifford 门加 T 门,平面芯片上有三条路,Bravyi–König 划出 T 的天花板(第 1 章)→ 测 Z̄AZ̄B 只区分奇偶、保留组内比例,是逻辑层的「不偷看的检查」(第 2 章)→ 缝合线上的 d 条局域检查连乘出这个非局域算符,n = 28、检查 27、k = 1、d 不变(第 3 章)→ 分裂只需按 X 测掉缝合比特,读数的后果全是泡利算符,记入 Pauli 帐(第 4 章)→ 两次奇偶测量加一次读出等于 CNOT,修正规则 Z̄C[m₂=−1]X̄T[m₁≠m₃],用 8 个振幅证完(第 5 章)→ 维持 d 轮给出时间方向的码距,逻辑门以 3 贴片 × 2d 轮计价(第 6 章)。至此,你手里的不再是一个能存的比特,而是一台能算的机器的全部原理:编码、译码、逻辑门、代价。
Replaying the chain: computation needs Clifford gates plus T, a planar chip offers three roads, and Bravyi–König sets T's ceiling (Ch. 1) → measuring Z̄AZ̄B separates only parity and preserves in-group ratios, the logical “check that never peeks” (Ch. 2) → d local checks on a seam multiply out to that nonlocal operator, with n = 28, 27 checks, k = 1 and d unchanged (Ch. 3) → splitting only measures the seam qubits in X, every consequence a Pauli booked on the frame (Ch. 4) → two parity measurements plus one readout equal a CNOT, corrected by Z̄C[m₂=−1]X̄T[m₁≠m₃] and proved with 8 amplitudes (Ch. 5) → holding for d rounds gives timelike distance, and logical gates are priced at 3 patches × 2d rounds (Ch. 6). By now, what you hold is no longer a qubit that can be stored but the full principle of a machine that computes: encoding, decoding, logical gates, cost.
三条继续走的路。其一,把游戏玩好:旋转版图、缝合的时序安排、多块贴片的路由——Litinski 的「表面码的游戏」把它们做成了可以在纸上玩的规则集。其二,T 门:魔法态的注入与蒸馏是逻辑计算机开销的主项,Fowler 与 Gidney 的低开销方案、以及近年的各种「便宜的蒸馏」都在压它。其三,另一种物理:可移动的中性原子阵列真的能把两块贴片搬到一起做横向 CNOT(2023 年演示到 d = 7),而「码变形与格点手术都是规范固定」这一统一观点(把合并前后的两套检查看成一个更大的码里可测可不测的两组「规范」检查,合并就是选定去测缝合检查这一组、把它们的值定下来,这叫规范固定),把本教程的手术、缺陷编织与更一般的码变形放进了同一个框架。入口文献见下。
Three roads onward. One, play the game well: rotated layouts, the scheduling of stitches, routing among many patches — Litinski's “game of surface codes” turns them into a rule set playable on paper. Two, the T gate: magic-state injection and distillation dominate a logical computer's overhead, and Fowler and Gidney's low-overhead scheme along with recent “cheap distillation” ideas keep squeezing it. Three, other physics: movable neutral-atom arrays can physically carry one patch onto another for a transversal CNOT (demonstrated up to d = 7 in 2023), and the unifying view that “code deformation and lattice surgery are gauge fixing” (regard the check sets before and after the merge as two optional “gauge” groups of one larger code; merging means choosing to measure the seam group and fixing its values, which is called gauge fixing) puts this tutorial's surgery, defect braiding and general code deformation in one framework. Entry points below.
高中数学版同系列教程:《从高考数学到 Toric Code》→ 《Surface Code · 高中数学版》→ 《译码器 · 高中数学版》→ 本教程 《BB 码 · 高中数学版》→ 《qLDPC 码 · 高中数学版》→
The high-school series: “From High-School Math to the Toric Code” → “The Surface Code · High-School Edition” → “Decoders · High-School Edition” → this one, “BB Codes · High-School Edition” → “qLDPC Codes · High-School Edition” →
符号与读法Symbols & how to read them
| 符号Symbol | 名称与读法Name & how to read it | 在本教程中的含义Meaning in this tutorial |
|---|---|---|
| X̄ Z̄ | 字母头上一横,读「X bar / Z bar」An overbar, read “X-bar / Z-bar” | 整块贴片的逻辑算符:Z̄ 是毛→毛的一排 Z,X̄ 是光→光的一列 X。A whole patch's logical operators: Z̄ a row of Z rough→rough, X̄ a column of X smooth→smooth. |
| |+̄⟩ | 加号头上一横,读「逻辑加态」A plus with an overbar, read “logical plus” | 编码后的 |+⟩ = (|0̄⟩ + |1̄⟩)/√2,X̄ 的 +1 本征态;辅助贴片的初态。The encoded |+⟩ = (|0̄⟩ + |1̄⟩)/√2, the +1 eigenstate of X̄; the ancilla patch's initial state. |
| M | 大写 M,读「测量」Capital M, read “measure” | MZ̄Z̄ = 「测量算符 Z̄Z̄」这一步;下标是被测的算符。MZ̄Z̄ = the step “measure the operator Z̄Z̄”; the subscript names what is measured. |
| [ · ] | 方括号里放命题,读「艾弗森括号」A statement in square brackets, the Iverson bracket | 命题成立取 1,否则取 0。Z̄[m₂=−1] = 「m₂ = −1 时施加 Z̄」。1 if the statement holds, else 0. Z̄[m₂=−1] = “apply Z̄ when m₂ = −1”. |
| Z̄AZ̄B X̄AX̄B | 下标是贴片的名字,读「Z bar A、Z bar B」Subscripts name the patches; read “Z-bar A, Z-bar B” | 两块贴片逻辑算符的乘积;本征值 +1 / −1 = 两个逻辑比特相同 / 不同。格点手术测的就是它。The product of two patches' logical operators; eigenvalue +1 / −1 = the two logical qubits agree / differ. It is what lattice surgery measures. |
| |0̄⟩ |1̄⟩ | 数字头上一横,读「逻辑 0 / 逻辑 1」A digit with an overbar, read “logical 0 / logical 1” | 整块贴片编码的基态;|0̄0̄⟩ 等四个基向量描述两个逻辑比特。The encoded basis states of a whole patch; the four states |0̄0̄⟩ etc. describe two logical qubits. |
| a′ | 撇号,读「a 撇」A prime, read “a prime” | 与 a 相区别的另一个 0/1 值:读出后 A 的新取值。A second 0/1 value distinct from a: A's value after the readout. |
| P± | 读「投影算符正 / 负」Read “projector plus / minus” | (I ± S)/2:把状态里 S 的 ±1 成分捞出来的漏勺。(I ± S)/2: the sieve that extracts the ±1 components of S from a state. |
| ∏ | 大写希腊字母 π,读「派」Capital Greek π, read “pie” | 连乘:∏ 缝合检查 = 全部缝合检查的乘积 = Z̄AZ̄B。Product: ∏ seam checks = the product of all seam checks = Z̄AZ̄B. |
| ⊕ | 圆圈加,读「异或」A circled plus, read “X-OR” | 0/1 的模 2 加法:c ⊕ 1 = 1 − c。Addition mod 2 on 0/1: c ⊕ 1 = 1 − c. |
| Σ ∑ | 大写希腊字母,读「西格玛」Capital Greek letter, read “SIG-ma” | 求和:多数表决的失败概率是二项分布尾巴的和。Summation: the majority vote's failure probability is a binomial tail sum. |
| ⌈ ⌉ | 读「向上取整」Read “ceiling” | ⌈T/2⌉ = T 的一半,不足则进一。⌈T/2⌉ = half of T, rounded up. |
| ∎ | 实心小方块,读「证毕」A filled square, read “Q.E.D.” | 证明结束的印章。The end-of-proof stamp. |
| GF(2) 秩 | 读「二元域」「秩」Read “the binary field”, “rank” | 只有 0、1 两个数,1 + 1 = 0;秩 = 线性独立检查的条数,k = n − 秩。Only 0 and 1, with 1 + 1 = 0; rank = the number of independent checks, k = n − rank. |
| C(T, k) | 读「T 选 k」Read “T choose k” | 组合数:从 T 轮里选 k 轮的选法数,二项分布的系数。Binomial coefficient: ways to choose k of T rounds; the coefficient in the binomial distribution. |
| † | 读「dagger」Read “dagger” | 共轭转置;UPU† = 门 U 把算符 P 变成的新算符,对酉矩阵 U† = U−1。Conjugate transpose; UPU† is what gate U turns operator P into; for a unitary, U† = U−1. |
| ⇒ ⇔ | 读「推出」「当且仅当」Read “implies”, “if and only if” | 单向 / 双向的逻辑推导。One-way / two-way logical implication. |
| ≈ μs | 读「约等于」「微秒」Read “approximately”, “microsecond” | 近似;百万分之一秒,真实芯片一轮症状的量级。Approximately; a millionth of a second, the scale of one syndrome round on a real chip. |
| eiθ | 读「e 的 i θ 次方」Read “e to the i theta” | 欧拉公式 cos θ + i sin θ:模长 1 的复数相位;T 门给 |1⟩ 乘 eiπ/4。Euler's formula cos θ + i sin θ: a complex phase of modulus 1; the T gate multiplies |1⟩ by eiπ/4. |
本教程新增词汇New terms in this tutorial
| 术语Term | 定义Definition |
|---|---|
| Clifford 门 / T 门Clifford gates / T gate | 把泡利串映成泡利串的门(H、S、CNOT)/ 使门集通用、但被 Bravyi–König 排除在局域、常深度酉电路实现之外的门。Gates mapping Pauli strings to Pauli strings (H, S, CNOT) / the gate that completes universality but is excluded from local, constant-depth unitary implementation by Bravyi–König. |
| 格点手术lattice surgery | 通过合并与分裂贴片来测量乘积算符 Z̄Z̄ 或 X̄X̄ 的方法;两次测量加读出构成 CNOT。Measuring product operators Z̄Z̄ or X̄X̄ by merging and splitting patches; two measurements plus a readout form a CNOT. |
| 合并 / 分裂merge / split | 加入缝合比特与缝合检查并测量 d 轮 / 停掉缝合检查、把缝合比特测掉并记账。Insert seam qubits and seam checks and measure for d rounds / stop the seam checks, measure out the seam qubits and book the outcomes. |
| 缝合比特 / 缝合检查seam qubits / seam checks | d−1 个制备好的新数据比特 / d 条新的四腿检查,乘积为目标算符。d−1 freshly prepared data qubits / d new four-leg checks whose product is the target operator. |
| 光边合并 / 毛边合并smooth merge / rough merge | 贴合光边、Z 面缝合检查、测 Z̄Z̄ / 贴合毛边、X 星缝合检查、测 X̄X̄。Smooth edges joined, Z-plaquette seam checks, measures Z̄Z̄ / rough edges joined, X-star seam checks, measures X̄X̄. |
| Pauli 帐 / 副产物算符Pauli frame / byproduct operator | 记录应施加而不必施加的 X̄、Z̄ 修正的经典账本 / 由随机读数决定的那些修正。The classical record of X̄, Z̄ corrections owed but never applied / those outcome-dependent corrections themselves. |
| 辅助贴片ancilla patch | CNOT 协议中制备为 |+̄⟩、先后与控制、目标合并、最后被读出丢弃的第三块贴片。The third patch in the CNOT protocol, prepared in |+̄⟩, merged in turn with control and target, then read out and discarded. |
| 时间方向的码距timelike distance | 不留痕迹地把合并读数弄反所需的最少读错次数;合并维持 T 轮时(只有读错的模型)等于 T,取 T = d。译码器被 ⌈T/2⌉ 次读错就可能骗过。The fewest misreads that flip the merge readout without a trace; for a merge held T rounds (misread-only model) it equals T, and one takes T = d. The decoder can be fooled by ⌈T/2⌉ misreads. |
| 时空体积spacetime volume | 逻辑操作占用的空间 × 时间。一个手术 CNOT 约 3 × 2d = 6d 贴片·轮;乘上每块贴片的 (2d − 1)² 个物理比特,约 6d(2d − 1)² 物理比特·轮,随 d³ 增长。Space × time occupied by a logical operation. A surgery CNOT is about 3 × 2d = 6d patch-rounds; times (2d − 1)² physical qubits per patch, about 6d(2d − 1)² physical-qubit-rounds, growing like d³. |
| 魔法态magic state | 供给 T 门的非稳定子资源态,经蒸馏提纯后由门传送消耗。The non-stabilizer resource state that supplies T gates, purified by distillation and consumed by gate teleportation. |
| Clifford 层级Clifford hierarchy | 按「多难追踪」给门分级:第一层是泡利算符,第二层是 Clifford 门(泡利 → 泡利),第三层把泡利映成 Clifford 门,T 在第三层。Grades gates by how hard they are to track: level one the Pauli operators, level two the Clifford gates (Pauli → Pauli), level three maps Paulis to Clifford gates; T sits at level three. |
| 横向门transversal gate | 两块相同的贴片上逐个对应比特做同一个门(如 CNOT),一步完成,错误不会在同一块贴片内扩散。The same gate (e.g. CNOT) applied to each pair of corresponding qubits of two identical patches, in one step; errors cannot spread within a patch. |
| 镜像修复mirror-symmetric repair | 分裂后 A、B 缝边上镜像位置的星同时亮 −1;两边用同样的 Z 串修掉,就不改变 X̄AX̄B,帐上不用记 Z̄。After a split, stars at mirror positions on A’s and B’s seam edges light −1 together; repairing both sides with the same Z strings leaves X̄AX̄B unchanged, so no Z̄ is booked. |
延伸阅读Further reading
- D. Horsman, A. G. Fowler, S. Devitt, R. Van Meter, “Surface code quantum computing by lattice surgery” (2012)
本教程的原始论文:合并、分裂、CNOT 协议与副产物算符。arXiv: 1111.4022This tutorial's source paper: merge, split, the CNOT protocol and byproduct operators. arXiv: 1111.4022 - S. Bravyi, R. König, “Classification of topologically protected gates for local stabilizer codes” (2012)
第 1 章的天花板:局域、常深度的酉电路只到 Clifford 群。arXiv: 1206.1609Chapter 1's ceiling: local, constant-depth unitary circuits reach only the Clifford group. arXiv: 1206.1609 - A. G. Fowler, M. Mariantoni, J. M. Martinis, A. N. Cleland, “Surface codes: Towards practical large-scale quantum computation” (2012)
缺陷编织那条路的百科全书,以及电路级噪声下的开销核算。arXiv: 1208.0928The encyclopaedia of the defect-braiding road, and overhead audits under circuit-level noise. arXiv: 1208.0928 - D. Litinski, “A Game of Surface Codes: Large-Scale Quantum Computing with Lattice Surgery” (2018)
把手术、路由与魔法态蒸馏做成一套可在纸上推演的规则;第 6 章代价的现代参考。arXiv: 1808.02892Surgery, routing and magic-state distillation as a rule set playable on paper; the modern reference for Chapter 6's costs. arXiv: 1808.02892 - A. G. Fowler, C. Gidney, “Low overhead quantum computation using lattice surgery” (2018)
压缩每次手术的贴片数与轮数。arXiv: 1808.06709Squeezing the patches and rounds per surgery. arXiv: 1808.06709 - C. Vuillot, L. Lao, B. Criger, C. García Almudéver, K. Bertels, B. M. Terhal, “Code deformation and lattice surgery are gauge fixing” (2018)
把手术、编织与码变形统一为同一种操作的理论框架。arXiv: 1810.10037The framework unifying surgery, braiding and code deformation as one operation. arXiv: 1810.10037 - D. Bluvstein et al., “Logical quantum processor based on reconfigurable atom arrays”, Nature (2023)
另一条路的实验:可移动原子把贴片叠在一起做横向 CNOT,d 从 3 到 7。arXiv: 2312.03982The other road, experimentally: movable atoms stack patches for transversal CNOTs, d from 3 to 7. arXiv: 2312.03982
全篇简化五项,一次结清:① 第 5 章的实验台在逻辑层模拟,把合并加分裂当作理想的一次乘积测量,分裂读数的记账并入三个 m 的符号;② 全程实振幅,复相位不改变任何结论;③ 合并几何用未旋转的 d = 3、5 版图演示,部署版为 45° 旋转,缝合规则相同;④ 第 6 章的多数表决是玩具模型,真实系统靠时空译码;⑤ 「3 贴片 × 2d 轮」与微秒数是量级估算,未计路由与魔法态蒸馏。以上不影响任何定性结论。
Five simplifications, settled in one bill: ① Chapter 5's bench simulates at the logical level, treating merge plus split as one ideal product measurement, with the split readouts' bookkeeping absorbed into the signs of the three m's; ② real amplitudes throughout, complex phases changing no conclusion; ③ merge geometry is shown on unrotated d = 3, 5 layouts, deployments rotating 45° with identical seam rules; ④ Chapter 6's majority vote is a toy, real systems relying on spacetime decoding; ⑤ “3 patches × 2d rounds” and the microsecond figures are order-of-magnitude estimates omitting routing and magic-state distillation. None of this touches any qualitative conclusion.