# Is the $[\![7,1,3]\!]$ Steane code a surface code?

All surface codes are CSS codes.

The smallest error correcting ($$d=3$$) CSS code is for 7 qubits. So we can be sure that the $$[\![5,1,3]\!]$$ code is not equivalent to a surface code since no surface code, in fact not even any CSS code, exists with parameters $$[\![5,1,3]\!]$$.

What about the $$[\![7,1,3]\!]$$ Steane code? Is the Steane code equivalent to some surface code? In Projective Plane and Planar Quantum Codes it is claimed that the Steane code cannot be equivalent to any surface code on $$\mathbb{R}P^2$$ since there is no cellulation of $$\mathbb{R}P^2$$ with $$7$$ edges and the lengths of all essential cycles and dual cycles at least 3. What about surface codes on other surfaces?

A surface code is defined by a planar graph, embedded on a plane (that's the "surface" part), where edges (E) are qubits, Z checks are faces (F), and X checks are vertices (V).

All connected planar graphs embedded on the plane have Euler characteristic V-E+F=+2.

The Steane code has 3 X checks, 3 Z checks, and 7 qubits. Computing the implied characteristic we get V-E+F = 3-7+3 = -1 != +2. Therefore the Steane code is not a surface code. At least, not one embedded on a flat surface.

• In principle there could still be an embedding by adding redundant checks. Take the toric code with n=3 (18 qubits, 9 X checks, 9 Z checks) : 9 - 18 + 9 = 0 which is euler characteristic of torus. The 9 checks have a redundant one; without it the characteristic is -2. So adding two redundant X and Z checks to the steane code could in principle change things Commented Jul 27, 2023 at 16:13
• Is it possible that the Steane code is a surface code on a genus 2 surface (which as you point out would have Euler characteristic $-2=\chi=2-2g$) Commented Aug 8, 2023 at 18:08

There is not "the" $$[\![7, 1, 3]\!]$$ code in the sense that there is "the" $$[\![5, 1, 3]\!]$$ code. While the Steane code is not a surface code (it is a color code, locally equivalent to two copies of a surface code), there is a $$[\![7, 1, 3]\!]$$ surface code corresponding to an example of a surface code with a twist. It can be depicted in the plane as a surface code on a triangle-shaped patch, with qubit vertices on the three corners of the triangle, qubit vertices at the centers of each edge of the triangle, and a qubit in the center of the triangle. Edges can be added connecting each triangle-edge-center qubit to the triangle-center qubit. There is one Pauli check associated to each of the three faces inside the triangle (each of weight four), and there is an alternating sequence of three "half moon" (digon) Pauli checks around the exterior (each of weight two---add the three edges to the figure to create the digon faces; there are left-handed and right-handed variants).

The precise Pauli support of the checks can be permuted with single-qubit Clifford gates as one wishes, so I won't list a "canonical set" here, but rest assured, there are many single-qubit-Clifford equivalent solutions leading to a commuting set of checks. That said, one can show that it is impossible to find a generating set containing checks with solely $$X$$ and $$Z$$ support (viz., it is not a CSS code).

Surface codes with twists allow them to not necessarily be CSS codes, unlike the assertion made by the original responder. Twists even allow surface codes on homologically trivial surfaces to hold logical qubits, such as the [[8, 3, 2]] code surface code on the cube (distinct from the "smallest interesting colour code" noted above) and the [[14, 3, 3]] surface code on the rhombic dodecahedron, both which lie on the sphere. Because of this, the Euler characteristic arguments made by other responders also do not apply.

• very interesting. Do you know any way to prove that the Steane code is not equivalent to a surface code with a twist? Also would you happen to know if there is a way to write the [[5,1,3]] code as a surface code with a twist? Commented Apr 3 at 14:17
• The [[5, 1, 3]] code is just an ordinary surface code (a toric code, actually) on the square lattice, but of the "XZZX" variety (an example of a single-qubit-Clifford basis change I was alluding to in my post) and with periodic boundary conditions canted at an angle to the lattice, as shown in Fig. 3 in this reference by Kovalev, Dumer, and Pryadko. Commented Apr 3 at 22:45

If it helps, the Steane code is known to be equivalent to a color code, not a surface code. See here for example- https://earltcampbell.com/2016/09/26/the-smallest-interesting-colour-code/, or here- https://errorcorrectionzoo.org/c/steane

However, see here https://arxiv.org/abs/1503.02065 about the similarities between color and surface codes.