目录Contents
速查回顾:四条随身事实Quick recap: four facts to carry
这一篇只依赖 Toric Code 教程里的四件事,全都和「怎样算一次奇偶」「两个操作能不能交换顺序」有关。每一条都给出原处的链接。 This guide relies on four things from the toric-code guide, all about “how a parity is computed” and “whether two operations may be swapped”. Each comes with a link to where it was taught.
| # | 事实Fact | 原处Where it was taught |
|---|---|---|
| 1 | 一条奇偶检查只问「这几个比特加起来是奇是偶」,答案 +1 或 −1;量子版靠一个辅助比特收集奇偶:对每个要查的比特做一次 CNOT 到辅助比特上,再测辅助比特。A parity check only asks “is the sum of these bits odd or even”, answer +1 or −1; the quantum version collects the parity into a helper qubit: one CNOT from each checked qubit onto the helper, then measure the helper. | 2.3 节section 2.3 · 表面码教程第 4 章surface guide, Chapter 4 |
| 2 | X 与 Z 在同一个比特上反对易:XZ = −ZX。两条泡利串相乘时可以交换顺序,代价 (−1)c,c = 两个都不是 I 且不同的字母同格相遇的位置数(碰撞定理;只有 X、Z 时就是 X 遇 Z)。X and Z on the same qubit anticommute: XZ = −ZX. Two Pauli strings may be multiplied in either order at the price (−1)c, c = the number of cells where two different non-identity letters meet (the collision theorem; for X/Z-only strings, where an X meets a Z). | 3.4 节section 3.4 · 4.2 节section 4.2 |
| 3 | 一个稳定子码是一份互相兼容的检查清单。兼容要两个条件:检查两两对易,而且任何几条检查的乘积都不等于 −I。第二条不能省:X1、X2、−X1X2 两两对易,可三条相乘得 X1X2·(−X1X2) = −I;一个态若让三条都读 +1,就得有 |ψ⟩ = −I|ψ⟩ = −|ψ⟩,只有零向量满足,所以没有任何态能通过全部三条。每条检查都只由 X 或只由 Z 组成且不带负号时(CSS 码,例如 toric、surface 与 steane 码),这一条自动成立:两两对易的检查可以随意调换次序,把 X 型的放在前、Z 型的放在后,乘积就是一个 X 串乘一个 Z 串;它要等于 ±I,两个串都必须是恒等,于是乘积是 +I。注意这不是说乘积里从不出现负号:XX 与 ZZ 对易,乘起来却是 −YY;只是 −I 乘不出来。逻辑算符与所有检查对易却不是检查的乘积。A stabilizer code is a list of mutually compatible checks. Compatible takes two conditions: the checks commute pairwise, and no product of checks equals −I. The second cannot be dropped: X1, X2, −X1X2 commute pairwise, yet the three multiply to X1X2·(−X1X2) = −I; a state reading +1 on all three would need |ψ⟩ = −I|ψ⟩ = −|ψ⟩, which only the zero vector satisfies, so no state passes all three. When every check is all-X or all-Z with no minus sign (CSS codes, such as the toric, surface and Steane codes), the condition holds automatically: commuting checks can be reordered freely, so put the X-type ones first and the Z-type ones after; the product is then an X string times a Z string, and for it to be ±I both strings must be the identity, so the product is +I. This does not mean no product ever carries a sign: XX and ZZ commute, yet their product is −YY; only −I cannot arise. a logical operator commutes with every check yet is not a product of checks. | 4.4 节section 4.4 |
| 4 | L × L 环面码有 2L² 个比特、k = 2 个逻辑比特;L = 3 时 n = 18。这一篇的主角蜂窝码在 3 × 3 时也是 n = 18、k = 2——不是巧合,第 2 章会说。The L × L toric code has 2L² qubits and k = 2 logical qubits; for L = 3, n = 18. This guide's protagonist, the honeycomb code, also has n = 18, k = 2 at 3 × 3; not a coincidence, as Chapter 2 will say. | 5.3 节section 5.3 |
记号:n = 物理量子比特数,k = 逻辑量子比特数,L = 环面每行每列的格数,c = 碰撞数。CNOT = 受控翻转:控制比特为 1 时翻转目标比特。
Notation: n = number of physical qubits, k = number of logical qubits, L = cells per row and per column of the torus, c = collision count. CNOT = controlled flip: flips the target qubit when the control qubit is 1.
这个问题用人话说是什么:一个负号,两种语言,一部词典The problem in plain words: one sign, two languages, one dictionary
先用一张 2 × 2 的表说清费米子和量子比特差在哪里——一个负号。再看这个负号怎样让「算一次奇偶」在两种语言里长得不一样,什么叫「编译器」,什么叫 ZX 图。最后逐字读 Wanted 板的原文。 First a 2 × 2 table shows where fermions differ from qubits: one sign. Then how that sign makes “computing a parity” look different in the two languages, what a “compiler” is, and what a ZX diagram is. Finally the Wanted board, word by word.
1.1玩具:座位、空与满、一个负号The toy: seats, empty or taken, one sign
想象一排座位,编号 1、2、3、…。每个座位要么空着(记 0)要么有人(记 1)。一个费米子fermion:一类粒子(电子是最熟悉的例子),同一个「座位」(量子态)最多坐一个,而且交换两个费米子会给整体状态乘上 −1。就是「一个人」。到这里它和量子比特一模一样:座位 i 的占据数 ni 是 0 或 1,和一个比特的 0/1 没有区别。差别只在一个动作上:把座位 i 和座位 j 的内容互换。对量子比特(盒子),互换就是互换,状态不变号。对费米子,规则是:
Picture a row of seats numbered 1, 2, 3, …. Each seat is either empty (write 0) or taken (write 1). A fermionA kind of particle (the electron is the familiar example) of which at most one can occupy a “seat” (quantum state), and such that exchanging two fermions multiplies the whole state by −1. is “one person”. So far it is identical to a qubit: the occupation ni of seat i is 0 or 1, no different from a bit's 0/1. The difference lies in one action only: swap the contents of seat i and seat j. For qubits (boxes) a swap is a swap; the state keeps its sign. For fermions the rule is:
记号:ni = 座位 i 的占据数(0 空、1 满);|ni nj⟩ = 「座位 i 是 ni、座位 j 是 nj」这个状态(尖括号是 Toric Code 教程 3.1 节的态记号);(−1)ni·nj 只在 ni = nj = 1 时等于 −1。这条公式只对相邻的两个座位成立,隔着别的座位互换见表下的一般规则。
Notation: ni = occupation of seat i (0 empty, 1 taken); |ni nj⟩ = the state “seat i holds ni, seat j holds nj” (the angle-bracket state notation of section 3.1 of the toric-code guide); (−1)ni·nj equals −1 only when ni = nj = 1. The formula holds for two adjacent seats; for seats with others in between, see the general rule below the table.
| 互换后的符号 ni \ njSign after the swap ni \ nj | 0 | 1 |
|---|---|---|
| 0 | +1(两个空座位,互换没意义)+1 (two empty seats, nothing to swap) | +1(一人挪了座位)+1 (one person moved) |
| 1 | +1(一人挪了座位)+1 (one person moved) | −1(两人交换,多一个负号) (two people exchanged, an extra sign) |
四格里只有一格是 −1。这一个负号就是费米子与量子比特的全部区别,后面每一个困难都从它长出来。第一个后果:列出「谁坐着」的顺序有意义。三个人坐在 1、2、3 号,按 (1,2,3) 记和按 (2,1,3) 记差一次互换,差一个 −1;按 (3,2,1) 记要三次相邻互换,差 (−1)³ = −1;按 (2,3,1) 记要两次,差 (−1)² = +1。量子比特没有这本「符号账」。人话:费米子的语言里,每句话都附带一个正负号,取决于你按什么顺序说。
Only one of the four cells is −1. That single sign is the entire difference between fermions and qubits, and every difficulty below grows out of it. First consequence: the order in which you list “who is seated” matters. Three people in seats 1, 2, 3: written as (1,2,3) versus (2,1,3) differs by one swap, a factor −1; as (3,2,1) it takes three adjacent swaps, (−1)³ = −1; as (2,3,1) two swaps, (−1)² = +1. Qubits keep no such “sign ledger”. In plain words: in the language of fermions every sentence carries a sign that depends on the order you say it in.
隔着别的座位互换怎么办?把它想成两位「旅行者」各走一趟:座位 i 的内容一格一格往右挪到 j,座位 j 的内容一格一格往左挪到 i。每挪一格是一次相邻互换,按上表,只有挪动的人越过另一个人时才乘 −1。于是负号有三个来源:座位 i 的人(如果有)越过中间每一个有人的座位,一次一个 −1;座位 j 的人(如果有)也一样;两位旅行者在路上彼此越过一次(两人都在时才算)。记 m = i 与 j 之间有人的座位数,合起来:
What about swapping seats with others in between? Think of two “travellers”: the content of seat i moves right one seat at a time until it reaches j, and the content of seat j moves left one seat at a time until it reaches i. Each one-seat move is an adjacent swap, and by the table it costs −1 only when the mover passes another person. So the minus signs have three sources: the person from seat i (if any) passes every occupied seat in between, one −1 each; the person from seat j (if any) does the same; and the two travellers pass each other once (only if both exist). With m = the number of occupied seats strictly between i and j, altogether:
两个可以手算的例子。|110⟩ 互换 1 号与 3 号:n₁ = 1、n₃ = 0、m = 1(2 号有人),指数 = 0 + 1·1 = 1,结果 −|011⟩,因为 1 号的人越过了 2 号的人。|1101⟩ 互换 1 号与 4 号:n₁ = n₄ = 1、m = 1,指数 = 1 + 2·1 = 3,结果乘 −1。第二个例子里中间那个人被两位旅行者各越过一次,两个负号抵消,剩下的 −1 来自两位旅行者彼此越过。所以两端都有人时,中间有几个人都不影响符号;只有一端有人时,中间每多一个人符号就翻一次。下面的部件可以摆出任意四座位的例子,逐项看指数怎样凑出来。
Two examples to check by hand. |110⟩, swap seats 1 and 3: n₁ = 1, n₃ = 0, m = 1 (seat 2 is taken), exponent = 0 + 1·1 = 1, result −|011⟩, because the person from seat 1 passed the person in seat 2. |1101⟩, swap seats 1 and 4: n₁ = n₄ = 1, m = 1, exponent = 1 + 2·1 = 3, so the state picks up −1. In the second example the person in the middle is passed once by each traveller; those two signs cancel, and the remaining −1 comes from the travellers passing each other. So when both end seats are taken, the number of people in between does not affect the sign; when only one end is taken, each extra person in between flips it. The widget below sets up any four-seat example and shows how the exponent is assembled term by term.
对。用隔位互换的公式:n₁ = n₄ = 1。第一问 m = 0,指数 = 1,符号 −1。第二问 m = 1,指数 = 1 + 2·1 = 3,仍是奇数,符号 −1。中间的人被两位旅行者各越过一次,贡献 (−1)² = +1。如果只有 1 号有人、4 号空着,情况就不同了:那时中间每多一个人符号翻一次。这种「符号取决于中间有几个人」的现象,正是 4.3 节说的「符号账让局部操作变得不局部」。
Right. Use the rule for swaps at a distance: n₁ = n₄ = 1. First question: m = 0, exponent 1, sign −1. Second: m = 1, exponent 1 + 2·1 = 3, still odd, sign −1. The person in between is passed once by each traveller, contributing (−1)² = +1. Had only seat 1 been taken and seat 4 empty, things would differ: then each extra person in between flips the sign. That dependence on who sits in between is exactly the “the sign ledger makes local operations non-local” point of 4.3.
再数一遍负号的三个来源。1 号的人往右走,越过 2 号的人一次:−1。4 号的人往左走,也越过 2 号的人一次:−1。两位旅行者彼此越过:−1。一共 (−1)³ = −1;没有 2 号时只剩最后一项,也是 −1。可以在上面的部件里把这两种摆法都试一下。
Count the three sources of minus signs again. The person from seat 1 walks right and passes the person in seat 2 once: −1. The person from seat 4 walks left and also passes seat 2 once: −1. The two travellers pass each other: −1. In total (−1)³ = −1; without anyone in seat 2 only the last term remains, again −1. Try both arrangements in the widget above.
1.2半个座位:马约拉纳对Half a seat: the Majorana pair
物理学家还喜欢把一个座位劈成两半。两半各叫一个马约拉纳Majorana(马约拉纳费米子):一个「半座位」。两个马约拉纳配成一对,才等于一个可以空或满的普通座位;单独一半没有「空/满」可言。,记 γ;一对 (γa, γb) 合起来才是一个能空能满的座位,「这个座位是空是满」是要把这一对合在一起问才有答案的问题,单独一半没有空满可言。这个问题写作 iγaγb(前面的 i 让答案是实数),答案只有 ±1,一个表示空,一个表示满(哪个号对应空取决于约定)。为什么要劈:劈开之后,可以把不同座位的两半配成新的对,像把两把椅子各锯一半再拼成一把新椅子;而「问新配出的一对是空是满」,下面会看到,正是蜂窝码那种只碰两个比特的检查的核心。QEC-Bank 蜂窝码条目的卡片这样记录这件事(codes/honeycomb/card.yaml,views 字段,type fermionic,原文):
Physicists also like to split a seat in two. Each half is called a MajoranaA Majorana fermion: “half a seat”. Two Majoranas paired together make one ordinary seat that can be empty or taken; a lone half has no “empty/taken” of its own., written γ; only a pair (γa, γb) together makes a seat that can be empty or taken, and “is this seat empty or taken” is a question that has an answer only when the pair is asked together; a lone half has no occupation. The question is written iγaγb (the i in front makes the answer real) and its answer is ±1, one value meaning empty and the other taken (which sign means empty is a convention). Why split: once split, halves from different seats can be paired anew, like sawing two chairs in half and joining them into a new chair; and “is this newly formed pair empty or taken”, as shown below, is the core of the kind of check touching only two qubits that the honeycomb code uses. The QEC-Bank honeycomb card records this as follows (codes/honeycomb/card.yaml, views field, type fermionic, verbatim):
rung: R5 · type: fermionic · dialect: parton
“Kitaev's four-Majorana representation factors each directional Pauli edge into a Z2 gauge variable and a matter-fermion pairing. The measurement cycle then becomes a rotating pairing pattern whose gauge-invariant products are the plaquette fluxes.”
origin: {kind: curated, ref: kitaev2006anyons} · refs: [kitaev2006anyons, zhu2023majoranaliquid] · gap: {target: wanted:fermionic-compiler}
rung: R5 · type: fermionic · dialect: parton
“Kitaev's four-Majorana representation factors each directional Pauli edge into a Z2 gauge variable and a matter-fermion pairing. The measurement cycle then becomes a rotating pairing pattern whose gauge-invariant products are the plaquette fluxes.”
origin: {kind: curated, ref: kitaev2006anyons} · refs: [kitaev2006anyons, zhu2023majoranaliquid] · gap: {target: wanted:fermionic-compiler}
逐词。four-Majorana representation:每个量子比特(自旋)用四个半座位表示,而不是两个——多出的两个是为了让 X、Y、Z 三种泡利都能写成「两个半座位的乘积」。directional Pauli edge:蜂窝码的每条检查是相邻两个比特上的 XX、YY 或 ZZ,由边的方向决定(卡片 description 原文:“Edge operators are fixed as XX, YY, or ZZ by direction”)。factors … into a Z2 gauge variable and a matter-fermion pairing:一条这样的边算符拆成两个因子——一个只取 ±1 的「规范变量」(一个取值可以当成固定的 ±1 的记账量,见下面的补课),和一个「两个半座位配对」。rotating pairing pattern:蜂窝码每一轮测同一种颜色标签的边(每一轮里 XX、YY、ZZ 三种方向都有),就是不断换着配对。plaquette fluxes:绕一个六边形面把规范变量乘起来得到的 ±1,是不随轮次变的守恒量。蜂窝码条目的推导页 pedagogy/representation-dictionary.md 把那个拆分写成一行,原文说是「示意地」(schematically)拆成:
Word by word. four-Majorana representation: each qubit (spin) is written with four half-seats rather than two; the extra two let all three Paulis X, Y, Z be written as “a product of two half-seats”. directional Pauli edge: each honeycomb check is XX, YY or ZZ on two neighbouring qubits, fixed by the edge's direction (card description verbatim: “Edge operators are fixed as XX, YY, or ZZ by direction”). factors … into a Z2 gauge variable and a matter-fermion pairing: such an edge operator splits into two factors, a “gauge variable” taking only ±1 (a bookkeeping quantity whose value can be treated as a fixed ±1; see the catch-up below) and a “pairing of two half-seats”. rotating pairing pattern: the honeycomb code measures the edges of one colour label each round (every round contains XX, YY and ZZ edges alike), that is, keeps re-pairing. plaquette fluxes: the ±1 obtained by multiplying the gauge variables around a hexagonal face, conserved from round to round. The entry's derivation page pedagogy/representation-dictionary.md writes that split in one line, in its own words “schematically”:
记号(只为读出这一行,不推导):σua = 比特 u 上的泡利算符,a ∈ {x, y, z} 说明是 X、Y 还是 Z;u、v = 一条边的两个端点比特;bux, buy, buz, cu = 比特 u 的四个半座位(四个马约拉纳);i = 虚数单位(i² = −1,Toric Code 教程 1.2 节),保证每个括号取值 ±1。第一个括号是「规范变量」,第二个是「物质配对」。原文见 codes/honeycomb/pedagogy/representation-dictionary.md。「示意」指的是整体符号:按 Kitaev 的约定 σa = i ba c,精确的等式是 σua σva = −(i bua bva)(i cu cv)(本篇用八个半座位的矩阵模型数值核对过;来源见下面的补课)。这个负号不影响下面的读法。
Notation (to read the line only, not to derive it): σua = the Pauli operator on qubit u, with a ∈ {x, y, z} saying whether it is X, Y or Z; u, v = the two endpoint qubits of an edge; bux, buy, buz, cu = the four half-seats (four Majoranas) of qubit u; i = the imaginary unit (i² = −1, section 1.2 of the toric-code guide), ensuring each bracket takes the value ±1. The first bracket is the “gauge variable”, the second the “matter pairing”. Source: codes/honeycomb/pedagogy/representation-dictionary.md. “Schematically” concerns the overall sign: with Kitaev's convention σa = i ba c the exact identity is σua σva = −(i bua bva)(i cu cv) (checked numerically here in a matrix model of eight half-seats; where it comes from is in the catch-up below). The sign does not affect the reading that follows.
这张图就是那一行公式的全部内容:一条两比特检查 = 一个规范对 × 一个物质对。规范对的值可以当成固定的 ±1(为什么可以,见补课),所以测这条检查,实际上就是在问「cu 和 cv 配成的这一对是空还是满」,再乘上一个已知的 ±1。蜂窝码每一轮测一组边,就是把所有 c 按这一组边两两配对来问;下一轮换一组边,就换一种配对。卡片说的 “rotating pairing pattern” 就是这件事。
This figure is the whole content of that one line: one two-qubit check = one gauge pair × one matter pair. The gauge pair's value can be treated as a fixed ±1 (why, see the catch-up), so measuring the check really asks “is the pair formed by cu and cv empty or taken”, times a known ±1. Each honeycomb round measures one set of edges, which pairs up all the c's along those edges and asks each pair; the next round uses another set of edges, hence another pairing. That is the card's “rotating pairing pattern”.
补课 · 为什么一个比特要四个半座位,「规范变量」又是什么Catch-up · Why one qubit takes four half-seats, and what a “gauge variable” is
先数状态。四个半座位配成两对,就是两个普通座位;两个座位各空或满,一共 2 × 2 = 4 种状态。一个量子比特只有 0 和 1 两种状态,多出了一倍。Kitaev 的做法是加一条约束:把比特 u 的四个半座位全乘起来,得到 Du = bux buy buz cu,它只取 ±1,规定只保留 Du = +1 的那些状态。这正好砍掉一半:4 种里留下 2 种,就是比特的 0 和 1(本页配套脚本在两个比特的情形下数过:约束后剩下 4 = 2 × 2 维)。
First count states. Four half-seats pair into two ordinary seats; each seat is empty or taken, 2 × 2 = 4 states. A qubit has only two, 0 and 1: twice too many. Kitaev's fix is one constraint: multiply all four half-seats of qubit u into Du = bux buy buz cu, which takes only the values ±1, and keep only the states with Du = +1. That removes exactly half: 2 of the 4 remain, and they are the qubit's 0 and 1 (checked numerically for two qubits: after the constraint 4 = 2 × 2 dimensions remain).
为什么是四个。在这种写法里每个泡利都是两个半座位的乘积:X = i bx c,Y = i by c,Z = i bz c。三个泡利共用 c,各配一个自己的 b,所以需要 1 + 3 = 4 个半座位。把一条 XX 边的两端相乘,Xu Xv = (i bux cu)(i bvx cv),重新排一下顺序,就分成了上图的两对:两个 bx 一对,两个 c 一对。重排时半座位每交换一次相邻位置就出一个负号(半座位之间也有 1.1 节那种符号账),数下来多出一个整体的 −1,这就是正文里「差一个整体负号」的来源。
Why four. In this representation every Pauli is a product of two half-seats: X = i bx c, Y = i by c, Z = i bz c. The three Paulis share c and each has its own b, so 1 + 3 = 4 half-seats are needed. Multiply the two ends of an XX edge, Xu Xv = (i bux cu)(i bvx cv), reorder, and it splits into the two pairs of the figure: the two bx together, the two c together. Each time two half-seats trade adjacent places during the reordering a minus sign appears (half-seats keep a sign ledger like the one of 1.1), and the count leaves one overall −1: that is the “up to an overall sign” in the main text.
规范变量。记 guv = i bux bvx(上图的虚线)。它平方等于 1,所以只取 ±1。它只含 b,而每条检查按上式是「某个 g 乘一对 c」;两对没有共同半座位的乘积可以随意交换顺序,所以 guv 和所有检查都对易,测检查不会改变它。于是可以把每个 g 当成一个固定的 ±1,这就是正文说「规范变量可以视为常数」的意思。但单个 g 的值本身没有物理意义:约束 Du 在保留下来的状态上等于 1,是「什么都不做」,可它会把比特 u 的三条边上的 g 值同时变号(也把 cu 那一对变号,所以检查本身不变)。一个值能被「什么都不做」改掉,就只是一个记账约定,这种变量叫规范变量。什么是真的?绕一个六边形把六个 g 乘起来:每个顶点恰有两条边在这个六边形上,Du 翻两个号,(−1)² = +1,乘积不变。这个乘积就是卡片里的 plaquette flux(面通量),「gauge-invariant products」说的就是它。
The gauge variable. Write guv = i bux bvx (the dashed line in the figure). It squares to 1, so it takes only ±1. It contains only b's, while every check is, by the formula, “some g times a pair of c's”; two pairs with no half-seat in common can be multiplied in either order, so guv commutes with every check and measuring checks never changes it. So each g can be treated as a fixed ±1: that is what the main text means by “the gauge variable may be treated as a constant”. The value of a single g has no physical meaning, though. The constraint Du equals 1 on the kept states, so applying it “does nothing”, yet it flips the sign of the g on all three edges at qubit u (and of the c-pairs there, so the checks themselves are unchanged). A value that “doing nothing” can change is only a bookkeeping convention; such a variable is called a gauge variable. What is real? Multiply the six g's around a hexagon: each vertex has exactly two of its edges on that hexagon, Du flips two signs, (−1)² = +1, and the product is unchanged. That product is the card's plaquette flux; “gauge-invariant products” refers to it.
每一条用到的等式(Du 与 guv、与 c 对反对易,与检查对易;guv 与同一条边上 YY、ZZ 检查对易;泡利乘法 XY = iZ 在约束后成立)都在两个比特、八个半座位的矩阵模型里逐一数值核对过。半座位本身满足的代数(每个自乘为 1、两两反对易)本篇不推导。
Every identity used here (Du anticommutes with guv and with the c-pair and commutes with the check; guv commutes with the YY and ZZ checks on the same edge; the Pauli product XY = iZ holds after the constraint) was checked numerically in a matrix model of two qubits, eight half-seats. The algebra the half-seats themselves obey (each squares to 1, any two anticommute) is not derived here.
半座位 γ 满足什么代数(每个自乘为 1、两两反对易),以及由此出发怎样严格推出上面那一行,需要大学水平的算符代数,本篇不推导;补课里只数了状态、说了为什么是四个和规范变量是什么。你需要带走的只有:一个座位 = 一对半座位;蜂窝码的每条两比特检查 = 一个固定的 ±1 × 一次「问某一对 c 半座位是空是满」;换轮次 = 换配对。这是 QEC-Bank 卡片里的「fermionic 视图」在人话里的全部内容。
What algebra the half-seats γ obey (each squares to 1, any two anticommute), and how the line above follows rigorously from it, needs university-level operator algebra and is not derived here; the catch-up only counts states and says why there are four and what a gauge variable is. Carry away only: one seat = one pair of half-seats; every two-qubit honeycomb check = a fixed ±1 × one “is a certain pair of c half-seats empty or taken”; changing rounds = changing the pairing. That is the whole content, in plain words, of the “fermionic view” on the QEC-Bank card.
1.3编译器:同一份配方,两种语言The compiler: one recipe, two languages
现在把「算一次两个比特的奇偶」这份配方用两种语言各写一遍。量子比特语言(第 0 章事实 1):准备一个辅助比特置 0;CNOT(比特 1 → 辅助);CNOT(比特 2 → 辅助);测辅助比特,读出 n₁ + n₂ 的奇偶。三个比特、两个两比特门、一次测量。这是假定芯片只提供单比特门、CNOT 和单比特测量时的一种实现,不是量子比特本身的要求。费米子语言:座位 1 和座位 2「合计有几个人」的奇偶,本来就是一个可以直接问的问题——在能直接测「一对座位的合计」的硬件上,这份配方就是一次测量,不需要辅助比特也不需要 CNOT。QEC-Bank 蜂窝码卡片的 realizations 字段登记了这样一种硬件设想(原文):platform “Majorana-tetron parity-measurement architecture”,status proposed,“Native pair-parity measurements and planar layouts were simulated with Majorana-specific faults. This is an architecture and decoder study, not a laboratory realization of a logical honeycomb memory.”——proposed(设想),不是 demonstrated(已演示)。卡片为这一条引用的两篇论文说的也是设想:Karzig 等人(arXiv:1610.05289)提出由四个或更多马约拉纳零模组成比特、只靠测量操作的架构设计;Paetznick 等人(arXiv:2202.11829)说明 Floquet 码只用两比特测量,适合「能直接实现两比特测量」的平台,例如基于马约拉纳零模的只测量拓扑比特,并在这种架构上给出不用辅助比特的测量序列和数值模拟。所以「一次测量」是这种硬件的能力,前提是硬件造得出来,不是费米子写法自带的。
Now write the recipe “compute the parity of two qubits” in each language. Qubit language (fact 1 of Chapter 0): prepare a helper qubit at 0; CNOT (qubit 1 → helper); CNOT (qubit 2 → helper); measure the helper, read the parity of n₁ + n₂. Three qubits, two two-qubit gates, one measurement. This is one implementation, assuming a chip that offers only single-qubit gates, CNOTs and single-qubit measurement; it is not something qubits as such require. Fermion language: the parity of “how many people in seats 1 and 2 together” is a question that can be asked directly; on hardware that can measure “the total of a pair of seats” natively, the recipe is one measurement, no helper, no CNOT. The realizations field of the QEC-Bank honeycomb card registers such a hardware proposal (verbatim): platform “Majorana-tetron parity-measurement architecture”, status proposed, “Native pair-parity measurements and planar layouts were simulated with Majorana-specific faults. This is an architecture and decoder study, not a laboratory realization of a logical honeycomb memory.”: proposed, not demonstrated. The two papers the card cites for this entry also describe proposals: Karzig et al. (arXiv:1610.05289) present architecture designs whose qubits are built from four or more Majorana zero modes and are operated by measurements only; Paetznick et al. (arXiv:2202.11829) note that Floquet codes use only two-qubit measurements, which suits platforms “where two-qubit measurements can be implemented directly, such as measurement-only topological qubits based on Majorana zero modes”, and give measurement sequences without auxiliary qubits plus simulations for that architecture. So “one measurement” is a capability of that hardware, if it can be built, and not something the fermionic notation brings with it.
同一份配方,两种写法,两种成本。把一种写法自动翻成另一种、并且保证意思不变、还能数出成本的程序,叫编译器compiler:把用一种语言写的程序翻译成另一种语言、保证语义不变的程序。日常例子:把人读的高级语言翻成机器指令。这里是把量子比特的电路翻成费米子/马约拉纳的操作,或反过来。。「费米子编译器」就是:输入一份量子比特语言的电路(或 QEC-Bank 的一张测量时间表),输出等价的费米子语言的操作序列——或者反过来。人话:QEC-Bank 已经会用量子比特的语言描述每个码;这道题要它学会第二种语言,并且会翻译。
One recipe, two spellings, two costs. A program that translates one spelling into the other automatically, guarantees the meaning is unchanged, and can count the cost, is a compilerA program that translates a program written in one language into another while preserving its meaning. Everyday example: turning a human-readable high-level language into machine instructions. Here: turning a qubit circuit into fermionic/Majorana operations, or back.. A “fermionic compiler” is: input a circuit in the qubit language (or a QEC-Bank measurement schedule), output the equivalent sequence of operations in the fermion language, or the reverse. In plain words: the QEC-Bank already describes every code in the language of qubits; this item asks it to learn a second language, and to translate.
1.4ZX 图:线、两种颜色的点、几条改写规则(只描述)ZX diagrams: wires, two colours of dots, a few rewrite rules (described only)
Wanted 板的 statement 说这台编译器「很可能」和另一种东西有相同的计算内容:ZX 图ZX diagram / ZX-calculus:一种画电路的图形语言。线是量子比特,点分两种颜色(Z 型与 X 型),点上可以标一个角度;配有一小组改写规则,规则改写前后的图表示同一个操作。。ZX 图是一种画电路的图形语言:一根线是一个量子比特随时间的轨迹;线上的点分两种颜色——Z 型(本篇按 QEC-Bank 的配色画成蓝)和 X 型(橙)——一个点可以连任意多根线,还可以标一个角度;然后有一小组改写规则,规则两边的图代表同一个操作。最基本的一条叫「融合」:两个同色的点用线连着,可以合成一个点,角度相加。下图画了两个例子,不做任何推导:
The Wanted statement says this compiler “plausibly” has the same computational content as something else: ZX diagramsZX diagram / ZX-calculus: a graphical language for drawing circuits. Wires are qubits, dots come in two colours (Z type and X type) and may carry an angle; a small set of rewrite rules says which diagrams denote the same operation.. A ZX diagram is a graphical language for circuits: a wire is one qubit's track through time; the dots on wires come in two colours, Z type (drawn blue here, following the QEC-Bank palette) and X type (amber); a dot may join any number of wires and carry an angle; and there is a small set of rewrite rules whose two sides denote the same operation. The most basic is “fusion”: two dots of the same colour joined by a wire merge into one, angles adding. The figure shows two examples, deriving nothing:
记号:t = 时间,线从左到右;α、β = 点上标的角度(希腊字母,读「阿尔法、贝塔」),本篇不用它们的具体值。ZX 教科书里 Z 点是绿色、X 点是红色,本篇按 QEC-Bank 的配色用蓝与橙。
Notation: t = time, wires run left to right; α, β = angles on the dots (Greek letters, read “alpha, beta”), whose values this guide never uses. ZX textbooks draw Z dots green and X dots red; this guide follows the QEC-Bank palette with blue and amber.
一个点做什么?只看最简单的情形(角度为 0),在 0/1 上逐个试就能读出来。Z 点(蓝)进一根线、出两根线:进来 0,两根出线都是 0;进来 1,两根都是 1。它把 0/1 的值复制一份。X 点(橙)进两根线、出一根线:出来的是两根进线的奇偶,a + b mod 2(0+0→0,0+1→1,1+0→1,1+1→0),也就是一次奇偶检查。现在读左图:控制比特的值 a 在蓝点被复制一份,顺着竖线送到橙点;橙点把它和目标比特的值 b 加起来,输出 a + b mod 2。控制比特不变、目标比特翻转当且仅当 a = 1,这正是 CNOT(整张图比 CNOT 多一个不影响结果的常数因子 √2,四种输入都在本页配套的矩阵核对里算过)。点上的角度 α 只在「进来 1」时给状态乘上一个相位 eiα,本篇不需要它。
What does a dot do? Take the simplest case (angle 0) and try 0 and 1 one at a time. A Z dot (blue) with one wire in and two out: 0 in gives 0 on both outputs, 1 in gives 1 on both. It copies the 0/1 value. An X dot (amber) with two wires in and one out outputs the parity of its inputs, a + b mod 2 (0+0→0, 0+1→1, 1+0→1, 1+1→0): a parity check. Now read the left figure: the control's value a is copied at the blue dot and sent down the vertical wire to the amber dot, which adds it to the target's value b and outputs a + b mod 2. The control is unchanged and the target flips exactly when a = 1: that is the CNOT (the diagram equals the CNOT times a harmless constant factor √2; all four inputs were checked in a matrix computation for this page). An angle α on a dot only multiplies the state by a phase eiα when the input is 1; this guide does not need it.
为什么 QEC-Bank 关心 ZX:设计文档 3.2 节把它定为「跨模型的桥」(原文:“ZX diagram — the cross-model bridge: circuit-based, measurement-based, fusion-based, and Floquet pictures are local-equivalence flavors of one underlying ZX object (Bombin–Litinski–Nickerson–Pastawski–Roberts, arXiv:2303.08829). CSS codes auto-generate phase-free ZX; long-term target semantics for schedule-equivalence checking.”)。也就是说,QEC-Bank 打算让各种「写法」——电路、测量、蜂窝码那样一轮轮的时间表——都翻成 ZX 图,再用改写规则判断两张图是不是同一回事(本系列另一篇 《两张测量时间表是不是同一回事》专讲这件事)。Wanted 板这道题的猜想是:费米子语言与 ZX 语言表达力相当——凡是能用 ZX 图画的,都能用半座位配对写出来,反之亦然。如果猜想成立,一部「ZX ↔ 费米子」的词典就把费米子语言也接上了这座桥。
Why the QEC-Bank cares about ZX: the design document, section 3.2, fixes it as “the cross-model bridge” (verbatim: “ZX diagram — the cross-model bridge: circuit-based, measurement-based, fusion-based, and Floquet pictures are local-equivalence flavors of one underlying ZX object (Bombin–Litinski–Nickerson–Pastawski–Roberts, arXiv:2303.08829). CSS codes auto-generate phase-free ZX; long-term target semantics for schedule-equivalence checking.”). That is, the QEC-Bank intends to translate every “spelling”, circuits, measurements, round-by-round schedules like the honeycomb's, into ZX diagrams and then use the rewrite rules to decide whether two diagrams are the same thing (another guide in this series, “Are two measurement schedules the same thing?”, is devoted to it). The conjecture behind this Wanted item: the fermion language and the ZX language are equally expressive; whatever can be drawn as a ZX diagram can be written as half-seat pairings, and vice versa. If so, a “ZX ↔ fermionic” dictionary connects the fermion language to that bridge too.
1.5Wanted 板的原文The board, verbatim
fermionic-compiler · “Fermionic compiler / ZX-fermion translator” · status: open · difficulty: open-research
“Compilation in the unified Majorana/parton/quon representation (spec 3.2: one 'fermionic' type, dialects majorana-pairs|parton|quon). Plausibly the same computational content as ZX compilation. First deliverable: a formal ZX <-> fermionic dictionary.”
fermionic-compiler · “Fermionic compiler / ZX-fermion translator” · status: open · difficulty: open-research
“Compilation in the unified Majorana/parton/quon representation (spec 3.2: one 'fermionic' type, dialects majorana-pairs|parton|quon). Plausibly the same computational content as ZX compilation. First deliverable: a formal ZX <-> fermionic dictionary.”
逐词翻译。Compilation:1.3 节的翻译。the unified Majorana/parton/quon representation:三个名字、一种表示。majorana-pairs方言一:直接用「半座位配对」写;Floquet 码(蜂窝码一类)的常用写法。 是 1.2 节的半座位配对;parton方言二:把每个自旋拆成若干「部分子」(parton)——就是四个半座位加规范变量的写法;蜂窝码卡片用的正是这一种。yaml 引用 arXiv:1703.02973。(部分子)是把每个自旋拆成若干零件的写法,蜂窝码卡片的 dialect 字段填的正是它;quon方言三:把码画成「量子化的图」,检查变成图上的圈算符。yaml 引用 arXiv:1910.12065(QEC-Bank 登记键 liu2019quantized,“Quantized Graphs and Quantum Error Correction”)。 是把码画成一张「量子化的图」的写法。设计文档 3.2 节的决定原文:“the Majorana-pair picture of Floquet codes, the parton construction (Hsieh–Halász, arXiv:1703.02973), and the quon/quantized-graph language (Liu, arXiv:1910.12065) are the same underlying representation under different names — recorded as one type fermionic with dialect: majorana-pairs | parton | quon”。spec 3.2:就是这份设计文档的 3.2 节。Plausibly the same computational content as ZX compilation:1.4 节末尾的猜想,注意「plausibly」(很可能)——这是一个尚未证明的判断。First deliverable: a formal ZX <-> fermionic dictionary:第一份交付物不是编译器本身,而是一部形式化的(机器可核对的)双向词典:ZX 的每个基本图元对应费米子语言的什么,改写规则对应什么恒等式。人话:先别造翻译机,先把词典编出来,而且词典的每一条都要能被机器核对。
Word by word. Compilation: the translation of 1.3. the unified Majorana/parton/quon representation: three names, one representation. majorana-pairsDialect one: write directly in “half-seat pairings”; the usual spelling for Floquet codes such as the honeycomb. is the half-seat pairing of 1.2; partonDialect two: split each spin into several “partons”, which is the four-half-seats-plus-gauge-variable spelling; the honeycomb card uses exactly this one. The yaml cites arXiv:1703.02973. splits each spin into several parts, and is what the honeycomb card's dialect field says; quonDialect three: draw the code as a “quantized graph”, checks becoming cycle operators on the graph. The yaml cites arXiv:1910.12065 (QEC-Bank key liu2019quantized, “Quantized Graphs and Quantum Error Correction”). draws the code as a “quantized graph”. The design document's decision, section 3.2, verbatim: “the Majorana-pair picture of Floquet codes, the parton construction (Hsieh–Halász, arXiv:1703.02973), and the quon/quantized-graph language (Liu, arXiv:1910.12065) are the same underlying representation under different names — recorded as one type fermionic with dialect: majorana-pairs | parton | quon”. spec 3.2: section 3.2 of that design document. Plausibly the same computational content as ZX compilation: the conjecture at the end of 1.4; note “plausibly”, an unproven judgement. First deliverable: a formal ZX <-> fermionic dictionary: the first deliverable is not the compiler itself but a formal (machine-checkable) two-way dictionary: what each basic ZX element corresponds to in the fermion language, and which identities the rewrite rules correspond to. In plain words: do not build the translating machine yet; write the dictionary first, and make every entry machine-checkable.
QEC-Bank 现在是怎么凑合的:四个条目,三种方言,一个词How the QEC-Bank copes today: four entries, three dialects, one word
没有编译器,QEC-Bank 就只能让人把每个条目的「费米子视图」用文字写一段,注明出处,标上 curated。这一章看真实的数据:蜂窝码条目的整架表示阶梯上哪些是机器算的、哪些是人写的;四个带费米子视图的条目各用哪种方言;以及条目自己的推导页是怎样承认这件事的。 Without a compiler, the QEC-Bank can only have a person write a paragraph for each entry's “fermionic view”, cite a source, and mark it curated. This chapter looks at the real data: which rungs of the honeycomb entry's representation ladder are machine-computed and which hand-written; which dialect each of the four entries with a fermionic view uses; and how the entry's own derivation page admits it.
“Curated per-entry fermionic notes only (refs arXiv:1703.02973, arXiv:1910.12065).”
“Curated per-entry fermionic notes only (refs arXiv:1703.02973, arXiv:1910.12065).”
逐词。Curated:人工整理——由人读论文、写成一段话;QEC-Bank 证据词表里与它相对的是 derived(机器从数据算出)。per-entry:一个条目一段,条目之间互不相通。fermionic notes:卡片 views 字段里 type 为 fermionic 的那条记录(1.2 节引过蜂窝码的那条)。only:除此之外什么都没有——没有程序、没有统一语法、没有翻译。refs:两篇论文,1910.12065 已登记为 liu2019quantized,1703.02973 尚未登记(据条目记载,登记待补)。人话:今天 QEC-Bank 里的「费米子视图」是四段人写的笔记,机器读不懂、也不会检查它们是否一致。
Word by word. Curated: assembled by hand, a person read the papers and wrote a paragraph; in the QEC-Bank vocabulary its opposite is derived (computed by the machine from data). per-entry: one paragraph per entry, with no connection between entries. fermionic notes: the record of type fermionic in the card's views field (the honeycomb one quoted in 1.2). only: nothing else exists, no program, no common syntax, no translation. refs: two papers, 1910.12065 registered as liu2019quantized, 1703.02973 not yet registered (cited by the entry, registration pending). In plain words: today the QEC-Bank “fermionic view” is four hand-written notes the machine can neither read nor check for consistency.
2.1蜂窝码的整架阶梯:一条 derived,一条 canonical,六条 curatedThe honeycomb's whole ladder: one derived, one canonical, six curated
先认识主角。honeycomb 是这道题 related 里唯一的条目,卡片 description 原文:“A period-three dynamical stabilizer memory made only from weight-two Pauli measurements on a honeycomb torus. Edge operators are fixed as XX, YY, or ZZ by direction, while a plaquette three-coloring partitions them into three perfect-matching rounds. The code is the ordered schedule and its outcome-dependent instantaneous stabilizer group, not any one static set of mutually commuting edge checks; after startup that group carries two toric-code logical qubits.” 人话:它只测两比特的检查(XX、YY 或 ZZ,由边的方向决定),分三轮轮流测;「码」是这张时间表,不是某一份固定的检查清单;跑起来之后存 2 个逻辑比特,和环面码一样(第 0 章事实 4)。instances.yaml 登记两个实例:L3x3(n = 18 verified,k = 2 verified)与 L6x6(n = 72 verified,k = 2 verified);两者的 d 在条目页上都显示 d = ?(那是本系列另一篇 《检查每一轮都在变,码距该怎么数》的题目)。
Meet the protagonist first. honeycomb is the only entry in this item's related list; its card description verbatim: “A period-three dynamical stabilizer memory made only from weight-two Pauli measurements on a honeycomb torus. Edge operators are fixed as XX, YY, or ZZ by direction, while a plaquette three-coloring partitions them into three perfect-matching rounds. The code is the ordered schedule and its outcome-dependent instantaneous stabilizer group, not any one static set of mutually commuting edge checks; after startup that group carries two toric-code logical qubits.” In plain words: it measures only two-qubit checks (XX, YY or ZZ, fixed by edge direction), in three rounds taken in turn; the “code” is that schedule, not any fixed check list; once running it stores 2 logical qubits, like the toric code (fact 4 of Chapter 0). instances.yaml registers two instances: L3x3 (n = 18 verified, k = 2 verified) and L6x6 (n = 72 verified, k = 2 verified); both show d = ? on the entry page (the subject of another guide in this series, “When the checks change every round, how do you count distance?”).
卡片的 views 字段登记了八种表示,每条带一个 rung(阶梯层级)、一个 type 和一个 origin。下表按卡片顺序逐字列出 type 与 origin 的 kind:
The card's views field registers eight representations, each with a rung, a type and an origin. The table lists type and origin kind verbatim, in card order:
| rung | type | origin | 人话In plain words |
|---|---|---|---|
| R1 | steady-isg-checks | derived · converter “honeycomb.build Schedule -> ISGTracker steady snapshot” · version v1 | 某一轮之后的检查清单,机器从时间表算出,带程序名和版本。The check list after some round, computed by the machine from the schedule, with program name and version. |
| R3 | schedule-isg | canonical | 三轮的时间表本身——这个码的定义。The three-round schedule itself: the code's definition. |
| R2 | instantaneous-toric | curated · hastings2021dynamically | 每一轮之后,把刚测过的每条边的两个比特并成一个有效比特,再在每个有效比特上各做一次基变换(只动一个比特的操作),此刻有效的检查清单就变成一个较粗格子上的环面码(卡片原文 “locally Clifford-equivalent to a toric code”)——人从论文整理。After each round, merge the two qubits of every just-measured edge into one effective qubit and apply a change of basis on each effective qubit separately (an operation touching one qubit at a time); the checks in force then become a toric code on a coarser lattice (card: “locally Clifford-equivalent to a toric code”). Assembled by a person from the paper. |
| R3 | spacetime-detector | curated · blackwell2025distance | 「探测器」画法:探测器是几次测量结果(常常是同一个量在不同轮次的结果)的乘积,没出错时它必然是 +1,变成 −1 就报告附近出过错;这张图说明哪些错会点亮哪些探测器。The “detector” picture: a detector is a product of a few measurement outcomes (often the same quantity at different rounds) that is certainly +1 when nothing went wrong, so a −1 reports a nearby fault; this view says which faults light up which detectors. |
| R5 | fermionic · dialect: parton | curated · kitaev2006anyons · gap → wanted:fermionic-compiler | 1.2 节引的那段;唯一带 gap 字段、指向本题的记录。The paragraph quoted in 1.2; the only record carrying a gap field, pointing at this item. |
| R5 | anyon-automorphism | curated · aasen2022automorphism | 跑完一个周期,两种「粒子」的标签互换。这里的粒子(anyon,任意子)指环面码里违反检查留下的两类缺陷:违反 X 型检查的一类和违反 Z 型检查的一类。After one full period the two “particle” labels are exchanged. The particles (anyons) are the two kinds of defect a violated check leaves in a toric code: one kind for violated X-type checks, one for violated Z-type checks. |
| R5 | measurement-qca | curated · aasen2023mqca | 把周期测量看成一种元胞自动机:一种处处用同一条局部规则、按节拍更新整个格子的机器(这里的「更新」由测量完成)。The periodic measurements viewed as a cellular automaton: a machine that updates the whole lattice in time steps by one local rule applied everywhere (here the update is done by measurements). |
| R5 | zx-spacetime | curated · bombin2024zx | 整段测量历史画成一张 ZX 图(1.4 节)。The whole measurement history drawn as one ZX diagram (1.4). |
数一数:8 条里 1 条 derived(机器算的,附程序名 honeycomb.build 与版本 v1)、1 条 canonical(定义本身)、6 条 curated(人写的)。R5 这一层——设计文档叫「跨模型视图」——的 4 条全部是 curated,其中费米子那条还是全表唯一带 gap 字段的:卡片自己承认这里有个洞,并把洞指向本题。QEC-Bank 的条目页照此渲染:在蜂窝码「表示阶梯」页的 R5 一栏,fermionic 记录旁边是一个 “curated from kitaev2006anyons” 的标签和一个 “Open machine-derivation problem →” 的链接,点过去就是 Wanted 板的这一项。人话:QEC-Bank 会算「这一轮的检查清单」,不会算「这个码的费米子写法」;后者是抄来的,而且卡片上写明了是抄来的。
Count: of 8 records, 1 derived (machine-computed, with program name honeycomb.build and version v1), 1 canonical (the definition itself), 6 curated (hand-written). All 4 records on rung R5, which the design document calls “cross-model views”, are curated, and the fermionic one is the only record in the whole table with a gap field: the card admits a hole here and points the hole at this item. The QEC-Bank entry pages render it accordingly: in the R5 row of the honeycomb “Representation ladder” page, the fermionic record carries a “curated from kitaev2006anyons” chip and an “Open machine-derivation problem →” link that leads to this item on the Wanted board. In plain words: the QEC-Bank can compute “this round's check list”; it cannot compute “this code's fermionic spelling”; the latter is copied, and the card says so.
2.2四个条目,三种方言,四个 curatedFour entries, three dialects, four curated
蜂窝码不是唯一带费米子视图的条目。对 codes/*/card.yaml 搜索 “type: fermionic”(2026-09-12),恰有四个条目命中,三种方言都出现了:
The honeycomb is not the only entry with a fermionic view. A search of codes/*/card.yaml for “type: fermionic” (2026-09-12) hits exactly four entries, and all three dialects appear:
| 条目Entry | dialect | origin | gap | 这段笔记说的是什么(人话)What the note is about (plain words) |
|---|---|---|---|---|
| honeycomb | parton | curated · kitaev2006anyons | wanted:fermionic-compiler | 四个半座位表示一个自旋;换轮次 = 换配对(1.2 节)。Four half-seats per spin; changing rounds = re-pairing (1.2). |
| steane | majorana-pairs | curated · bravyi2010majorana | wanted:fermionic-compiler | 原文:“The CSS-to-Majorana dictionary maps a single odd-length Steane block to a formal half-integer Majorana encoding; two copies are needed for an ordinary Majorana code…” ——一部把 CSS 码翻成马约拉纳码的词典,附一条「奇数长度要两份」的注意事项。Verbatim: “The CSS-to-Majorana dictionary maps a single odd-length Steane block to a formal half-integer Majorana encoding; two copies are needed for an ordinary Majorana code…”: a dictionary from CSS codes to Majorana codes, with a caveat that odd length needs two copies. |
| surface | quon | curated · liu2019quantized | wanted:fermionic-compiler | 原文:“The toric bulk underlying the planar patch becomes a quantized graph: star and plaquette checks are unified as cycle operators…” ——把环面码画成一张量子化的图,星与面统一成图上的圈。Verbatim: “The toric bulk underlying the planar patch becomes a quantized graph: star and plaquette checks are unified as cycle operators…”: the toric code drawn as a quantized graph, stars and plaquettes unified as cycles on it. |
| toric | majorana-pairs | curated · bravyi2018coherent | wanted:fermionic-compiler | 原文:“Under restricted coherent-noise channels the correction calculation can be mapped to free Majorana fermions and simulated efficiently. This is a channel-specific algorithmic dictionary…” ——一部只对特定噪声有效的「算法词典」,让模拟变快。Verbatim: “Under restricted coherent-noise channels the correction calculation can be mapped to free Majorana fermions and simulated efficiently. This is a channel-specific algorithmic dictionary…”: an “algorithmic dictionary” valid only for specific noise, making simulation fast. |
四条记录,四个 curated,四个 gap 都指向本题;四个条目的「表示阶梯」页上各有一个 “Open machine-derivation problem →” 链接。注意表里的四段笔记说的不是同一件事:一段讲怎样把自旋拆成半座位(honeycomb),一段讲怎样把整个码翻成马约拉纳码(steane),一段讲怎样画成图(surface),一段讲怎样加速模拟(toric)。它们用三种方言写成,彼此之间没有任何机器能核对的对应关系——这正是 statement 里「unified」(统一)这个词今天还只是一个决定而不是一个事实的原因(4.3 节)。
Four records, four curated, four gaps all pointing at this item; each of the four entries' “Representation ladder” pages carries an “Open machine-derivation problem →” link. Note that the four notes are not about the same thing: one on splitting spins into half-seats (honeycomb), one on translating a whole code into a Majorana code (steane), one on drawing it as a graph (surface), one on speeding up simulation (toric). They are written in three dialects with no machine-checkable correspondence among them, which is exactly why “unified” in the statement is today a decision rather than a fact (4.3).
2.3条目自己怎么说In the entry's own words
蜂窝码条目的推导页 codes/honeycomb/pedagogy/representation-dictionary.md 在「Majorana / parton gauge theory」一节的 QEC-Bank status 里写(原文):“There is no generic fermionic compiler in the repository, so this view is not machine-derived.” 同一页末尾有一张「来源 → 目标 → 状态」的账本,其中一行:“spin Paulis | Majorana gauge variables | curated dictionary”,并解释这张账本的目的是 “prevents a derived rank from lending machine certainty to a curated conversion farther down the chain” —— 防止上游机器算出的秩(R1 的 derived)把「机器的确定性」借给下游人写的换算。人话:条目自己知道费米子那一栏是人写的,并且专门立了一张账本,防止读者把它误当成机器算的。
The honeycomb entry's derivation page codes/honeycomb/pedagogy/representation-dictionary.md writes under QEC-Bank status in its “Majorana / parton gauge theory” section (verbatim): “There is no generic fermionic compiler in the repository, so this view is not machine-derived.” The same page ends with a “source → target → status” ledger containing the row “spin Paulis | Majorana gauge variables | curated dictionary”, and explains the ledger's purpose as “prevents a derived rank from lending machine certainty to a curated conversion farther down the chain”: it stops a machine-computed rank upstream (the derived R1) from lending “machine certainty” to a hand-written conversion downstream. In plain words: the entry knows its fermionic column is hand-written, and keeps a ledger precisely so readers do not mistake it for machine output.
为什么我们想要答案:把 curated 变成 derived,把设想变成可算的成本Why we want the answer: turn curated into derived, and proposals into countable costs
why_it_matters 只有一句话,说了两件事:让费米子视图由机器推导;为 Floquet 码打开「马约拉纳原生」的编译。这一章把两件事各落到卡片的具体字段上,再说今天的 QEC-Bank 用户做不到什么。 why_it_matters is one sentence saying two things: make the fermionic view machine-derived; open “Majorana-native” compilation for Floquet codes. This chapter pins each to concrete card fields, then says what a QEC-Bank user cannot do today.
“Makes the fermionic view machine-derived instead of fully curated; opens Majorana-native compilation for Floquet codes.”
“Makes the fermionic view machine-derived instead of fully curated; opens Majorana-native compilation for Floquet codes.”
3.1第一件事:curated → derivedFirst: curated → derived
2.1 节的表里已经有一个榜样:R1 那条 steady-isg-checks,origin 是 kind: derived, converter: "honeycomb.build Schedule -> ISGTracker steady snapshot", version: "v1"——机器从时间表算出检查清单,并记下用的是哪个程序的哪个版本。一台费米子编译器会让 R5 的费米子记录长成同样的样子:
The table of 2.1 already contains a model: the R1 record steady-isg-checks, whose origin is kind: derived, converter: "honeycomb.build Schedule -> ISGTracker steady snapshot", version: "v1"; the machine computed the check list from the schedule and recorded which program and version it used. A fermionic compiler would let the R5 fermionic record take the same shape:
| # | 今天Today | 有了编译器之后With a compiler |
|---|---|---|
| 1 | origin.kind: curated, ref: kitaev2006anyons,一段人写的英文。origin.kind: curated, ref: kitaev2006anyons, one hand-written English paragraph. | origin.kind: derived + converter / version,外加一份机器生成的费米子写法(哪些半座位、哪一轮配哪对),任何人可以重跑。origin.kind: derived + converter / version, plus a machine-generated fermionic spelling (which half-seats, which pairs in which round) anyone can re-run. |
| 2 | gap: {target: wanted:fermionic-compiler},条目页上的 “Open machine-derivation problem →”。gap: {target: wanted:fermionic-compiler}, the “Open machine-derivation problem →” on the entry page. | gap 字段消失;四个条目页上的四个链接一起消失。The gap field disappears; so do the four links on the four entry pages. |
| 3 | 四段方言不同的笔记,机器无法比较。Four notes in different dialects, incomparable by machine. | 四段都由同一部词典翻出,方言之间可以互译;「steane 的马约拉纳写法」和「honeycomb 的部分子写法」变成同一种数据的两个输出。All four produced by one dictionary, dialects mutually translatable; “steane in Majorana” and “honeycomb in partons” become two outputs of the same data. |
| 4 | 推导页账本:“spin Paulis | Majorana gauge variables | curated dictionary”。Derivation-page ledger: “spin Paulis | Majorana gauge variables | curated dictionary”. | 同一行的第三栏改成 derived;账本存在的理由(防止机器确定性被「借用」)不再需要。The third column of that row becomes derived; the ledger's reason for existing (stopping machine certainty from being “borrowed”) is no longer needed. |
3.2第二件事:为 Floquet 码打开马约拉纳原生的编译Second: open Majorana-native compilation for Floquet codes
Floquet 码Floquet code:检查清单按固定周期一轮轮变化的码;蜂窝码是最早的例子(周期三轮)。名字来自研究周期性系统的数学家 Floquet。是检查清单按周期变化的码,蜂窝码是它的代表。它只用两比特的检查,而 1.3 节说过,「问一对座位的合计」恰好是马约拉纳硬件设想中原生(native,硬件直接提供)的操作。蜂窝码卡片的 fit.platforms 字段把 majorana-parity-measurement 列在第一位,realizations 字段里那条马约拉纳架构的状态是 proposed。今天缺的一环:QEC-Bank 存的是量子比特语言的时间表(R3 canonical),要在马约拉纳硬件上跑,得有人手工把每一轮的 XX/YY/ZZ 翻成「测哪几个半座位」(tetron 是设想中的一种马约拉纳量子比特,一个比特由四个半座位组成;在这种硬件上,一次 XX/YY/ZZ 测量是一次同时涉及四个半座位的奇偶测量),再手工数成本。编译器把这一步变成机器的事:输入 R3 的时间表,输出马约拉纳语言的操作序列和成本。这样卡片上才能出现「同一个码,两种硬件语言,各自的成本」这样可比的数字——而不是一个 proposed 加一段文字。人话:蜂窝码天生适合费米子硬件,但 QEC-Bank 今天没有工具把它翻成那种硬件听得懂的话。
A Floquet codeA code whose check list changes round by round with a fixed period; the honeycomb code is the earliest example (period three). Named after Floquet, the mathematician of periodic systems. is a code whose check list changes periodically, and the honeycomb is its representative. It uses only two-qubit checks, and as 1.3 said, “asking a pair of seats for their total” is exactly the operation that Majorana hardware proposals offer natively (directly provided by the hardware). The honeycomb card's fit.platforms field lists majorana-parity-measurement first, and the Majorana architecture in its realizations field has status proposed. The missing link today: the QEC-Bank stores the schedule in the qubit language (R3 canonical); to run it on Majorana hardware someone must hand-translate each round's XX/YY/ZZ into “which half-seats to measure” (a tetron is a proposed Majorana qubit made of four half-seats; on such hardware one XX/YY/ZZ measurement is a single parity measurement involving four half-seats) and count the cost by hand. A compiler makes that the machine's job: input the R3 schedule, output the Majorana-language operation sequence and its cost. Only then can the card show comparable numbers, “one code, two hardware languages, each with its cost”, instead of one proposed and a paragraph. In plain words: the honeycomb code is born for fermionic hardware, but the QEC-Bank today has no tool to translate it into words that hardware understands.
3.3今天的用户做不到什么What a user cannot do today
三件事。第一,要求 QEC-Bank 输出任何一个码的费米子写法。只有四个条目有人写过笔记;其余条目连笔记也没有,而且笔记不是写法。第二,核对两段方言不同的笔记是否说的是同一件事。steane 的 majorana-pairs 笔记与 honeycomb 的 parton 笔记之间没有任何可执行的对应;设计文档说三种方言「是同一种表示」,但这句话今天没有机器能验证。第三,在费米子语言里比较成本。「蜂窝码在马约拉纳硬件上一个周期要几次配对测量」这样的数字,卡片上没有,因为没有人算过、也没有程序能算。人话:QEC-Bank 今天能用一种语言完整描述蜂窝码,第二种语言只有几句人写的注释。
Three things. First, ask the QEC-Bank to output the fermionic spelling of any code. Only four entries have hand-written notes; the rest have none, and a note is not a spelling. Second, check whether two notes in different dialects say the same thing. There is no executable correspondence between steane's majorana-pairs note and honeycomb's parton note; the design document says the three dialects “are the same representation”, but no machine can verify that sentence today. Third, compare costs in the fermion language. A number like “how many pair-parity measurements per period for the honeycomb on Majorana hardware” is not on the card, because nobody has computed it and no program can. In plain words: the QEC-Bank can fully describe the honeycomb code in one language today; in the second language it has only a few hand-written remarks.
合格的答案长什么样,为什么难What a qualifying answer looks like, and why it is hard
statement 说得明确:第一份交付物是一部词典,不是编译器。这一章先说这部词典的一条词条长什么样、「formal」是什么意思,再解释为什么难度是 open-research——三个诚实的难点,每一个都回到 1.1 节那个负号或 2.2 节那三种方言。 The statement is explicit: the first deliverable is a dictionary, not a compiler. This chapter first says what one entry of that dictionary looks like and what “formal” means, then why the difficulty is open-research: three honest difficulties, each tracing back to the sign of 1.1 or the three dialects of 2.2.
4.1第一份交付物:一部词典的一条词条The first deliverable: one entry of a dictionary
日常词典的一条词条是「一个词 → 另一种语言里的对应词 + 用法」。这部词典的一条词条是:ZX 图的一个基本图元(一根线、一个带角度的 Z 点、一个 X 点、一个把 Z 点和 X 点互换角色的「换颜色」小方块,即哈达玛门 H)→ 费米子语言里的对应物(哪几个半座位、怎样配对、带什么符号)+ 一份证明,证明两边表示同一个操作。此外还要有规则的词条:ZX 的每条改写规则(比如 1.4 节的融合)对应费米子语言里的哪条恒等式,同样附证明。formal(形式化)的意思是:这些证明写成机器能逐行核对的形式,而不是论文里的一段话——就像本系列 《一张机器能核对的「没有更轻逻辑算符」证书》里「声明」与「证书」的区别。<->(双向):从 ZX 到费米子、从费米子到 ZX 都要能查。人话:合格的答案是一张两栏对照表,每行附一份机器能核对的证明,两个方向都能查。编译器(把整张图翻过去)是第二步,statement 没有把它列为第一份交付物。
An entry in an everyday dictionary is “one word → its counterpart in the other language + usage”. An entry in this dictionary is: one basic element of a ZX diagram (a wire, a Z dot with an angle, an X dot, a small “change colour” box that swaps the roles of Z and X dots, i.e. the Hadamard gate H) → its counterpart in the fermion language (which half-seats, how paired, with which sign) + a proof that both sides denote the same operation. There must also be rule entries: which identity in the fermion language each ZX rewrite rule (such as the fusion of 1.4) corresponds to, again with proof. formal means these proofs are written in a form a machine can check line by line, not as a paragraph in a paper, the distinction between “claim” and “certificate” of this series' “A machine-checkable certificate that nothing lighter exists”. <-> (two-way): lookups from ZX to fermionic and from fermionic to ZX must both work. In plain words: a qualifying answer is a two-column table, each row with a machine-checkable proof, consultable in both directions. The compiler (translating whole diagrams) is step two; the statement does not list it as the first deliverable.
4.2difficulty:open-research,因为「plausibly」difficulty: open-research, because of “plausibly”
Wanted 板给难度只有两个词。hard-engineering = 「知道怎么做,但要做很多」;open-research = 「没人知道怎么做」。这道题是 open-research,关键词是 statement 里的 plausibly:「ZX 编译与费米子编译有相同的计算内容」是一个很可能成立的判断,不是定理。一部双向词典存在的前提是两种语言表达力相当;如果某种 ZX 图元在费米子语言里没有对应物(或反过来),词典就有空行,编译器就翻不过去。今天没有人证明过两边相当,也没有人找到反例。人话:先要知道两种语言能不能互译,才谈得上怎么编词典;第一个问题今天还没有答案。
The Wanted board grades difficulty with two words only. hard-engineering = “known how, but much to do”; open-research = “nobody knows how”. This item is open-research, and the key word is plausibly in the statement: “ZX compilation and fermionic compilation have the same computational content” is a judgement that probably holds, not a theorem. A two-way dictionary presupposes that the two languages are equally expressive; if some ZX element has no counterpart in the fermion language (or the reverse), the dictionary has blank rows and the compiler cannot translate. Nobody has proved the two sides equivalent, and nobody has found a counterexample. In plain words: one must first know whether the two languages are inter-translatable before discussing how to write the dictionary; the first question has no answer today.
4.3三个诚实的难点Three honest difficulties
一、「统一」是一个决定,不是一个已证的事实。设计文档 3.2 节把三种方言记为同一种表示,用的词是 “(unified; decided)”——「决定」。同一段接着说这需要 “a curated correspondence note documenting the translation. (That unification note is itself a small research artifact of the QEC-Bank.)” —— 那份说明三种方言如何互译的对照笔记「本身就是一件小的研究成果」,也就是还没写出来。而设计文档 4.1 节的对照表对这一行的现状描述是:“Papers only (arXiv:1703.02973, 1910.12065; Floquet-Majorana folklore) — no tooling, no agreed common syntax”。没有工具,没有公认的统一语法。一部形式化词典需要两边各有一套固定的语法;ZX 有,费米子这边今天有三种方言、零套语法。
One: “unified” is a decision, not a proven fact. The design document, section 3.2, records the three dialects as one representation with the words “(unified; decided)”: decided. The same passage continues that this needs “a curated correspondence note documenting the translation. (That unification note is itself a small research artifact of the QEC-Bank.)”: the note explaining how the three dialects translate into one another “is itself a small research artifact”, that is, not yet written. And the comparison table in section 4.1 of the design document describes the state of this row as “Papers only (arXiv:1703.02973, 1910.12065; Floquet-Majorana folklore) — no tooling, no agreed common syntax”. No tooling, no agreed common syntax. A formal dictionary needs a fixed syntax on each side; ZX has one, the fermionic side today has three dialects and zero syntaxes.
二、那个负号让「局部」变得不局部。回到 1.1 节:费米子的每句话带一个正负号,取决于列举的顺序。常见的做法是固定一个顺序(比如按座位编号),那么「操作座位 j」的符号就会依赖于它前面所有座位的占据数——一个只碰一个座位的费米子操作,翻成量子比特语言会变成一条从 1 号一直拖到 j 号的长泡利串。手算一例:按座位编号的顺序记账,「请一个人坐进 3 号座位」这个操作的符号是 (−1)(1、2 号里有人的座位数),因为新来的人要排到前面每一位已坐者之后。对 |110⟩ 做,前面有 2 人,符号 +1,得 +|111⟩;对 |100⟩ 做,前面有 1 人,符号 −1,得 −|101⟩。同一个操作,符号由它没碰到的座位决定。翻成量子比特,就要在 1 号和 2 号比特上各放一个 Z 来读出这个符号(Z 在 1 上给 −1),于是变成 Z1Z2 再乘上 3 号比特上的「0 变 1」。这种翻译叫 Jordan–Wigner 变换,座位越靠后,拖的 Z 越长。这就是 1.1 节检查站里「中间有几个人会影响符号」的同一个现象。ZX 图的改写规则是局部的:只看图上相邻的几个点。一条局部的 ZX 规则翻到费米子那边可能带上一长串符号;一条局部的费米子恒等式翻到 ZX 那边可能变成一张跨越许多根线的图。词典的每一条都得处理这本符号账,而且要让机器核对。这是这道题技术上最重的部分,本篇只指出它,不展示任何一条翻译。
Two: that sign makes “local” non-local. Back to 1.1: every fermionic sentence carries a sign depending on the listing order. The usual remedy fixes an order (say by seat number), and then the sign of “act on seat j” depends on the occupations of all seats before it; a fermionic operation touching one seat becomes, in the qubit language, a long Pauli string dragging from seat 1 to seat j. A worked case: with the ledger kept in seat order, the operation “seat a person in seat 3” carries the sign (−1)(number of occupied seats among 1 and 2), because the newcomer must be listed after every person already seated before it. On |110⟩ there are 2 people before it, sign +1, giving +|111⟩; on |100⟩ there is 1, sign −1, giving −|101⟩. The same operation gets its sign from seats it does not touch. In the qubit language a Z must sit on qubits 1 and 2 to read that sign off (Z gives −1 on a 1), so the operation becomes Z1Z2 times “turn 0 into 1” on qubit 3. This translation is called the Jordan–Wigner transformation, and the later the seat, the longer the tail of Z’s. It is the same effect as “the people in between change the sign” in the checkpoint of 1.1. ZX rewrite rules are local: they look at a few adjacent dots. A local ZX rule may carry a long tail of signs on the fermionic side; a local fermionic identity may become a diagram spanning many wires on the ZX side. Every dictionary entry must handle this sign ledger, and let a machine check it. This is the technically heaviest part of the item; this guide points at it and shows no translation.
三、ZX 是量子比特的语言,费米子多一条守恒律。ZX 图里的每根线是一个量子比特,两种颜色对应 X 与 Z 两种基;费米子那边,「座位总人数的奇偶」是一个物理上不能改变的量:自然界允许的每个操作都成对地增减费米子,所以总人数的奇偶永远不变(物理学叫它费米子宇称超选择规则;1.1 节的互换只挪人、不增减人,是一个特例)。ZX 语言没有天生的位置放这条约束——需要为它添加规则,或者只翻译遵守它的那一部分图。词典要说明哪些 ZX 图没有费米子对应物,这本身就是研究内容。
Three: ZX is a qubit language; fermions carry one more conservation law. Every wire in a ZX diagram is a qubit and the two colours are the X and Z bases; on the fermionic side, “the parity of the total number of people” is a quantity physics never changes: every operation nature allows adds or removes fermions in pairs, so the parity of the head count stays fixed (physicists call this the fermion-parity superselection rule; the swaps of 1.1 move people without adding or removing any, a special case). The ZX language has no built-in place for that constraint; rules must be added for it, or only the diagrams that respect it translated. The dictionary must say which ZX diagrams have no fermionic counterpart, and that is research in itself.
4.4玩具尺度的对照:难的不是大小Toy-scale comparison: size is not the hard part
和 《大码的码距》不同,这道题的难点不是组合爆炸。1.1 节的符号表只有 2 × 2 = 4 格;ZX 图的基本图元和基本规则各只有个位数到十位数的条目;蜂窝码 L3x3 只有 18 个比特、每轮 9 条两比特检查(18 ÷ 2)。词典的行数不会多,难在每一行该写什么(4.3 节的一、三)和每一行怎样写成机器能核对的证明(4.3 节的二)。人话:这不是一部厚词典,是一部还不知道该用什么字母表来写的词典。
Unlike “Distance for large codes”, the difficulty here is not combinatorial explosion. The sign table of 1.1 has 2 × 2 = 4 cells; ZX has only single- to double-digit numbers of basic elements and rules; the honeycomb L3x3 has 18 qubits and 9 two-qubit checks per round (18 ÷ 2). The dictionary will not have many rows; the difficulty is what to write in each row (points one and three of 4.3) and how to write each row as a machine-checkable proof (point two). In plain words: this is not a thick dictionary; it is a dictionary whose alphabet has not been agreed yet.
记号:2 × 2 = 4 与 18 ÷ 2 = 9 是本篇自己算的数;18 来自 instances.yaml 的 L3x3(n = 18 verified),「每轮是一组完美匹配」来自卡片 description 的 “three perfect-matching rounds”(完美匹配 = 每个比特恰好配一对,所以每轮 n/2 条检查)。
Notation: 2 × 2 = 4 and 18 ÷ 2 = 9 are computed for this guide; 18 comes from instances.yaml's L3x3 (n = 18 verified), and “each round is a perfect matching” from the card description's “three perfect-matching rounds” (perfect matching = every qubit in exactly one pair, hence n/2 checks per round).
从这里出发能做什么:算一本符号账,再去看四个条目What you can do from here: keep a sign ledger, then visit four entries
一个手算练习,把 1.1 节的规则用到三个座位上,亲眼看到「顺序决定符号」;然后是往哪里走。本篇唯一的交互部件是 1.1 节的座位互换,它是本页自带的;共享部件库里目前没有费米子的语言,这本身也是一个诚实的注脚。 One hand exercise applying the rule of 1.1 to three seats, to see “order decides the sign” with your own eyes; then where to go. The only interactive widget of this guide is the seat-swap of 1.1, built for this page; the shared widget library has no fermion language yet, itself an honest footnote.
5.1手算:三个座位的符号账By hand: the sign ledger of three seats
三个座位 1、2、3 全部有人。把「先说谁」的顺序从 (1,2,3) 换成别的顺序,每一步只允许互换两个座位的内容;按 1.1 节的表,两个有人的座位互换乘 −1。问:到达每一种顺序,总共乘上几个 −1?
Seats 1, 2, 3 are all taken. Change the order of “who is named first” from (1,2,3) to another order, one swap of two seats' contents per step; by the table of 1.1, swapping two taken seats multiplies by −1. Question: reaching each order, how many factors of −1 in total?
| 目标顺序Target order | 一条最短的互换路径One shortest swap path | 互换次数Swaps | 总符号Total sign |
|---|---|---|---|
| (1,2,3) | 不动none | 0 | +1 |
| (2,1,3) | 互换第 1、2 位swap positions 1, 2 | 1 | −1 |
| (1,3,2) | 互换第 2、3 位swap positions 2, 3 | 1 | −1 |
| (3,2,1) | 互换第 1、3 位swap positions 1, 3 | 1 | −1 |
| (2,3,1) | (1,2,3) → (2,1,3) → (2,3,1)(1,2,3) → (2,1,3) → (2,3,1) | 2 | +1 |
| (3,1,2) | (1,2,3) → (3,2,1) → (3,1,2)(1,2,3) → (3,2,1) → (3,1,2) | 2 | +1 |
六种顺序,三种得 −1、三种得 +1。值得自己验证的一点:到同一个目标顺序可以走不同的路径,路径长短可以不同,但互换次数的奇偶总是一样。请自己试:从 (1,2,3) 出发,用 2 次或 4 次互换到达 (2,3,1) 总能做到,用 1 次或 3 次永远做不到。这条「奇偶不变」叫置换的奇偶性(大学线性代数讲行列式时才正式出现;下面的补课用数数给出证明),它也正是费米子语言里符号有意义的原因:符号只依赖终点,不依赖路径。人话:费米子的符号账记的是「换了奇数次还是偶数次」,一本机器完全能记的账——难的是把它和 ZX 图的每条规则对上。
Six orders, three giving −1 and three giving +1. Worth checking yourself: the same target order can be reached by different paths of different lengths, but the parity of the swap count is always the same; try reaching (2,3,1) from (1,2,3) in 4 swaps, which you will find always possible, and in 3 swaps, which you will find never possible. This “parity invariance” is called the sign of a permutation (formally met in university linear algebra with determinants; the catch-up below proves it by counting), and it is exactly why signs in the fermion language are meaningful: the sign depends on the destination, not on the path. In plain words: the fermionic sign ledger records “odd or even number of swaps”, a ledger a machine can perfectly keep; the hard part is matching it to every ZX rule.
补课 · 为什么互换次数的奇偶只由终点决定(数「逆序对」)Catch-up · Why the parity of the swap count depends only on the destination (counting inversions)
给一个顺序数它的逆序对:两个数里大的排在小的前面,就算一对。(1,2,3) 没有逆序对;(2,3,1) 有 (2,1) 和 (3,1) 两对;(3,2,1) 有 (3,2)、(3,1)、(2,1) 三对。
For an order, count its inversions: pairs of numbers in which the larger stands before the smaller. (1,2,3) has none; (2,3,1) has two, (2,1) and (3,1); (3,2,1) has three, (3,2), (3,1) and (2,1).
第一步:相邻互换让逆序对数正好变 1。互换相邻的两个数,只有这两个数之间的先后变了,它们和其余每个数的先后都不变;所以逆序对数恰好 +1 或 −1。
Step 1: an adjacent swap changes the inversion count by exactly 1. Swapping two neighbours changes only the order of those two; their order relative to every other number is untouched. So the count goes up or down by exactly 1.
第二步:任意互换等于奇数次相邻互换。互换第 p 位和第 q 位(p < q,中间隔 q − p − 1 个数):先把第 p 位的数一步步右移到第 q 位,要 q − p 步;再把原来第 q 位的数(现在在第 q − 1 位)一步步左移到第 p 位,要 q − p − 1 步。一共 2(q − p) − 1 步,奇数。这正是 1.1 节「两位旅行者」的走法。
Step 2: any swap equals an odd number of adjacent swaps. To swap positions p and q (p < q, with q − p − 1 numbers in between), move the number at p right one step at a time to q: q − p steps; then move the number that was at q (now at q − 1) left to p: q − p − 1 steps. In total 2(q − p) − 1 steps, an odd number. That is exactly the “two travellers” walk of 1.1.
结论。每次互换都让逆序对数的奇偶翻一次。从 0 个逆序对的 (1,2,3) 出发,走到一个有 v 个逆序对的顺序,互换次数的奇偶必然等于 v 的奇偶,不管走哪条路。检查上表:(2,3,1) 与 (3,1,2) 各有 2 个逆序对,所以只能用偶数次到达,符号 +1;(2,1,3)、(1,3,2) 各 1 个,(3,2,1) 3 个,符号 −1。
Conclusion. Every swap flips the parity of the inversion count. Starting from (1,2,3) with 0 inversions and ending at an order with v inversions, the number of swaps has the parity of v, whatever the path. Check against the table: (2,3,1) and (3,1,2) have 2 inversions each, so they can only be reached in an even number of swaps, sign +1; (2,1,3) and (1,3,2) have 1 each and (3,2,1) has 3, sign −1.
5.2往哪里走Where to go next
相关条目。yaml 的 related 只有 honeycomb。本教程系列目前没有蜂窝码的独立教程;请直接看 QEC-Bank 的条目页:蜂窝码条目(两个实例、d = ?、三种平台)与它的表示阶梯页(2.1 节那八条记录和 “Open machine-derivation problem →” 链接)。带费米子视图的另外三个条目:steane、surface、toric 的表示阶梯页。表面码与环面码在本系列的教程:Surface Code 条目总览、《从高考数学到 Toric Code》。
Related entries. The yaml's related list has only honeycomb. This tutorial series has no standalone honeycomb guide yet; go straight to the QEC-Bank entry pages: the honeycomb entry (two instances, d = ?, three platforms) and its representation-ladder page (the eight records of 2.1 and the “Open machine-derivation problem →” link). The other three entries with a fermionic view: the ladder pages of steane, surface and toric. Surface and toric codes in this series: Surface Code entry overview, “From Exam Maths to the Toric Code”.
同一系列。ZX 图作为「判断两张时间表是否等价」的工具:《两张测量时间表是不是同一回事》;蜂窝码的 d = ? 从哪里来:《检查每一轮都在变,码距该怎么数》;「formal」(机器可核对)是什么意思:《一张机器能核对的「没有更轻逻辑算符」证书》。这道题的 yaml 没有登记 working_repo。
In this series. ZX diagrams as the tool for “are two schedules equivalent”: “Are two measurement schedules the same thing?”; where the honeycomb's d = ? comes from: “When the checks change every round, how do you count distance?”; what “formal” (machine-checkable) means: “A machine-checkable certificate that nothing lighter exists”. The item's yaml registers no working_repo.
一个负号、三种方言、四个 curatedOne sign, three dialects, four curated
回放一遍。费米子与量子比特只差一个负号:互换两个有人的座位乘 −1,于是每句话带一个由顺序决定的符号。一个座位可以劈成两个半座位(马约拉纳),把不同座位的半座位重新配对、问一对是空是满(再乘一个固定的 ±1 规范变量),就是蜂窝码那种两比特检查——QEC-Bank 卡片用 parton 方言把这件事写成一段 curated 的笔记。同一份「算奇偶」的配方,在只提供 CNOT 与单比特测量的量子比特芯片上常写成辅助比特加两个 CNOT,在设想中能原生测配对奇偶的马约拉纳硬件上是一次配对测量;在两种语言之间翻译并数成本的程序叫编译器。QEC-Bank 今天有四个条目带费米子视图(honeycomb、steane、surface、toric),三种方言,四个 curated,四个 gap 指向本题;条目自己的推导页写着 “There is no generic fermionic compiler in the repository”。Wanted 板要的第一份交付物是一部形式化的 ZX ↔ 费米子词典:每行一个图元或一条规则,附机器能核对的证明。难度 open-research:两种语言是否表达力相当只是「plausibly」;三种方言的「统一」是决定而非证明,没有公认语法;那个负号让局部规则拖出长串符号。
Replay. Fermions differ from qubits by one sign: swapping two taken seats multiplies by −1, so every sentence carries a sign fixed by order. A seat can be split into two half-seats (Majoranas); re-pairing half-seats from different seats and asking whether a pair is empty or taken (times a fixed ±1 gauge variable) is the honeycomb's two-qubit check, which the QEC-Bank card writes, in the parton dialect, as one curated note. The same “compute a parity” recipe is commonly a helper qubit plus two CNOTs on a qubit chip that offers CNOTs and single-qubit measurement, and one pair measurement on proposed Majorana hardware with native pair-parity measurement; a program translating between the two and counting cost is a compiler. Today four QEC-Bank entries carry a fermionic view (honeycomb, steane, surface, toric), three dialects, four curated, four gaps pointing at this item; the entry's own derivation page says “There is no generic fermionic compiler in the repository”. The first deliverable the board asks for is a formal ZX ↔ fermionic dictionary: one element or rule per row, with a machine-checkable proof. Difficulty open-research: whether the two languages are equally expressive is only “plausibly”; the “unification” of three dialects is decided, not proved, with no agreed syntax; and that one sign drags long sign strings out of local rules.
符号与读法Symbols & how to read them
| 符号Symbol | 名称与读法Name & how to read it | 在本篇中的含义Meaning in this guide |
|---|---|---|
| n, k, L | 读字母名Read as letters | 物理比特数、逻辑比特数、环面边长;蜂窝码 L3x3:n = 18,k = 2;L6x6:n = 72,k = 2。Physical qubits, logical qubits, torus side; honeycomb L3x3: n = 18, k = 2; L6x6: n = 72, k = 2. |
| ni | 读「n 下标 i」Read “n sub i” | 座位 i 的占据数:0 空、1 满。Occupation of seat i: 0 empty, 1 taken. |
| |ni nj⟩ | 读「态 n i n j」Read “the state n i n j” | 两个座位的占据状态;尖括号是量子态记号(Toric Code 教程 3.1 节)。The occupation state of two seats; angle brackets are the quantum-state notation (toric-code guide 3.1). |
| (−1)ni·nj | 读「负一的 n i n j 次方」Read “minus one to the n i n j” | 互换两个座位的符号:只在两个都有人时为 −1。The sign of swapping two seats: −1 only when both are taken. |
| m | 读字母名Read as a letter | 1.1 节隔位互换时,两个被互换座位之间有人的座位数;符号 = (−1)ni·nj + (ni + nj)·m。In 1.1, the number of occupied seats between the two swapped seats; sign = (−1)ni·nj + (ni + nj)·m. |
| iγaγb | 读「i 伽马 a 伽马 b」Read “i gamma a gamma b” | 问一对半座位「空还是满」;答案 ±1,一个表示空、一个表示满(约定决定哪个)。Asks a pair of half-seats “empty or taken”; answer ±1, one meaning empty and one taken (a convention decides which). |
| Du | 读「D 下标 u」Read “D sub u” | 比特 u 四个半座位之积 buxbuybuzcu;只保留 Du = +1 的状态(补课 cu-1a)。Product of qubit u’s four half-seats buxbuybuzcu; only states with Du = +1 are kept (catch-up cu-1a). |
| guv | 读「g 下标 u v」Read “g sub u v” | 边 uv 上的规范变量 i buabva,取 ±1;单个值是记账约定,绕六边形的乘积(面通量)才有物理意义。The gauge variable i buabva on edge uv, value ±1; a single value is a bookkeeping convention, only the product around a hexagon (the flux) is physical. |
| H | 读字母名Read as a letter | ZX 图里的「换颜色」小方块,即哈达玛门:把 Z 点与 X 点互换角色。The “change colour” box in ZX diagrams, the Hadamard gate: swaps the roles of Z and X dots. |
| c, (−1)c | 读「碰撞数」Read “collision count” | 两条泡利串中两个不同的非 I 字母相遇的格数;交换顺序的代价。Cells where two different non-identity letters meet between two Pauli strings; the price of swapping their order. |
| γ, bua, cu | 希腊字母「伽马」;b、c 读字母名Greek “gamma”; b, c as letters | 半座位(马约拉纳);bux,y,z 与 cu 是比特 u 的四个半座位(卡片公式)。Half-seats (Majoranas); bux,y,z and cu are the four half-seats of qubit u (the card's formula). |
| σua | 希腊字母「西格玛」Greek “sigma” | 比特 u 上的泡利算符,a ∈ {x, y, z} 指 X、Y、Z。The Pauli operator on qubit u, a ∈ {x, y, z} naming X, Y, Z. |
| i | 读「虚数单位」(斜体时)Read “imaginary unit” (in the formula) | i² = −1(Toric Code 教程 1.2 节);在 1.1 节作座位编号时是普通下标。i² = −1 (toric-code guide 1.2); as a seat index in 1.1 it is an ordinary subscript. |
| α, β | 希腊字母「阿尔法、贝塔」Greek “alpha, beta” | ZX 图里点上标的角度;融合规则把它们相加。本篇不用具体值。Angles on ZX dots; the fusion rule adds them. No values used here. |
| Z2(Z2) | 读「Z 二」Read “Z two” | 卡片原文里「只取两个值」的变量:±1(或 0/1)。In the card text, a variable taking two values: ±1 (or 0/1). |
| R1 … R5 | 读「表示阶梯第 1 到 5 层」Read “ladder rungs 1 to 5” | R1 检查矩阵,R2 结构,R3 时间表,R4 电路,R5 跨模型视图(费米子视图在 R5)。R1 checks, R2 structure, R3 schedules, R4 circuits, R5 cross-model views (the fermionic view is R5). |
| <->, ↔ | 读「双向」Read “two-way” | 词典两个方向都能查:ZX → 费米子,费米子 → ZX。The dictionary works in both directions: ZX → fermionic, fermionic → ZX. |
本篇新增词汇New terms in this guide
| 术语Term | 白话定义Plain definition |
|---|---|
| 费米子fermion | 一个座位最多坐一个、互换两个有人的座位乘 −1 的粒子。A particle with at most one per seat, whose exchange of two taken seats multiplies by −1. |
| 规范变量gauge variable | 取值只是记账约定的 ±1 变量:「什么都不做」的操作能把它变号;只有某些乘积(如绕六边形一圈)有物理意义。A ±1 variable whose value is only a bookkeeping convention: an operation that “does nothing” can flip it; only certain products (e.g. around a hexagon) are physical. |
| Jordan–Wigner 变换Jordan–Wigner transformation | 按座位顺序把费米子操作翻成量子比特操作:碰座位 j 的操作要在前面所有比特上带一串 Z 来记符号。Translating fermionic operations into qubit operations in seat order: an operation on seat j carries a string of Z’s on all earlier qubits to track the sign. |
| 逆序对inversion | 一个顺序里大数排在小数前面的一对;每次互换让逆序对数的奇偶翻一次。A pair in an order where the larger number stands before the smaller; every swap flips the parity of their count. |
| 探测器detector | 几次测量结果的乘积,没出错时必为 +1;变成 −1 就报告附近出过错。A product of a few measurement outcomes that is +1 when nothing went wrong; −1 reports a nearby fault. |
| tetrontetron | 设想中的马约拉纳量子比特,一个比特由四个半座位组成。A proposed Majorana qubit made of four half-seats. |
| 符号账sign ledger | 费米子语言里由列举顺序决定的正负号;只依赖互换次数的奇偶。The sign in the fermion language fixed by listing order; depends only on the parity of the swap count. |
| 马约拉纳(半座位)Majorana (half-seat) | 半个座位;两个配成一对才能问空/满。Half a seat; two must be paired before empty/taken can be asked. |
| 方言:majorana-pairs / parton / quondialects: majorana-pairs / parton / quon | 费米子表示的三种写法:半座位配对 / 把自旋拆成零件 / 画成量子化的图。设计文档决定把三者记为同一种表示。Three spellings of the fermionic representation: half-seat pairs / spins split into parts / quantized graphs. The design document decided to record them as one representation. |
| 编译器compiler | 在两种语言之间翻译程序、保证意思不变、能数成本的程序。A program translating programs between two languages, preserving meaning and counting cost. |
| ZX 图 / ZX 演算ZX diagram / ZX-calculus | 线 + 两色点 + 少数改写规则的图形电路语言;QEC-Bank 定为跨模型的桥。A graphical circuit language of wires, two-colour dots and a few rewrite rules; the QEC-Bank's cross-model bridge. |
| 形式化词典formal dictionary | 每条词条附机器能核对的证明的双向对照表。A two-way correspondence table with a machine-checkable proof on every entry. |
| Floquet 码Floquet code | 检查清单按周期变化的码;蜂窝码是代表。A code whose check list changes periodically; the honeycomb is the representative. |
| 原生(native)操作native operation | 硬件直接提供、不需要翻译的操作;马约拉纳硬件设想中的配对测量。An operation the hardware provides directly, without translation; pair-parity measurement in Majorana hardware proposals. |
| 证据词evidence word | curated(人写)、derived(机器算出,附程序与版本)、canonical(定义本身)、claimed(从文献抄)、proposed(设想)。curated (hand-written), derived (machine-computed, with program and version), canonical (the definition itself), claimed (copied from literature), proposed (a proposal). |
| open-research / hard-engineeringopen-research / hard-engineering | Wanted 板的两种难度:没人知道怎么做 / 知道怎么做但要做很多。The board's two difficulty grades: nobody knows how / known how but much to do. |
延伸阅读Further reading
- Zhengwei Liu, “Quantized Graphs and Quantum Error Correction” (2019)
liu2019quantized(QEC-Bank 已登记,arXiv 1910.12065)。yaml 与设计文档指为 quon 方言的出处;surface 条目的 quon 视图引用它。本篇没有读它。liu2019quantized (registered in the QEC-Bank, arXiv 1910.12065). Named by the yaml and the design document as the source of the quon dialect; cited by the surface entry's quon view. Not read for this guide. - arXiv:1703.02973
yaml 的第二篇引文;设计文档 3.2 节写作 “the parton construction (Hsieh–Halász, arXiv:1703.02973)”。QEC-Bank 参考文献登记表里尚无条目——据条目记载,登记待补。本篇没有读它。The yaml's second citation; the design document, section 3.2, writes “the parton construction (Hsieh–Halász, arXiv:1703.02973)”. No entry in the QEC-Bank reference registry yet: cited by the entry, registration pending. Not read for this guide. - H. Bombín, D. Litinski, N. Nickerson, F. Pastawski, S. Roberts, “Unifying flavors of fault tolerance with the ZX calculus” (2023)
bombin2023unifying(已登记,arXiv 2303.08829;蜂窝码卡片以别名 bombin2024zx 引用)。设计文档把它定为 ZX 作为跨模型之桥的依据。bombin2023unifying (registered, arXiv 2303.08829; the honeycomb card cites it under the alias bombin2024zx). The design document's basis for ZX as the cross-model bridge. - QEC-Bank: the Wanted item and its data
wanted/fermionic-compiler.yaml(六个字段原文)、codes/honeycomb/card.yaml(description、views 八条、realizations、fit)、codes/honeycomb/instances.yaml(L3x3、L6x6)、codes/honeycomb/pedagogy/representation-dictionary.md(卡片公式与 “no generic fermionic compiler” 一句)、codes/{steane,surface,toric}/card.yaml 的 fermionic 视图、docs/superpowers/specs/2026-07-04-qec-atlas-design.md 3.2 节与 4.1 节对照表。kitaev2006anyons 在登记表中只有键名,元数据待补。wanted/fermionic-compiler.yaml (the six fields verbatim), codes/honeycomb/card.yaml (description, eight views, realizations, fit), codes/honeycomb/instances.yaml (L3x3, L6x6), codes/honeycomb/pedagogy/representation-dictionary.md (the card formula and the “no generic fermionic compiler” sentence), the fermionic views of codes/{steane,surface,toric}/card.yaml, docs/superpowers/specs/2026-07-04-qec-atlas-design.md section 3.2 and the table of 4.1. kitaev2006anyons has only a key in the registry, metadata pending.
状态原文:open;难度原文:open-research。逐字引用的:statement、why_it_matters、current_proxy(第 1、2、3 章的框),蜂窝码卡片的 description、fermionic 视图全文、八条 views 的 type 与 origin、realizations 中马约拉纳架构一条、fit.platforms,steane / surface / toric 三条 fermionic 视图的片段,推导页的公式与两句话,设计文档 3.2 节的两个要点与 4.1 节的一行。本篇自己算的、QEC-Bank 页面上没有的数:符号表的 4 格、5.1 节的 6 行、8 = 1 + 1 + 6、四个条目、18 ÷ 2 = 9。本篇自己证的:1.1 节隔位互换的符号公式(「两位旅行者」的数法)及其在检查站中的应用,5.1 节的置换奇偶(补课 cu-5a 数逆序对)。本篇用矩阵模型数值核对过的:隔位互换公式(最多 6 个座位的每种情形)、1.2 节那一行的精确符号(差一个整体负号)、补课 cu-1a 里用到的每一条对易关系、4.3 节 Jordan–Wigner 例子的两个符号、1.4 节 CNOT = 复制点 + 奇偶点。只描述、未推导的:半座位的算符代数本身、四半座位表示的严格推导、ZX 图的完整规则与语义(1.4 节只读了角度为 0 的两种点)、三种方言之间的任何对应、两篇引文的任何内容(未读)。4.3 节「二、三」两点是本篇对难点的人话概括,不是 QEC-Bank 文件里的原文。没有运行 QEC-Bank 的任何程序;「恰有四个条目」是一次 grep 的结果(2026-09-12)。
Status verbatim: open; difficulty verbatim: open-research. Quoted word for word: statement, why_it_matters, current_proxy (the boxes of Chapters 1, 2, 3), the honeycomb card's description, the full fermionic view, type and origin of all eight views, the Majorana-architecture realization, fit.platforms, fragments of the three fermionic views of steane / surface / toric, the derivation page's formula and two sentences, two bullet points of design-document section 3.2 and one row of 4.1. Computed for this guide and absent from QEC-Bank pages: the 4 cells of the sign table, the 6 rows of 5.1, 8 = 1 + 1 + 6, four entries, 18 ÷ 2 = 9. Proved in this guide: the sign formula for swaps at a distance in 1.1 (the “two travellers” count) and its use in the checkpoint, and the permutation parity of 5.1 (catch-up cu-5a, counting inversions). Checked numerically in a matrix model for this guide: the distance-swap formula (every case up to 6 seats), the exact sign of the line in 1.2 (off by an overall minus), every commutation fact used in catch-up cu-1a, the two signs of the Jordan–Wigner example in 4.3, and CNOT = copy dot + parity dot in 1.4. Described only, not derived: the operator algebra of half-seats itself, a rigorous derivation of the four-half-seat representation, the full rules and semantics of ZX diagrams (1.4 reads only the two kinds of angle-0 dot), any correspondence among the three dialects, any content of the two cited papers (not read). Points two and three of 4.3 are this guide's plain-language summary of the difficulties, not text from QEC-Bank files. No QEC-Bank program was run; “exactly four entries” is the result of one grep (2026-09-12).
开放问题总览 · 大码的码距:便宜的上界,昂贵的下界 · 一张机器能核对的「没有更轻逻辑算符」证书 · 同一个码穿不同的衣服 · 拓扑替我们算出门 · 有些码还没有「标准译码器」 · 用费米子的语言写电路(本篇) · 检查每一轮都在变,码距该怎么数 · 从理想症状到真实电路 · 两张测量时间表是不是同一回事 · 不在乎的比特,与穿了衣服的码距 · 在 Wanted 板上查看 →
All open problems · Distance for large codes: cheap upper bounds, expensive lower bounds · A machine-checkable certificate that nothing lighter exists · The same code in different clothes · Topology computes the gates · Some codes still have no standard decoder · Writing circuits in the language of fermions (this guide) · When the checks change every round, how do you count distance? · From ideal syndromes to real circuits · Are two measurement schedules the same thing? · Don't-care qubits and the dressed distance · See it on the Wanted board →
蜂窝码 · QEC-Bank 条目页(表示阶梯:R5 fermionic · curated) · Surface Code · 条目总览 · BB 码 · 条目总览 · 《从高考数学到 Toric Code》2.3:奇偶检查 · 4.2:泡利串与碰撞定理
Honeycomb code · QEC-Bank entry page (representation ladder: R5 fermionic · curated) · Surface Code · Entry overview · BB codes · Entry overview · “From Exam Maths to the Toric Code” 2.3: parity checks · 4.2: Pauli strings and the collision theorem