Skip to main content
KetQat

Appearance

Code · advanced

Bacon–Shor code

A subsystem code on an m by m grid of qubits whose gauge group is generated by XX on horizontal neighbours and ZZ on vertical neighbours. It encodes one logical qubit with (m − 1)^2 gauge qubits and distance m, and its weight-2m stabilizers are inferred from two-qubit measurements.

Established definitionMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Layout. Qubits sit at the sites (i,j)(i, j), 1≤i,j≤m1 \le i, j \le m, of an m×mm \times m grid, n=m2n = m^2. Rows are indexed by ii, columns by jj.

Gauge group. Generated by

Xi,jXi,j+1(horizontal neighbours),Zi,jZi+1,j(vertical neighbours),X_{i,j} X_{i,j+1} \quad (\text{horizontal neighbours}), \qquad Z_{i,j} Z_{i+1,j} \quad (\text{vertical neighbours}),

2m(m−1)2m(m-1) operators of weight 2. An XXXX pair and a ZZZZ pair that share one site anticommute, so the gauge group is non-abelian.

Stabilizer. The products

∏i=1mXi,jXi,j+1(j=1,…,m−1),∏j=1mZi,jZi+1,j(i=1,…,m−1)\prod_{i=1}^{m} X_{i,j} X_{i,j+1} \quad (j = 1, \dots, m-1), \qquad \prod_{j=1}^{m} Z_{i,j} Z_{i+1,j} \quad (i = 1, \dots, m-1)

act as XX on two adjacent columns and as ZZ on two adjacent rows, weight 2m2m. They commute with every gauge generator (a column pair meets a vertical ZZZZ pair in zero or two sites) and generate the stabilizer, r=2(m−1)r = 2(m-1).

Parameters. The gauge group has dimension r+2gr + 2g over F2\F_2 with g=(m−1)2g = (m-1)^2 gauge qubits, so by the structure theorem

k=n−r−g=m2−2(m−1)−(m−1)2=1.k = n - r - g = m^2 - 2(m-1) - (m-1)^2 = 1 .

Bare logical operators are Xˉ=∏iXi,1\bar X = \prod_i X_{i,1} (a full column of XX) and Zˉ=∏jZ1,j\bar Z = \prod_j Z_{1,j} (a full row of ZZ); they share one site and anticommute. The distance is mm: the code is [[m2,1,(m−1)2,m]][[m^2, 1, (m-1)^2, m]]. (For m=3,4,5m = 3, 4, 5 the values of rr, gg and kk, and for m=3m = 3 the dressed distance 3, were checked by direct computation.)

How it is used. Only the weight-2 gauge operators are measured; the eigenvalue of each weight-2m2m stabilizer is the product of the mm gauge outcomes that compose it, which is deterministic on the code even though each gauge outcome is random. The XX checks see only the parity of ZZ errors in each column, and the ZZ checks the parity of XX errors in each row; each is a repetition code of length mm on those parities.

Performance. For a single block with perfect syndromes and independent XX and ZZ errors of probability pp, lengthening the rows improves protection against one error type and degrades it against the other, so there is no threshold for the family. The best square block has p m≈(ln⁡2)/4≈0.173p\, m \approx (\ln 2)/4 \approx 0.173, and its logical failure probability is approximately 1.02p e−0.0601/p1.02 \sqrt{p}\, e^{-0.0601 / p}; at p=10−3p = 10^{-3} the optimal mm is 173 and the failure probability about 2.6×10−282.6 \times 10^{-28} (Napp and Preskill, who also treat biased noise with rectangular blocks). Used as the code of a concatenated scheme, the Bacon–Shor code allows fault-tolerant error correction without entangled ancilla states, using nearest-neighbour two-qubit measurements, and Aliferis and Cross prove a threshold lower bound of 1.94×10−41.94 \times 10^{-4} for adversarial stochastic noise.

History. Subsystem codes of this kind were introduced by Bacon, motivated by self-correcting quantum memories; the two-dimensional form above is the one used for fault tolerance by Aliferis and Cross and analysed by Napp and Preskill. For m=3m = 3, fixing the gauge so that the vertical ZZZZ pairs become stabilizers gives back the Shor code.

Instance of
Part of
Stated in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Dave Bacon (2006). Operator quantum error-correcting subsystems for self-correcting quantum memories. Physical Review A 73, 012340. doi:10.1103/PhysRevA.73.012340arXiv:quant-ph/0506023
  2. Panos Aliferis, Andrew W. Cross (2007). Subsystem Fault Tolerance with the Bacon-Shor Code. Physical Review Letters 98, 220502. doi:10.1103/PhysRevLett.98.220502arXiv:quant-ph/0610063
  3. John Napp, John Preskill (2013). Optimal Bacon-Shor codes. Quantum Information and Computation 13 (5&6), 490-510. doi:10.26421/QIC13.5-6-9arXiv:1209.0794

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Gauge generators, stabilizers, k = 1, bare logicals and distance re-derived; own GF(2) computation for m = 3, 4, 5 gave r = 2(m-1), g = (m-1)^2, k = 1 and dressed distance d = m. Performance numbers compared with Napp and Preskill, arXiv:1209.0794, Eqs. (1)-(2) and (22)-(23): 4pn ~ ln 2 and failure ~ 1.01768 sqrt(p) exp(-0.0600566/p); recomputed m = ln2/(4p) = 173 and failure 2.66e-28 (record: about 2.6e-28) at p = 1e-3. Threshold 1.94e-4 for adversarial stochastic noise, FTEC without entangled ancillas and nearest-neighbour two-qubit measurements compared with the abstract of Aliferis and Cross, arXiv:quant-ph/0610063. Bacon, arXiv:quant-ph/0506023, checked for the origin (square and cubic lattice subsystem codes motivated by self-correction). Gauge fixing to the Shor code checked by inspection. Reference metadata matched Crossref.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision 07d964370d374180. Source file knowledge/records/code/bacon-shor-code.md in the content repository (readable there once it is public).