Triangular surface code[1] 

Also known as Triangle surface code.


A surface code with weight-four stabilizer generators defined on a triangular lattice patch that are examples of twist-defect surface code with a single twist defect at the center of the patch. The codes use about \(25\%\) fewer physical per logical qubit for a given distance compared to the surface code.

Triangular surface codes are defined on a plane tiled with equilateral triangles. The size of the triangular patches and which patch encodes data versus act as ancillas for gates depends on the initialization and measurement procedures. See Ref. [1] for tables and figures.


For a triangle code with 7 qubits of information, 6 (6, 8) ancilla qubits, 13 (13, 15) qubits in total, and max degree of 4 (5, 4), the lower pseudo-threshold under depolarizing noise is \(1.05 \times 10^{-4}\) (\(1.57 \times 10^{-4}\), \(1.76 \times 10^{-4}\)), and the upper pseudo-threshold is \(1.22 \times 10^{-4}\) (\(1.92 \times 10^{-4}\), \(2.23 \times 10^{-4}\)).


For specific triangle codes, the rates are \(7/13\) or \(7/15\) both with distance \(3\) and weight-four check operators. In general, for \(d\) distance, there are \(3d^2 + O(d)\), \(9d^2/4 + O(d)\), or \(6d^2/4 + O(d)\) physical qubits per logical qubit, depending on the type of initialization and measurement procedures.


Code conversion (CC) initialization and measurement method, in which the surface code is used to hold data between gates in patches.Basis-state conversion (BC) initialization and measurement method in which one initializes and then measures a logical Pauli eigenstate. To do this, triangle ancilla qubits are required outside of the triangle patches that hold the data. That is, the ancilla patches must be empty of data and be adjacent to the side that contains the logical Pauli that needs to be measured or initialized.The CAT states (CS) initialization and measurement method uses a row of \(d\) ancilla qubits along some edge of a triangle code with distance \(d\) to create and verify a GHz state that is used to measure the logical operator along the same edge. Creating this GHz state takes \(O(d)\) time steps. To relaibly measure the logical state, the GHz state must be measured \(O(d)\) times, resuling in \(O(d^2)\) time for logical measurement. Initialization is a similar procedure that requires \(O(d^2)\) time for logical-operator measurements that occur \(O(d)\) times as well as \(O(d^2)\) time to project the code onto a logical state [1].

Transversal Gates

Triangle codes admit transversal order-three single-qubit Clifford gates, e.g., \(\bar{SH}\) [1].


Performing single-qubit Clifford gates using the CC procedure requires surface code patches to be embedded in triangle patches. This procedure requires \(O(d)\) Clifford gate times for \(H,S,CNOT\) [1].The BC procedure requires \(O(1)\) time to perform \(H,S\) gates and \(O(d)\) time to perform \(CNOT\). Sometimes reorientation of the sides is required, and that takes \(O(d)\) to perform [1].


The decoding uses a single decoding graph since the triangle code is not a CSS code. Nodes of the graph are located at each stabilizer (center of the triangle graph) and have red or blue edges, where red associates with \(X\) errors and blue with \(Z\) errors. To take into account any errors from measuring the error syndrome, a three-dimensional stack of the decoding graphs is laid on top of the code with vertical edges connecting to qubits between layers [1].

Fault Tolerance

The symmetry of triangle codes allows for fault-tolerant measurement and encoding in any Pauli basis [1].A non-fault-tolerant curcuit initializes the triangle code. To guarantee fault-tolerance, postselection is performed on trivial measurements of the syndrome and of the logical Pauli, depending on the basis of the logical states [1].Making syndrome extraction fault tolerant requires a specific ordering of syndrome measurements so as to avoid hook errors [1].

Code Capacity Threshold

\(10\%\) under either bit-flip or bit-phase noise for ideal syndrome measurements. The decoder used is a decoding graph with the same weight assigned to each edge, and Dijkstra's algorithm is used to computre the total weight of any path [1].


\(3.2\%\) bit-flip error-correction threshold for noisy syndrome measurements and \(2.6\%\) for bit-phase flip noise. The decoder used is a decoding graph as describe above [1].In general, the triangular surface code has a threshold of similar magnitude to the toric code for uncorrelated \(X\) and \(Z\) errors. For correlated errors, the triangle code has a lower threshold of a factor of about \(36\) [1].




  • Stellated color code — Stellated color codes are color-code analogues of triangle surface codes in that both encode logical information in lattices with a single twist defect. Instances of the former can be obtained by fattening [2] the vertices of the latter [3].


T. J. Yoder and I. H. Kim, “The surface code with a twist”, Quantum 1, 2 (2017) arXiv:1612.04795 DOI
H. Bombin and M. A. Martin-Delgado, “Exact topological quantum order inD=3and beyond: Branyons and brane-net condensates”, Physical Review B 75, (2007) arXiv:cond-mat/0607736 DOI
M. S. Kesselring et al., “The boundaries and twist defects of the color code and their applications to topological quantum computation”, Quantum 2, 101 (2018) arXiv:1806.02820 DOI
Page edit log

Your contribution is welcome!

on (edit & pull request)— see instructions

edit on this site

Zoo Code ID: triangle_surface

Cite as:
“Triangular surface code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2024.
@incollection{eczoo_triangle_surface, title={Triangular surface code}, booktitle={The Error Correction Zoo}, year={2024}, editor={Albert, Victor V. and Faist, Philippe}, url={} }
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:

Cite as:

“Triangular surface code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2024.