Quantum computers can solve certain computational problems exponentially faster than any known classical algorithm [1 , 2 ] , with anticipated applications in quantum simulation for material science, drug design and other areas [3 , 4 ] , while also presenting significant challenges to current cryptographic infrastructure [2 ] . However, realizing these applications requires quantum error correction (QEC), in which many physical qubits are encoded into logical qubits to protect information from inevitable noise and imperfections in the hardware.
The surface code has led experimental efforts in this direction, owing to its compatibility with a square-grid layout on a planar chip, and recently enabled the first experimental demonstrations of exponential suppression of the logical error rate at physical error rates below threshold [5 ] . However, the surface code requires a substantial resource overhead to achieve logical error rates relevant to practical applications, with utility-scale fault-tolerant quantum computers expected to require around 100k to 1 million qubits [6 , 7 ] . Furthermore, fabricating a monolithic chip at this scale becomes impractical, due to fundamental constraints on fabrication, yield and coupler density (see Figure 1 a), motivating modular architectures in which smaller units are networked together [8 , 9 , 10 ] .
Figure 1. Hardware models. In all panels, black circles represent data qubits and red (blue) squares represent measure qubits for X X X (Z Z Z ) stabilizers. a , A monolithic grid architecture, in which qubits are placed on a plane with 2D nearest-neighbor grid connectivity. This geometry supports the Euclidean surface code, shown here. b , A general QLDPC architecture, in which each qubit is coupled to a constant number of other qubits, without additional constraints on geometric locality. Couplers may cross and may be long-range, as shown here for the Gross code [11 ] . Each edge represents a coupler between qubits. c , A boundary-connected modular architecture. Planar modules are connected by flexible inter-module couplers routed without geometric constraints. The wiring pattern realizes a closed hyperbolic surface with genus g ≥ 2 g \ge2 g ≥ 2 . The inset shows the planar connectivity within a single module.
An alternative path to fault-tolerant quantum computation with lower overhead lies in the use of more general, high-rate quantum low-density parity-check (QLDPC) codes [12 ] . In principle these codes can substantially reduce resource overheads relative to the surface code [11 ] , however their implementation in solid state systems requires a high density of long-range crossing couplers (see Figure 1 b).
Here we demonstrate that the practical necessity of partitioning a quantum computer into modules can be leveraged to dramatically reduce the resource requirements of QEC. We show that high encoding rates can be achieved using flat Euclidean modules of around 100 qubits, with sparse and fixed non-local couplers connecting qubits at module boundaries (see Figure 1 c). This connectivity is motivated by state-of-the-art superconducting quantum computers, for which local planar gates now operate below the surface code threshold [5 ] , while link resonators connecting chips through cables have been demonstrated to achieve error rates approaching 1% [13 , 14 , 15 ] .
Our constructions are derived from color codes and surface codes on high-genus hyperbolic surfaces [16 , 17 , 18 , 19 , 20 ] . Each module forms a locally flat Euclidean tile of the overall QLDPC code. These tiles are connected using inter-module couplers to form the global connectivity of the hyperbolic tiling [20 , 21 ] . We design modular syndrome extraction circuits for these codes that are tailored to our distributed hardware model and develop efficient and accurate machine learning [22 , 23 ] and matching decoders [24 ] . Our circuit-level simulations demonstrate a 10× reduction in physical qubit overhead compared to the surface code at a logical error rate of 10 − 10 10^{-10} 1 0 − 10 , assuming physical error rates expected for near-term experiments (SI1000 noise model with p = 0.1 % p = 0.1\% p = 0.1% , see Methods) and inter-module gates that are ten times noisier (p s e a m = 1 % p_{\mathrm{seam}} = 1\% p seam = 1% ). This is achieved with a modular hyperbolic surface code of 120 modules of 116 qubits each (see Figure 3 ), using multi-rate syndrome extraction circuits that show substantial tolerance to slow and noisy inter-module couplers. Projecting to larger system sizes, we find these savings scale to an over 30× overhead reduction, requiring only 36 physical qubits per logical qubit, including measure qubits, to achieve a distance of 20–24. This is both lower overhead and higher distance than the [ [ 288 , 12 , 18 ] ] [[288,12,18]] [[ 288 , 12 , 18 ]] two-gross bivariate bicycle code (48 physical qubits per logical qubit, including check qubits) [11 , 25 ] , despite requiring much simpler connectivity that is mostly local in 2D. By comparison, a Euclidean surface code at the same distance requires over 1000 physical qubits per logical qubit. Previous work using 2D nearest-neighbor gates [7 , 26 , 27 , 28 , 29 ] or hyperbolic codes [20 , 30 , 31 ] has demonstrated qubit overhead reductions of up to around 5× at the circuit level.
Figure 3. Simulation data for modular hyperbolic codes using an SI1000 noise model with p = 0.1 % p = 0.1\% p = 0.1% and inter-module CZ gates adjusted to have a noise strength of p s e a m = 1 % p_{\mathrm{seam}} = 1\% p seam = 1% (see Methods for details). a , Modular hyperbolic color codes derived from V8.8.8 hyperbolic tilings using L = 2 L = 2 L = 2 and an octagon module partition. b , Modular hyperbolic surface codes derived from { 4 , 10 } \{4, 10\} { 4 , 10 } regular hyperbolic tilings with L = 5 L = 5 L = 5 and a rectangle module partition. In both panels we compare with Euclidean surface codes partitioned into modules of a comparable size (with additional measure qubits on the boundaries).
Furthermore, we show how our modular QLDPC codes can be augmented to an architecture capable of implementing universal fault-tolerant computation. We design fault-tolerant circuits for implementing logical gates via code automorphisms, corresponding to symmetries of the hyperbolic tiling that permute the modules, using only nearest-neighbor gates within each module and one additional seam of inter-module couplers on each side of a module. We further design low-weight, highly symmetrical logical bases, as well as modular extractor systems that can measure logical Pauli operators via code surgery. These techniques are combined to enable a single extractor system to access hundreds of distinct logical Pauli operators, allowing logical qubits to be teleported into and out of the code, and enabling universal computation with low space overhead. All of these methods can be implemented using hardware components that have already been demonstrated with fidelity very close to those assumed here [5 , 13 , 14 , 15 ] .
Modular hyperbolic codes
Our codes are defined on tilings of closed hyperbolic surfaces, i.e. closed surfaces of constant negative curvature, which have genus g ≥ 2 g \ge2 g ≥ 2 . Codes defined on such tilings encode k k k logical qubits into n n n physical qubits with a constant encoding rate k / n k/n k / n [16 , 17 , 18 ] . While other QLDPC code families are known to have constant rate asymptotically [32 , 33 , 34 ] , the rate for hyperbolic codes is unusually high in practice, approaching 1 / 2 1/2 1/2 for color codes on 12.12.12 tilings [17 , 18 ] . For example, our search finds [ [ n , k , d ] ] = [ [ 648 , 328 , 8 ] ] [[n,k,d]] = [[648,328,8]] [[ n , k , d ]] = [[ 648 , 328 , 8 ]] and [ [ 672 , 172 , 10 ] ] [[672,172,10]] [[ 672 , 172 , 10 ]] hyperbolic color codes (see Table S10 ), where d d d is the code distance, which have rates comparable to recently proposed ultra-high-rate QLDPC codes [35 , 36 ] . Although their distance grows logarithmically with n n n , for practical system sizes it is only a factor of two to three below the distances of around 20–24 needed for utility-scale quantum computation.
Table S10. Hyperbolic color codes derived from base tilings (L = 1 L=1 L = 1 ). Orientable: whether the manifold is orientable. k d 2 / n kd^2/n k d 2 / n : code figure of merit.
We close this gap by fine-graining: we replace each face of the base hyperbolic tiling with a patch of a Euclidean lattice of side length L L L (with L = 1 L = 1 L = 1 recovering the base tiling) to obtain a semi-hyperbolic tiling, from which we construct a new family of semi-hyperbolic surface codes, distinct from those of Ref. [19 ] and, for the first time, semi-hyperbolic color codes. Fine-graining leaves k k k unchanged while increasing d d d by a factor of roughly L L L and n n n by a factor of roughly L 2 L^2 L 2 , trading encoding rate for distance while approximately preserving the figure of merit k d 2 / n kd^2/n k d 2 / n . Since the base hyperbolic codes have such a high rate, the resulting codes retain high encoding rates (as high as k / n = 1 / 16 k/n = 1/16 k / n = 1/16 among the codes we find) at large distances (d ≥ 22 d \ge22 d ≥ 22 ).
Fine-graining also flattens the tiling locally, allowing the semi-hyperbolic code to be partitioned into Euclidean planar modules. Semi-hyperbolic Floquet codes on the same class of tilings, including their modular implementation, have previously been studied [20 , 21 ] (the latter using a generic graph-partitioning heuristic), but color codes have not previously been constructed on them. We refer to the resulting modular semi-hyperbolic codes simply as modular hyperbolic codes, and find many new examples by searching over suitable hyperbolic tilings, as described below.
A modular hyperbolic color code is derived from a tiling of a hyperbolic surface with triangular faces. An example of such a tiling of the infinite hyperbolic plane with 8 triangles meeting at each vertex is shown in Figure 2 a. The vertices of the tiling are three-colorable, with one vertex of each color per triangle, and we assign each edge the third color absent from its two vertices. A tiling of a finite, closed surface can be obtained by cutting a polygon (called the fundamental polygon ) out of this infinite plane and identifying (i.e. gluing) pairs of its boundary edges together to fold the flat polygon into a closed manifold. The fundamental polygon of the genus-2 Bolza surface is shaded in Figure 2 a, with the identified pairs of edges labeled in Figure 2 b. Each triangular face is replaced with a Euclidean hexagonal tiling of side length L L L to form a semi-hyperbolic tiling of hexagons and octagons [20 ] . An X X X stabilizer and a Z Z Z stabilizer generator are then defined on each face of the resulting three-face-colorable tiling.
Figure 2. Construction of a modular hyperbolic color code, using the [ [ 256 , 8 , 12 ] ] [[256, 8, 12]] [[ 256 , 8 , 12 ]] Bolza color code as an example. a, The base infinite hyperbolic tiling, shown in the Poincaré disk model, has triangular faces with 8 meeting at each vertex (face configuration V8.8.8). Its vertices are three-colorable (red, green, blue), with one vertex of each color per triangle. Each edge is assigned the third color, absent from its two vertices. The fundamental polygon of the genus-2 Bolza surface is shaded, and contains 16 triangles. b, The semi-hyperbolic color code obtained by replacing each triangular face with a Euclidean hexagonal tiling of side length L = 4 L = 4 L = 4 , giving a tiling of the surface by hexagons and octagons. A data qubit is associated with each vertex, and both an X X X and a Z Z Z stabilizer with each face. Sides of the fundamental polygon that are identified carry the same label. The code is partitioned into 8 modules, each derived from a pair of triangles of the base tiling sharing an edge of a chosen color (here red edges). c, The two modules outlined in b shown in detail. Two measure qubits are placed in each hexagonal face within a module, with additional measure qubits on the boundary. Qubits within a module are coupled by nearest-neighbor in-module couplers on a 2D grid (solid lines), while stabilizers spanning multiple modules are measured using inter-module couplers at the boundary (dashed lines).
We partition a semi-hyperbolic color code into modules by deriving each module from a contiguous set of triangular faces in the base hyperbolic tiling. In Figure 2 b-Figure 2 c we show an example of a quadrilateral module partition, for
which each module is defined by a pair of triangles in the base tiling that share an edge of a chosen color (e.g. red edges). By combining the eight triangles together that share a vertex of a given color (e.g. red vertices), we can also obtain a larger octagon module partition.
We also construct modular hyperbolic surface codes , derived instead from a hyperbolic tiling of quadrilateral faces. Each quadrilateral face is replaced with a square-grid tiling of side length L L L . Rather than placing data qubits on the edges of this fine-grained tiling [19 ] , we take the dual tiling and bicolor its faces red and blue. We then associate a data qubit with each vertex of this dual tiling, an X X X stabilizer with each red face and a Z Z Z stabilizer with each blue face (see Figure 3 b), analogous to the rotated surface code. Compared with placing data qubits on edges, this has two advantages. First, for odd L L L it distributes the high-weight corner stabilizers between X X X and Z Z Z types (which are related by a symmetry when the tiling is regular, see Section S11A), which can help rebalance the X X X and Z Z Z distances and improve the code parameters. Second, no data qubits lie on the edges of the base quadrilaterals, which allows uniform module partitions.
Logical operators are supported on non-trivial cycles around a handle of the surface, with a genus-g g g tiling supporting 4 g 4g 4 g logical qubits for the hyperbolic color codes and 2 g 2g 2 g logical qubits for the surface codes [37 , 38 ] . By the Gauss-Bonnet theorem, the genus of a closed hyperbolic surface grows linearly with its area. Consequently, for a given code family, the number of logical qubits increases linearly with the number of modules, alongside an increasing distance (which grows with the tiling’s combinatorial systole). The negative curvature responsible for this scaling is absent within any module, each of which is a flat Euclidean patch, and arises entirely from the inter-module couplers connecting them.
Modular Syndrome Extraction
We design fault-tolerant syndrome extraction circuits that respect the connectivity constraints of the boundary-connected modular architecture, and benchmark them under a circuit-level noise model with elevated seam noise. For the modular hyperbolic color codes, we place a pair of measure qubits in each hexagonal plaquette in the bulk and use them to prepare a Bell state. The Bell state is coupled to the data qubits and used to extract the plaquette’s X X X stabilizer, then measured to obtain a stabilizer measurement along with a flag measurement [39 , 40 , 41 ] . The process is then repeated in the opposite basis for the Z Z Z stabilizers. Stabilizers that span modules are measured using cat states (Greenberger–Horne–Zeilinger states) supported on m m m measure qubits, which are prepared using inter-module couplers. Once prepared, the m m m -qubit cat state is then coupled to the stabilizer’s data qubits using in-module gates and then measured to obtain the stabilizer measurement and m − 1 m-1 m − 1 flag measurements.
The circuits for the modular hyperbolic surface codes are similar, with some important differences. A single measure qubit (instead of a Bell state) is used to measure each square plaquette stabilizer in the bulk. The X X X and Z Z Z stabilizers are also interleaved, leading to commutativity constraints. We find valid low-depth extraction schedules by solving the relevant constraint satisfaction problem on the base tiling and lifting to translationally-invariant schedules within the modules. Additionally, we design multi-rate circuits that measure the high-weight inter-module stabilizers less frequently (once every three QEC rounds), which we find leads to improved logical error rates while allowing for slower inter-module gates.
To decode efficiently we develop and train a variant of the AlphaQubit decoder (AQ) for the modular hyperbolic color codes [23 ] . For the modular hyperbolic surface codes we decode using a correlated minimum-weight perfect matching (MWPM) decoder [24 ] .
Our circuit-level simulations are presented in Figure 3 . For the modular hyperbolic color codes (decoded with AlphaQubit) our simulations show an 8× density improvement when compared to the Euclidean surface code partitioned into modules of a similar size. By projecting to larger system sizes (details in Methods), we find that the savings increase to an over 30× overhead reduction, with a modular hyperbolic color code requiring only 36 physical qubits per logical to achieve a distance of 20–24 using planar 72-qubit modules (see Table M2 ). For modular hyperbolic surface codes, our simulations demonstrate a 10× reduction in the number of physical qubits per logical qubit needed to reach a logical error rate of 10 − 10 10^{-10} 1 0 − 10 , increasing to a 15× saving when extrapolating to larger system sizes. While the modular hyperbolic surface codes are not as dense as their color code counterparts, they have the potential practical advantage of supporting fast and accurate MWPM decoding. We find that our circuits for both hyperbolic color and surface codes are highly tolerant to noisy inter-module gates, with even 10× higher seam errors than bulk errors leading to only a modest increase in logical error rate (see Figure M4 ).
Table M2. Modular hyperbolic color codes derived from 8.8.8 tilings, for side lengths L = 2 L=2 L = 2 (octagon modules, K = 8 K=8 K = 8 ), L = 3 L=3 L = 3 and L = 4 L=4 L = 4 (quadrilateral modules, K = 2 K=2 K = 2 ). Each row is a tiling on the Pareto frontier for at least one of these values of L L L , with symmetry group G G G of order ∣ G ∣ |G| ∣ G ∣ , and k k k is independent of L L L . For each L L L we give d d d , the physical-to-logical qubit overhead N M K / k N_{MK}/k N M K / k and k d 2 / n kd^2/n k d 2 / n , where n = ∣ G ∣ L 2 n=|G|L^2 n = ∣ G ∣ L 2 is the number of data qubits and N M K = ( ∣ G ∣ / K ) q K ( L ) N_{MK}=(|G|/K)q_K(L) N M K = ( ∣ G ∣/ K ) q K ( L ) is the total number of physical qubits (data and ancilla) in the modular layout, with q K ( L ) q_K(L) q K ( L ) the number of qubits per module given in Table M1 . Distances quoted as a range are bounded below and above by the methods of Section S10, and k d 2 / n kd^2/n k d 2 / n is then given for both bounds. The automorphism basis columns are independent of L L L and describe the symmetric homology basis found using G + G^+ G + (showing the basis with the lowest total seed weight w w w when multiple Pareto-optimal bases exist). k f o u n d / g k_{\mathrm{found}}/g k found / g is the number of symplectic pairs found, out of the genus g g g , w w w are the seed weights on T △ T^\triangle T △ and w 1 w_1 w 1 are the seed weights once restricted to a single edge color in T △ T^\triangle T △ (for compatibility with certain module layouts). Pair is the mean number of automorphism moves (right Cayley graph distance in the generators ρ ± 1 , σ ± 1 \rho^{\pm1},\sigma^{\pm1} ρ ± 1 , σ ± 1 ) between measuring the two cycles of a symplectic pair with a fixed extractor, and Cayley the mean and maximum of the same over all pairs of basis cycles. Separate tables for each L L L , as well as tables across all three-colorable tilings, are given in § 1.12 .
Figure M4. Logical error rate as a function of the inter-module error rate p s e a m p_{\mathrm{seam}} p seam , swept from 0.1% to 2% with the bulk error rate fixed at p = 0.1 % p = 0.1\% p = 0.1% . a, Modular hyperbolic color codes with L = 2 L = 2 L = 2 octagon modules. b, Modular hyperbolic color codes with quadrilateral modules at L = 2 , 3 , 4 L = 2, 3, 4 L = 2 , 3 , 4 . c, Modular hyperbolic surface codes derived from two different tilings.
Logical Control and Computation
To operate on the logical information stored in the modular hyperbolic memory we combine two ingredients: code surgery and code automorphisms. In code surgery [42 , 43 , 44 , 45 , 46 , 47 ] , a generalization of lattice surgery [48 ] [49], an ancilla system of data and measure qubits is coupled to the memory code in order to measure its logical operators. These measurements implement fault-tolerant logic and allow logical information to be moved into and out of the memory [19 , 25 ] . Code automorphisms are symmetries that permute the physical qubits while preserving the codespace. Here they are global rotations and translations of the hyperbolic tiling, and they allow a single ancilla system to measure many different logical operators.
Combining these two ingredients with low overhead requires co-designing the logical basis of the code with both the surgery ancilla system and the circuits that implement automorphisms. To teleport an individual logical qubit into and out of the memory, we must be able to measure single-qubit logical X ˉ i \bar{X}_i X ˉ i and Z ˉ i \bar{Z}_i Z ˉ i operators (see Section M1). These single-qubit logical operators of the code are derived from a canonical homology basis of the underlying hyperbolic surface. On an orientable genus-g g g surface, a full canonical homology basis consists of g g g symplectic pairs of homologically non-trivial cycles that cross each other an odd number of times (see Figure 4 a for one such pair), while cycles from different pairs cross an even number of times. In a hyperbolic color code, restricting a cycle to edges of one color defines a logical operator, and two colors give four independent, commuting X X X and Z Z Z logical operators per cycle. With anticommuting partners on the other cycle, each symplectic pair encodes four logical qubits [37 ] (two for a hyperbolic surface code), whose operators can be deformed onto module boundaries. While it is known that a shortest homology basis can be found in polynomial time [50], such a basis does not ensure that cycles form symplectic pairs, nor that they can be mapped onto each other via automorphisms. To satisfy these additional constraints, we enumerate low-weight homologically non-trivial seed cycles and generate the orbit of each seed cycle under the action of the automorphisms we can implement. We then search for g ′ ≤ g g^{\prime} \le g g ′ ≤ g symplectic pairs within the orbit of each single seed loop (Methods). For the [ [ 6400 , 104 , 30 ] ] [[6400, 104, 30]] [[ 6400 , 104 , 30 ]] code (g = 26 g = 26 g = 26 ) and the [ [ 3600 , 104 , 22 ] ] [[3600, 104, 22]] [[ 3600 , 104 , 22 ]] code derived from the same tiling with L = 3 L = 3 L = 3 , the orbit of the seed cycle in Figure 4 a contains g ′ = 25 g^{\prime} = 25 g ′ = 25 symplectic pairs, covering 100 of the 104 logical qubits (Table M2 ).
Figure 4. Logical control architecture: code automorphisms and a ribbon extractor . a , A symplectic pair of homologically non-trivial cycles on the semi-hyperbolic tiling of the [ [ 6400 , 104 , 30 ] ] [[6400, 104, 30]] [[ 6400 , 104 , 30 ]] color code, drawn as solid and dashed lines. The two cycles are related by ρ \rho ρ , a global rigid rotation of the tiling by π / 2 \pi/2 π /2 (green arrows). Together with a second rotation σ \sigma σ (purple arrows), these generate all rotations of the tiling, each of which permutes the modules while preserving the codespace (a code automorphism). Logical Pauli operators are supported on the monochromatic substrings of a cycle, obtained by restricting it to edges of a single color. Two of the three colors (e.g. blue and red) give four independent logical operators per cycle. Operators on the same cycle commute, and anticommuting pairs are supported across the symplectic pair, so each pair defines four logical qubits. For the [ [ 6400 , 104 , 30 ] ] [[6400, 104, 30]] [[ 6400 , 104 , 30 ]] code, the orbit of a single seed cycle under these rotations generates a symplectic basis for 100 of the 104 logical qubits. A single extractor then suffices for 100 qubits: it measures the operators on the seed cycle, and every other cycle in the orbit is rotated onto it. b , A ribbon extractor attached to a non-trivial cycle of the memory code, shown in detail in the inset. The extractor is itself boundary-connected and modular, containing ancilla qubits and ancilla checks. It couples to the memory code modules only along the cycle, at the boundaries. It can fault-tolerantly measure all 2 4 − 1 = 15 2^4-1=15 2 4 − 1 = 15 non-trivial products of the four logical Pauli operators on the cycle, using roughly 22% additional physical qubits relative to the memory.
We access this seed cycle by attaching a modular ribbon extractor , an extractor system [47 ] that we design for boundary-connected modules. The name comes from the fact that this system, which extracts logical information from the code, is a closed loop of non-trivial width attached to a cycle that wraps around the base code. Here we focus on ribbon extractors for modular hyperbolic color codes with the quadrilateral module partition; we expect the same methods to apply to other module partitions and to modular hyperbolic surface codes. Like the memory itself, the extractor is built from planar modules joined at their boundaries, and it attaches to the memory along the cycle that supports the logical operators, using inter-module couplers at module boundaries as in the rest of the architecture. A single extractor can fault-tolerantly measure all 2 4 − 1 = 15 2^4 - 1 = 15 2 4 − 1 = 15 non-trivial products of the four logical Pauli operators on the cycle it is attached to. We prove (Supplementary Information) that this construction preserves the full distance d d d . For both the [ [ 3600 , 104 , 22 ] ] [[3600, 104, 22]] [[ 3600 , 104 , 22 ]] and [ [ 6400 , 104 , 30 ] ] [[6400, 104, 30]] [[ 6400 , 104 , 30 ]] codes, the extractor is about 4.5 × 4.5\times 4.5 × smaller than the memory itself.
To measure the other logical operators with the ribbon extractor we implement code automorphisms using fault-tolerant walking circuits . Two rotations ρ \rho ρ and σ \sigma σ about neighboring vertices generate all orientation-preserving rotations and translations of the tiling (Figure 4 a). For quadrilateral modules, ρ \rho ρ and σ \sigma σ each map every module onto another module with the same internal layout and orientation. Since the modules are in general not mapped to their neighbors in the code by these global rotations, we add an additional inter-module seam of couplers from the north boundary of each module to the south boundary of its image in ρ \rho ρ . An O ( L ) O(L) O ( L ) -step walking circuit of SWAP gates implements the move while all stabilizers originally internal to the module continue to be measured at every step, and simulations of a simplified model of the resulting stabilizer dislocation suggest only a modest increase in logical error rate (Methods). We implement the σ \sigma σ rotation in a similar manner, using the east and west boundaries instead. For the larger octagon modules, which would be internally rotated by ρ \rho ρ and σ \sigma σ , we find that most tilings we consider admit an alternative, smaller group of symmetries that still moves every module onto every other while preserving internal module orientation, typically needing one additional seam on each side of a module (Supplementary Information). This smaller group requires two to four seed cycles rather than one to cover the same logical basis, which can still be measured by a single ribbon extractor by adding additional seams to its boundaries. Bringing any basis cycle of the [ [ 3600 , 104 , 22 ] ] [[3600, 104, 22]] [[ 3600 , 104 , 22 ]] or [ [ 6400 , 104 , 30 ] ] [[6400, 104, 30]] [[ 6400 , 104 , 30 ]] code under the ribbon extractor, starting from any other, takes a mean of 4.4 and at most six ρ \rho ρ , ρ − 1 \rho^{-1} ρ − 1 , σ \sigma σ or σ − 1 \sigma^{-1} σ − 1 moves (Table M2 ), with each move transporting four logical operators simultaneously.
Because every logical qubit in this canonical basis has both its X i X_i X i and Z i Z_i Z i cycles in the orbit of the seed cycle, any individual logical qubit can be selectively teleported into and out of the hyperbolic memory by coupling the ribbon extractor to a small compute region, such as a Euclidean surface or color code, enabling universal computation with low space overhead.
As a benchmark, we consider a widely used arithmetic subroutine in quantum algorithms and compile a 50-bit ripple-carry adder [51] onto the [ [ 3600 , 104 , 22 ] ] [[3600, 104, 22]] [[ 3600 , 104 , 22 ]] (L = 3 L=3 L = 3 ) and [ [ 6400 , 104 , 30 ] ] [[6400, 104, 30]] [[ 6400 , 104 , 30 ]] (L = 4 L=4 L = 4 ) memories derived from the same tiling, each using a single ribbon extractor to teleport operands into and out of a small compute region (Methods). Since the symmetry group is non-Abelian, the number of moves between two cycles depends on where the extractor is attached (Methods). By choosing the extractor location so that the two cycles of every symplectic pair are only a single automorphism move apart, and storing operands that are accessed in close succession in the same symplectic pair, we bound the time for the ribbon measurements and automorphisms by 21,402 and 28,930 QEC cycles respectively (428 and 579 per bit).
Discussion and Outlook
While partitioning quantum processors into manageable modules in solid state systems is known to be important for alleviating constraints on fabrication, yield and coupler density, our architecture demonstrates this modularity can also be exploited to deliver substantial efficiency gains in quantum error correction. Realizing these savings in a superconducting quantum computer will require a fully integrated system that simultaneously operates high-performance local grids of qubits [5 ] and high-fidelity inter-module couplers [13 , 14 , 15 ] . These systems must also be resilient to fabrication defects, such as broken qubits or couplers. However, we expect that existing methods for handling fabrication defects in planar color codes [52] and surface codes [53–56] should be naturally adaptable to modular hyperbolic codes, since the local code structure is similar.
While our implementation of neural network and correlated matching decoders demonstrates that efficient and accurate decoding is possible, real-time decoding at scale will require parallelization or specialized hardware implementations. Since the full distance of a modular hyperbolic code is distributed across many modules, sub-distance parallelization strategies will likely be necessary, which generally requires parallelizing the decoding algorithm itself [5 ] [57] rather than relying on parallel windowing [58, 59]. Utility-scale quantum computation requires the ability to implement universal logic fault-tolerantly. We have demonstrated that this is possible by providing the ingredients for a low-overhead quantum memory, using the ribbon extractor for logical measurement along with circuits for implementing automorphisms. This architecture is universal and a natural fit for serial quantum algorithms and subroutines, such as addition circuits. However, we see several opportunities to improve on the current design. First, our ribbon extractor does not fully exploit the non-local connectivity available at module boundaries. This leaves open the possibility of building more space-efficient extractors that use this connectivity [47 ] . Second, it would be desirable to design extractor systems capable of measuring more complex high-weight logical Pauli operators, either in serial or in parallel, in order to implement certain subroutines such as QROM lookup with lower time overhead. Finally, these logical primitives should be co-designed with compilations of full quantum algorithms, building on our adder estimate (Methods), to provide a complete resource estimation of boundary-connected module architectures.
In summary, boundary-connected modules turn a constraint of scalable hardware into a resource for quantum error correction. Our architecture builds hyperbolic codes from flat Euclidean modules, requiring connectivity similar to that of current superconducting processors designed for the surface code, with the hyperbolic geometry realized by the inter-module couplers at their boundaries. Together with the modular syndrome extraction circuits, decoders and logical measurement methods we develop for this setting, this unlocks the efficiency of high-rate QLDPC codes on superconducting devices. Therefore, boundary-connected modular architectures substantially lower the cost of reaching utility-scale fault-tolerant quantum computation using near-term hardware.
Methods
Symmetry groups of hyperbolic tilings
Symmetry groups of hyperbolic tilings are used throughout this work for constructing the tilings, partitioning codes, finding logical bases and implementing automorphisms. In this section, we introduce the relevant terminology and explain how the tilings are constructed. For a more comprehensive overview, see the Supplementary Information as well as Refs. [17 , 20 ] [60, 61].
A hyperbolic triangle group △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) (with r , s , t ∈ Z ≥ 2 r,s,t \in\mathbb{Z}_{\ge2} r , s , t ∈ Z ≥ 2 satisfying 1 r + 1 s + 1 t < 1 \frac{1}{r}+\frac{1}{s}+\frac{1}{t}<1 r 1 + s 1 + t 1 < 1 ) is generated by reflections across the sides of a hyperbolic triangle with internal angles π / r \pi/r π / r , π / s \pi/s π / s and π / t \pi/t π / t . This group has presentation
△ ( r , s , t ) = ⟨ a , b , c ∣ a 2 = b 2 = c 2 = e , ( a b ) r = ( b c ) s = ( c a ) t = e ⟩ (1) \triangle(r,s,t)=\langle a,b,c\mid a^2=b^2=c^2=e,\ (ab)^r=(bc)^s=(ca)^t=e\rangle \tag*{(1)} △ ( r , s , t ) = ⟨ a , b , c ∣ a 2 = b 2 = c 2 = e , ( ab ) r = ( b c ) s = ( c a ) t = e ⟩ (1)
where the generators a a a , b b b and c c c represent reflections across the three sides of the triangle and e e e is the identity element. Reflecting the triangle across its bounding mirrors produces a triangular tiling of the hyperbolic plane H 2 \mathbb{H}^2 H 2 where each triangular tile has vertices with degrees 2 r 2r 2 r , 2 s 2s 2 s and 2 t 2t 2 t (face configuration V 2 r .2 s .2 t V2r.2s.2t V 2 r .2 s .2 t ). An example of a V 8.8.8 V8.8.8 V 8.8.8 triangular tiling is shown in Figure 2 a, where red, green and blue edges are the images of a a a , b b b and c c c mirrors, respectively.
We can construct a finite tiling T △ \mathcal{T}^{\triangle} T △ of a closed hyperbolic surface by finding a torsion-free normal subgroup Γ ◃ △ ( r , s , t ) \Gamma\triangleleft\triangle(r,s,t) Γ ◃ △ ( r , s , t ) of finite index. The quotient group
G ( r , s , t ) : = △ ( r , s , t ) / Γ (2) G(r,s,t):=\triangle(r,s,t)/\Gamma \tag*{(2)} G ( r , s , t ) := △ ( r , s , t ) /Γ (2)
is then the symmetry group of the finite V 2 r .2 s .2 t V2r.2s.2t V 2 r .2 s .2 t triangular tiling on the closed hyperbolic surface H 2 / Γ \mathbb{H}^2/\Gamma H 2 /Γ . See
Figure M1a for an example of a small finite V 8.8.8 V8.8.8 V 8.8.8 tiling (in this case of the Bolza surface). Notice, for example, that c b a b c a = e cbabca=e c bab c a = e is a relation in G ( r , s , t ) G(r,s,t) G ( r , s , t ) (passing through the identified boundary A A A ), meaning c b a b c a ∈ Γ cbabca\in\Gamma c bab c a ∈ Γ . The orientation-preserving subgroup G + ( r , s , t ) ≤ G ( r , s , t ) G^+(r,s,t)\leq G(r,s,t) G + ( r , s , t ) ≤ G ( r , s , t ) consists of all even-length words in G G G , and is generated by ρ : = a b \rho:=ab ρ := ab and σ : = b c \sigma:=bc σ := b c (see Figure M1 b). For this work we enumerate normal subgroups Γ ◃ △ ( r , s , t ) \Gamma\triangleleft\triangle(r,s,t) Γ ◃ △ ( r , s , t ) using the methods of Refs. [62, 63] up to a finite index, and construct larger tilings by searching for surjective homomorphisms from △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) onto candidate finite groups (such as PSL ( 2 , q ) \operatorname{PSL}(2,q) PSL ( 2 , q ) ).
Figure M1. Symmetry groups of the V 8.8.8 V8.8.8 V 8.8.8 tiling of the genus-two Bolza surface. a, Reflecting locally across a red, green or blue edge corresponds to right-multiplication by a a a , b b b or c c c respectively. Taking one triangle labeled as the identity e ∈ G ( 4 , 4 , 4 ) e\in G(4,4,4) e ∈ G ( 4 , 4 , 4 ) as the fundamental domain, each triangle is uniquely labeled with an element g ∈ G ( 4 , 4 , 4 ) g\in G(4,4,4) g ∈ G ( 4 , 4 , 4 ) . Opposite boundary edges (labeled with matching uppercase letters) are identified. b, We can instead take a pair of triangles related by a b b b reflection as the fundamental domain of the orientation-preserving subgroup G + G^+ G + generated by ρ : = a b \rho:=ab ρ := ab and σ : = b c \sigma:=bc σ := b c , and label the resultant quadrilaterals with elements of G + G^+ G + .
For the modular hyperbolic surface codes we use quadrilateral tilings, for which each face is instead a quadrilateral. We construct many of these using quadrilateral groups □ ( r , s , t , u ) \square(r,s,t,u) □ ( r , s , t , u ) , which are instead generated by reflections across the sides of a hyperbolic quadrilateral, see Section S1 for details. These include non-regular quadrilateral tilings with face configuration V 2 r .2 s .2 t .2 u V2r.2s.2t.2u V 2 r .2 s .2 t .2 u , substantially enlarging the space of tilings beyond the regular { p , q } \{p,q\} { p , q } tilings used in previous hyperbolic surface code constructions [17 , 19 ] . In particular, the big square module partition described below requires each tile to have a corner at which four quadrilaterals meet, which is impossible for a regular hyperbolic { 4 , q } \{4,q\} { 4 , q } tiling (see Table S11 , Table S15 and S16 for examples of codes constructed from these tilings).
Table S11. Hyperbolic surface codes derived from base tilings (L = 1 L = 1 L = 1 ). Orientable: whether the manifold is orientable. k d 2 / n kd^2/n k d 2 / n : code figure of merit.
Table S15. TABLE S15. Modular hyperbolic surface codes for side length L = 5 L=5 L = 5 with rectangle modules (K = 2 K=2 K = 2 base quadrilaterals per module). M 2 M_2 M 2 : number of rectangle modules (residual single square modules in parentheses if unmatched). N M 2 N_{M_2} N M 2 : total physical qubits in the modular layout including both data qubits and ancilla qubits. N M 2 / k N_{M_2}/k N M 2 / k : physical-to-logical qubit overhead. G r o t G_{\mathrm{rot}} G rot : order of the orientation-preserving rotational symmetry subgroup relative to target. Automorphism Bases: logical basis operator coverage k f o u n d / g k_{\mathrm{found}}/g k found / g and generator seed weights w w w (pruned to ≥ 85 % \geq85\% ≥ 85% coverage or highest-coverage basis). Cov.: maximum basis coverage percentage. Pair: mean number of automorphism moves between measuring the two cycles of a symplectic pair with a fixed extractor. Cayley: mean and maximum of the same over all pairs of basis loops. Both are right Cayley graph distances among basis automorphisms, with the extractor placed to minimise Pair (then the maximum, then the mean), for the listed basis with the highest coverage. k d 2 / n kd^2/n k d 2 / n : code figure of merit.
Modular hyperbolic color codes
Our modular hyperbolic color codes are constructed by fine-graining a triangular hyperbolic tiling T △ \mathcal{T}^{\triangle} T △ (Section M1) and replacing each triangular face with a Euclidean hexagonal lattice of side length L L L . This family of tilings was used to construct Floquet codes in [20 ] , but has not previously been studied for constructing color codes. We associate a data qubit with each vertex and define an X X X and Z Z Z stabilizer on each face of the tiling, see Supplementary Information for more details on the code construction.
Table M1 summarizes the different module layouts for modular hyperbolic color codes, giving the total number of qubits per module as a function of the fine-graining parameter (side-length) L L L for each module type. The color code modules partition the triangular tiles of the base triangular tiling (T △ \mathcal{T}^{\triangle} T △ ) into triangle (K = 1 K=1 K = 1 ), quadrilateral (K = 2 K=2 K = 2 ) or octagon (K = 8 K=8 K = 8 ) modules. Triangular modules are formed from a single triangle of the base tiling T △ \mathcal{T}^{\triangle} T △ , in bijection with the elements of G ( r , s , t ) G(r,s,t) G ( r , s , t ) . Each quadrilateral module is a pair of adjacent triangles sharing an edge of a chosen color (e.g. green, the images of b b b mirrors; the other two choices are analogous), each labeled by a left coset g ⟨ b ⟩ g\langle b\rangle g ⟨ b ⟩ (where g ∈ G ( r , s , t ) g\in G(r,s,t) g ∈ G ( r , s , t ) ) or equivalently by an element of G + ( r , s , t ) G^+(r,s,t) G + ( r , s , t ) . Each octagon module is formed from 8 triangles at a vertex type (e.g. meeting at vertex b ∩ c b\cap c b ∩ c , labeled by a left coset g ⟨ b , c ⟩ g\langle b,c\rangle g ⟨ b , c ⟩ for g ∈ G ( r , s , t ) g\in G(r,s,t) g ∈ G ( r , s , t ) ).
Table M1. Hyperbolic color and surface code module options. Number of qubits per module for different module shapes and values of the fine-graining parameter L L L . *The Octagon module is available for base triangular tilings with face configuration V 2 r .2 s .2 t V2r.2s.2t V 2 r .2 s .2 t where at least one vertex has degree 8 (e.g., 2 r = 8 2r=8 2 r = 8 ). **The Big Square module is available for base quadrilateral tilings with face configuration V a . b . c . d Va.b.c.d V a . b . c . d where at least one vertex degree is 4 (e.g., a = 4 a=4 a = 4 ).
Modular Hyperbolic Surface Codes
Our modular hyperbolic surface codes are derived from tilings of closed hyperbolic surfaces by quadrilateral faces (Figure M2 a). We fine-grain each face of the quadrilateral tiling T □ T^{\square} T □ with an L × L L \times L L × L Euclidean square grid to form a semi-hyperbolic tiling. Rather than placing qubits on the edges of the tiling, as done in [19 ] , we instead take its dual tiling, bicolor the faces red and blue and associate a data qubit with each vertex, an X X X stabilizer with each red face and a Z Z Z stabilizer with each blue face. This corresponds to replacing each quadrilateral face of T □ T^{\square} T □ with a patch of square stabilizers resembling a rotated surface code in the bulk, so our construction could be considered a “rotated” analog of [19 ] . Stabilizers in the bulk of a tile then have weight four, locally identical to a planar surface code, while those at the corners of the tiles inherit the higher weight set by the vertex degree of T □ T^{\square} T □ , which is six for the { 4 , 6 } \{4,6\} { 4 , 6 } tiling shown in Figure M2 .
Figure M2. Construction of modular hyperbolic surface codes. a, A modular hyperbolic surface code derived from a quadrilateral tiling, in which six squares meet at each vertex (a regular { 4 , 6 } \{4,6\} { 4 , 6 } tiling), shown in the Poincaré disk model. The code is partitioned into modules, each derived from a single square of the base quadrilateral tiling; two neighboring modules are outlined with dashed green and blue lines. b, The two outlined modules of a shown in detail.
Compared with Ref. [19 ] , where all high-weight corner stabilizers have the same Pauli type, for odd L L L our construction distributes them between X X X and Z Z Z types (see Section S11 A), and since no data qubits lie on the edges of the base quadrilaterals, the tiles can be grouped into uniform modules.
We partition the code into modules by grouping contiguous quadrilateral tiles: a single tile gives a square module (K = 1 K=1 K = 1 ), each labeled by an element of G ( r , s , t , u ) : = □ ( r , s , t , u ) / Γ G(r,s,t,u):=\square(r,s,t,u)/\Gamma G ( r , s , t , u ) := □ ( r , s , t , u ) /Γ . A rectangle module (K = 2 K=2 K = 2 ) is formed by an even pair of quadrilateral tiles sharing an edge (labeled by an element of the orientation-preserving subgroup G + ( r , s , t , u ) ≤ G ( r , s , t , u ) G^+(r,s,t,u) \leq G(r,s,t,u) G + ( r , s , t , u ) ≤ G ( r , s , t , u ) ). If the quadrilateral tiling has face configuration V a . b . c . d Va.b.c.d V a . b . c . d with at least one of a , b , c , d a,b,c,d a , b , c , d equal to 4, i.e. each quadrilateral tile has at least one corner at which four tiles meet, then we can form a big square module (K = 4 K=4 K = 4 ) by choosing one such corner type and combining the four quadrilaterals that meet at each vertex of that type in T □ T^{\square} T □ (labeled by a left coset of the corresponding vertex stabilizer in G ( r , s , t , u ) G(r,s,t,u) G ( r , s , t , u ) ). See Table M1 for diagrams of the modules, as well as the sizes of the modules. Qubits within a module are coupled by nearest-neighbor gates on a 2D grid, and only the stabilizers straddling tile boundaries require inter-module couplers (Figure M2 b).
Code Parameters and Tables
Table M2 and Table M3 list codes on the Pareto frontier for the two modular hyperbolic code families whose circuit-level simulations are shown in Figure 3 . Table M2 gives semi-hyperbolic color codes derived from 8.8.8 8.8.8 8.8.8 tilings with side length L = 2 L=2 L = 2 and an octagon module partition, for which each module contains 16 L 2 + 8 = 72 16L^2+8=72 16 L 2 + 8 = 72 physical qubits, as well as with side lengths L = 3 L=3 L = 3
Table M3. Modular hyperbolic surface codes for side length L = 5 L=5 L = 5 with rectangle modules (K = 2 K=2 K = 2 base quadrilaterals per module), restricted to { 4 , 10 } \{4,10\} { 4 , 10 } regular tilings. M 2 M_2 M 2 : number of rectangle modules (residual single square modules in parentheses if unmatched). N M 2 N_{M2} N M 2 : total physical qubits in the modular layout, including both data and ancilla qubits. N M 2 / k N_{M2}/k N M 2 / k : physical-to-logical qubit overhead. Automorphism Bases: logical basis operator coverage k f o u n d / g k_{\mathrm{found}}/g k found / g and generator seed weights w w w , pruned to bases with ≥ 85 % \ge85\% ≥ 85% coverage or the single highest-coverage basis otherwise. Cov.: maximum basis coverage percentage. Pair: mean number of automorphism moves between measuring the two cycles of a symplectic pair with a fixed extractor. Cayley: mean and maximum of the same over all pairs of basis loops. Both are right Cayley graph distances among basis automorphisms, with the extractor placed to minimise Pair (then the maximum, then the mean), for the listed basis with the highest coverage. k d 2 / n kd^2/n k d 2 / n : code figure of merit. A table across all quadrilateral tilings is given in Table S15 .
and L = 4 L=4 L = 4 and a quadrilateral module partition (with 4 L 2 + 2 L = 42 4L^2+2L=42 4 L 2 + 2 L = 42 and 72 physical qubits per module, respectively), together with the logical bases found using G + G^+ G + (Section M K). Table M3 gives semi-hyperbolic surface codes derived from { 4 , 10 } \{4,10\} { 4 , 10 } regular tilings with L = 5 L=5 L = 5 and a rectangle module partition, for which each module contains 4 L 2 + 3 L + 1 = 116 4L^2+3L+1=116 4 L 2 + 3 L + 1 = 116 physical qubits. Both tables are restricted to the Pareto frontier of the corresponding tiling family; broader tables spanning all tilings, module partitions and side lengths we considered are given in § 1.12 .
Distance finding
Distances of the hyperbolic color codes and surface codes are computed by finding the minimum length homologically non-trivial cycle (combinatorial systole) of certain tilings associated with the codes. For the color codes, our string-like distance upper bound d s t r i n g ≥ d d_{\mathrm{string}}\ge d d string ≥ d is computed as twice the length of the smallest systole among the three shrunk lattices [37 ] . In Section S10 we prove that a lower bound on the distance is given by d r e s : = median ( s R r e s , s G r e s , s B r e s ) ≤ d d_{\mathrm{res}}:=\operatorname{median}(s_R^{\mathrm{res}},s_G^{\mathrm{res}},s_B^{\mathrm{res}})\le d d res := median ( s R res , s G res , s B res ) ≤ d , where s C r e s s_C^{\mathrm{res}} s C res is the systole of the shrunk lattice [64, 65] of color C ∈ { R , G , B } C\in\{R,G,B\} C ∈ { R , G , B } . Finally, the X X X and Z Z Z distances of the hyperbolic surface codes are computed exactly as the systole of a cell complex associated with the tiling. All systoles are computed using a tree-cotree decomposition [66], accelerated by restricting the source nodes to a single fundamental domain (tile) of the tiling, which retains full accuracy due to the symmetries of the tiling. In Section S10 we explain our methods in more detail and show that our distance finding methods empirically scale linearly with code size and are orders of magnitude faster than alternative available methods for codes of size n > 10 3 n>10^3 n > 1 0 3 –10 4 10^4 1 0 4 . FurFurthermore, from comparing to the exact connected-cluster method [67, 68], we observe that the upper bound d s t r i n g d_{\mathrm{string}} d string is usually tight (d s t r i n g = d d_{\mathrm{string}} = d d string = d ) with almost all discrepancies occurring for tilings with distance d = 2 d = 2 d = 2 at L = 1 L = 1 L = 1 .
We design syndrome extraction circuits compatible with the planar module layout. In the bulk of each module, stabilizers have weight four for surface codes and weight six for color codes. We add one measure qubit per bulk face for surface codes and two measure qubits per bulk face for color codes, with both cases giving a planar layout in which every qubit couples to at most four nearest neighbors on a 2D Euclidean grid. At the edges of modules, stabilizers span two modules; at the corners, a weight-w w w stabilizer spans m m m modules with one measure qubit per module, forming a linear chain of m m m measure qubits. We place all measure qubits using a graph flooding algorithm that preserves this layout.
To measure the higher-weight corner stabilizers while respecting the planar module layout and existing inter-module connectivity, we develop cat-flagged circuits. We prepare a cat state (a Greenberger–Horne–Zeilinger state) across the linear chain using the inter-module links, couple each measure qubit to its local data qubits to extract the stabilizer, and measure the cat state. The linear chain gives a cat-state preparation depth of O ( m ) O(m) O ( m ) .
For a particular stabilizer on a face, one measure qubit reads out the syndrome and the remaining m − 1 m - 1 m − 1 act as flag qubits, which can detect hook errors. Figure M3 shows a weight-eight corner stabilizer spanning four modules with four measure qubits. For surface codes, we interleave X X X and Z Z Z stabilizer extraction, ensuring that their interactions with shared data qubits are consistently ordered. We find such a schedule by solving a constraint satisfaction problem on the base tiling, explained in Supplementary Information. For color codes, X X X and Z Z Z stabilizers are extracted sequentially. We schedule each extraction stage using a translationally invariant plaquette schedule, assigning the same up-middle-down ordering to every bulk plaquette within a module.
Figure M3. Cat-flagged syndrome extraction for a weight-8 corner stabilizer of a modular hyperbolic color code, such as those derived from V8.8.8 tilings.
All stabilizers can be measured every cycle in the uniform-rate (measurement-aligned) variant of our circuits. Inter-module stabilizers require additional time for cat or Bell state preparation and measurement. In the multi-rate variant, we spread their preparation, extraction and measurement across three consecutive cycles, interleaving them with bulk stabilizer extraction so that the noisy inter-module links are used less frequently. We find that the multi-rate circuits have improved logical error rates relative to the uniform-rate circuits, see Section S4 for more details.
We benchmark these circuits under the modular SI1000 noise model of Table M4 . Circuits are first transpiled into a gate set of CZ gates, single-qubit rotations, Z Z Z -basis resets and Z Z Z -basis measurements, and noise is applied to the transpiled circuit. Every CZ gate acting between qubits in different modules is assigned the elevated error rate p s e a m p_{\mathrm{seam}} p seam , while all other operations take their bulk rates regardless of their position relative to a module boundary.
Table M4. The superconducting-inspired modular SI1000 noise model, where inter-module CZ gates carry an independent error rate p s e a m p_{\mathrm{seam}} p seam ; setting p s e a m = p p_{\mathrm{seam}} = p p seam = p recovers standard SI1000. Here DEP 1 ( q ) \operatorname{DEP}_{1}(q) DEP 1 ( q ) and DEP 2 ( q ) \operatorname{DEP}_{2}(q) DEP 2 ( q ) are one- and two-qubit depolarizing channels of strength q q q , XERR ( q ) \operatorname{XERR}(q) XERR ( q ) applies X X X with probability q q q , and MERR ( q ) \operatorname{MERR}(q) MERR ( q ) flips the reported measurement outcome with probability q q q . The single parameter p p p sets the two-qubit gate error rate, with all other rates defined relative to it.
Figure M4 shows the logical error rate as p s e a m p_{\mathrm{seam}} p seam is swept from 0.1% to 2% with the bulk error rate fixed at p = 0.1 % p = 0.1\% p = 0.1% . For modular hyperbolic codes across all module partitions and all module sizes, the logical error rate is only weakly sensitive to p s e a m p_{\mathrm{seam}} p seam . This tolerance follows from boundary connectivity, since only the small fraction of gates that cross a module boundary is affected by the elevated error rates.
Neural Network Decoding for Hyperbolic Color Codes
AlphaQubit (AQ) is a family of recurrent, attention-based decoders, mapping the error correction syndrome into a predicted probability that each logical observable is flipped [22 , 23 ] . We use here a variant that differs from what was previously published [23 ] in several regards.
The first difference is that the network is trained to produce several binary classification predictions, one per logical measurement in the circuit. We train each of them using a binary cross-entropy loss to independently predict each observable.
The second difference is that, rather than performing attention across all the stabilizer measurements, we can perform it across all triggered stabilizers (events) in a time window. Because the circuits have a few rounds only (16 rounds), here the time window corresponds to the whole experiment.
The third major difference is the auxiliary targets we use during training. Instead of simulating stopping the experiment at every point in time [23 ] , we adapt an approach similar to [69]. In the detector error model, the prediction for each of the k k k observables results from XOR’ing together the predictions for several error mechanisms. By assigning a time to each error mechanism (the time of the first event that it triggers), we can partition the error mechanisms that can flip each observable. By XOR’ing the errors in each partition, we produce T × k T \times k T × k auxiliary binary targets for T T T rounds. Predicting the auxiliary targets during training via auxiliary heads both improves training time and performance, even though those labels are not fault-tolerant observables in isolation.
Another difference is our use of graph-derived spacetime coordinates (combining the round index with scaled spatial coordinates) for both input features and rotary position embeddings [70]. Unlike Poincaré projections, which introduce metric distortions and artificial boundary cuts, our spatial coordinates are obtained from a spectral embedding of the single-round detector error model hypergraph (using the leading non-trivial eigenvectors of a normalized diffusion operator), so that detectors that frequently co-occur in the noise model are placed close together in Euclidean space.
The resulting AQ network has around 55 million parameters. We train a different instance per circuit, using up to 3 billion simulated examples, from a mixture of SI1000 noise levels. After training, AQ can decode each 16-round example (wall time for the forward pass, on a single v6e Trillium TPU) from 140 μ \mu μ s to 6000 μ \mu μ s, depending on the size of the circuit.
Correlated Matching Decoding for Hyperbolic Surface Codes
For the hyperbolic surface codes, we use a variant of the correlated sparse blossom decoder in pymatching [24 ] [71]. We use three passes, finding that this slightly improves accuracy relative to two-pass matching.
We use a custom decomposition of the detector error model by classifying the detectors in the circuit into four classes: X X X flags, X X X stabilizers, Z Z Z flags and Z Z Z stabilizers. The X X X (Z Z Z ) stabilizer detectors are the ones formed from consecutive measurements of X X X (Z Z Z ) stabilizers in the circuit. The flag detectors are formed from single measurements of qubits in the cat (or Bell) states that do not correspond to measurements of the code’s stabilizers. For example, when measuring an X X X stabilizer using an n n n -qubit X X X cat state (stabilized by ⟨ X ⊗ n , Z 0 Z 1 , Z 1 Z 2 , … , Z n − 2 Z n − 1 ⟩ \langle X^{\otimes n}, Z_0 Z_1, Z_1 Z_2, \ldots, Z_{n-2} Z_{n-1}\rangle ⟨ X ⊗ n , Z 0 Z 1 , Z 1 Z 2 , … , Z n − 2 Z n − 1 ⟩ ), the cat state is unencoded into a product state followed by single-qubit measurements, of which one is an X X X stabilizer measurement and the remaining n − 1 n - 1 n − 1 are Z Z Z flag measurements.
Given these four detector classes, we decompose the detector error model (DEM) so that each component of a decomposed error triggers only detectors from a single class. Concretely, for each error mechanism e e e in the DEM that triggers detectors belonging to more than one class, we decompose e e e into components e = e 1 ⊕ e 2 ⊕ ⋯ e = e_1 \oplus e_2 \oplus\cdots e = e 1 ⊕ e 2 ⊕ ⋯ , where each e i e_i e i triggers detectors from only one of the four classes { X -stab , Z -stab , X -flag , Z -flag } \{X\text{-stab}, Z\text{-stab}, X\text{-flag}, Z\text{-flag}\} { X -stab , Z -stab , X -flag , Z -flag } . Each component e i e_i e i is required to also appear as an independent error elsewhere in the DEM, which determines its detector and observable signature. The observable assignments are chosen so that the symmetric difference of the observables across all components matches the observables of the original undecomposed error.
This decomposition is finer than the standard two-class basis decomposition used for planar surface codes (which separates detectors only into X-type and Z-type). The finer four-class decomposition is necessary to ensure that each component of a decomposed error is matchable, i.e. that it triggers at most two detectors of its class. In each basis, a DEM error (or error component) is guaranteed to trigger two stabilizer detectors (since locally the code resembles a standard Euclidean surface code) and either one or two flag detectors (as shown by at most two flag detecting regions being supported on each qubit in Figure S19 ). Without separating flag detectors from stabilizer detectors, a single component could trigger, for example, two X stabilizer detectors together with one or two X flag detectors, giving a component with three or four detectors that cannot be represented as an edge in the matching graph.
Figure S19. Detecting regions of the cat-flagged syndrome extraction circuit for a weight-8 stabilizer measured with m = 4 m = 4 m = 4 ancillas, shown over two rounds each consisting of an X X X and Z Z Z subround. a X X X plaquette stabilizer detecting region (red), sensitive to Z Z Z errors. Each detector compares the plaquette stabilizer ancilla outcomes of two consecutive rounds. b Z Z Z plaquette stabilizer detecting region (blue), sensitive to X X X errors. c Flag detecting regions, shown in different shades of blue and red to distinguish independent detectors. Each of the m − 1 m - 1 m − 1 flag ancillas is measured in the opposite basis to the plaquette stabilizer ancilla, and yields a deterministic outcome every sub-round. The flag detectors detect hook errors that would otherwise propagate onto multiple data qubits.
The decomposed DEM is decoded using the correlated minimum-weight perfect matching decoder in PyMatching [24 ] , which builds a single matching graph from the full decomposed DEM and accounts for correlations between the components of decomposed errors when computing the minimum-weight matching. We run the decoder for three passes, following the iterative re-weighting approach of Ref. [71]: after each pass, the edge weights in the matching graph are updated based on the errors identified in the previous pass, and the matching is re-computed. We find that three passes slightly improves accuracy relative to two passes, with diminishing returns beyond three.
measure each stabilizer cut by a module boundary with a single measure qubit, coupled to the data qubits in neighboring modules by inter-module CZ gates, rather than using the cat-state and flag construction of our hyperbolic circuits. A modular partition of the code, however, needs a measure qubit in every module the stabilizer touches, for example to prepare the Bell pairs that mediate the inter-module gates, so to compare qubit counts fairly we count one extra measure qubit for each additional module touched by a cut stabilizer. This gives 2 d 2 − 1 + 2 w d + w 2 2d^2-1+2wd+w^2 2 d 2 − 1 + 2 w d + w 2 qubits, with L = 7 L=7 L = 7 and w = ⌊ ( d − 1 ) / L ⌋ w=\lfloor(d-1)/L\rfloor w = ⌊( d − 1 ) / L ⌋ cuts in each direction: each cut is crossed by d d d stabilizers, and the stabilizer at each of the w 2 w^2 w 2 cut intersections touches four modules. The hyperbolic circuits include the corresponding qubits explicitly.
The overhead of a code is its total number of physical qubits (including ancilla qubits) divided by k k k . For a simulated hyperbolic code, we compute the density improvement against the largest-distance surface code whose ϵ \epsilon ϵ is no lower than that of the hyperbolic code (the improvement is that surface code’s overhead divided by the hyperbolic code’s overhead). Hollow symbols mark codes that are too large to simulate or decode. We plot these at the measured ϵ \epsilon ϵ of the Euclidean surface code with the largest odd distance not exceeding d d d . This extrapolation is supported by the fact that every simulated hyperbolic code except the smallest, [8 , 6 ] [64], reaches a lower ϵ \epsilon ϵ than the odd-distance Euclidean surface code at distance d d d or d − 1 d-1 d − 1 . For the color codes, d d d is the stringlike upper bound of Section S10, which we expect to be tight.
Simulation methodology
All logical error rates are estimated by Monte Carlo sampling of separate X and Z basis memory experiments under the modular SI1000 noise model (Table M4 ) with p = 0.1 % p = 0.1\% p = 0.1% and, unless stated otherwise, p s e a m = 1 % p_{\mathrm{seam}} = 1\% p seam = 1% , using Stim [72]. From the shot failure probability P L P_L P L we report the logical error rate per logical qubit per round, ϵ = 1 − ( 1 − P L ) 1 / ( k r ) \epsilon= 1-(1-P_L)^{1/(kr)} ϵ = 1 − ( 1 − P L ) 1/ ( k r ) , which is ≈ P L / ( k r ) \approx P_L/(kr) ≈ P L / ( k r ) in the low-error regime P L ≪ 1 P_L \ll1 P L ≪ 1 relevant here, and report 95% Clopper–Pearson confidence intervals. Surface codes (hyperbolic and Euclidean) use r = 30 r = 30 r = 30 and the correlated matching decoder (Section M H). Hyperbolic color codes use r = 16 r = 16 r = 16 and AlphaQubit (Section M G). While the number of rounds differs between code families, we do not expect this to impact our comparisons, since we normalize the logical error rate by the number of rounds. For the hyperbolic surface codes in Figure 3 we use multi-rate circuits, alternate the extraction order forward and backward between rounds, and use a ZZ schedule within each module (see Section M F and Section S4 B).
We compare to rotated surface codes of odd distance 3 ≤ d ≤ 25 3 \le d \le25 3 ≤ d ≤ 25 using a standard NZ schedule. Each code is partitioned into modules of 7 × 7 7 \times7 7 × 7 data qubits (98 qubits per module), every inter-module CZ gate is assigned p s e a m p_{\mathrm{seam}} p seam , and decoding uses the same correlated matching decoder. For simplicity, the simulated Euclidean circuits measure each stabilizer cut by a module boundary with a single measure qubit, coupled to the data qubits in neighboring modules by inter-module CZ gates, rather than using the cat-state and flag construction of our hyperbolic circuits. A modular partition of the code, however, needs a measure qubit in every module the stabilizer touches, for example to prepare the Bell pairs that mediate the inter-module gates, so to compare qubit counts fairly we count one extra measure qubit for each additional module touched by a cut stabilizer. This gives 2 d 2 − 1 + 2 w d + w 2 2d^2-1+2wd+w^2 2 d 2 − 1 + 2 w d + w 2 qubits, with L = 7 L=7 L = 7 and w = ⌊ ( d − 1 ) / L ⌋ w=\lfloor(d-1)/L\rfloor w = ⌊( d − 1 ) / L ⌋ cuts in each direction: each cut is crossed by d d d stabilizers, and the stabilizer at each of the w 2 w^2 w 2 cut intersections touches four modules. The hyperbolic circuits include the corresponding qubits explicitly.
The overhead of a code is its total number of physical qubits (including ancilla qubits) divided by k k k . For a simulated hyperbolic code, we compute the density improvement against the largest-distance surface code whose ϵ \epsilon ϵ is no lower than that of the hyperbolic code (the improvement is that surface code’s overhead divided by the hyperbolic code’s overhead). Hollow symbols mark codes that are too large to simulate or decode. We plot these at the measured ϵ \epsilon ϵ of the Euclidean surface code with the largest odd distance not exceeding d d d . This extrapolation is supported by the fact that every simulated hyperbolic code except the smallest, [8 , 6 ] [64], reaches a lower ϵ \epsilon ϵ than the odd-distance Euclidean surface code at distance d d d or d − 1 d-1 d − 1 . For the color codes, d d d is the stringlike upper bound of Section S10, which we expect to be tight.
Fault-Tolerant Automorphism Gates
A code automorphism is a permutation of the physical qubits that preserves the stabilizer group, while implementing a (potentially nontrivial) logical operation [73–77]. For hyperbolic codes, the code automorphisms are derived from the symmetries of the hyperbolic tiling. In this section we explain how certain code automorphisms can be implemented using walking circuits .
Let’s consider modular hyperbolic color codes with a quadrilateral module partition as an example, for which the modules are in bijection with the elements of G + G^+ G + . Left multiplication by an element h ∈ G + h \in G^+ h ∈ G + defines a rigid motion (isometry) of the tiling, mapping module g g g to h g hg h g (see Figure M5 ). We define a consistent internal coordinate system of each module, such that ( g , x , y ) (g,x,y) ( g , x , y ) denotes a qubit at coordinate ( x , y ) (x,y) ( x , y ) in module g g g . Notice that any automorphism h ∈ G + h \in G^+ h ∈ G + permutes the modules while preserving their internal coordinate system, mapping ( g , x , y ) → ( h g , x , y ) (g,x,y) \to(hg,x,y) ( g , x , y ) → ( h g , x , y ) . We can implement such an automorphism by using inter-module couplers to connect the north boundary of module g g g to the south boundary of module h g hg h g , using a walking circuit (consisting of SWAP gates) to map the quantum information in module g g g to module h g hg h g .
Figure M5. Modules and inter-module connectivity as group elements and action. a, The quadrilateral modules are in bijection with the elements of the group generated by the two rotations ρ \rho ρ (green) and σ \sigma σ (purple), shown here in the Poincaré disk with each module labeled by its group element. Taking one module as the identity e e e , every other module is labeled by a sequence of rotations mapping e e e onto it. b, The two kinds of inter-module connection required at a module g g g . Right multiplication (blue) gives the four modules adjacent to g g g in the tiling, whose shared boundaries carry the couplers used to measure stabilizers spanning two modules. Left multiplication (red) gives the modules that g g g is mapped onto by the rotations, whose shared boundaries carry the couplers used by the walking circuits that implement the automorphisms.
We can similarly implement an arbitrary automorphism in G + G^{+} G + by adding a second seam to the east and west boundaries of each module. Since G + G^{+} G + is generated by the two elements ρ : = a b \rho:= ab ρ := ab and σ : = b c \sigma:= bc σ := b c , we add additional couplers at the north and south boundaries to implement the automorphism g → ρ g g \to\rho g g → ρ g and use the east and west boundaries to implement g → σ g g \to\sigma g g → σ g , see Figure M6 . With these additional couplers we can use walking circuits to implement any automorphism in G + G^{+} G + using a sequence of automorphisms in { σ , σ − 1 , ρ , ρ − 1 } \{\sigma, \sigma^{-1}, \rho, \rho^{-1}\} { σ , σ − 1 , ρ , ρ − 1 } . Since the existing seams required for code connectivity (stabilizer measurement) correspond to right multiplication by ρ \rho ρ and σ \sigma σ , the overall inter-module connectivity corresponds to a left-right Cayley graph of G + G^{+} G + , see Figure M5 .
Figure M6. A permutation of the modules is implemented using walking circuits and additional seams on opposing boundaries, shown here for a single module g g g . Under the global rotation ρ \rho ρ , module g g g is mapped onto ρ g \rho g ρ g : the north seam of g g g connects to the south seam of ρ g \rho g ρ g . The east and west seams implement σ \sigma σ in the same way, and the two rotations together generate the full orientation-preserving symmetry group. Grey arrows mark the four modules reached by left multiplication.
Implementing a single automorphism ρ \rho ρ or σ \sigma σ (an automorphism move ) with a walking circuit takes O ( L ) O(L) O ( L ) steps, during which only the stabilizers originally fully internal to a module can be repeatedly measured. The stabilizers originally on the boundary of the module become dislocated until the move is completed, after which they can be measured again. We describe the automorphism walking circuits in more detail in Section S7. In Section S7 C we also simulate a simplified model in which the stabilizers on module boundaries are not measured for several rounds, providing evidence that this stabilizer dislocation causes only a modest increase in logical error rates.
For the larger octagon color code modules, each containing eight triangles, this construction requires modification. The octagon modules are in bijection with the left cosets G / D = { g D ∣ g ∈ G } G/D = \{gD \mid g \in G\} G / D = { g D ∣ g ∈ G } , where D : = ⟨ b , c ⟩ ≤ G D := \langle b, c \rangle\leq G D := ⟨ b , c ⟩ ≤ G is a dihedral subgroup of order eight, ∣ D ∣ = 8 |D| = 8 ∣ D ∣ = 8 . The automorphism σ = b c ∈ G + \sigma= bc \in G^{+} σ = b c ∈ G + would rotate the identity module ⟨ b , c ⟩ \langle b,c \rangle ⟨ b , c ⟩ rather than leaving the internal coordinates fixed, which is not compatible with our walking circuits using fixed inter-module couplers. We resolve this by finding a complement Λ ≤ G \Lambda\leq G Λ ≤ G of D ≤ G D \leq G D ≤ G , which by definition satisfies
Λ D = G , Λ ∩ D = { e } . (3) \Lambda D = G,\qquad\Lambda\cap D = \{e\}. \tag*{(3)} Λ D = G , Λ ∩ D = { e } . (3)
Each element g ∈ G g \in G g ∈ G can then be factorized as g = λ d g = \lambda d g = λ d , where λ ∈ Λ \lambda\in\Lambda λ ∈ Λ labels the octagon module that triangle g g g belongs to and d ∈ D d \in D d ∈ D is the slot of g g g in module λ ∈ Λ \lambda\in\Lambda λ ∈ Λ . We refer to the identity slot e ∈ D e \in D e ∈ D in each module as its frame , which is used to define a fixed, consistent internal coordinate system ( x , y ) (x,y) ( x , y ) for each module λ ∈ Λ \lambda\in\Lambda λ ∈ Λ . Left multiplication by any element λ ′ ∈ Λ \lambda' \in\Lambda λ ′ ∈ Λ then maps ( λ d , x , y ) → ( λ ′ λ d , x , y ) (\lambda d,x,y) \to(\lambda'\lambda d,x,y) ( λ d , x , y ) → ( λ ′ λ d , x , y ) , corresponding to an automorphism that permutes modules while leaving the internal coordinate system fixed, as desired. Using additional seams this can be implemented using walking circuits in a similar way to how we described for quadrilateral modules.
It is not a priori obvious whether a complement Λ ≤ G \Lambda\leq G Λ ≤ G of D ≤ G D \leq G D ≤ G exists for a given tiling T △ \mathcal{T}^{\triangle} T △ . Additionally, it is desirable for Λ \Lambda Λ to be two-generated, such that only one additional seam of inter-module couplers is required on each of the four boundaries of the module. In Section S7E we provide an efficient method to enumerate the complements Λ \Lambda Λ of D D D and find that complements do exist for many of the tilings in Table M2 , including those with symmetry group Δ ( 4 , 4 , 4 ) i \Delta(4,4,4)_{i} Δ ( 4 , 4 , 4 ) i for i ∈ { 32 , 40 , 58 , 109 } i \in\{32,40,58,109\} i ∈ { 32 , 40 , 58 , 109 } , but not for Δ ( 4 , 4 , 4 ) 96 \Delta(4,4,4)_{96} Δ ( 4 , 4 , 4 ) 96 (Table S4 ). Moreover, for each of these four tilings, we find a complement requiring at most two generators.
Table S4. Complements Λ \Lambda Λ of the module subgroup D D D for the quadrilateral (∣ D ∣ = 2 |D|=2 ∣ D ∣ = 2 ) and octagon (∣ D ∣ = 8 |D|=8 ∣ D ∣ = 8 ) partitions of selected 8.8.8 hyperbolic color codes. The symmetry group is the Coxeter quotient △ ( 4 , 4 , 4 ) i \triangle(4,4,4)_i △ ( 4 , 4 , 4 ) i that defines the code, written as in the extended candidate tables of § 1.12 ; its order ∣ G ∣ |G| ∣ G ∣ is the number in the code’s name, and is also the number of data qubits at L = 1 L=1 L = 1 . The Modules column is ∣ G ∣ / ∣ D ∣ |G|/|D| ∣ G ∣/∣ D ∣ , which is also the order ∣ Λ ∣ |\Lambda| ∣Λ∣ of every complement and hence the number of frame-preserving automorphisms it provides. The Complements column gives the number of complements found by exhaustive enumeration. The Normal column gives the number of complements Λ \Lambda Λ that are normal subgroups of G G G , giving G = Λ ⋊ D G=\Lambda\rtimes D G = Λ ⋊ D . The Or.-preserving column counts the number of complements contained in G + G^+ G + . Min. generators is the fewest generators any complement needs, which determines the number of additional automorphism seams needed at module boundaries. k f o u n d / g k_{\mathrm{found}}/g k found / g is the number of symplectic pairs, out of the genus g g g that a complete basis would reach, for the symmetric homology basis used in the subsequent columns. s s s is the fewest seed cycles that cover such a basis when restricted to using the left action of one of the available complements (needing at most two generators) for the frame-preserving automorphism circuits, and s ∗ s^* s ∗ is the same count for a basis of the same k f o u n d k_{\mathrm{found}} k found searched directly under Λ \Lambda Λ instead of inherited from G + G^+ G + . w w w is the weight of a seed cycle, measured as the length of a homologous cycle in the dual tiling; there is one weight per seed cycle, and a single entry means all s s s of them are that weight rather than that they sum to it. w 1 w_1 w 1 is the same weight for the shortest homologous dual cycle restricted to dual edges of a single colour, with one colour for all seeds chosen to minimise the total, listed in the same seed order as w w w . Pair gives the mean right Cayley graph distance, in the generators of the complement, between the two loops of each symplectic pair, i.e. the number of automorphism moves needed to switch a fixed extractor from measuring one cycle of the pair to measuring the other, with each seed’s extractor placed on whichever translate of the seed minimises it. Cayley gives the mean and maximum of the same distance over all pairs of basis loops at that placement. For the quadrilateral partition, Pair and Cayley in G + G^+ G + with generators ρ ± 1 , σ ± 1 \rho^{\pm1},\sigma^{\pm1} ρ ± 1 , σ ± 1 are given in Table M2 .
Low-weight Symmetrical Logical Basis
Logical operators are associated with homologically non-trivial cycles of the tiling, and identifying a *canonical logical basis reduces to finding a canonical homology basis for the underlying hyperbolic tiling. Two non-trivial cycles form a symplectic pair if they cross each other an odd number of times. Such a pair supports two logical qubits for surface codes and four for color codes. A complete canonical homology basis consists of g g g symplectic pairs, where cycles within each pair cross an odd number of times and cycles belonging to distinct pairs cross an even number of times. This gives k = 2 g k = 2g k = 2 g logical qubits for surface codes and k = 4 g k = 4g k = 4 g for color codes, where each cycle additionally supports operators of two independent colors. Shorter cycles give lower-weight logical operators, enabling more efficient Pauli measurements. Finding a shortest homology basis is tractable in polynomial time [50], and any homology basis can be brought into canonical form by Gaussian elimination over F 2 \mathbb{F}_2 F 2 also in polynomial time. However, Gaussian elimination combines cycles, which may increase their length and generally yields cycles that are no longer related to one another by code automorphisms.
We develop algorithms that address this by exploiting the symmetry structure of the tiling. We enumerate short homologically non-trivial cycles from every vertex by breadth-first search, retaining the shortest representative per homology class. One or two of the shortest cycles are selected as seed cycles. Their full orbit under G + G^+ G + is generated, producing a candidate set of cycles related by the tiling symmetries. We then identify mutually compatible symplectic pairs by a backtracking search on the candidate set. For most hyperbolic tilings we consider, one or two seed cycles suffice to generate a complete or near-complete basis yielding logical operators at or near minimum weight (see Table M2 ). The resulting basis is lifted from the hyperbolic tiling to the semi-hyperbolic tiling to obtain low-weight logical operators compatible with the module partition. Full details are in the Supplementary Information.
Since logical operators in the basis are related by ρ \rho ρ and σ \sigma σ , a single extractor system [47 ] suffices per seed cycle. Applying walking circuits rotates between all logical operators in the orbit of that seed. Since the length of a homologically non-trivial cycle on a hyperbolic surface grows logarithmically with its area, each extractor system couples to only a logarithmic fraction of the total modules, provided the cycles in the basis are close to minimum length. With one or two seed cycles, a constant number of extractor systems, each coupled to O ( log M ) O(\log M) O ( log M ) of the M M M modules, is therefore sufficient to access all logical operators. If the extractor is attached to the cycle h γ h\gamma hγ , where γ \gamma γ is the seed cycle and h ∈ G + h \in G^+ h ∈ G + , then the cycle x γ x\gamma x γ is brought under it by the automorphism h x − 1 h x^{-1} h x − 1 , so switching from measuring x γ x\gamma x γ to measuring γ \gamma γ takes ∣ h x − 1 y h − 1 ∣ |h x^{-1}y h^{-1}| ∣ h x − 1 y h − 1 ∣ moves, where ∣ ⋅ ∣ |\cdot| ∣ ⋅ ∣ is the word length in the generators { ρ ± 1 , σ ± 1 } \{\rho^{\pm1},\sigma^{\pm1}\} { ρ ± 1 , σ ± 1 } . For h = e h=e h = e this is the distance between x x x and y y y in the right Cayley graph of G + G^+ G + , rather than the left Cayley distance ∣ y x − 1 ∣ |yx^{-1}| ∣ y x − 1 ∣ (the length of the automorphism that maps x γ x\gamma x γ onto y γ y\gamma y γ ). Since G + G^+ G + is in general non-Abelian, the choice of h h h affects the number of moves and can be optimized (§ 1.8 ). For the [ [ 6400 , 104 , 30 ] ] [[6400,104,30]] [[ 6400 , 104 , 30 ]] code, bringing any basis cycle under an extractor, starting from any other, takes a mean of 4.4 and at most six moves (Table M2 ).
Logical Measurement
Given a choice of seed cycle, we can build an ancillary extractor system to measure out the set of non-trivial logical Pauli operators associated with the given seed cycle. One important fact is that for any logical operator belonging to a given seed cycle in a semi-hyperbolic surface or color code tiling, we can always choose a representative that is only supported on the data qubits at the boundary of individual modules forming the hyperbolic code, see Figure 4 b for an example.
We will construct an extractor system that will be itself formed of a collection of modules that will be connected through their respective boundary links. The extractor will then couple to the base code along the boundaries of the modules that support the logical operators corresponding to the chosen seed cycle. This coupling to the base code will use its own set of boundary links, and locally will have many of the features that are common to lattice surgery, see Figure 4 b and Section S6 for further details. In particular, there will be a new set of stabilizers that will have to be measured across qubits belonging to the measurement ancilla and base code, in a similar fashion to those measured across two different tiles in the base semi-hyperbolic code.
Overall, the simplest such extractor will be topologically equivalent to a long ribbon, whose base connects to the base code in the aforementioned way. The ribbon extractor itself will be equivalent to a long strip of a closed surface code, built from a linear chain of connected modules, such that the product of all of the stabilizers of one type will determine the value of the desired logical measurement [42 ] . Such an extractor would be able to measure any logical operator that is supported on the seed cycle, which for the color code tilings would be any of the 15 non-trivial logical Pauli representatives.
To quantify the physical overhead of the ribbon extractor, we detail an explicit construction for a tiling with side length L = 4 L = 4 L = 4 for the [ [ 6400 , 104 , 30 ] ] [[6400,104,30]] [[ 6400 , 104 , 30 ]] hyperbolic color code derived from a V 8.8.8 V8.8.8 V 8.8.8 tiling, as given explicitly in Figure 4 b and detailed in Section S6 why such a ribbon extractor is distance-preserving. Each extractor module is built in layers, where the first layer will have 4 ancilla (data) qubits and 6 ancilla check qubits and the second layer will have 6 qubits of each. In order for the extractor to be provably distance preserving, we use d / 2 d/2 d /2 odd layers and d / 2 − 1 d/2 - 1 d /2 − 1 even layers (this is a well-studied approach called thickening [42 , 44 , 47 ] ), thus totaling 10 d / 2 + 12 ( d / 2 − 1 ) = 11 d − 12 10d/2 + 12(d/2 - 1) = 11d - 12 10 d /2 + 12 ( d /2 − 1 ) = 11 d − 12 qubits per extractor module. There will be one such extractor module for each tile boundary that is a part of the seed loop, which in the case of the given lattice is 10 such modules. This gives an overhead of 3180 qubits (both ancilla data and check qubits) for the ribbon extractor, which results in about a 22% overhead as the number of physical (data and measurement) qubits in the base code is 14400, see Table S9 . Choosing L = 3 L = 3 L = 3 instead, the same seed cycle gives the [ [ 3600 , 104 , 22 ] ] [[3600, 104, 22]] [[ 3600 , 104 , 22 ]] code with 8400 physical qubits (Table S8 ), for which the ribbon extractor requires 1880 qubits, about 22% of the memory. Using the L = 2 L = 2 L = 2 octagon partition of this tiling ([ [ 1600 , 104 , 14 – 16 ] ] [[1600, 104, 14\text{--}16]] [[ 1600 , 104 , 14 – 16 ]] , 3600 physical qubits), the ribbon extractor would require 1040 qubits (about 29% of the memory). Here the smaller group of implementable automorphisms splits the same basis into four seed cycles rather than one, but since each extractor module uses only one seam of inter-module couplers to attach to the memory, a single extractor can serve all four by adding additional seams on the sides of the ribbon, one to each seed cycle (Section S7 E). Since the complement is smaller than G + G^+ G + (50 rather than 200 elements), bringing any basis cycle under the extractor then takes a mean of 2.9 and at most four moves (Table S4 ). It should be noted that this is a rather overly-cautious bound on the physical overhead, as the number of layers of thickening is taken to be d / 2 d/2 d /2 which is in all likelihood superfluous for the purpose of a rigorous distance proof. Namely, if we have some guarantee of the overlap of other logical operators with the target logical operator being measured, then this overhead could be significantly reduced.
Table S8. Hyperbolic color codes on the Pareto frontier for 8.8.8 tilings and L = 3 L=3 L = 3 . Here M 2 M_2 M 2 is the number of quadrilateral modules and N M 2 N_{M_2} N M 2 is the number of physical qubits (data and ancilla) in the code using the quadrilateral module partition. The seed weights w w w and w 1 w_1 w 1 and the Pair and Cayley columns are defined as in Table S13 , except that Pair and Cayley are computed for the listed basis with the lowest total seed weight w w w .
Table S13. Modular hyperbolic color codes for side length L = 3 L=3 L = 3 with quadrilateral modules (K = 2 K=2 K = 2 base triangles per module). M 2 M_2 M 2 : number of quadrilateral modules. N M 2 N_{M2} N M 2 : total physical qubits in the modular layout including both data qubits and ancilla qubits. N M 2 / k N_{M2}/k N M 2 / k : physical-to-logical qubit overhead. Automorphism Bases: logical basis operator coverage f o u n d / g f_{\mathrm{ound}}/g f ound / g and generator seed weights w w w (length of the shortest homologous dual cycle found for each seed) and w 1 w_1 w 1 (the same, restricted to dual edges of a single colour, with one colour per basis chosen to minimise the total), showing Pareto-optimal bases with ≥ 85 % \geq85\% ≥ 85% coverage or the single highest-coverage basis if < 85 % <85\% < 85% . Cov.: maximum basis coverage percentage. Pair: mean number of automorphism moves between measuring the two cycles of a symplectic pair with a fixed extractor. Cayley: mean and maximum of the same over all pairs of basis loops. Both are right Cayley graph distances among basis automorphisms, with the extractor placed to minimise Pair (then the maximum, then the mean), for the listed basis with the highest coverage. k d 2 / n kd^2/n k d 2 / n : code figure of merit.
Table S9. Hyperbolic color codes on the Pareto frontier for 8.8.8 tilings and L = 4 L=4 L = 4 . Here M 2 M_2 M 2 is the number of quadrilateral modules and N M 2 N_{M_2} N M 2 is the number of physical qubits (data and ancilla) in the code using the quadrilateral module partition. The seed weights w w w and w 1 w_1 w 1 and the Pair and Cayley columns are defined as in Table S13 , except that Pair and Cayley are computed for the listed basis with the lowest total seed weight w w w .
Finally, in addition to measuring the aforementioned logical qubits, the ribbon extractor can be used to facilitate the joint measurement of a logical qubit from the base code and another code patch [43 ] . This is particularly useful if one were to treat the hyperbolic code as a form of logical memory and have some other code, say a surface code, that would be used as a compute region. The ribbon extractor would be used to perform joint logical measurements of the form X ‾ m X ‾ c \overline{X}_m\overline{X}_c X m X c and Z ‾ m Z ‾ c \overline{Z}_m\overline{Z}_c Z m Z c , where P ‾ m \overline{P}_m P m and P ‾ c \overline{P}_c P c are logical Pauli operators for the memory and compute codes, respectively. The ribbon extractor would achieve this by coupling to the base hyperbolic code as discussed while additionally coupling its upper boundary to the compute code, for example a surface code, thereby jointly measuring the logical operators across both codes. In order to complete both of these measurements, one would perform an automorphism gate between measurements to rotate the appropriate conjugate basis element from the hyperbolic code to facilitate this joint measurement between code blocks. Together, these joint logical Pauli measurements enable fault-tolerant logical state and gate teleportation between the memory and compute blocks [78]. Universal quantum circuits can then be compiled and executed via Pauli-based computation [79, 80], consuming logical magic states supplied to the compute region via magic state distillation [81, 82] or cultivation [83].
Compiling an adder onto the hyperbolic memory
We compile the n n n -bit CDKM ripple-carry adder [51] onto the [ [ 3600 , 104 , 22 ] ] [[3600,104,22]] [[ 3600 , 104 , 22 ]] (L = 3 L = 3 L = 3 ) and [ [ 6400 , 104 , 30 ] ] [[6400,104,30]] [[ 6400 , 104 , 30 ]] (L = 4 L = 4 L = 4 ) modular hyperbolic color codes derived from the Δ ( 4 , 4 , 4 ) 109 \Delta(4,4,4)_{109} Δ ( 4 , 4 , 4 ) 109 8.8.8 tiling, storing the a a a and b b b registers in the memory and applying all gates in a compute region with C C C operand slots. Qubits are teleported between the two using the ribbon extractor (Section M L): a load uses the measurements M ‾ X q X ‾ c \overline{M}_{X_q\overline{X}_c} M X q X c and M ‾ Z q Z ‾ c \overline{M}_{Z_q\overline{Z}_c} M Z q Z c , and a store uses M ‾ X q X ‾ c \overline{M}_{X_q\overline{X}_c} M X q X c . Retaining operands in the compute region between blocks, the adder requires N R = 3 ( 4 n − C ) N_R = 3(4n-C) N R = 3 ( 4 n − C ) ribbon measurements, and automorphism moves (Section M J) bring each logical operator under the extractor. With α d \alpha d α d cycles per ribbon measurement and κ L \kappa L κ L per move, this takes T = α d N R + κ L N A T = \alpha d N_R + \kappa L N_A T = α d N R + κ L N A cycles, where N A N_A N A is the number of moves. Every symplectic pair in our basis is related by the same automorphism, so with an appropriate extractor location, switching between the two cycles of a pair takes a single move. Performing the two measurements of each load consecutively, and using at most D = 6 D = 6 D = 6 moves (the diameter of the Cayley graph of G + G^+ G + with generators { ρ ± 1 , σ ± 1 } \{\rho^{\pm1},\sigma^{\pm1}\} { ρ ± 1 , σ ± 1 } ) for every other measurement, gives N A ≤ ( 2 D + 1 ) ( 4 n − C ) N_A \le(2D+1)(4n-C) N A ≤ ( 2 D + 1 ) ( 4 n − C ) . We further store the four operands a 2 i a_{2i} a 2 i , b 2 i b_{2i} b 2 i , a 2 i + 1 a_{2i+1} a 2 i + 1 , b 2 i + 1 b_{2i+1} b 2 i + 1 in the same symplectic pair ( α i , β i ) (\alpha_i,\beta_i) ( α i , β i ) , with each X q X_q X q on α i \alpha_i α i and each Z ‾ q \overline{Z}_q Z q on β i \beta_i β i . With C = 3 C = 3 C = 3 , the loads and stores before each block then act on at most two pairs, each costing at most one jump of ≤ D \le D ≤ D moves and one switch, giving N A ≤ 4 ( D + 1 ) n N_A \le4(D+1)n N A ≤ 4 ( D + 1 ) n with N R = 3 ( 4 n − 3 ) N_R = 3(4n-3) N R = 3 ( 4 n − 3 ) . For a 50-bit adder with α = 1 \alpha= 1 α = 1 and κ = 2 \kappa= 2 κ = 2 , this gives T ≤ 21 , 402 T \le21,402 T ≤ 21 , 402 cycles (428 per bit) at L = 3 L = 3 L = 3 and T ≤ 28 , 930 T \le28,930 T ≤ 28 , 930 cycles (579 per bit) at L = 4 L = 4 L = 4 , compared with 28,080 and 37,830 cycles without grouping (C = 5 C = 5 C = 5 ), and 33,930 and 45,630 cycles for the coarse bound N A ≤ D N R N_A \le DN_R N A ≤ D N R . The compute-region logic can largely run in parallel with the extractor measurements and automorphisms. See § 1.8 for details.
Acknowledgments
We thank Earl Campbell, Sergio Boixo and Alex Gaunt for valuable feedback on the manuscript. We also thank Hussain Masoom for support, and Cody Jones, Mike Newman, Guang Hao Low and Leonid Pryadko for helpful discussions.
AI Usage
In the later stages of the project, AI tools assisted with tasks including implementing parts of the research software, helping with technical details of the octagon module subgroup complements and graph-derived detector coordinates, and proposing the argument underlying the color code distance lower bound. The authors developed the key ideas and constructions, prepared the manuscript, verified all AI-assisted contributions and take full responsibility for the content.
Author Contributions
O.H. conceived and guided the project, which was motivated by a boundary-connected hardware model that M.M. proposed. H.S. and O.H. developed the modular hyperbolic color code constructions, cat-flagged circuits, and symmetric canonical logical bases. H.S. implemented the first versions of the hyperbolic color code circuits and the Euclidean surface code circuits used for comparison. O.H. carried out the code search, developed the qubit layouts, the hyperbolic surface code circuits and the distance-finding methods, adapted correlated matching to the hyperbolic surface codes, designed the automorphism walking circuits, performed the final numerical simulations, and compiled the ripple-carry adder. Z.H. and T.J.-O., with support from O.H., designed the ribbon extractor and proved that it preserves the code distance.
F.H., A.S., L.Z., T.E. and J.S. developed and extended the AlphaQubit decoder and ran decoding experiments, with guidance from J.B. and input from O.H. on the graph-derived detector coordinates. M.M. advised on hardware assumptions. C.G. assisted with the three-dimensional visualization in Figure 1 and the adder compilation. O.H. and H.S. prepared most of the manuscript and figures, with Z.H. and T.J.-O. contributing text and figures on logical measurement and the Google DeepMind authors contributing the Methods on AlphaQubit. P.K. and H.N. provided leadership and support. All authors discussed the results and commented on the manuscript.
Supplementary Information is available for this paper. Correspondence and requests for materials should be addressed to O.H. (oscarhiggott@google.com) or H.S. (hasansayginel@google.com).
Oscar Higgott; Hasan Sayginel; Francisco J.H. Heras; Zhiyang He; Tomas Jochym-O’Connor; Andrew W. Senior; Lei M. Zhang; Thomas Edlich; James S. Spencer; Matt McEwen; Craig Gidney; Johannes Bausch; Pushmeet Kohli; Hartmut Neven
Hyperbolic Tilings and Symmetry Groups
We detail the construction of hyperbolic and semi-hyperbolic codes derived from closed hyperbolic tilings. Throughout this work, the symmetry groups of these tilings play a central role. Beyond code construction, they guide module partitioning, inter-module connectivity, and the implementation of fault-tolerant logical gates.
A tiling of the hyperbolic plane H 2 \mathbb{H}^{2} H 2 is a covering of the space by closed polygonal faces that intersect only along their edges. Due to the plane’s constant negative curvature, the interior angles of a hyperbolic polygon are smaller than those of its Euclidean counterpart, permitting vertex configurations that cannot be realized on flat surfaces.
Hyperbolic tilings can be generated from subgroups of the isometry group of H 2 \mathbb{H}^{2} H 2 . Such a group acts on the plane with a fundamental domain , a closed region whose images under the group cover the plane and overlap only along their boundaries. The tiling is the orbit of this domain under the group, with each tile a distinct image of it, so that the tiles are in bijection with the group elements and the combinatorial structure of the tiling is determined by the structure of the group.
The tilings we consider arise from Coxeter groups acting on a space of constant negative curvature. Their generators are order-two reflections across the edges of a Coxeter polygon . This polygon serves as a fundamental domain whose interior angles are of the form π / n i \pi/n_i π / n i for integers n i ≥ 2 n_i \ge2 n i ≥ 2 . The geometry completely determines the group’s relations, since composing reflections across two mirrors intersecting at angle π / n i \pi/n_i π / n i yields a rotation of order n i n_i n i . In this work, we focus on two of the simplest cases of these structures: triangle groups and quadrilateral groups .
Triangle Groups
A hyperbolic triangle group, denoted △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) , is generated by reflections a a a , b b b , c c c in the three sides of a hyperbolic triangle with interior angles π / r , π / s , π / t \pi/r,\pi/s,\pi/t π / r , π / s , π / t satisfying 1 / r + 1 / s + 1 / t < 1 1/r+1/s+1/t<1 1/ r + 1/ s + 1/ t < 1 . Taking this triangle as the fundamental domain and repeatedly reflecting it across its edges produces an infinite tiling (see Figure S1 ). In the resulting tiling, 2 r 2r 2 r , 2 s 2s 2 s and 2 t 2t 2 t triangles meet at the respective vertices, and each triangle copy corresponds uniquely to a group element of △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) . The group presentation is given by:
Figure S1. The △ ( 4 , 4 , 4 ) \triangle(4,4,4) △ ( 4 , 4 , 4 ) triangle group and its associated three-colorable infinite 8.8.8 (or { 8 , 3 } \{8,3\} { 8 , 3 } ) hyperbolic tiling. (Left ) The fundamental triangle with internal angles π / 4 \pi/4 π /4 , π / 4 \pi/4 π /4 , π / 4 \pi/4 π /4 and generator point in the interior. (Right ) The tiling generated by the orbit of the fundamental triangle under △ ( 4 , 4 , 4 ) \triangle(4,4,4) △ ( 4 , 4 , 4 ) , shown in the Poincaré disk. Each triangle corresponds to a unique group element, labeled by a word in the generators a a a , b b b , c c c , with the identity element e e e marked.
△ ( r , s , t ) = ⟨ a , b , c | a 2 = b 2 = c 2 = ( a b ) r = ( b c ) s = ( c a ) t = e ⟩ . (4) \triangle(r,s,t)=\left\langle a,b,c \,\middle|\, a^{2}=b^{2}=c^{2}=(ab)^{r}=(bc)^{s}=(ca)^{t}=e\right\rangle. \tag*{(4)} △ ( r , s , t ) = ⟨ a , b , c a 2 = b 2 = c 2 = ( ab ) r = ( b c ) s = ( c a ) t = e ⟩ . (4)
where a a a , b b b , c c c are reflections in the three edges of the triangle and e e e is the identity element. Composing two adjacent reflections yields a rotation about their shared vertex. This defines the corner rotations ρ = a b \rho=ab ρ = ab , σ = b c \sigma=bc σ = b c , τ = c a \tau=ca τ = c a by angles 2 π / r 2\pi/r 2 π / r , 2 π / s 2\pi/s 2 π / s , 2 π / t 2\pi/t 2 π / t respectively. The reflections a a a , b b b , c c c are orientation-reversing and the rotations ρ \rho ρ , σ \sigma σ , τ \tau τ are orientation-preserving, therefore △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) contains both orientation-preserving and orientation-reversing isometries. The orientation-preserving subgroup, denoted △ + ( r , s , t ) \triangle^{+}(r,s,t) △ + ( r , s , t ) , is an index-2 subgroup generated by the corner rotations. Since ρ σ τ = ( a b ) ( b c ) ( c a ) = e \rho\sigma\tau=(ab)(bc)(ca)=e ρ σ τ = ( ab ) ( b c ) ( c a ) = e , the third rotation is redundant, τ = ( ρ σ ) − 1 \tau=(\rho\sigma)^{-1} τ = ( ρ σ ) − 1 , and two generators suffice:
△ + ( r , s , t ) = ⟨ ρ , σ | ρ r = σ s = ( ρ σ ) t = e ⟩ . (5) \triangle^{+}(r,s,t)=\left\langle\rho,\sigma\,\middle|\, \rho^{r}=\sigma^{s}=(\rho\sigma)^{t}=e\right\rangle. \tag*{(5)} △ + ( r , s , t ) = ⟨ ρ , σ ρ r = σ s = ( ρ σ ) t = e ⟩ . (5)
Geometrically, △ + ( r , s , t ) \triangle^{+}(r,s,t) △ + ( r , s , t ) acts on a fundamental domain consisting of two reflected copies of the original triangle glued along a shared edge, so that each of its elements is a word of even length in a , b , c a,b,c a , b , c (see Figure S7 ).
Figure S7. Example of a quotient triangle group △ ( 4 , 4 , 4 ) / Γ \triangle(4,4,4)/\Gamma △ ( 4 , 4 , 4 ) /Γ and its orientation-preserving subgroup. The full quotient triangle group has order 128 and defines a hyperbolic color code with parameters [ [ 128 , 36 , 8 ] ] [[128,36,8]] [[ 128 , 36 , 8 ]] . (Left) The full quotient group defines a V8.8.8 tiling of a closed hyperbolic surface. Each group element is associated with a distinct triangle. Right multiplication by a generator (a a a , b b b or c c c ) corresponds to a reflection across a local mirror to an adjacent triangle, defining the local connectivity. Left multiplication corresponds to a global isometry (reflection, rotation, or translation) of the entire tiled surface. (Right) The orientation-preserving subgroup △ + ( 4 , 4 , 4 ) / Γ \triangle^{+}(4,4,4)/\Gamma △ + ( 4 , 4 , 4 ) /Γ . Its fundamental domains are quadrilaterals, each formed by joining a pair of adjacent triangles (related by an a b a\ b a b reflection). The subgroup generators ρ : = a b \rho:= ab ρ := ab and σ : = b c \sigma:= bc σ := b c are corner rotations. Left multiplication by each of these subgroup generators acts as a global isometry (as illustrated by the arrows connecting quadrilaterals), transforming the entire tiled surface while preserving its structure. Right multiplication instead defines the local adjacency between quadrilaterals.
Wythoff Construction
Uniform tilings of H 2 \mathbb{H}^{2} H 2 can be generated from a triangle group by the Wythoff kaleidoscopic construction . A uniform tiling can be described by its vertex configuration p 1 . p 2 … p k p_{1}.p_{2}\ldots p_{k} p 1 . p 2 … p k , which specifies the sequence of p i p_i p i -sided polygons meeting in cyclic order around every vertex. Alternatively, for regular tilings composed of a single polygon type with q q q regular p p p -gons meeting at every vertex, we can denote them more compactly by the Schlӓfli symbol { p , q } \{p,q\} { p , q } .
The Wythoff construction proceeds by placing a vertex inside the fundamental triangle, called the generator point , and drawing a perpendicular line from it to each triangle edge. The orbit of the generator point and its associated perpendicular lines under the group action of △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) produces the vertex and edge sets of the tiling T = ( V , E , F ) \mathcal{T}=(V,E,F) T = ( V , E , F ) . The specific Wythoff tiling produced depends on the placement of the generator point relative to the triangle’s edges, as summarized in Table S1 . When the point lies in the interior of the fundamental triangle, it rests on no mirrors. Consequently, every corner contributes its full ring of reflected copies, yielding faces with 2 r 2r 2 r , 2 s 2s 2 s , and 2 t 2t 2 t sides. This generates the omnitruncated tiling with a vertex configuration of 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t , meaning polygons with 2 r 2r 2 r , 2 s 2s 2 s , and 2 t 2t 2 t sides meet at every vertex in cyclic order. Figure S1 illustrates this interior placement for the △ ( 4 , 4 , 4 ) \triangle(4,4,4) △ ( 4 , 4 , 4 ) group, where r = s = t = 4 r=s=t=4 r = s = t = 4 yields the regular 8.8.8 8.8.8 8.8.8 (or { 8 , 3 } \{8,3\} { 8 , 3 } ) tiling in which three octagons meet at every vertex.
Table S1. The seven positions of the generator point in the fundamental triangle of △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) and the vertex configuration of the resulting uniform Wythoff tiling for a hyperbolic triangle group (1 / r + 1 / s + 1 / t < 1 1/r+1/s+1/t<1 1/ r + 1/ s + 1/ t < 1 ). A configuration entry equal to 2 denotes a degenerate digon (a two-sided face) that contributes an edge rather than a polygon, so that its two adjacent faces merge. A corner position gives a regular tiling when the two remaining orders are equal or at least one of them is 2, and a quasi-regular tiling otherwise; a mirror position gives a cantellated tiling in general, or a truncated tiling when one of the orders on that mirror is 2.
Moving the generator point onto a mirror (triangle edge) or into a corner (triangle vertex) produces the other uniform tilings of the group. When the point lies on a single mirror, it remains fixed under the corresponding reflection. As a result, the polygonal rings around the two corners on that mirror are halved, while the ring at the opposite corner remains full. If the point sits precisely at a corner, it lies on two mirrors simultaneously: the rings at the other two corners are halved, and the occupied corner itself no longer generates a face. These seven possible generator positions and their corresponding tilings are detailed in Table S1 . As an illustrative example, Figure S2 depicts the complete Wythoff family for the △ ( 2 , 4 , 6 ) \triangle(2,4,6) △ ( 2 , 4 , 6 ) group.
Figure S2. The seven uniform tilings generated from the triangle group △ ( 2 , 4 , 6 ) \triangle(2,4,6) △ ( 2 , 4 , 6 ) by the Wythoff construction, one for each position of the generator point (black dot) in the fundamental triangle (blue highlight), following Table S1 with ( r , s , t ) = ( 2 , 4 , 6 ) (r,s,t)=(2,4,6) ( r , s , t ) = ( 2 , 4 , 6 ) . The three corner positions give the quasi-regular tiling a 4.6.4.6 4.6.4.6 4.6.4.6 (corner a ∩ b a \cap b a ∩ b ) and the regular tilings b 6.6.6.6 6.6.6.6 6.6.6.6 (or { 6 , 4 } \{6,4\} { 6 , 4 } , corner b ∩ c b \cap c b ∩ c ) and c 4.4.4.4.4.4 4.4.4.4.4.4 4.4.4.4.4.4 (or { 4 , 6 } \{4,6\} { 4 , 6 } , corner c ∩ a c \cap a c ∩ a ). The three mirror positions give the truncated tilings d 6.8.8 6.8.8 6.8.8 (mirror a a a ) and e 4.12.12 4.12.12 4.12.12 (mirror b b b ) and the cantellated tiling f 4.4.4.6 4.4.4.6 4.4.4.6 (mirror c c c ). The interior position gives the omnitruncated tiling g 4.8.12 4.8.12 4.8.12 . Since r = 2 r=2 r = 2 (i.e. the mirrors a a a and b b b intersect at a right angle π / 2 \pi/2 π /2 ), reflections across these orthogonal mirrors generate digons which collapse into single edges resulting in the regular tilings in b,c and truncated tilings in d,e.
Quadrilateral Groups
A quadrilateral group is generated by reflections a , b , c , d a,b,c,d a , b , c , d across the four sides of a quadrilateral with interior angles π / r \pi/r π / r , π / s \pi/s π / s , π / t \pi/t π / t , π / u \pi/u π / u . The group presentation is
□ ( r , s , t , u ) = ⟨ a , b , c , d ∣ a 2 = b 2 = c 2 = d 2 = ( a b ) r = ( b c ) s = ( c d ) t = ( d a ) u = e ⟩ (6) \square(r,s,t,u)=\langle a,b,c,d \mid a^2=b^2=c^2=d^2=(ab)^r=(bc)^s=(cd)^t=(da)^u=e\rangle \tag*{(6)} □ ( r , s , t , u ) = ⟨ a , b , c , d ∣ a 2 = b 2 = c 2 = d 2 = ( ab ) r = ( b c ) s = ( c d ) t = ( d a ) u = e ⟩ (6)
where r , s , t , u r,s,t,u r , s , t , u are the orders of the corner rotations ρ = a b \rho=ab ρ = ab , σ = b c \sigma=bc σ = b c , τ = c d \tau=cd τ = c d , υ = d a \upsilon=da υ = d a respectively, with ρ σ τ υ = e \rho\sigma\tau\upsilon=e ρ σ τ υ = e . The quadrilateral is hyperbolic when 1 / r + 1 / s + 1 / t + 1 / u < 2 1/r+1/s+1/t+1/u<2 1/ r + 1/ s + 1/ t + 1/ u < 2 . The orientation-preserving subgroup □ + ( r , s , t , u ) \square^+(r,s,t,u) □ + ( r , s , t , u ) is an index-2 subgroup, with presentation
□ + ( r , s , t , u ) = ⟨ ρ , σ , τ ∣ ρ r = σ s = τ t = ( ρ σ τ ) u = e ⟩ (7) \square^+(r,s,t,u)=\langle\rho,\sigma,\tau\mid\rho^r=\sigma^s=\tau^t=(\rho\sigma\tau)^u=e\rangle \tag*{(7)} □ + ( r , s , t , u ) = ⟨ ρ , σ , τ ∣ ρ r = σ s = τ t = ( ρ σ τ ) u = e ⟩ (7)
where we have used υ = ( ρ σ τ ) − 1 \upsilon=(\rho\sigma\tau)^{-1} υ = ( ρ σ τ ) − 1 . Reflecting the fundamental quadrilateral in its four sides produces a tiling with face configuration V 2 r .2 s .2 t .2 u V^{2r.2s.2t.2u} V 2 r .2 s .2 t .2 u , where every vertex degree is even (i.e. the vertex degrees of a quadrilateral tile are 2 r 2r 2 r , 2 s 2s 2 s , 2 t 2t 2 t , 2 u 2u 2 u ). Each tile corresponds to a unique group element of □ ( r , s , t , u ) \square(r,s,t,u) □ ( r , s , t , u ) , labeled by a word in the generators a , b , c , d a,b,c,d a , b , c , d (see Figure S3 ).
Figure S3. The □ ( 2 , 2 , 4 , 4 ) \square(2,2,4,4) □ ( 2 , 2 , 4 , 4 ) quadrilateral group and its associated quadrilateral tiling of the hyperbolic plane. (Left ) The fundamental quadrilateral with interior angles π / 2 \pi/2 π /2 , π / 2 \pi/2 π /2 , π / 4 \pi/4 π /4 , π / 4 \pi/4 π /4 and reflection generators a a a , b b b , c c c , d d d labeling its four sides. (Right ) The tiling generated by the orbit of the fundamental quadrilateral under □ ( 2 , 2 , 4 , 4 ) \square(2,2,4,4) □ ( 2 , 2 , 4 , 4 ) , shown in the Poincaré disk. Each quadrilateral corresponds to a group element, labeled by a word in the generators a a a , b b b , c c c , d d d , with the identity element e e e marked. The resulting tiling has face configuration V 4.4.8.8 V\,4.4.8.8 V 4.4.8.8 , with vertex degrees 4 4 4 , 4 4 4 , 8 8 8 , 8 8 8 at the four corners of each tile.
We note that quadrilateral tilings of the hyperbolic plane can also arise from triangle groups, as we discuss in Section S1 E. The two families of groups are complementary: quadrilateral groups produce tilings whose vertex degrees are always even, including non-regular tilings such as V 4.4.8.8 V^{4.4.8.8} V 4.4.8.8 from □ ( 2 , 2 , 4 , 4 ) \square(2,2,4,4) □ ( 2 , 2 , 4 , 4 ) (Figure S3 ), whereas triangle groups can produce only regular or quasi-regular (dual) quadrilateral tilings but can accommodate both even and odd vertex degrees. We also note that a Wythoff construction on the quadrilateral group is also possible, giving the other uniform tilings of the group, but we do not use it in this work.
Dual Tilings
Every tiling T = ( V , E , F ) \mathcal{T} = (V,E,F) T = ( V , E , F ) has a dual tiling T ∗ \mathcal{T}^{*} T ∗ , obtained by placing a vertex at the center of each face of T \mathcal{T} T and connecting two such vertices whenever the corresponding faces share an edge. This exchanges the roles of vertices and faces: the faces of T \mathcal{T} T become the vertices of T ∗ \mathcal{T}^{*} T ∗ , the vertices of T \mathcal{T} T become the faces of T ∗ \mathcal{T}^{*} T ∗ , and each edge of T \mathcal{T} T is crossed by exactly one dual edge of T ∗ \mathcal{T}^{*} T ∗ . Taking the dual twice recovers the original tiling, ( T ∗ ) ∗ = T (\mathcal{T}^{*})^{*} = \mathcal{T} ( T ∗ ) ∗ = T . We sometimes use the face-configuration notation to name dual tilings: if T \mathcal{T} T has vertex configuration r . s . t r.s.t r . s . t , we write V r . s . t V\,r.s.t V r . s . t for its dual T ∗ \mathcal{T}^{*} T ∗ . Figure S4 shows the primal 8.8.8 8.8.8 8.8.8 (or { 8 , 3 } \{8,3\} { 8 , 3 } ) tiling, in which three octagons meet at each vertex, together with its dual V 8.8.8 V\,8.8.8 V 8.8.8 (or { 3 , 8 } \{3,8\} { 3 , 8 } ), in which eight triangles meet at each vertex.
Figure S4. The 8.8.8 8.8.8 8.8.8 (or { 8 , 3 } \{8,3\} { 8 , 3 } ) tiling and its dual V 8.8.8 V\,8.8.8 V 8.8.8 (or { 3 , 8 } \{3,8\} { 3 , 8 } ) tiling, shown in the Poincaré disk. The notation 8.8.8 8.8.8 8.8.8 denotes the vertex configuration in which three octagons meet at each vertex; the prefix V V V denotes the dual, whose vertices correspond to the faces of 8.8.8 8.8.8 8.8.8 . a The primal tiling T = 8.8.8 \mathcal{T} = 8.8.8 T = 8.8.8 . b The dual tiling T ∗ = V 8.8.8 \mathcal{T}^{*} = V\,8.8.8 T ∗ = V 8.8.8 . c T \mathcal{T} T and T ∗ \mathcal{T}^{*} T ∗ superimposed.
Color Code Tilings
To define a valid color code on a two-dimensional tiled surface, the tiling must satisfy two geometric conditions. The tiling must be trivalent (three edges meeting at each vertex) and its faces must be three-colorable such that no two faces that share an edge have the same color [1 ] . We refer to tilings that satisfy these specific geometric properties as color code tilings .
To construct hyperbolic color codes, we systematically obtain valid color code tilings for hyperbolic surfaces using the Wythoff construction explained in Section S1 A [2 , 3 ] . As shown in Table S1 , the interior generator point yields a tiling with the vertex configuration 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t . Since exactly three faces meet at every vertex, the resulting graph is trivalent. Moreover, the faces of the omnitruncated tiling correspond directly to the three distinct corners of the fundamental triangle. This natural tripartite division guarantees that the faces are three-colorable, making them color code tilings. Figure S1 illustrates an example of a color code tiling with octagon faces. The dual of the color tiling is the underlying triangular tiling which we denote T △ T^{\triangle} T △ . The triangular tiles of T △ T^{\triangle} T △ are associated with group elements of Δ ( r , s , t ) \Delta(r,s,t) Δ ( r , s , t ) . Equivalently, the vertices and edges of the color code tiling T T T form the Cayley graph of Δ ( r , s , t ) \Delta(r,s,t) Δ ( r , s , t ) : the vertices are the group elements and they are joined by an edge whenever they are related by a generator a a a , b b b or c c c .
Quadrilateral Tilings
A quadrilateral tiling T □ T^{\square} T □ is a tiling of quadrilateral faces. In this work, we use quadrilateral tilings to construct hyperbolic surface codes. Specifically, we define a hyperbolic surface code on the dual T = ( T □ ) ∗ T = (T^{\square})^{*} T = ( T □ ) ∗ of a quadrilateral tiling T □ T^{\square} T □ by associating stabilizer generators with the faces of T T T . For T T T to support a valid surface code, its faces must be two-colorable : each face is assigned one of two colors (e.g. red and blue) such that no two faces sharing an edge receive the same color. This ensures that X- and Z-type stabilizer generators can be assigned to faces of different color, so that stabilizers of opposite type with overlapping support always share an even number of data qubits and therefore commute. The faces of T T T are two-colorable whenever the vertices of T □ T^{\square} T □ are two-colorable, i.e. its edges form a bipartite graph. On the infinite plane this is always the case: every face of T □ T^{\square} T □ has even length, so every cycle has even length and the graph is bipartite. On the closed surfaces of Section S1 F this can fail since the tiling on the surface now has homologically non-trivial cycles, which may sometimes have odd length. Therefore, we check each closed quadrilateral tiling and keep only those that remain bipartite.
Quadrilateral tilings T □ T^{\square} T □ of the hyperbolic plane can arise from triangle groups, quadrilateral groups, or in many cases from both, and we construct codes using tilings from both symmetry groups.
The first class of tilings we consider are those that have quadrilateral reflection symmetry. These are generated by a quadrilateral group □ ( r , s , t , u ) \square(r,s,t,u) □ ( r , s , t , u ) and correspond to tilings where every vertex degree is even, giving the face configuration V 2 r .2 s .2 t .2 u V2r.2s.2t.2u V 2 r .2 s .2 t .2 u . In this case, a single quadrilateral face is a valid Coxeter polygon and can be taken as the fundamental domain. The tiles are in bijection with the group elements of □ ( r , s , t , u ) \square(r,s,t,u) □ ( r , s , t , u ) , and adjacent tiles are related by right multiplication by a generator (see Figure S3 ).
The second class of tilings is regular quadrilateral tilings { 4 , q } \{4,q\} { 4 , q } (or V q . q . q . q Vq.q.q.q V q . q . q . q ), where q q q quadrilaterals meet at every vertex and q q q may be odd. When q q q is odd (such as { 4 , 5 } \{4,5\} { 4 , 5 } ), the quadrilateral cannot act as the fundamental domain for a quadrilateral reflection group. Nevertheless, { 4 , q } \{4,q\} { 4 , q } tilings can be systematically constructed from triangle groups, such as from Δ ( 2 , 4 , q ) \Delta(2,4,q) Δ ( 2 , 4 , q ) groups via the Wythoff construction by placing the generator point at the corner c ∩ a c \cap a c ∩ a (see Figure S2 for the construction of { 4 , 6 } \{4,6\} { 4 , 6 } from Δ ( 2 , 4 , 6 ) \Delta(2,4,6) Δ ( 2 , 4 , 6 ) ). Algebraically, the quadrilateral tiles in this case correspond to the left cosets Δ ( 2 , 4 , q ) / D \Delta(2,4,q)/D Δ ( 2 , 4 , q ) / D of the subgroup D = ⟨ b , c ⟩ ≅ D 4 D = \langle b,c\rangle\cong D_4 D = ⟨ b , c ⟩ ≅ D 4 of order 8, with each quadrilateral formed by the union of the 8 images of the fundamental triangle belonging to a coset g D gD g D for group elements g ∈ Δ ( 2 , 4 , q ) g \in\Delta(2,4,q) g ∈ Δ ( 2 , 4 , q ) .
Regular tilings with even vertex degrees support both algebraic descriptions simultaneously. For example, the { 4 , 8 } \{4,8\} { 4 , 8 } tiling (Figure S5 ) can be generated either from the quadrilateral group □ ( 4 , 4 , 4 , 4 ) \square(4,4,4,4) □ ( 4 , 4 , 4 , 4 ) or from the triangle group Δ ( 2 , 4 , 8 ) \Delta(2,4,8) Δ ( 2 , 4 , 8 ) . □ ( 4 , 4 , 4 , 4 ) \square(4,4,4,4) □ ( 4 , 4 , 4 , 4 ) is an index-8 subgroup of Δ ( 2 , 4 , 8 ) \Delta(2,4,8) Δ ( 2 , 4 , 8 ) . Figure S5 shows how the tiles are labeled by cosets. The fundamental triangle is the identity e e e , and every other triangle is an image of it under some g ∈ Δ ( 2 , 4 , 8 ) g \in\Delta(2,4,8) g ∈ Δ ( 2 , 4 , 8 ) . The 8 images forming one quadrilateral are exactly those differing by an element of D D D , so they share a coset g D gD g D and the tile is labeled by a chosen representative g g g , e.g. the central tile is e D = D eD = D eD = D . Each quadrilateral is thus both an image of the fundamental domain of □ ( 4 , 4 , 4 , 4 ) \square(4,4,4,4) □ ( 4 , 4 , 4 , 4 ) and a coset of D D D in Δ ( 2 , 4 , 8 ) \Delta(2,4,8) Δ ( 2 , 4 , 8 ) .
Figure S5. The { 4 , 8 } \{4, 8\} { 4 , 8 } quadrilateral tiling of the hyperbolic plane and its coset decomposition under the triangle group △ ( 2 , 4 , 8 ) \triangle(2, 4, 8) △ ( 2 , 4 , 8 ) . (Left ) The tiling generated on the Poincaré disk. Each quadrilateral tile (black lines) is formed by the union of 8 triangles with interior angles π / 2 , π / 4 , π / 8 \pi/2, \pi/4, \pi/8 π /2 , π /4 , π /8 (thin orange lines) and corresponds to a left coset g D ∈ △ ( 2 , 4 , 8 ) / D gD \in\triangle(2, 4, 8)/D g D ∈ △ ( 2 , 4 , 8 ) / D of the dihedral subgroup D = ⟨ b , c ⟩ ≅ D 4 D = \langle b, c \rangle\cong D_4 D = ⟨ b , c ⟩ ≅ D 4 . This tiling can equivalently be generated as the orbit of the fundamental domain of the quadrilateral group □ ( 4 , 4 , 4 , 4 ) \square(4, 4, 4, 4) □ ( 4 , 4 , 4 , 4 ) , which is an index-8 subgroup of △ ( 2 , 4 , 8 ) \triangle(2, 4, 8) △ ( 2 , 4 , 8 ) . (Right ) The fundamental triangle of △ ( 2 , 4 , 8 ) \triangle(2, 4, 8) △ ( 2 , 4 , 8 ) and a quadrilateral tile (coset e D = D eD = D eD = D ) with internal corner angles π / 4 \pi/4 π /4 . The center of the quadrilateral tile corresponds to the corner b ∩ c b \cap c b ∩ c of the fundamental triangle (corner with angle π / 4 \pi/4 π /4 ), the four outer boundaries correspond to mirror a a a , and the four vertices correspond to the corner c ∩ a c \cap a c ∩ a with interior angle π / 8 \pi/8 π /8 .
Closed Hyperbolic Surfaces from Quotient Groups
The triangle and quadrilateral groups both tile the infinite hyperbolic plane, and closed hyperbolic surfaces can be obtained from their quotient groups. We describe the construction for a triangle group △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) here. The quadrilateral case is identical, with □ ( r , s , t , u ) \square(r,s,t,u) □ ( r , s , t , u ) in place of △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) throughout.
To obtain a finite tiling on a closed surface we identify a finite-index normal subgroup Γ ⊴ △ ( r , s , t ) \Gamma\trianglelefteq\triangle(r,s,t) Γ ⊴ △ ( r , s , t ) and form the quotient Σ = H 2 / Γ \Sigma= \mathbb{H}^2/\Gamma Σ = H 2 /Γ , which identifies points of H 2 \mathbb{H}^2 H 2 that lie in the same Γ \Gamma Γ -orbit. For Σ \Sigma Σ to be a smooth closed surface, Γ \Gamma Γ must act freely, that is without fixed points. Reflections fix their mirror lines and rotations fix their centers, so a free Γ \Gamma Γ can contain no reflections or rotations. Γ \Gamma Γ can consist only of the fixed-point-free isometries of H 2 \mathbb{H}^2 H 2 which are hyperbolic translations and glide reflections. The identifications imposed by such a Γ \Gamma Γ fold the infinite tiling into a finite tiling on the compact surface Σ \Sigma Σ .
The quotient group G ( r , s , t ) = △ ( r , s , t ) / Γ G(r,s,t) = \triangle(r,s,t)/\Gamma G ( r , s , t ) = △ ( r , s , t ) /Γ acts as the symmetry group of the tiled closed hyperbolic surface, with presentation
G ( r , s , t ) = ⟨ a , b , c ∣ a 2 = b 2 = c 2 = ( a b ) r = ( b c ) s = ( c a ) t = e , Γ -relations ⟩ , (8) G(r,s,t) = \left\langle a,b,c \mid a^2 = b^2 = c^2 = (ab)^r = (bc)^s = (ca)^t = e,\ \Gamma\text{-relations} \right\rangle, \tag*{(8)} G ( r , s , t ) = ⟨ a , b , c ∣ a 2 = b 2 = c 2 = ( ab ) r = ( b c ) s = ( c a ) t = e , Γ -relations ⟩ , (8)
where the Γ \Gamma Γ -relations are the additional identifications that render G G G finite and correspond to generators of Γ \Gamma Γ . Each element of G G G corresponds to a distinct copy of the fundamental triangle and the total number of triangles in the finite tiling equals the index ∣ G ∣ = [ △ ( r , s , t ) : Γ ] |G| = [\triangle(r,s,t) : \Gamma] ∣ G ∣ = [ △ ( r , s , t ) : Γ ] . Adjacent triangles are related by right multiplication by a generator (see Figure S7 ), so the adjacency structure of the tiling is the Cayley graph of G G G with respect to { a , b , c } \{a,b,c\} { a , b , c } .
We use two complementary computational methods to enumerate quotient groups:
Low-Index Normal Subgroups (LINS): The first approach is an exhaustive search based on Todd–Coxeter coset enumeration [3 , 4 ] . We use the LINS package [5 ] in GAP [6 ] to systematically find all normal subgroups Γ ⊴ △ ( r , s , t ) \Gamma\trianglelefteq\triangle(r,s,t) Γ ⊴ △ ( r , s , t ) up to a given index. This guarantees that we enumerate every finite tiling up to that size, but it must enumerate all normal subgroups to do so, and there are many of them, so reaching large index (large ∣ G ∣ |G| ∣ G ∣ ) becomes prohibitively expensive.
Epimorphism Search: To reach larger indices than the exhaustive search can, we instead search for epimorphisms onto a chosen target group. We fix a candidate finite group H H H (such as a projective special linear group PSL ( 2 , q ) \operatorname{PSL}(2,q) PSL ( 2 , q ) ) and search for a surjective homomorphism, or epimorphism, ϕ : △ ( r , s , t ) → H \phi:\triangle(r,s,t) \to H ϕ : △ ( r , s , t ) → H . Its kernel Γ = ker ( ϕ ) \Gamma= \ker(\phi) Γ = ker ( ϕ ) is a normal subgroup with quotient G ( r , s , t ) = △ ( r , s , t ) / Γ ≅ H G(r,s,t) = \triangle(r,s,t)/\Gamma\cong H G ( r , s , t ) = △ ( r , s , t ) /Γ ≅ H . By targeting a specific H H H we obtain a large quotient directly, without enumerating subgroups up to its index.
Topology and Orientability of the Surface
The topology of the closed surface Σ = H 2 / Γ \Sigma= \mathbb{H}^{2}/\Gamma Σ = H 2 /Γ follows from the Gauss–Bonnet theorem. In the constant negative curvature of H 2 \mathbb{H}^{2} H 2 each fundamental triangle has area π ( 1 − 1 / r − 1 / s − 1 / t ) \pi(1 - 1/r - 1/s - 1/t) π ( 1 − 1/ r − 1/ s − 1/ t ) , and Σ \Sigma Σ is tiled by ∣ G ∣ |G| ∣ G ∣ images of it, so
Area ( Σ ) = ∣ G ∣ π ( 1 − 1 r − 1 s − 1 t ) = − 2 π χ ( Σ ) , (9) \operatorname{Area}(\Sigma) = |G|\pi\left(1 - \frac{1}{r} - \frac{1}{s} - \frac{1}{t}\right) = -2\pi\chi(\Sigma), \tag*{(9)} Area ( Σ ) = ∣ G ∣ π ( 1 − r 1 − s 1 − t 1 ) = − 2 π χ ( Σ ) , (9)
where χ ( Σ ) \chi(\Sigma) χ ( Σ ) is the Euler characteristic. Since 1 / r + 1 / s + 1 / t < 1 1/r + 1/s + 1/t < 1 1/ r + 1/ s + 1/ t < 1 the area factor is positive, and ∣ χ ∣ |\chi| ∣ χ ∣ grows linearly with ∣ G ∣ |G| ∣ G ∣ .
The surface Σ \Sigma Σ is orientable when Γ \Gamma Γ preserves orientation, and non-orientable when it does not. Every isometry of H 2 \mathbb{H}^{2} H 2 is either orientation-preserving (translations, rotations) or orientation-reversing (reflections, glide reflections), the latter being the odd-length words in a , b , c a, b, c a , b , c . Thus Σ \Sigma Σ is orientable if and only if Γ \Gamma Γ contains only even-length words, that is Γ ≤ Δ + ( r , s , t ) \Gamma\le\Delta^{+}(r,s,t) Γ ≤ Δ + ( r , s , t ) , the index-2 orientation-preserving subgroup. A free Γ \Gamma Γ that meets this condition contains neither rotations (excluded by freeness) nor glide reflections (excluded by orientation), leaving only hyperbolic translations. Our enumeration produces both orientable and non-orientable quotients, and we construct hyperbolic color and surface codes on both. We report their parameters in § 1.12 .
Orientable and non-orientable surfaces constructed from the same tiling look identical locally and differ only in how they close up. This affects the structure of the homologically non-trivial cycles of the surface, which, as we explain in § 1.5 , are associated with the logical operators of the code, so the difference carries over to the logical structure. The number of independent homologically non-trivial cycles is
dim H 1 ( Σ ; F 2 ) = 2 − χ ( Σ ) , (10) \dim H_{1}(\Sigma;\mathbb{F}_{2}) = 2 - \chi(\Sigma), \tag*{(10)} dim H 1 ( Σ ; F 2 ) = 2 − χ ( Σ ) , (10)
which gives 2 g 2g 2 g cycles for an orientable surface of genus g g g (where χ = 2 − 2 g \chi= 2 - 2g χ = 2 − 2 g ) and c c c cycles for a non-orientable surface with cross-cap number c c c (where χ = 2 − c \chi= 2 - c χ = 2 − c ). Figure S6 shows a torus and a Klein bottle as the smallest Euclidean examples of an orientable and a non-orientable surface, each with its fundamental polygon. The distinction lies in how their cycles cross: on the orientable torus the non-trivial cycles form a symplectic pair , crossing each other an odd number of times and any other representative of their own class an even number of times, whereas on the non-orientable Klein bottle a cycle can cross another representative of its own class an odd number of times, so no such pairing exists. The hyperbolic surfaces we use are the higher-genus and higher-cross-cap analogues of these two.
Figure S6. The torus T 2 T^2 T 2 and the Klein bottle K K K as the simplest orientable and non-orientable Euclidean closed surfaces. Each is shown as a surface and as a fundamental polygon whose opposite edges are identified according to the arrows. a The torus is orientable: both pairs of opposite edges are glued without a flip (all arrows on identified edges point in the same direction). The purple and orange cycles are homologically non-trivial and cross exactly once, forming a symplectic pair. On the fundamental polygon, the purple, lilac and pink lines are three distinct representatives of the same homology class. b The Klein bottle is non-orientable: one pair of edges is glued with a flip (the red arrows point in opposite directions). On the fundamental polygon, the purple, lilac and pink lines are again representatives of the same homology class, but the orientation-reversing identification forces them to cross each other an odd number of times. Therefore, the non-trivial cycles do not arrange into symplectic pairs as they do on the torus.
In this work, we mostly focus on the orientable surfaces, for which we build a canonical logical basis by finding symplectic pairs of homologically non-trivial cycles (§ 1.5 ). In the basis we design, non-trivial cycles are also related to one another by the orientation-preserving symmetries of the tiling, so that the corresponding logical operators can be mapped onto each other by the fault-tolerant walking circuits of Section S7 for logical measurement (Section S6). The symplectic pairing of cycles and their symmetries are what makes this basis well-defined.
The non-orientable surfaces also yield codes with favorable parameters, in some cases outperforming those of orientable surfaces of comparable size (see § 1.12 ). We expect most of the methods developed in this work to apply to them directly, however we leave the finer details of a modular QEC architecture based on non-orientable surfaces to future work.
Orientable Surfaces
For an orientable Σ \Sigma Σ , the quotient group G G G corresponds to a compact surface Σ g \Sigma_g Σ g of genus g ≥ 2 g \ge2 g ≥ 2 with χ = 2 − 2 g \chi= 2 - 2g χ = 2 − 2 g , and its orientation-preserving symmetries form the index-2 subgroup
G + ( r , s , t ) = Δ + ( r , s , t ) / Γ = ⟨ ρ , σ ∣ ρ r = σ s = ( ρ σ ) t = e , Γ -relations ⟩ , (11) G^{+}(r,s,t) = \Delta^{+}(r,s,t)/\Gamma= \langle\rho,\sigma\mid\rho^{r} = \sigma^{s} = (\rho\sigma)^{t} = e,\ \Gamma\text{-relations} \rangle, \tag*{(11)} G + ( r , s , t ) = Δ + ( r , s , t ) /Γ = ⟨ ρ , σ ∣ ρ r = σ s = ( ρ σ ) t = e , Γ -relations ⟩ , (11)
with ∣ G ∣ = 2 ∣ G + ∣ |G| = 2|G^{+}| ∣ G ∣ = 2∣ G + ∣ . Each element of G + G^{+} G + corresponds to an image of the fundamental domain of Δ + ( r , s , t ) \Delta^{+}(r,s,t) Δ + ( r , s , t ) , that is, a pair of adjacent triangles glued along a shared edge forming a quadrilateral, and the adjacency of these quadrilaterals is given by the Cayley graph of G + G^{+} G + with respect to { ρ , σ } \{\rho,\sigma\} { ρ , σ } (see Figure S7 ). Substituting χ = 2 − 2 g \chi= 2 - 2g χ = 2 − 2 g and ∣ G ∣ = 2 ∣ G + ∣ |G| = 2|G^{+}| ∣ G ∣ = 2∣ G + ∣ into Equation (9) gives the genus,
g = 1 + ∣ G + ∣ 2 ( 1 − 1 r − 1 s − 1 t ) . (12) g = 1 + \frac{|G^{+}|}{2}\left(1 - \frac{1}{r} - \frac{1}{s} - \frac{1}{t}\right). \tag*{(12)} g = 1 + 2 ∣ G + ∣ ( 1 − r 1 − s 1 − t 1 ) . (12)
Double Covers
Double covers provide an additional method to construct closed surfaces, enlarging the pool of tilings found by the epimorphism search. A double cover of Σ \Sigma Σ is a surface Σ ~ \widetilde{\Sigma} Σ with a two-to-one map Σ ~ → Σ \widetilde{\Sigma} \to\Sigma Σ → Σ , with two points of Σ ~ \widetilde{\Sigma} Σ lying above each point of Σ \Sigma Σ . We use double covers to obtain orientable surfaces from non-orientable ones and to enforce the vertex two-colorability (bipartiteness) required for valid surface codes on closed quadrilateral tilings (see Section S1 E), thereby enlarging the pool of candidate tilings.
Orientable double cover. Algebraically, the orientable double cover discards the orientation-reversing elements of Γ \Gamma Γ and replaces Γ \Gamma Γ with
Γ ~ : = Γ ∩ Δ + ( r , s , t ) , (13) \widetilde{\Gamma} := \Gamma\cap\Delta^{+}(r,s,t), \tag*{(13)} Γ := Γ ∩ Δ + ( r , s , t ) , (13)
which retains only the orientation-preserving elements. Since Γ ~ ≤ Δ + ( r , s , t ) \widetilde{\Gamma} \leq\Delta^{+}(r,s,t) Γ ≤ Δ + ( r , s , t ) by construction, the quotient Σ ~ = H 2 / Γ ~ \widetilde{\Sigma} = \mathbb{H}^{2}/\widetilde{\Gamma} Σ = H 2 / Γ is orientable. When Σ \Sigma Σ is non-orientable, Γ ~ \widetilde{\Gamma} Γ has index 2 in Γ \Gamma Γ (since [ Δ : Δ + ] = 2 [\Delta: \Delta^{+}] = 2 [ Δ : Δ + ] = 2 ), so it imposes half as many identifications and yields an orientable surface with twice as many tiles, ∣ G ~ ∣ = 2 ∣ G ∣ |\widetilde{G}| = 2|G| ∣ G ∣ = 2∣ G ∣ . When Σ \Sigma Σ is already orientable, Γ ≤ Δ + \Gamma\leq\Delta^{+} Γ ≤ Δ + and the construction returns Γ ~ = Γ \widetilde{\Gamma} = \Gamma Γ = Γ unchanged.
Computationally, we obtain Γ ~ \widetilde{\Gamma} Γ by constructing the group G ~ ≤ G × Z 2 \widetilde{G} \leq G \times\mathbb{Z}_{2} G ≤ G × Z 2 generated by a ~ = ( a , 1 ) \widetilde{a} = (a,1) a = ( a , 1 ) , b ~ = ( b , 1 ) \widetilde{b} = (b,1) b = ( b , 1 ) , and c ~ = ( c , 1 ) \widetilde{c} = (c,1) c = ( c , 1 ) , where 1 is the non-identity element of Z 2 \mathbb{Z}_{2} Z 2 . The Z 2 \mathbb{Z}_{2} Z 2 factor tracks word-length parity, ensuring that an element of Δ ( r , s , t ) \Delta(r,s,t) Δ ( r , s , t ) maps to the identity in G ~ \widetilde{G} G if and only if it belongs to Γ \Gamma Γ and has even word length. Consequently, the kernel of the epimorphism Δ ( r , s , t ) → G ~ \Delta(r,s,t) \to\widetilde{G} Δ ( r , s , t ) → G is precisely Γ ∩ Δ + ( r , s , t ) \Gamma\cap\Delta^{+}(r,s,t) Γ ∩ Δ + ( r , s , t ) .
Bipartite double cover. For regular quadrilateral tilings { 4 , q } \{4,q\} { 4 , q } constructed from a triangle group Δ ( 2 , 4 , q ) \Delta(2,4,q) Δ ( 2 , 4 , q ) , the generators a a a and c c c both fix the vertices of the quadrilateral tiling, and only b b b moves between vertices (see Figure S5 ). The vertex two-colorability required for a valid surface code (Section S1 E) therefore depends on the parity of b b b in each element of Γ \Gamma Γ : the closed tiling is bipartite if and only if every element of Γ \Gamma Γ contains an even number of b b b generators. When this condition fails, we can restore bipartiteness by taking a double cover that twists b b b by the non-trivial element of Z 2 \mathbb{Z}_{2} Z 2 . Specifically, we construct G ~ ≤ G × Z 2 \widetilde{G} \leq G \times\mathbb{Z}_{2} G ≤ G × Z 2 generated by a ~ = ( a , 0 ) \widetilde{a} = (a,0) a = ( a , 0 ) , b ~ = ( b , 1 ) \widetilde{b} = (b,1) b = ( b , 1 ) , and c ~ = ( c , 0 ) \widetilde{c} = (c,0) c = ( c , 0 ) , so that the Z 2 \mathbb{Z}_{2} Z 2 factor tracks only the parity of b b b . We note that even when the base quadrilateral tiling is not bipartite, the fine-grained semi-hyperbolic tilings that we introduce later in Section S2 B can still be bipartite if L L L is even, in which case valid semi-hyperbolic surface codes can be defined without taking a double cover.
We apply these double cover constructions to the quotients found by our searches, keeping both the original tilings and the covers as code tiling candidates.
Left and Right Multiplication in Hyperbolic Symmetry Groups
As explained in Section S1 A, when the hyperbolic surface is tiled by a fundamental domain of a triangle group, we obtain a tiling with face configuration V 2 r .2 s .2 t V2r.2s.2t V 2 r .2 s .2 t (referred to as the dual tiling in Figure S4 ). As illustrated in Figure S7 , the fundamental triangle is labeled by the identity element e e e . Any other triangle in the tiling is reached by applying a specific sequence of reflections, corresponding to a unique group element g ∈ G g \in G g ∈ G .
The algebraic structure of the quotient group G = △ ( r , s , t ) / Γ G = \triangle(r,s,t)/\Gamma G = △ ( r , s , t ) /Γ and its orientation-preserving subgroup G + G^{+} G + defines both the local geometric structure and global symmetries of the corresponding hyperbolic tilings. This dual role can be understood through the distinction between left and right group multiplication.
Left multiplication defines global symmetries of the tiling. As per convention, the group acts on the tiled surface via left multiplication. Consider the operation that maps every tile g g g in the tiling to h g hg h g , where h ∈ G h \in G h ∈ G is a fixed group element. Geometrically, this left multiplication applies a global isometry (a translation, rotation, or reflection) to the entire tiled surface, mapping the tiling onto itself.
Right multiplication defines local adjacency, corresponding to a local move to an adjacent tile. Considering a specific triangular tile g g g as an example, its immediate neighbors are the triangles that share its edges. The reflections across the three edges of the fundamental triangle e e e are the generators a a a , b b b and c c c . The reflections across the corresponding edges of the displaced triangle g g g are given instead by the conjugate operators g a g − 1 gag^{-1} g a g − 1 , g b g − 1 gbg^{-1} g b g − 1 and g c g − 1 gcg^{-1} g c g − 1 . To see why, consider the action of reflecting across an edge of g g g : one first maps g g g back to the identity e e e (via g − 1 g^{-1} g − 1 ), performs the reflection (e.g., a a a ), and then maps back to g g g (via g g g ). Applying one of these local reflections to the tile g g g gives its neighbor ( g a g − 1 ) g = g a (gag^{-1})g = ga ( g a g − 1 ) g = g a . Therefore, right multiplication by a generator corresponds to crossing a local mirror (tile boundary) to an adjacent tile.
This geometric interpretation of left and right multiplication generalizes in the expected way to the orientation-preserving subgroup G + = △ + ( r , s , t ) / Γ G^{+} = \triangle^{+}(r,s,t)/\Gamma G + = △ + ( r , s , t ) /Γ , shown in the right panel of Figure S7 . Here, the fundamental domain is no longer a single triangle but a quadrilateral formed by joining a pair of adjacent triangles (specifically the identity triangle e e e and its neighbor b b b , related by a reflection). Each quadrilateral in this new tiling is identified with an element p ∈ G + p \in G^{+} p ∈ G + , representing a pair of triangles p p p and p b pb p b . Left multiplication by elements of G + G^{+} G + defines the global, orientation-preserving isometries of the closed surface. For the two rotation generators ρ : = a b \rho:= ab ρ := ab and σ : = b c \sigma:= bc σ := b c , multiplying on the left corresponds to a global rotation (with ρ \rho ρ and σ \sigma σ each centered on different vertices), while right multiplication by the same generators corresponds to a local move to an adjacent tile.
In the context of modular hyperbolic codes, as discussed later in this supplement, we will see that the global symmetries define automorphisms of the code used for implementing logic (and the connectivity required for this) whereas right multiplication defines the inter-module connectivity required to implement syndrome extraction circuits.
Hyperbolic and Semi-Hyperbolic Code Constructions
In this section we explain how we construct hyperbolic codes from tilings of closed hyperbolic surfaces, and how we obtain semi-hyperbolic codes by fine-graining the base hyperbolic tiling with a Euclidean tiling.
Hyperbolic and Semi-Hyperbolic Color Codes
Color codes are defined on color code tilings, with data qubits associated with vertices and both an X X X - and a Z Z Z -type stabilizer generator supported on each face [1 ] . We start with a color code tiling T = ( V , E , F ) \mathcal{T}=(V,E,F) T = ( V , E , F ) on a closed hyperbolic surface Σ \Sigma Σ , whose dual is the base triangular tiling T △ = ( V △ , E △ , F △ ) \mathcal{T}^{\triangle}=(V^{\triangle},E^{\triangle},F^{\triangle}) T △ = ( V △ , E △ , F △ ) associated with the symmetry group G = △ ( r , s , t ) / Γ G=\triangle(r,s,t)/\Gamma G = △ ( r , s , t ) /Γ . We write ∣ F △ ∣ \lvert F^{\triangle}\rvert ∣ F △ ∣ for the number of base triangular tiles. Each triangle face in T △ \mathcal{T}^{\triangle} T △ corresponds to a group element g ∈ G g\in G g ∈ G , so the number of triangular tiles is equal to the order of the quotient group ∣ F △ ∣ = ∣ G ∣ \lvert F^{\triangle}\rvert=\lvert G\rvert ∣ F △ ∣ = ∣ G ∣ . The tiling T \mathcal{T} T has vertex configuration 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t and defines a hyperbolic color code, which we label 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t -∣ F △ ∣ \lvert F^{\triangle}\rvert ∣ F △ ∣ . Since T = ( T △ ) ∗ \mathcal{T}=(\mathcal{T}^{\triangle})^{*} T = ( T △ ) ∗ is the dual of the base triangular tiling, its vertices, edges and faces are those of T △ \mathcal{T}^{\triangle} T △ with the roles of vertices and faces exchanged, ∣ V ∣ = ∣ F △ ∣ \lvert V\rvert=\lvert F^{\triangle}\rvert ∣ V ∣ = ∣ F △ ∣ , ∣ E ∣ = ∣ E △ ∣ \lvert E\rvert=\lvert E^{\triangle}\rvert ∣ E ∣ = ∣ E △ ∣ and ∣ F ∣ = ∣ V △ ∣ \lvert F\rvert=\lvert V^{\triangle}\rvert ∣ F ∣ = ∣ V △ ∣ . Using ∣ F △ ∣ = ∣ G ∣ \lvert F^{\triangle}\rvert=\lvert G\rvert ∣ F △ ∣ = ∣ G ∣ , that T △ \mathcal{T}^{\triangle} T △ is a triangulation (∣ E △ ∣ = 3 2 ∣ F △ ∣ \lvert E^{\triangle}\rvert=\frac{3}{2}\lvert F^{\triangle}\rvert ∣ E △ ∣ = 2 3 ∣ F △ ∣ ), and that each vertex of T △ \mathcal{T}^{\triangle} T △ has degree 2 r 2r 2 r , 2 s 2s 2 s or 2 t 2t 2 t ,
∣ V ∣ = ∣ F △ ∣ , ∣ E ∣ = 3 ∣ F △ ∣ 2 , ∣ F ∣ = ∣ F △ ∣ 2 ( 1 r + 1 s + 1 t ) . (14) \lvert V\rvert=\lvert F^{\triangle}\rvert,\qquad\lvert E\rvert=\frac{3\lvert F^{\triangle}\rvert}{2},\qquad\lvert F\rvert=\frac{\lvert F^{\triangle}\rvert}{2}\left(\frac{1}{r}+\frac{1}{s}+\frac{1}{t}\right). \tag*{(14)} ∣ V ∣ = ∣ F △ ∣ , ∣ E ∣ = 2 3 ∣ F △ ∣ , ∣ F ∣ = 2 ∣ F △ ∣ ( r 1 + s 1 + t 1 ) . (14)
The dimension of the first homology group then follows from the Euler characteristic χ = ∣ V ∣ − ∣ E ∣ + ∣ F ∣ \chi=\lvert V\rvert-\lvert E\rvert+\lvert F\rvert χ = ∣ V ∣ − ∣ E ∣ + ∣ F ∣ ,
dim H 1 ( Σ ; F 2 ) = 2 − χ = 2 + ∣ F △ ∣ 2 ( 1 − 1 r − 1 s − 1 t ) . (15) \dim H_{1}(\Sigma;\mathbb{F}_{2})=2-\chi=2+\frac{\lvert F^{\triangle}\rvert}{2}\left(1-\frac{1}{r}-\frac{1}{s}-\frac{1}{t}\right). \tag*{(15)} dim H 1 ( Σ ; F 2 ) = 2 − χ = 2 + 2 ∣ F △ ∣ ( 1 − r 1 − s 1 − t 1 ) . (15)
The hyperbolic color code has n = ∣ V ∣ = ∣ F △ ∣ n=\lvert V\rvert=\lvert F^{\triangle}\rvert n = ∣ V ∣ = ∣ F △ ∣ data qubits, one on each vertex of T \mathcal{T} T . Since each homologically non-trivial cycle supports independent logical operators for two of the three colors [1 , 7 ] (see § 1.5 ), the number of logical qubits is
k = 2 dim H 1 ( Σ ; F 2 ) = 4 + ∣ F △ ∣ ( 1 − 1 r − 1 s − 1 t ) . (16) k=2\dim H_{1}(\Sigma;\mathbb{F}_{2})=4+\lvert F^{\triangle}\rvert\left(1-\frac{1}{r}-\frac{1}{s}-\frac{1}{t}\right). \tag*{(16)} k = 2 dim H 1 ( Σ ; F 2 ) = 4 + ∣ F △ ∣ ( 1 − r 1 − s 1 − t 1 ) . (16)
On an orientable surface of genus g g g Equation (16) reduces to k = 4 g k=4g k = 4 g . The code distance of hyperbolic color codes grows logarithmically with the number of data qubits, d = O ( log n ) d=O(\log n) d = O ( log n ) [8 ] .
We construct semi-hyperbolic color codes by fine-graining the hyperbolic tiling [3 ] , illustrated in stages in Figure S8 . We note that these semi-hyperbolic tilings were used previously to construct semi-hyperbolic Floquet codes [3 ] , but have not previously been used to construct color codes. Following [3 ] , we start from the base triangular tiling T △ \mathcal{T}^{\triangle} T △ (Figure S8 ), the dual of the color code tiling T \mathcal{T} T (Figure S8 ). We subdivide every edge into L ≥ 1 L\geq1 L ≥ 1 segments, where L L L is the fine-graining parameter (side-length), and fill each triangular tile with a Euclidean { 3 , 6 } \{3,6\} { 3 , 6 } tiling, giving the fine-grained tiling T L △ \mathcal{T}^{\triangle}_{L} T L △ (Figure S8 ). Its dual gives the semi-hyperbolic color code tiling T L = ( T L △ ) ∗ \mathcal{T}_{L}=(\mathcal{T}^{\triangle}_{L})^{*} T L = ( T L △ ) ∗ (Figure S8 ), on which we place the color code (Figure S8 ). At L = 1 L=1 L = 1 no fine-graining takes place and we recover the hyperbolic color code, while L ≥ 2 L\geq2 L ≥ 2 gives a semi-hyperbolic tiling and the corresponding semi-hyperbolic color code. We label the resulting codes as 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t -∣ F △ ∣ \lvert F^{\triangle}\rvert ∣ F △ ∣ -L L L .
Figure S8. Semi-hyperbolic color code construction in stages, shown for the Bolza surface, the closed genus-2 surface obtained from △ ( 4 , 4 , 4 ) \triangle(4,4,4) △ ( 4 , 4 , 4 ) at index ∣ G ∣ = 16 |G|=16 ∣ G ∣ = 16 by identifying opposite boundary edges. a The three-colorable tiling T \mathcal{T} T on a closed hyperbolic surface, on which we define the hyperbolic color code denoted 8.8.8-16 (equivalently 8.8.8-16-L1). b The base triangular tiling T △ \mathcal{T}^{\triangle} T △ . c The fine-grained base triangular tiling T L △ \mathcal{T}^{\triangle}_{L} T L △ , shown for fine-graining parameter L = 3 L=3 L = 3 . d The dual of the fine-grained tiling, T L = ( T L △ ) ∗ \mathcal{T}_{L}=(\mathcal{T}^{\triangle}_{L})^{*} T L = ( T L △ ) ∗ . e The semi-hyperbolic 8.8.8-16-L3 color code with parameters [ [ 144 , 8 , 8 ] ] [[144,8,8]] [[ 144 , 8 , 8 ]] associated with T L \mathcal{T}_{L} T L .
The faces of the semi-hyperbolic color code tiling T L \mathcal{T}_{L} T L are of two types. Bulk faces lie in the interior of a fine-grained region and are hexagons, supporting weight-six stabilizers locally identical to a Euclidean planar 6.6.6 color code. Corner faces, on the other hand, are inherited from the vertex configuration of the hyperbolic tiling T \mathcal{T} T supporting stabilizers of weight 2 r 2r 2 r , 2 s 2s 2 s or 2 t 2t 2 t . The number of high-weight corner stabilizers is fixed by the underlying hyperbolic surface and does not grow with L L L .
Fine-graining does not change the topology of Σ \Sigma Σ , so dim H 1 ( Σ ; F 2 ) \dim H_{1}(\Sigma;\mathbb{F}_{2}) dim H 1 ( Σ ; F 2 ) and hence k k k are unchanged, while the number of physical data qubits grows quadratically in L L L . On the other hand, code distance scales roughly linearly with L L L .
The numbers of vertices, edges and faces of the semi-hyperbolic color code tiling T L \mathcal{T}_L T L are
∣ V L ∣ = L 2 ∣ F △ ∣ , (17) |V_L| = L^2|F^\triangle|, \tag*{(17)} ∣ V L ∣ = L 2 ∣ F △ ∣ , (17)
∣ E L ∣ = 3 L 2 ∣ F △ ∣ 2 , (18) |E_L| = \frac{3L^2|F^\triangle|}{2}, \tag*{(18)} ∣ E L ∣ = 2 3 L 2 ∣ F △ ∣ , (18)
∣ F L ∣ = ∣ F △ ∣ 2 ( L 2 − 1 + 1 r + 1 s + 1 t ) , (19) |F_L| = \frac{|F^\triangle|}{2}\left(L^2 - 1 + \frac{1}{r} + \frac{1}{s} + \frac{1}{t}\right), \tag*{(19)} ∣ F L ∣ = 2 ∣ F △ ∣ ( L 2 − 1 + r 1 + s 1 + t 1 ) , (19)
so the semi-hyperbolic color code has n = ∣ V L ∣ = L 2 ∣ F △ ∣ n = |V_L| = L^2|F^\triangle| n = ∣ V L ∣ = L 2 ∣ F △ ∣ data qubits [3 ] . Therefore, the encoding rate of a 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t -∣ F △ ∣ |F^\triangle| ∣ F △ ∣ -L L L code is given as
k n = 1 L 2 ( 1 − 1 r − 1 s − 1 t ) + 4 L 2 ∣ F △ ∣ ⟶ ∣ F △ ∣ → ∞ 1 L 2 ( 1 − 1 r − 1 s − 1 t ) . (20) \frac{k}{n} = \frac{1}{L^2}\left(1 - \frac{1}{r} - \frac{1}{s} - \frac{1}{t}\right) + \frac{4}{L^2|F^\triangle|}
\underset{|F^\triangle|\to\infty}{\longrightarrow}
\frac{1}{L^2}\left(1 - \frac{1}{r} - \frac{1}{s} - \frac{1}{t}\right). \tag*{(20)} n k = L 2 1 ( 1 − r 1 − s 1 − t 1 ) + L 2 ∣ F △ ∣ 4 ∣ F △ ∣ → ∞ ⟶ L 2 1 ( 1 − r 1 − s 1 − t 1 ) . (20)
The bracket is always positive for a hyperbolic tiling with 1 / r + 1 / s + 1 / t < 1 1/r + 1/s + 1/t < 1 1/ r + 1/ s + 1/ t < 1 . Code distances scale as d = O ( L log ∣ F △ ∣ ) d = O(L\log|F^\triangle|) d = O ( L log ∣ F △ ∣ ) , so L L L tunes a distance–rate trade-off: increasing L L L raises the distance while k k k is fixed by the topology and n n n grows as L 2 L^2 L 2 . Although fine-graining reduces the encoding rate quadratically, it boosts the distance, therefore these codes can retain a constant-factor density advantage in k d 2 / n kd^2/n k d 2 / n over the surface code. We report this figure of merit for the resulting code families in § 1.12 . We also note that we developed efficient and accurate methods to compute code distances as explained in Section S10.
As an example, the 8.8.8-16-L3 code defined on the Bolza surface shown in Figure S8 , corresponds to a semi-hyperbolic color code with code parameters [ [ 144 , 8 , 8 ] ] [[144, 8, 8]] [[ 144 , 8 , 8 ]] .
Hyperbolic and Semi-Hyperbolic Surface Codes
Surface codes can be defined on two-colorable tilings, with data qubits associated with vertices, X X X -type stabilizer generators supported on each face of one color (e.g. red faces) and Z Z Z -type stabilizer generators on each face of another color (e.g. blue faces). We start with a base quadrilateral tiling T □ = ( V □ , E □ , F □ ) \mathcal{T}^{\square}=(V^{\square},E^{\square},F^{\square}) T □ = ( V □ , E □ , F □ ) on a closed hyperbolic surface Σ \Sigma Σ and define the hyperbolic surface code on its dual T = ( T □ ) ∗ \mathcal{T}=(\mathcal{T}^{\square})^{*} T = ( T □ ) ∗ . We write ∣ F □ ∣ |F^{\square}| ∣ F □ ∣ for the number of base quadrilateral tiles. As explained in Section S1 E, we use quadrilateral tilings with face configuration V 2 r .2 s .2 t .2 u V2r.2s.2t.2u V 2 r .2 s .2 t .2 u that arise from quadrilateral groups or regular { 4 , q } \{4,q\} { 4 , q } quadrilateral tilings from a triangle group. The underlying symmetry group determines how the number of quadrilateral tiles ∣ F □ ∣ |F^{\square}| ∣ F □ ∣ relates to the quotient order ∣ G ∣ |G| ∣ G ∣ . In either case ∣ F □ ∣ |F^{\square}| ∣ F □ ∣ is the quantity associated with the number of physical data qubits. For generality, let us use V a . b . c . d V a.b.c.d V a . b . c . d for the face configuration of an arbitrary quadrilateral tiling T □ \mathcal{T}^{\square} T □ in this section, where a , b , c , d a,b,c,d a , b , c , d are the vertex degrees of a tile. We label the hyperbolic surface code V a . b . c . d V a.b.c.d V a . b . c . d -∣ F □ ∣ |F^{\square}| ∣ F □ ∣ . For the regular tilings { 4 , q } \{4,q\} { 4 , q } , we also use the shorthand { 4 , q } \{4,q\} { 4 , q } -∣ F □ ∣ |F^{\square}| ∣ F □ ∣ .
Since T = ( T □ ) ∗ \mathcal{T}=(\mathcal{T}^{\square})^{*} T = ( T □ ) ∗ is the dual of the base quadrilateral tiling, its vertices, edges and faces are those of T □ \mathcal{T}^{\square} T □ with the roles of vertices and faces exchanged. ∣ V ∣ = ∣ F □ ∣ |V|=|F^{\square}| ∣ V ∣ = ∣ F □ ∣ , ∣ E ∣ = ∣ E □ ∣ |E|=|E^{\square}| ∣ E ∣ = ∣ E □ ∣ and ∣ F ∣ = ∣ V □ ∣ |F|=|V^{\square}| ∣ F ∣ = ∣ V □ ∣ . Using that T □ \mathcal{T}^{\square} T □ has quadrilateral faces (∣ E □ ∣ = 2 ∣ F □ ∣ |E^{\square}|=2|F^{\square}| ∣ E □ ∣ = 2∣ F □ ∣ ) and vertices of degree a a a , b b b , c c c or d d d ,
∣ V ∣ = ∣ F □ ∣ , ∣ E ∣ = 2 ∣ F □ ∣ , ∣ F ∣ = ∣ F □ ∣ ( 1 a + 1 b + 1 c + 1 d ) . (21) |V|=|F^{\square}|,\qquad|E|=2|F^{\square}|,\qquad|F|=|F^{\square}|\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d}\right). \tag*{(21)} ∣ V ∣ = ∣ F □ ∣ , ∣ E ∣ = 2∣ F □ ∣ , ∣ F ∣ = ∣ F □ ∣ ( a 1 + b 1 + c 1 + d 1 ) . (21)
The dimension of the first homology group then follows from the Euler characteristic χ = ∣ V ∣ − ∣ E ∣ + ∣ F ∣ \chi= |V| - |E| + |F| χ = ∣ V ∣ − ∣ E ∣ + ∣ F ∣ ,
dim H 1 ( Σ ; F 2 ) = 2 − χ = 2 + ∣ F □ ∣ ( 1 − 1 a − 1 b − 1 c − 1 d ) . (22) \dim H_1(\Sigma;\mathbb{F}_2) = 2 - \chi= 2 + |F^{\square}|\left(1 - \frac{1}{a} - \frac{1}{b} - \frac{1}{c} - \frac{1}{d}\right). \tag*{(22)} dim H 1 ( Σ ; F 2 ) = 2 − χ = 2 + ∣ F □ ∣ ( 1 − a 1 − b 1 − c 1 − d 1 ) . (22)
The hyperbolic surface code has n = ∣ V ∣ = ∣ F □ ∣ n = |V| = |F^{\square}| n = ∣ V ∣ = ∣ F □ ∣ data qubits, one on each vertex of T \mathcal{T} T , and encodes one logical qubit per independent homology class (see § 1.5 ), so
k = dim H 1 ( Σ ; F 2 ) = 2 + ∣ F □ ∣ ( 1 − 1 a − 1 b − 1 c − 1 d ) . (23) k = \dim H_1(\Sigma;\mathbb{F}_2) = 2 + |F^{\square}|\left(1 - \frac{1}{a} - \frac{1}{b} - \frac{1}{c} - \frac{1}{d}\right). \tag*{(23)} k = dim H 1 ( Σ ; F 2 ) = 2 + ∣ F □ ∣ ( 1 − a 1 − b 1 − c 1 − d 1 ) . (23)
On an orientable surface of genus g g g , Equation (23) reduces to k = 2 g k = 2g k = 2 g . As for the color codes, the distance grows logarithmically in the number of data qubits, d = O ( log n ) d = O(\log n) d = O ( log n ) [8 ] .
We construct semi-hyperbolic surface codes by fine-graining the hyperbolic tiling as for the color codes, but with square tilings instead of triangular ones, illustrated in stages in Figure S9 . Our fine-graining procedure is similar to that of Ref. [9 ] , but the resulting codes differ: we place data qubits on the vertices of ( T L □ ) ∗ (\mathcal{T}^{\square}_L)^* ( T L □ ) ∗ , with the two stabilizer types on faces of different color, whereas Ref. [9 ] places data qubits on the edges of T L □ \mathcal{T}^{\square}_L T L □ , analogous to the distinction between the rotated and unrotated planar surface codes. With data qubits on the edges of T L □ \mathcal{T}^{\square}_L T L □ , every stabilizer of one type is a weight-four face, while all high-weight corner stabilizers (on vertices of degree greater than four) are of the other type, and the resulting X X X and Z Z Z distances generally differ (see Table 1 of Ref. [9 ] ). In contrast, for odd L L L our construction distributes the high-weight corner stabilizers between both X X X and Z Z Z types, and for regular tilings the X X X and Z Z Z stabilizers are related by a symmetry of the tiling (see Section S11 A). Furthermore, with data qubits on the edges of T L □ \mathcal{T}^{\square}_L T L □ , those on the edges of the base quadrilaterals would lie on module boundaries, with no natural choice of module to assign them to, leading to non-uniform modules, whereas in our construction every data qubit lies strictly inside a base quadrilateral. We start from the base quadrilateral tiling T □ \mathcal{T}^{\square} T □ (Figure S9 ), the dual of the surface code tiling T \mathcal{T} T (Figure S9 ). We subdivide every edge into L ≥ 1 L \ge1 L ≥ 1 segments, where L L L is the fine-graining parameter, and fill each quadrilateral tile with a Euclidean square tiling, giving the fine-grained tiling T L □ \mathcal{T}^{\square}_L T L □ (Figure S9 ). Its dual gives the semi-hyperbolic surface code tiling T L = ( T L □ ) ∗ \mathcal{T}_L = (\mathcal{T}^{\square}_L)^* T L = ( T L □ ) ∗ (Figure S9 ), on which we place the surface code (Figure S9 ). At L = 1 L = 1 L = 1 no fine-graining takes place and we recover the hyperbolic surface code, while L ≥ 2 L \ge2 L ≥ 2 gives a semi-hyperbolic tiling and the corresponding semi-hyperbolic surface code. We label the resulting codes as V . a . b . c . d . ∣ F □ ∣ \mathcal{V}.a.b.c.d.|F^{\square}| V . a . b . c . d .∣ F □ ∣ -L L L (or { 4 , q } . ∣ F □ ∣ \{4,q\}.|F^{\square}| { 4 , q } .∣ F □ ∣ -L L L for regular tilings).
Figure S9. Semi-hyperbolic surface code construction in stages, shown for a base quadrilateral tiling T □ = V 6.6.6.6 \mathcal{T}^{\square} = \mathrm{V}6.6.6.6 T □ = V 6.6.6.6 on a closed hyperbolic surface of genus g g g with ∣ F □ ∣ |F^{\square}| ∣ F □ ∣ quadrilateral tiles. a The two-colorable dual tiling T = ( T □ ) ∗ \mathcal{T} = (\mathcal{T}^{\square})^{*} T = ( T □ ) ∗ (the 6.6.6.6 tiling) on the closed surface, on which we define the hyperbolic V 6.6.6.6 \mathrm{V}6.6.6.6 V 6.6.6.6 -∣ F □ ∣ |F^{\square}| ∣ F □ ∣ -L 1 L1 L 1 surface code. b The base quadrilateral tiling T □ \mathcal{T}^{\square} T □ , whose dual is T \mathcal{T} T . c The fine-grained tiling T L □ \mathcal{T}_{L}^{\square} T L □ , each quadrilateral face replaced by an L × L L \times L L × L Euclidean square tiling, shown for fine-graining parameter L = 5 L = 5 L = 5 . d The dual of the fine-grained tiling, T L = ( T L □ ) ∗ \mathcal{T}_{L} = (\mathcal{T}_{L}^{\square})^{*} T L = ( T L □ ) ∗ . e The semi-hyperbolic V 6.6.6.6 \mathrm{V}6.6.6.6 V 6.6.6.6 -∣ F □ ∣ |F^{\square}| ∣ F □ ∣ -L 5 L5 L 5 surface code (also denoted { 4 , 6 } \{4, 6\} { 4 , 6 } -∣ F □ ∣ |F^{\square}| ∣ F □ ∣ -L 5 L5 L 5 ), with a data qubit on each vertex, an X X X -stabilizer generator on each red face and a Z Z Z -stabilizer generator on each blue face.
As in the color-code case, the faces of ( T L □ ) ∗ (\mathcal{T}^{\square}_L)^* ( T L □ ) ∗ are of two types. Bulk faces are weight-four squares, locally identical to a Euclidean planar surface code, while the corner faces inherited from the vertices of T □ \mathcal{T}^{\square} T □ carry higher-weight stabilizers of weight a a a , b b b , c c c or d d d . The number of high-weight corner stabilizers is fixed by the underlying hyperbolic surface and does not grow with L L L .
Fine-graining does not change the topology of Σ \Sigma Σ , so dim H 1 ( Σ ; F 2 ) \dim H_1(\Sigma;\mathbb{F}_2) dim H 1 ( Σ ; F 2 ) and hence k k k are unchanged, while the number of data qubits grows quadratically in L L L . Since ( T L □ ) ∗ (\mathcal{T}^{\square}_L)^* ( T L □ ) ∗ is four-valent, its counts are
∣ V L ∣ = L 2 ∣ F □ ∣ , (24) |V_L| = L^2|F^{\square}|, \tag*{(24)} ∣ V L ∣ = L 2 ∣ F □ ∣ , (24)
∣ E L ∣ = 2 L 2 ∣ F □ ∣ , (25) |E_L| = 2L^2|F^{\square}|, \tag*{(25)} ∣ E L ∣ = 2 L 2 ∣ F □ ∣ , (25)
∣ F L ∣ = ∣ F □ ∣ ( L 2 − 1 + 1 a + 1 b + 1 c + 1 d ) , (26) |F_L| = |F^{\square}|\left(L^2 - 1 + \frac{1}{a} + \frac{1}{b} + \frac{1}{c} + \frac{1}{d}\right), \tag*{(26)} ∣ F L ∣ = ∣ F □ ∣ ( L 2 − 1 + a 1 + b 1 + c 1 + d 1 ) , (26)
so the semi-hyperbolic surface code has n = ∣ V L ∣ = L 2 ∣ F □ ∣ n = |V_L| = L^2|F^{\square}| n = ∣ V L ∣ = L 2 ∣ F □ ∣ data qubits. Dividing k k k from Equation (23) by n n n gives the encoding rate
k n = 1 L 2 ( 1 − 1 a − 1 b − 1 c − 1 d ) + 2 L 2 ∣ F □ ∣ \frac{k}{n} = \frac{1}{L^2}\left(1 - \frac{1}{a} - \frac{1}{b} - \frac{1}{c} - \frac{1}{d}\right) + \frac{2}{L^2|F^{\square}|} n k = L 2 1 ( 1 − a 1 − b 1 − c 1 − d 1 ) + L 2 ∣ F □ ∣ 2
⟶ ∣ F □ ∣ → ∞ 1 L 2 ( 1 − 1 a − 1 b − 1 c − 1 d ) . (27) \longrightarrow_{|F^{\square}|\to\infty} \frac{1}{L^2}\left(1 - \frac{1}{a} - \frac{1}{b} - \frac{1}{c} - \frac{1}{d}\right). \tag*{(27)} ⟶ ∣ F □ ∣ → ∞ L 2 1 ( 1 − a 1 − b 1 − c 1 − d 1 ) . (27)
The bracket is always positive for a hyperbolic tiling with 1 / a + 1 / b + 1 / c + 1 / d < 1 1/a + 1/b + 1/c + 1/d < 1 1/ a + 1/ b + 1/ c + 1/ d < 1 . The regular tilings { 4 , q } \{4,q\} { 4 , q } are the special case with a = b = c = d = q a = b = c = d = q a = b = c = d = q , for which
k = 2 + ∣ F □ ∣ ( 1 − 4 q ) , k n = 1 L 2 ( 1 − 4 q ) + 2 L 2 ∣ F □ ∣ , (28) k = 2 + |F^{\square}|\left(1 - \frac{4}{q}\right), \qquad\frac{k}{n} = \frac{1}{L^2}\left(1 - \frac{4}{q}\right) + \frac{2}{L^2|F^{\square}|}, \tag*{(28)} k = 2 + ∣ F □ ∣ ( 1 − q 4 ) , n k = L 2 1 ( 1 − q 4 ) + L 2 ∣ F □ ∣ 2 , (28)
and hyperbolic when q > 4 q > 4 q > 4 . We explain how accurate code distances for hyperbolic surface codes can be computed efficiently in Section S10, and report the parameters of the resulting code families in § 1.12 .
A caveat concerns which fine-grained tilings define valid surface codes. The surface code requires the tiling ( T L □ ) ∗ (\mathcal{T}_{L}^{\square})^{*} ( T L □ ) ∗ to be two-colorable, which holds when T L □ \mathcal{T}_{L}^{\square} T L □ is bipartite. A non-bipartite base tiling T □ \mathcal{T}^{\square} T □ can become bipartite after fine-graining at certain values of L L L , so we check each fine-grained tiling directly and keep only those that are two-colorable. When the base tiling itself is not bipartite, it can also be made so by taking a bipartite double cover as described in Section S1 F iii.
Module Partitions and Ancilla Placement
The hyperbolic code constructions of Section S2 are defined on closed hyperbolic surfaces. In this section we describe how to map these codes onto a modular QEC architecture of boundary-connected planar chips. We present the available module partitions for color codes and surface codes. The module partitions and the inter-module connectivity follow from the algebraic structure of the symmetry groups of the tiling as we will see below. Modular implementations of semi-hyperbolic Floquet codes were discussed in Ref. [3 ] , using modules similar to the triangle partition below, and simulated in Ref. [10 ] , using recursive spectral bisection of the code’s connectivity graph, which does not in general produce identical modules or a layout with nearest-neighbor gates on a 2D grid. In contrast, each of our modules is a small grouping of base tiles that can be laid out on a 2D grid with nearest-neighbor couplers.
Semi-Hyperbolic Color Code Modules
The semi-hyperbolic color codes are constructed from a base triangular tiling T △ T^\triangle T △ , whose ∣ F △ ∣ = ∣ G ∣ |F^\triangle| = |G| ∣ F △ ∣ = ∣ G ∣ tiles are in bijection with elements of the quotient triangle group G = △ ( r , s , t ) / Γ G = \triangle(r,s,t)/\Gamma G = △ ( r , s , t ) /Γ . A module partition groups the triangular tiles, and their associated data qubits and ancilla qubits into planar modules. Figure S10 illustrates three color code module types and how they are derived from the base triangular tiling T △ T^\triangle T △ . The top row shows the module partition on the base tiling in the Poincaré disk and the bottom row shows the corresponding fine-grained planar modules. We describe the different partitions with parameter K K K , which corresponds to the number of triangular tiles grouped into a single module. Figure S10 -Figure S10 correspond to triangle (K = 1 K = 1 K = 1 ), quadrilateral (K = 2 K = 2 K = 2 ) and octagon (K = 8 K = 8 K = 8 ) partitions respectively.
Figure S10. Module partition options for semi-hyperbolic color codes, illustrated on the V 8.8.8 V_{8.8.8} V 8.8.8 base triangular tiling from G = △ ( 4 , 4 , 4 ) / Γ G = \triangle(4,4,4)/\Gamma G = △ ( 4 , 4 , 4 ) /Γ with ∣ G ∣ = 128 |G| = 128 ∣ G ∣ = 128 (the same tiling shown with group element labels in Figure S7 ). Top row: The base tiling shown in the Poincaré disk, with the red dashed lines tracing the boundaries of a single module. Bottom row: The corresponding fine-grained planar module (shown here for L = 3 L = 3 L = 3 ), with data qubits (filled circles) and ancilla qubits (open circles). Solid black lines indicate in-module couplers whereas dashed gray lines indicate inter-module couplers. a Triangle module (K = 1 K=1 K = 1 ): each triangular tile forms its own module and is an image g F gF g F of a chosen fundamental domain F F F of G G G , so the modules are in bijection with the elements of G G G . b Quadrilateral module (K = 2 K=2 K = 2 ): pairs of adjacent triangles are merged across an edge of the chosen edge color (e.g. here it is a blue edge), each an image of a fundamental domain of the orientation-preserving subgroup G + G^+ G + . c Octagon module (K = 8 K=8 K = 8 ): eight triangles meeting at a vertex are grouped together, each module corresponding to a coset.
Triangle Modules (K=1)
The simplest partition assigns each tile of T △ T^\triangle T △ to its own module, giving ∣ G ∣ |G| ∣ G ∣ triangular modules (Figure S10 ). Each tile is an image g F gF g F of a chosen fundamental domain F F F of the quotient group G G G , so the modules are in bijection with the elements of G G G . After fine-graining with parameter L L L , each triangular module contains L 2 L^2 L 2 data qubits and N = 2 L 2 + 2 L N = 2L^2 + 2L N = 2 L 2 + 2 L total qubits including ancillas. This is the finest possible partition: it minimizes module size but maximizes the number of inter-module seams.
Quadrilateral Modules (K = 2)
The quadrilateral partition we use is associated with the orientation-preserving subgroup G + = △ + ( r , s , t ) / Γ G^+ = \triangle^+(r,s,t)/\Gamma G + = △ + ( r , s , t ) /Γ and pairs adjacent triangles into quadrilateral modules (Figure S10 ). The construction exploits the three-edge-coloring of the base triangular tiling T △ T^{\triangle} T △ , where the three edge colors correspond to the three reflection generators a a a , b b b , c c c of △ ( r , s , t ) \triangle(r,s,t) △ ( r , s , t ) , so that two adjacent tiles sharing a color-m m m edge (m ∈ { a , b , c } m \in\{a,b,c\} m ∈ { a , b , c } ) are related by right multiplication by the reflection m m m .
Choosing any one of the three colors, or equivalently one of the three reflections m ∈ { a , b , c } m \in\{a,b,c\} m ∈ { a , b , c } , and pairing each tile g g g with its neighbor g m gm g m across the corresponding edge, partitions the ∣ G ∣ |G| ∣ G ∣ tiles into ∣ G ∣ / 2 |G|/2 ∣ G ∣/2 left cosets g D = { g , g m } gD = \{g,gm\} g D = { g , g m } of the order-two subgroup D = ⟨ m ⟩ ≤ G D = \langle m\rangle\leq G D = ⟨ m ⟩ ≤ G .
Because m m m reverses orientation, each coset { g , g m } \{g,gm\} { g , g m } contains exactly one element g ∈ G + = ⟨ ρ , σ ⟩ g \in G^+ = \langle\rho,\sigma\rangle g ∈ G + = ⟨ ρ , σ ⟩ , so each module is an image of a fundamental domain of G + G^+ G + and can be labeled by its orientation-preserving element g ∈ G + g \in G^+ g ∈ G + (see Figure S7 ). The resulting quadrilateral modules each contain 2 L 2 2L^2 2 L 2 data qubits and N = 4 L 2 + 2 L N = 4L^2 + 2L N = 4 L 2 + 2 L total qubits. Figure S11 illustrates how a quadrilateral module grows with the fine-graining parameter L L L .
Figure S11. Quadrilateral (honeycomb) hyperbolic color code modules with increasing fine-graining parameter L L L .
This partition is the one we use most, because the bijection between modules and elements of G + G^+ G + allows us to design fault-tolerant circuits with minimal additional inter-module connectivity in order to implement orientation-preserving symmetries of the tiling. As explained in Section S1 G, neighboring modules are reached by right multiplication by the generators ρ \rho ρ and σ \sigma σ , which fixes the inter-module connectivity, while a global symmetry of the surface acts by left multiplication and permutes the modules as whole units. A global automorphism therefore maps each module onto another module rather than cutting across module boundaries, and this allows it to be realized as an automorphism circuit (Section S7). We use these automorphism circuits to map between the logical operators of the code by choosing a suitable symmetrical canonical logical basis (§ 1.5 and § 1.5 A) and design a ribbon extractor for logical readout (Section S6). We explain these constructions in the later sections. We can also choose to leave some of the paired triangles split, keeping them as two separate triangle modules rather than merging them into a quadrilateral. This introduces additional module boundaries where more inter-module seams can be attached, which is useful when we need extra connectivity for particular modules, for instance for logical readout using an extractor.
Each quadrilateral module can be laid out on the square grid in two ways as shown in Figure S12 . The honeycomb layout uses honeycomb plaquettes and results in a rhombus-shaped module, while the diagonal rectangle layout uses diagonal couplers to pack the qubits into a rectangular footprint. Both layouts lead to modules with an equal number of qubits, and the choice affects only the physical arrangement of qubits and couplers.
Figure S12. Two plaquette template options for color code modules shown on a quadrilateral module at L = 5 L = 5 L = 5 . a Honeycomb layout . b Diagonal rectangle layout .
Octagon Modules (K = 8)
A coarser partition groups eight triangles into a single octagonal module (Figure S10 ). These eight tiles are the ones meeting at a vertex of T △ T^{\triangle} T △ of a chosen color, or equivalently the eight triangles making up one octagonal face of the color code tiling T T T of a chosen color, for instance a red face. Associating red, green and blue edges with a a a , b b b and c c c and mirrors, respectively, a red face corresponds to eight triangular tiles of T △ T^{\triangle} T △ related by b b b and c c c reflections (right multiplication by b b b and c c c ). Each such group of tiles is a left coset g D = g ⟨ b , c ⟩ gD = g\langle b,c\rangle g D = g ⟨ b , c ⟩ of the order-eight dihedral subgroup D = ⟨ b , c ⟩ ≅ D 4 ≤ G D = \langle b,c\rangle\cong D_4 \leq G D = ⟨ b , c ⟩ ≅ D 4 ≤ G , so in general the octagonal modules are in bijection with the ∣ G ∣ / 8 |G|/8 ∣ G ∣/8 left cosets of D D D rather than with single group elements of G + G^{+} G + . After fine-graining, each octagon module contains 8 L 2 8L^{2} 8 L 2 data qubits and N = 16 L 2 + 8 N = 16L^{2} + 8 N = 16 L 2 + 8 total qubits.
This module is available only when the color code tiling actually has octagonal faces, which happens for a 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t tiling when one of r r r , s s s , t t t equals 4, so that the corresponding face has 8 sides. For the 8.8.8 family all three face colors are octagons, and any of them may be used. Grouping tiles into an octagon module reduces the number of inter-module seams at the cost of a larger planar chip. Octagon modules require a modified set of automorphisms that permute modules without rotating them internally. In Sections M J and S7 E we explain how we find these, together with symmetric logical bases, for the tilings we consider.
Semi-Hyperbolic Surface Code Modules
The semi-hyperbolic surface codes are constructed from a base quadrilateral tiling T □ T^{\square} T □ . A module partition groups the quadrilateral tiles, together with their data and ancilla qubits, into planar modules, and we again label the partitions by the number K K K of base tiles grouped into each module. Figure S13 shows the three surface code module types, with K = 1 K = 1 K = 1 , K = 2 K = 2 K = 2 and K = 4 K = 4 K = 4 giving the square, rectangle and big square modules respectively. As in the color code case, the module structure follows from the symmetry group of the tiling, though here the details depend on whether the quadrilateral tiling comes from a quadrilateral group or from a triangle group, as discussed in Section S1 E.
Figure S13. Module partition options for semi-hyperbolic surface codes, illustrated on a V 4.6.4.6 V^{4.6.4.6} V 4.6.4.6 base quadrilateral tiling. Top row: The base tiling shown in the Poincaré disk, with the red dashed lines tracing the boundaries of a single module. Bottom row: The corresponding planar module (shown here for L = 5 L=5 L = 5 ), with data qubits (filled circles) and ancilla qubits (open circles). Solid black lines indicate in-module couplers whereas dashed gray lines indicate inter-module couplers. a Square module (K = 1 K=1 K = 1 ): each quadrilateral tile forms its own module. b Rectangle module (K = 2 K=2 K = 2 ): pairs of adjacent quadrilateral tiles are merged across a shared edge. c Big square module (K = 4 K=4 K = 4 ): this requires a base tiling V a . b . c . d V^{a.b.c.d} V a . b . c . d with at least one of a a a , b b b , c c c , d d d equal to 4; choosing one such corner type, the four tiles meeting at each vertex of that type are grouped together.
Square Modules (K=1)
The simplest partition assigns each quadrilateral tile of T □ T^{\square} T □ to its own module, giving one square module per tile (Figure S13 ). When the tiling comes from a quadrilateral group, each tile is an image g F gF g F of a chosen fundamental domain F F F of G = □ ( r , s , t , u ) / Γ G = \square(r,s,t,u)/\Gamma G = □ ( r , s , t , u ) /Γ , so the modules are in bijection with the group elements. When the quadrilateral tiling instead arises from a triangle group, each tile is associated with a coset rather than a single group element (see Section S1 E). After fine-graining, each square module contains L 2 L^{2} L 2 data qubits and N = 2 L 2 + 2 L + 1 N = 2L^{2} + 2L + 1 N = 2 L 2 + 2 L + 1 total qubits. Like the triangle module for the color code, this is the finest partition we use, minimizing module size.
Rectangle Modules (K=2)
The rectangle partition pairs two adjacent quadrilateral tiles into a single module (Figure S13 ). When the tiling has quadrilateral reflection symmetry, each pair is an image of a fundamental domain of the orientation-preserving subgroup G + G^{+} G + , and the modules are in bijection with its elements. In this case the same picture as for the color code applies, with adjacent modules reached by right multiplication and automorphisms acting by left multiplication, so we can again implement automorphism circuits, described with a connectivity given by the left Cayley graph of G + G^{+} G + . After fine-graining, each rectangle module contains 2 L 2 2L^{2} 2 L 2 data qubits and N = 4 L 2 + 3 L + 1 N = 4L^{2} + 3L + 1 N = 4 L 2 + 3 L + 1 total qubits.
Pairing the square tiles into rectangles is not always possible when the quadrilateral tiling does not have quadrilateral reflection symmetry. We use a maximum matching on the Cayley graph of the tiles in those cases and any tile left unmatched remains a lone square (K = 1 K = 1 K = 1 ) module.
Big Square Modules (K=4)
The coarsest surface code partition collects four quadrilateral tiles into a single big square module (Figure S13 ). After fine-graining, each big square module contains 4 L 2 4L^{2} 4 L 2 data qubits and N = 8 L 2 + 4 L + 1 N=8L^{2}+4L+1 N = 8 L 2 + 4 L + 1 total qubits. This module requires the four tiles to meet in a way that forms a larger square, which is available only for base quadrilateral tilings V a . b . c . d V^{a.b.c.d} V a . b . c . d in which one of a a a , b b b , c c c , d d d equals 4.
We now explain the modular fault-tolerant syndrome extraction circuits we use to benchmark the performance of the semi-hyperbolic (L ≥ 2 L \ge2 L ≥ 2 ) color and surface codes as a quantum memory. In all the circuits we design, every two-qubit gate is either local to a module and acts between neighboring qubits, or it is a long-range gate between modules acting via an inter-module coupler.
Hyperbolic Color Code Circuits
Modular hyperbolic color codes are associated with a 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t hyperbolic tiling as explained in Section S2. We focus on the quadrilateral module partition (K = 2 K=2 K = 2 ) in the explanation here, though the same circuit techniques apply to the other partitions. We can classify the stabilizers into two categories: bulk and boundary stabilizers. Bulk stabilizers are supported entirely within a single module and are all weight-6 in a quadrilateral module. Weight-6 bulk stabilizers are measured using standard Bell-flagged color code circuits introduced for Euclidean planar color codes [11 ] . Boundary stabilizers have support on data qubits in more than one module. Most boundary stabilizers are also weight-6, but they also include the corner stabilizers of weight 2 r 2r 2 r , 2 s 2s 2 s or 2 t 2t 2 t , inherited from the faces of the underlying 2 r .2 s .2 t 2r.2s.2t 2 r .2 s .2 t hyperbolic tiling. We measure corner stabilizers with a generalization of Bell-flagged circuits that we call *modular cat-flagged circuits. Flag-based circuits for (non-fine-grained, non-modular) hyperbolic color codes were also studied in [12 ] .
The idea for modular cat-flagged syndrome extraction is that for a stabilizer allocated m m m ancillas across the modules it touches, we unitarily prepare an m m m -qubit cat state on the ancillas using the inter-module couplers. Each ancilla then couples to the data qubits associated with the stabilizer within its own module using nearest-neighbor gates on the square grid. Finally we apply the inverse of the cat-state preparation circuit followed by single-qubit measurements, which measures the stabilizer on a single ancilla qubit. The remaining m − 1 m-1 m − 1 ancillas give the flag measurements that detect hook errors. One syndrome extraction round consists of an X X X subround followed by a Z Z Z subround. Each subround carries out a cat-state preparation, a data–ancilla coupling stage, and cat-state measurement.
The number of ancillas associated with a stabilizer m m m is fixed by the boundary geometry rather than the stabilizer weight, and varies even among stabilizers of equal weight, as Figure S14 shows. Figure S15 , for example, shows a weight-6 boundary stabilizer on a skewed boundary present in Figure S14 , allocated m = 3 m=3 m = 3 ancillas (instead of 2) to enforce nearest-neighbor two-qubit gates. The corner stabilizers are the most demanding case in the syndrome extraction, since they require preparation of larger cat states. Figure M3 shows a weight-8 corner stabilizer shared among 4 modules, extracted with a 4-qubit cat state. Figure S16 shows another weight-8 stabilizer that instead spans 8 modules with a single ancilla in each.
Figure S14. Long-range stabilizers of four boundary-connected planar modules of an 8.8.8 modular hyperbolic color code. The four modules are identical and related to their neighbors by a 90° rotation. Data qubits (black) and ancilla qubits (white) sit on the square grid within each module. Dashed lines show the inter-module links. Stabilizers spanning across modules may get skewed relative to the square-grid layout, and since ancillas are placed on the square grid the number available varies between stabilizers, even among those of equal weight. The cat-flagged circuits accommodate this. A stabilizer allocated m m m ancillas is extracted using an m m m -qubit cat state.
Figure S15. A skewed weight-6 boundary stabilizer and the Z Z Z -basis cat-state preparation circuit used to measure the X X X stabilizer, using a 3-qubit cat state prepared in CNOT-depth 2.
Figure S16. A weight-8 stabilizer spanning 8 modules, with 1 ancilla per module, and the cat-flagged circuits used to measure its X X X and Z Z Z stabilizers, using an 8-qubit cat state. The cat state is prepared and measured along a linear chain in CNOT-depth 4, and syndrome CNOTs in depth 3.
The cost of an m m m -qubit cat state depends on the inter-module connectivity available. Prepared along a linear chain of seams it takes depth ⌈ m / 2 ⌉ \lceil m/2\rceil ⌈ m /2 ⌉ . Adding further inter-module connectivity as shown in Figure S17 reduces this to log-depth ⌈ log 2 m ⌉ \lceil\log_{2}m\rceil ⌈ log 2 m ⌉ , trading extra inter-module connectivity for a shallower circuit.
Figure S17. Log-depth preparation of the 8-qubit Z Z Z -basis cat state. Using additional inter-module connectivity, the cat state is prepared in CNOT-depth 3 rather than depth 4. The measurement circuit is the inverse of the preparation circuit above.
The data–ancilla coupling gates within a block of X X X - (or Z Z Z -) extraction all commute, and any edge coloring of the bipartite data–ancilla interaction graph yields a valid schedule, of depth at most the maximum vertex degree of that graph [13 ] . Since each data qubit couples to three ancillas, three time steps suffice. Additionally, on an orientable surface we can define a globally consistent direction, and use the translationally-invariant up–middle–down plaquette schedule of the planar color code rather than an unstructured circuit found by edge coloring. The up–middle–down circuit shown in Figure S18 is applied identically to every face and every module.
Figure S18. The up–middle–down plaquette schedule for the local data–ancilla coupling stage. On an orientable surface, the same up–middle–down ordering is applied identically to every plaquette. The three panels, left to right, show its successive time steps. The schedule shown extracts the Z Z Z stabilizers; the X X X stabilizers are extracted by the same schedule with the CNOT data–ancilla directions reversed.
The detectors of cat-flagged circuits are of two types, as shown in Figure S19 . A plaquette detector compares a stabilizer’s syndrome measurement in one round with its measurement in the previous round. In the absence of errors, this parity is deterministic, so the detector spans two consecutive rounds. In an X X X subround these are the X X X -plaquette detecting regions (Figure S19 ), sensitive to Z Z Z errors, and in a Z Z Z subround they are the Z Z Z -plaquette detecting regions (Figure S19 ), sensitive to X X X errors. A flag detector arises from each of the m − 1 m - 1 m − 1 ancillas that are not used to read out the plaquette stabilizer syndrome. The cat-state measurement collapses the syndrome onto a single ancilla, and the remaining m − 1 m - 1 m − 1 ancillas are measured in the opposite basis. Each such measurement has a deterministic outcome in the absence of errors, yielding m − 1 m - 1 m − 1 flag detectors per round (Figure S19 ). These flag detectors fire on hook errors that would otherwise propagate from a single fault on one ancilla qubit onto multiple data qubits and reduce the effective distance.
Hyperbolic Surface Code Circuits
The modular hyperbolic surface codes use cat-flagged syndrome extraction that is conceptually similar to that of the modular hyperbolic color codes. As was done for the modular hyperbolic color code circuits, we unitarily prepare an m m m -qubit cat state on the m m m ancilla qubits of each stabilizer that is supported on module boundaries (e.g. each stabilizer that spans more than one module, or that spans both sides of a module that wraps around a handle of the surface). Once the cat states have been prepared, each ancilla couples to the data qubits of its stabilizer within its own module using nearest-neighbor gates on the square grid. Finally we apply the inverse of the unitary cat state preparation circuit followed by single-qubit measurements to measure the stabilizer along with m − 1 m-1 m − 1 flag measurements.
One important difference with the hyperbolic surface code circuits is that we interleave the X X X and Z Z Z syndrome extraction, unlike the hyperbolic color codes for which X X X and Z Z Z are measured sequentially. In other words, we extract
X X X and Z Z Z stabilizers simultaneously after unitarily preparing cat states for stabilizers of both bases. This leads to additional commutativity constraints for the hyperbolic surface code circuits that did not arise for the hyperbolic color code circuits. These commutativity constraints arise wherever an X X X stabilizer shares support with a Z Z Z stabilizer, since the CNOT gates used to extract adjacent X X X and Z Z Z stabilizers do not commute.
If an X X X and Z Z Z stabilizer have data qubits in common, they always share exactly two data qubits, as shown in Figure S20 . We can determine if a particular interleaved extraction schedule (CNOT ordering) is valid using the commutation of the CNOTs in neighboring X X X and Z Z Z plaquettes. As illustrated in Figure S21 , swapping the order of two CNOT gates CNOT ( a X , q ) \operatorname{CNOT}(a_X,q) CNOT ( a X , q ) and CNOT ( q , a Z ) \operatorname{CNOT}(q,a_Z) CNOT ( q , a Z ) in adjacent X X X and Z Z Z stabilizers introduces an additional effective CNOT gate CNOT ( a X , a Z ) \operatorname{CNOT}(a_X,a_Z) CNOT ( a X , a Z ) coupling the ancillas of the two plaquettes. We can determine if a given schedule is correct by starting with a schedule that is not interleaved and which we therefore know to be correct (extract X X X stabilizers followed by Z Z Z stabilizers), and then commute CNOT gates past each other until the schedule’s gate ordering is reached. If the action of the effective CNOT gates introduced from the commutation in Figure S21 b is trivial, then we know that the schedule is valid [13 ] . As shown in Figure S21 c, if the schedule gate ordering in Figure S21 a, defined by the time steps ( t a X , t b X , t a Z , t b Z ) (t_a^X,t_b^X,t_a^Z,t_b^Z) ( t a X , t b X , t a Z , t b Z ) , satisfies
Figure S20. Adjacent X X X and Z Z Z stabilizers in modular hyperbolic surface codes. a, The stabilizer structure of a modular hyperbolic surface code derived from a { 4 , 6 } \{4,6\} { 4 , 6 } regular tiling with L = 5 L=5 L = 5 fine-graining. Here we show the structure on the infinite hyperbolic plane (rather than a fundamental polygon corresponding to a specific closed surface). b, Examples of X X X and Z Z Z stabilizers that share support on data qubits in the code. If an X X X stabilizer i i i intersects with a Z Z Z stabilizer j j j , the two stabilizers always have exactly two qubits in common. Let stabilizer i i i be supported on an n i n_i n i -gon plaquette containing an m i m_i m i -qubit cat state. Similarly stabilizer j j j is supported on an n j n_j n j -gon plaquette containing an m j m_j m j -qubit cat state. In general note that n i ≠ n j n_i \ne n_j n i = n j and m i ≠ m j m_i \ne m_j m i = m j , and furthermore note that m k = 1 m_k=1 m k = 1 corresponds to the trivial case of a single-qubit ∣ + ⟩ |+\rangle ∣ + ⟩ or ∣ 0 ⟩ |0\rangle ∣0 ⟩ ancilla qubit for an X X X or Z Z Z stabilizer respectively.
Figure S21. a, Any X X X and Z Z Z stabilizer that intersect in a modular hyperbolic surface code share exactly two data qubits and are each measured by coupling an m i m_i m i -qubit cat state to the stabilizer’s data qubits using CNOT gates. Note that the size m i ≥ 1 m_i \ge1 m i ≥ 1 of the cat state may differ for the two stabilizers. The CNOT gates are targeted on the data qubits for the X X X stabilizer and controlled on them for the Z Z Z stabilizer. We have labeled each CNOT gate with the time step it is applied in the extraction circuit. b, Since the CNOTs act as a target on the data qubits for the X X X stabilizer and as a control for Z Z Z , they do not commute. Swapping the order of a CNOT gate CNOT( a X , q ) (a_X,q) ( a X , q ) for the X X X stabilizer with another gate CNOT( q , a Z ) (q,a_Z) ( q , a Z ) for the Z Z Z stabilizer introduces an effective CNOT interaction CNOT( a X , a Z ) (a_X,a_Z) ( a X , a Z ) controlled on an ancilla (cat state) qubit a X a_X a X of the X X X stabilizer and targeted on an ancilla qubit a Z a_Z a Z of the Z Z Z stabilizer. c, We can verify the correctness of an extraction circuit by starting with an extraction circuit that is not interleaved and therefore trivially correct (extract X X X stabilizers followed by Z Z Z stabilizers), and then commuting CNOT gates past each other until the schedule’s CNOT ordering is reached. We can then inspect the action of the effective CNOT gates (in red) to check if their action is trivial. In this subfigure we show the four possible cases. If the number of effective (red) CNOT gates coupling the ancillas in the two plaquettes is even (top row) then their action is trivial.
( t a X < t a Z ) ⟺ ( t b X < t b Z ) (29) (t_a^X < t_a^Z) \Longleftrightarrow(t_b^X < t_b^Z) \tag*{(29)} ( t a X < t a Z ) ⟺ ( t b X < t b Z ) (29)
then either 0 or 2 CNOT gates coupling the X X X and Z Z Z ancillas are introduced from commuting the CNOT gates in the extraction circuit past one another, which have trivial action on the cat states.
To see why, consider the state of a cat state that is supported on the ancilla qubits a X i ∈ Q X a n c a_X^i \in Q_X^{\mathrm{anc}} a X i ∈ Q X anc , with stabilizer group
S X a n c = ⟨ X ⊗ m X , { Z a X i Z a X i + 1 } j = 0 m X − 2 ⟩ , (30) S_X^{\mathrm{anc}} = \left\langle X^{\otimes m_X}, \left\{Z_{a_X^i}Z_{a_X^{i+1}}\right\}_{j=0}^{m_X-2} \right\rangle, \tag*{(30)} S X anc = ⟨ X ⊗ m X , { Z a X i Z a X i + 1 } j = 0 m X − 2 ⟩ , (30)
as well as the state of the opposite-basis cat state supported on the Z Z Z stabilizer ancilla qubits a Z j ∈ Q Z a n c a_Z^j \in Q_Z^{\mathrm{anc}} a Z j ∈ Q Z anc , with stabilizer group
S Z a n c = ⟨ Z ⊗ m Z , { X a Z j X a Z j + 1 } j = 0 m Z − 2 ⟩ . (31) S_Z^{\mathrm{anc}} = \left\langle Z^{\otimes m_Z}, \left\{X_{a_Z^j}X_{a_Z^{j+1}}\right\}_{j=0}^{m_Z-2} \right\rangle. \tag*{(31)} S Z anc = ⟨ Z ⊗ m Z , { X a Z j X a Z j + 1 } j = 0 m Z − 2 ⟩ . (31)
Note that a single CNOT gate CNOT ( a X i , a Z j ) \operatorname{CNOT}(a_X^i,a_Z^j) CNOT ( a X i , a Z j ) between the two cat states maps the global transversal stabilizers as X ⊗ m X → X ⊗ m X X a Z j X^{\otimes m_X} \to X^{\otimes m_X}X_{a_Z^j} X ⊗ m X → X ⊗ m X X a Z j and Z ⊗ m Z → Z ⊗ m Z Z a X i Z^{\otimes m_Z} \to Z^{\otimes m_Z}Z_{a_X^i} Z ⊗ m Z → Z ⊗ m Z Z a X i .
If there are exactly two effective CNOT gates introduced by the commutation, for example CNOT ( a X i 1 , a Z j 1 ) \operatorname{CNOT}(a_X^{i_1},a_Z^{j_1}) CNOT ( a X i 1 , a Z j 1 ) and CNOT ( a X i 2 , a Z j 2 ) \operatorname{CNOT}(a_X^{i_2},a_Z^{j_2}) CNOT ( a X i 2 , a Z j 2 ) , their combined action maps the global X X X stabilizer of the X X X -basis cat state to:
X ⊗ m X → X ⊗ m X ⊗ X a Z j 1 X a Z j 2 . (32) X^{\otimes m_X} \to X^{\otimes m_X} \otimes X_{a_Z^{j_1}}X_{a_Z^{j_2}}. \tag*{(32)} X ⊗ m X → X ⊗ m X ⊗ X a Z j 1 X a Z j 2 . (32)
However the operator X a Z j 1 X a Z j 2 X_{a_Z^{j_1}}X_{a_Z^{j_2}} X a Z j 1 X a Z j 2 is an element of the stabilizer group S Z a n c S_Z^{\mathrm{anc}} S Z anc (as it can be formed by a product of the adjacent X X XX X X parity operators). Therefore, it acts trivially on the Z Z Z plaquette’s cat state.
Similarly, the global Z Z Z stabilizer of the Z Z Z -basis cat state transforms as:
Z ⊗ m Z → Z a X i 1 Z a X i 2 ⊗ Z ⊗ m Z , (33) Z^{\otimes m_Z} \to Z_{a_X^{i_1}}Z_{a_X^{i_2}} \otimes Z^{\otimes m_Z}, \tag*{(33)} Z ⊗ m Z → Z a X i 1 Z a X i 2 ⊗ Z ⊗ m Z , (33)
and because Z a X i 1 Z a X i 2 ∈ S X a n c Z_{a_X^{i_1}}Z_{a_X^{i_2}} \in S_X^{\mathrm{anc}} Z a X i 1 Z a X i 2 ∈ S X anc , this also acts trivially on the X X X plaquette’s cat state. Since all generators of the joint stabilizer group S X a n c ⊗ S Z a n c S_X^{\mathrm{anc}}\otimes S_Z^{\mathrm{anc}} S X anc ⊗ S Z anc map to themselves up to multiplication by existing stabilizers, any even number of effective CNOT gates between the two cat states leaves their joint state invariant.
Lifted schedules
We now show how we find a valid CNOT gate ordering for a low-depth syndrome extraction circuit for the entire modular hyperbolic code (i.e. such that the gate ordering for every pair of adjacent X X X and Z Z Z stabilizers satisfies Equation (29) ). We simplify the scheduling problem by choosing to use a translationally invariant schedule within each face of the base tiling, so that the schedule is fully determined by its values at the four corners of each face of the base tiling. Translational invariance is not a requirement, but it significantly simplifies the overall constraint satisfaction problem (by reducing its size by a factor of L 2 L^2 L 2 ) and leads to a more structured circuit.
Recall that the semi-hyperbolic surface code is constructed by subdividing each face of the base quadrilateral tiling T □ \mathcal{T}^{\square} T □ into an L × L L \times L L × L grid of fine squares, and then taking the dual. The fine tiling within each base face is therefore a regular square lattice, and we choose a schedule within each base face that is translationally invariant on this fine-grained lattice (every face in the fine-grained lattice is assigned the same time steps, regardless of its basis). Not every permutation of { 0 , 1 , 2 , 3 } \{0,1,2,3\} { 0 , 1 , 2 , 3 } assigned to the 4 corners of a square yields a valid translationally-invariant schedule that satisfies Equation (29) for pairs of adjacent X X X and Z Z Z stabilizers. Only those permutations in the dihedral orbit of the base permutation [ 0 , 1 , 3 , 2 ] [0,1,3,2] [ 0 , 1 , 3 , 2 ] under D 4 D_4 D 4 do (Figure S22 ). This gives 8 valid permutations per face: the 4 rotations and 4 reflections of [ 0 , 1 , 3 , 2 ] [0,1,3,2] [ 0 , 1 , 3 , 2 ] .
!Three square plaquette schedules labelled [0,1,3,2], [0,1,2,3], and [0,2,1,3], marked Valid, Invalid, and Invalid bbox=0.29,0.07,0.71,0.19
Figure S22. Valid translationally-invariant schedules for a square plaquette. Of the 24 permutations of { 0 , 1 , 2 , 3 } \{0,1,2,3\} { 0 , 1 , 2 , 3 } , only the 8 in the dihedral orbit of [ 0 , 1 , 3 , 2 ] [0,1,3,2] [ 0 , 1 , 3 , 2 ] under D 4 D_4 D 4 yield valid translationally-invariant schedules on the fine-grained square lattice. The remaining schedules are in the dihedral orbit of [ 0 , 1 , 2 , 3 ] [0,1,2,3] [ 0 , 1 , 2 , 3 ] or [ 0 , 2 , 1 , 3 ] [0,2,1,3] [ 0 , 2 , 1 , 3 ] , neither of which yield valid schedules.
Assigning one of these 8 valid permutations to a face of the base tiling uniquely determines a translationally-invariant fine schedule within that face (Figure S23 ). We call this the lifted schedule : the coarse assignment at the 4 corners of each base face is “lifted” to the full L × L L \times L L × L fine grid by translational invariance. The scheduling problem thus reduces to a constraint satisfaction problem (CSP) on the base tiling, with one variable per face and a domain of 8 valid permutations.
Figure S23. Scheduling constraints for syndrome extraction on modular hyperbolic surface codes. a, Two adjacent faces A A A and B B B of a { 4 , 6 } \{4,6\} { 4 , 6 } hyperbolic tiling used to derive a modular hyperbolic surface code. The faces share two vertices r r r and s s s and each corner of each face is assigned a timestep. b, The timesteps in the corner of each face of the base tiling are lifted to a translationally-invariant schedule on the fine-grained tiling within the face. c, The translationally invariant schedules within adjacent faces must be compatible. If the two faces belong to different modules, they need only satisfy the commutativity constraint. d, If the two faces additionally belong to the same module, then we must additionally impose time step collision constraints on the stabilizers that span the two base tiling faces A A A and B B B (ensuring that the ancillas are acted on at most once in a time step).
Optionally, the domain can be extended by allowing a global shift : adding a constant offset δ \delta δ to all 4 timesteps of a face, giving permutations of { δ , δ + 1 , δ + 3 , δ + 2 } \{\delta,\delta+1,\delta+3,\delta+2\} { δ , δ + 1 , δ + 3 , δ + 2 } . This enlarges the domain from 8 to 8 ( 1 + δ max ) 8(1+\delta_{\max}) 8 ( 1 + δ m a x ) permutations per face, increasing the likelihood of finding a satisfying assignment at the cost of additional extraction layers. For the circuits used in this work, we initially try δ = 0 \delta=0 δ = 0 . If that does not yield a solution we try δ = 1 \delta=1 δ = 1 and finally fall back to the boundary-first depth-6 schedule explained in Section S4 B iv if that also fails.
Compatibility constraints between adjacent faces
When two base faces A A A and B B B share an edge with vertices r r r and s s s , as in Figure S23 , the lifted schedules within A A A and B B B must be compatible. Let t x F t_x^F t x F denote the time step assigned to vertex x x x in face F F F (see Figure S23 ). Two types of constraints arise:
Commutativity constraint (all adjacent faces). The relative ordering of the timesteps at the shared vertices must be consistent across the two faces (Figure S23 ). Concretely, for two base faces A A A and B B B sharing vertices r r r and s s s we require:
( t r A < t s A ) ⟺ ( t r B < t s B ) . (34) \left(t_r^A < t_s^A\right) \Longleftrightarrow\left(t_r^B < t_s^B\right). \tag*{(34)} ( t r A < t s A ) ⟺ ( t r B < t s B ) . (34)
This ensures that the lifted translationally-invariant schedule satisfies the commutativity condition Equation (29) for all pairs of adjacent X X X and Z Z Z stabilizers that lie on the border of the two coarse base faces A A A and B B B .
Timestep collision constraint (same-module faces). When two base faces additionally belong to the same module, there exist fine stabilizers along the shared boundary whose support spans both faces’ territories (Figure S23 ). Each such stabilizer has a single ancilla that is coupled to data qubits in both faces, and this ancilla can participate in at most one CNOT per timestep. This requires that the four timesteps at the shared vertices are all distinct:
∣ { t r A , t s A , t r B , t s B } ∣ = 4. (35) \left|\left\{t_r^A,t_s^A,t_r^B,t_s^B\right\}\right|=4. \tag*{(35)} { t r A , t s A , t r B , t s B } = 4. (35)
Constraint satisfaction via backtracking
We cast the scheduling problem as a binary CSP and solve it with a backtracking search enhanced by arc consistency. Each face of the base tiling is a variable with a domain of 8 valid permutations (or more with shifts). Each shared edge imposes the commutativity constraint (S31), and each shared edge between same-module faces additionally imposes the collision constraint (S32). The solver uses the AC-3 algorithm to maintain arc consistency, pruning the domain of each variable after every assignment. Variables are selected using the minimum remaining values (MRV) heuristic, and values are ordered by the least constraining value (LCV) heuristic.
Boundary-first fallback
For some base tilings and module partitions, no assignment satisfying both the commutativity constraint (S31) and the collision constraint (S32) exists. In this case we relax the commutativity constraint on cross-module edges (edges shared by faces in different modules), while retaining it on intra-module edges. The resulting schedule may have inconsistent gate orderings across module boundaries, which we handle by using a boundary-first extraction strategy: the boundary CNOTs used for extraction of inter-module X X X stabilizers are implemented in earlier time steps, scheduled via a bipartite edge coloring [13 ] to avoid time step collisions, before the remaining CNOTs proceed with the standard lifted schedule. By measuring the inter-module X X X stabilizers first, this ensures that the X X X and Z Z Z
inter-module stabilizer measurements are not interleaved and hence satisfy the necessary commutativity constraints with their neighbors. Since the degree of the Tanner graph restricted to the inter-module X X X stabilizers is two, these stabilizers can be scheduled in two time steps [13 ] . Combined with the remaining four time steps of the subsequent lifted schedule this leads to a total extraction circuit depth of six.
Scheduler benchmarks
We benchmarked the scheduler for 137 unique tilings, corresponding to the tilings on a Pareto frontier for each family of regular tilings, as well as quadrilateral tilings. Specifically, we defined a tiling to be on the Pareto frontier for a given family and side length L L L if there does not exist in our database a tiling with fewer faces and higher k d 2 / n kd^2/n k d 2 / n for a modular hyperbolic code with the chosen L L L . For each tiling, we run 10 random seeds, each of which randomises the tie-breaking order in the MRV and LCV heuristics, and report the median runtime. The families we choose are regular { 4 , s } \{4,s\} { 4 , s } tilings for s ∈ { 5 , 6 , … , 12 } s \in\{5,6,\ldots,12\} s ∈ { 5 , 6 , … , 12 } and quadrilateral tilings V 4. x . y . z V4.x.y.z V 4. x . y . z for x , y , z ∈ { 4 , 5 , … , 16 } x,y,z \in\{4,5,\ldots,16\} x , y , z ∈ { 4 , 5 , … , 16 } . For each of these tilings we apply our scheduling method, first attempting to use a standard schedule with δ = 0 \delta= 0 δ = 0 , then trying a standard δ = 1 \delta= 1 δ = 1 schedule (if δ = 0 \delta= 0 δ = 0 failed), before finally using the boundary first fallback described in Section S4B iv if δ = 1 \delta= 1 δ = 1 was also infeasible with the standard schedule. In Figure S24 we show the runtime of our scheduler (written in Python) for each tiling and each stage of the scheduling procedure, and in Figure S25 we show the fraction of tilings scheduled at each stage. For all base tilings we consider (with up to 10 4 10^4 1 0 4 quadrilateral faces, i.e. defining modular hyperbolic codes with up to 10 4 10^4 1 0 4 square modules or 10 4 / 2 10^4/2 1 0 4 /2 rectangular modules), we find that the scheduler finds a schedule in less than a minute. For base tilings with fewer than 10 3 10^3 1 0 3 faces, the scheduler finds a schedule in less than a second.
Figure S24. Runtime per stage of the hyperbolic surface code scheduler for modular hyperbolic surface code tilings on the Pareto frontier for { 4 , s } \{4,s\} { 4 , s } regular tilings with s ∈ { 5 , 6 , … , 12 } s \in\{5,6,\ldots,12\} s ∈ { 5 , 6 , … , 12 } and quadrilateral tilings V 4. x . y . z V^{4.x.y.z} V 4. x . y . z for x , y , z ∈ { 4 , 5 , … , 16 } x,y,z \in\{4,5,\ldots,16\} x , y , z ∈ { 4 , 5 , … , 16 } . A tiling is on the Pareto frontier for a side length L L L if there does not exist (among the tilings we have constructed) a hyperbolic surface code in the same tiling family with fewer faces that has a larger k d 2 / n kd^2/n k d 2 / n . We define the Pareto frontier here for L = 5 L=5 L = 5 although the scheduling does not use L L L (it operates directly on the base tiling). The y y y axis shows the time taken for a given stage of the scheduler per tiling. The x x x axis is the number of faces in the base hyperbolic tiling. For each tiling, we first try to find a standard interleaved schedule with a shift δ = 0 \delta=0 δ = 0 . If no schedule exists (“infeasible”) we instead try a shift of δ = 1 \delta=1 δ = 1 (resulting in an additional marker on the plot for the tiling, showing the duration of only this stage). If this is also infeasible or times out, we instead fall back to the boundary first fallback, which is guaranteed to succeed and uses 6 time steps for extraction. Again, the additional marker on the plot for the boundary first fallback shows the duration of this stage only. We carry out this analysis for both the square module partition (left figure) and rectangular module partition (right figure), using the same set of tilings for both.
Figure S25. For the same tilings and benchmarks run in Figure S24 , we show the fraction of tilings that reach each outcome using the modular hyperbolic surface code scheduler. We bin the tilings by their size (x x x axis), and the “outcome” (legend) is the stage of the scheduler that successfully scheduled the circuit. For example the outcome “Standard shift=1” means that a shift δ = 1 \delta=1 δ = 1 successfully scheduled the circuit (despite the first stage δ = 0 \delta=0 δ = 0 failing). The “Boundary first” outcome (schedule) is used if the attempted δ ∈ { 0 , 1 } \delta\in\{0,1\} δ ∈ { 0 , 1 } standard schedules were infeasible.
Hook errors, NZ and alternating schedules
In stabilizer measurement circuits for the Euclidean surface code, an X X X error on an X X X stabilizer ancilla halfway through the cycle propagates onto two data qubits (and likewise for Z Z Z errors in the middle of a Z Z Z stabilizer measurement). These types of errors are commonly known as hook errors [15 ] . For the rotated surface code, it is known that some gate orderings can lead to hook errors that reduce the circuit distance below the code distance [16 ] .
One can avoid distance-reducing hook errors in the Euclidean rotated surface code by choosing a schedule such that the hook errors propagate orthogonal to the relevant logical operator. However, even a bad gate ordering, with distance-reducing hook errors, can mitigate against some hook errors using an alternating schedule [17 ] . If one starts with a circuit with bad hook errors, such that the circuit distance is ⌈ d / 2 ⌉ \lceil d/2 \rceil ⌈ d /2 ⌉ for a distance d d d rotated surface code, the circuit distance can be improved to d − 1 d - 1 d − 1 by alternating the order of CNOT gates in consecutive cycles (i.e. use a reversed ordering of the CNOT gates in odd cycles). This trick exploits the fact that problematic hook errors in rotated surface code circuits correspond to diagonal errors in the spacetime decoding graph (the problematic errors trigger a pair of detectors that are separated in time by one cycle) [17 ] . Furthermore, the shortest logical error in such a circuit with hook errors (and without an alternating schedule) consists of a path of these diagonal errors that spans ⌈ d / 2 ⌉ \lceil d/2 \rceil ⌈ d /2 ⌉ cycles.
For our modular hyperbolic surface codes, we would expect any schedule for our qubit layout (single bare ancilla
per square plaquette in the bulk) to have distance-reducing hook errors. To understand why, we first note that any homologically non-trivial cycle on the hyperbolic code supports both an X X X and a Z Z Z logical operator. Suppose a low-weight logical X X X operator crosses a module of a modular hyperbolic surface code horizontally. Naively we might try to avoid hooks just by using a standard “NZ” rotated surface code schedule (with a different schedule for X X X and Z Z Z plaquettes, see Figure S26 ), in the hope of aligning problematic X X X hook errors orthogonal to the minimum weight logical X X X operator while keeping Z Z Z hook errors parallel. However, there is also a low-weight logical Z Z Z operator crossing the module horizontally, so this approach will not work. Furthermore, for any tiling with a symmetry group that includes the internal symmetries of the square module (e.g. those derived from { 4 , s } \{4,s\} { 4 , s } regular tilings), a minimum weight logical operator that passes horizontally through the module can be mapped to another minimum weight logical operator passing vertically across the module via an automorphism (a rotation centered on the module). Therefore we would not expect a standard “NZ” schedule to avoid distance-reducing hook errors in our modular hyperbolic codes, since it is impossible to align hook errors orthogonal to logical operators.
Figure S26. NZ schedule, following the standard schedule for the Euclidean rotated surface code.
We confirmed the presence of hook errors numerically by finding the shortest graphlike error for some of the circuits of interest, see Table S2 . The shortest graphlike error gives an upper bound on the full circuit distance and is efficient to compute (we used the stim.Circuit.shortest_graphlike_error method [14 ] ). We denote by “ZZ” the standard translationally-invariant schedule for the modular hyperbolic surface codes we have introduced so far, where we give every plaquette within a module the same CNOT ordering regardless of its basis (each “Z” denotes the shape drawn by the CNOT order in each of the X X X and Z Z Z basis plaquettes). As shown in Table S2 , using the ZZ schedule for d = 10 d = 10 d = 10 , L = 5 L = 5 L = 5 regular { 4 , s } \{4,s\} { 4 , s } modular hyperbolic surface codes, the circuit distance drops to 5, 6 or 7, well below the full code distance of 10.
Table S2. Circuit-level distance comparison between standard ZZ and NZ scheduling strategies, comparing standard (non-alternating) rounds with alternating forward-backward (fb) rounds for multi-rate hyperbolic modular surface codes at side length L = 5 L = 5 L = 5 (r = 5 r = 5 r = 5 rounds). Distances are computed using a search for graphlike errors on the detector error model (using the stim method stim.Circuit.shortest_graphlike_error [14 ] ). For Square modules, non-alternating rounds cap the circuit distance to d c i r c = 6 d_{\mathrm{circ}} = 6 d circ = 6 for all tilings; round alternation alone is insufficient to raise the distance of the ZZ schedule on { 4 , 6 } \{4,6\} { 4 , 6 } , { 4 , 10 } \{4,10\} { 4 , 10 } , and { 4 , 12 } \{4,12\} { 4 , 12 } , whereas the NZ schedule combined with round alternation recovers d c i r c = 8 d_{\mathrm{circ}} = 8 d circ = 8 across all tilings. For Rectangular modules on { 4 , 6 } \{4,6\} { 4 , 6 } and { 4 , 10 } \{4,10\} { 4 , 10 } codes, zero-shift collision-free scheduling is infeasible: the standard ZZ schedule resolves collisions by introducing a shift offset (δ = 1 \delta= 1 δ = 1 ), whereas the NZ schedule disables δ = 1 \delta= 1 δ = 1 and instead uses the boundary-first fallback strategy (yielding an asymmetry where Z-basis distance outperforms X-basis distance).
We mitigate against this distance reduction by making two further modifications to the circuit. First, we use an alternating schedule by reversing the order of the CNOT gates that couple data qubits to ancilla qubits in the odd rounds. As shown in Table S2 , for the square module partition this boosts the distance from 6 to 8 for the { 4 , 8 } \{4,8\} { 4 , 8 } code, however the distance remains 6 for the other three codes. For the rectangular module partition, the alternating schedule increases the distance by one (up to 6 or 8, depending on the tiling). The reason that the alternating schedule does not mitigate hook errors in the ZZ schedule as well as it does for the NZ schedule in the Euclidean surface code is shown in Figure S29 . Specifically, Figure S29 shows a pair of Z Z Z errors that trigger only two detectors, both in the same cycle, and which are equivalent to three Z Z Z errors on data qubits lying parallel with a logical operator. Since chains of hook errors of this form are not diagonal in the spacetime detector error model (the chain does not traverse time), the alternating schedule is unable to mitigate against it. Nevertheless, the alternating schedule does still lead to a modest improvement in the logical error rate, see Figure S27 and Figure S28 .
Figure S27. Comparison between standard and alternating forward-backward (fb) schedules for ZZ and NZ across all four tilings for square modules (side length L = 5 L = 5 L = 5 , r = 30 r = 30 r = 30 syndrome measurement rounds, averaged over X X X and Z Z Z bases).
Figure S28. Comparison between standard (non-alternating) and alternating forward–backward (fb) schedules for ZZ and NZ across all four tilings for rectangular modules (m s = 2 m_s = 2 m s = 2 , side length L = 5 L = 5 L = 5 , r = 30 r = 30 r = 30 syndrome measurement rounds, averaged over X X X and Z Z Z bases).
Figure S29. Hook errors in a ZZ schedule of a modular hyperbolic surface code. The two Z Z Z errors in a, both occurring between time steps 1 and 2 of round r r r of the syndrome extraction circuit, are equivalent to the three Z Z Z errors in b, all occurring immediately after time step 3 (data qubit errors occurring between round r r r and round $r + 1). Notice that the left Z Z Z error in a flips stabilizer α \alpha α in round r + 1 r + 1 r + 1 and flips stabilizer β \beta β in round r r r . This error is therefore diagonal in spacetime, however the right Z Z Z error in a also flips stabilizer β \beta β in round r r r , canceling with the left Z Z Z error’s syndrome. Therefore the combined effect of the two Z Z Z errors is a pair of stabilizers α \alpha α and γ \gamma γ occurring in the same round r + 1 r + 1 r + 1 , and equivalent to the three data qubit errors occurring between rounds r r r and r + 1 r + 1 r + 1 in b.
Despite the circuit distance dropping below the code distance even with the alternating schedule, the logical error rate performance is still excellent, matching what we would expect for using a Euclidean surface code at a distance equal to the hyperbolic code’s full code distance. This is shown in Figure S30 , where we see that the ZZ alternating schedule circuits outperform d = 9 d = 9 d = 9 Euclidean surface codes and almost match d = 11 d = 11 d = 11 Euclidean surface code performance, despite the circuit distance being 6 for the 4 , 6 {4, 6} 4 , 6 , 4 , 10 {4, 10} 4 , 10 and 4 , 12 {4, 12} 4 , 12 codes. Remarkably, our simulations of the distance 20 4 , 10 {4, 10} 4 , 10 modular hyperbolic surface code, shown in Figure 3 of the main text, show that its logical error rate outperforms a distance-21 Euclidean surface code, despite the inevitable presence of hook errors that reduce the circuit distance below the code distance of 20 (we used ZZ alternating multi-rate schedules for these simulations).
Figure S30. Comparison of alternating ZZ and NZ schedules, for d = 10 d = 10 d = 10 , L = 5 L = 5 L = 5 modular hyperbolic surface codes with square module partitions, averaged over X X X and Z Z Z bases. We compare with d = 9 d = 9 d = 9 and d = 11 d = 11 d = 11 Euclidean rotated surface codes using a standard NZ schedule, with a single vertical and horizontal seam (CZ gates that cross the seam have a noise strength p s e a m p_{\mathrm{seam}} p seam ).
While the ZZ alternating schedule circuits already have good performance, we also implemented an “NZ” alternating schedule, in order to further mitigate against hook errors, and in the hope that this might additionally translate into improved logical error rates. Our NZ schedule adapts the standard rotated surface code extraction pattern [16 ] to modular hyperbolic surface codes by assigning distinct CNOT interaction orders to the X X X and Z Z Z plaquettes within one base face of the original hyperbolic tiling, see Figure S26 . In cyclic order around each fine-grained square plaquette, X X X stabilizers follow an “N”-shaped schedule (traversing vertically first, i.e. time steps P X : = [ 3 , 1 , 0 , 2 ] P_X := [3, 1, 0, 2] P X := [ 3 , 1 , 0 , 2 ] for corners [NW,NE,SE,SW]), while Z Z Z stabilizers follow a “Z”-shaped schedule (traversing horizontally first, e.g. P Z : = [ 3 , 2 , 0 , 1 ] P_Z := [3, 2, 0, 1] P Z := [ 3 , 2 , 0 , 1 ] ). This NZ circuit does not have the problematic, purely “spatial”, pair of hook errors shown in Figure S29 , allowing the alternating schedule to be more effective at hook error mitigation in the bulk of a base face.
To lift this schedule to the full, fine-grained modular hyperbolic code, each face of the base tiling is assigned a joint X / Z X/Z X / Z schedule pair ( g ⋅ P X , g ⋅ P Z ) (g \cdot P_X, g \cdot P_Z) ( g ⋅ P X , g ⋅ P Z ) , obtained by applying the same dihedral symmetry g ∈ D 4 g \in D_4 g ∈ D 4 (one of the 4 rotations or reflections) simultaneously to both seed schedules (each a permutation of { 0 , 1 , 2 , 3 } \{0,1,2,3\} { 0 , 1 , 2 , 3 } ). This preserves the relative orientation between X X X and Z Z Z schedules across the fine grid within each base face. The global schedule is found using the same backtracking CSP solver described in Section S4B: each base face represents a variable with a domain of the 8 joint D 4 D_4 D 4 permutations, with edge commutativity constraints adapted to the NZ schedule to ensure Equation (29) holds for X X X and Z Z Z stabilizers spanning adjacent base modules. For adjacent base faces within a module, rather than using only the time step collision constraint (Equation (35) ), we instead enforce that different base faces within the same module have translationally invariant schedules (i.e. all X X X plaquettes within a module have the same translationally invariant schedule, and similarly for Z Z Z ). Since we wanted to enforce translational invariance within a module, we fixed the shift δ = 0 \delta= 0 δ = 0 (rather than falling back to δ = 1 \delta= 1 δ = 1 as we did for the ZZ schedule). However when the δ = 0 \delta= 0 δ = 0 NZ scheduling fails, we do still use the boundary first fallback.
The circuit distances of the NZ schedule, with and without using an alternating schedule, are shown in Table S2 . Across the codes benchmarked, the NZ alternating schedule has the best circuit distance among the different schedules, as expected, typically achieving a circuit distance of 8 (for a distance 10 code). This corresponds to losing a distance of 1 across each of the two modules that wraps around a handle of the hyperbolic surface. When the boundary fallback is used, the distance drops to 7. This is expected, since the boundary fallback un-interleaves the module boundary stabilizer measurement CNOTs in one basis, so a hook error that would have been diagonal in spacetime becomes purely spacelike (and as such the alternating schedule cannot mitigate against it). Regardless, as shown in Figure S30 and Figure S31 , we find that the NZ alternating schedule has essentially the same logical error rate performance as the ZZ alternating schedule, despite the different circuit distances. This further confirms that, while hook errors are present in these modular hyperbolic surface code circuits, they are so improbable that they have no noticeable impact on logical error rates at practical physical error rates.
Figure S31. Comparison of alternating ZZ and NZ schedules, for d = 10 d = 10 d = 10 , L = 5 L = 5 L = 5 modular hyperbolic surface codes with rectangular module partitions.
Multi-rate measurement schedules
Rather than measuring all stabilizers in every cycle, we measure some higher-weight stabilizers less frequently. Concretely, any stabilizer in the code associated with a vertex of the original base hyperbolic tiling is measured once every three cycles. As an example, consider a square module partition of a 4 , s {4, s} 4 , s regular hyperbolic surface code. In the modular hyperbolic code, each degree s s s vertex in the base tiling lifts to a weight-s s s stabilizer in the semi-hyperbolic code, which is shared by the s s s square modules at their corners (see Figure S20 for the stabilizer structure of a 4 , s {4, s} 4 , s , L = 5 L = 5 L = 5 modular hyperbolic code, as an example). Preparing the cat state with the linear encoding circuit we use requires ⌈ s / 2 ⌉ \lceil s/2 \rceil ⌈ s /2 ⌉ layers of inter-module gates. We will refer to these high-weight stabilizers as “corner” stabilizers. Since the corner stabilizers require both high-weight cat states and the use of inter-module couplers, which are expected to be noisier and slower, they are therefore much slower to measure than the weight-four stabilizers fully supported within a module. If we were to measure all stabilizers every cycle, the data qubits would be idling while the corner stabilizers’ cat states are being prepared.
Instead, we measure the higher-weight, non-local stabilizers less frequently [18 , 19 ] . Concretely, in our multi-rate circuit, the corner stabilizers are measured once every three cycles, while all remaining stabilizers are measured every cycle. A timeline of a multi-rate syndrome extraction circuit is shown in Figure S32 . The “full-rate” stabilizers (all stabilizers aside from corner stabilizers) are measured in full every cycle. The “subsampled” stabilizers (corner stabilizers) are measured across three cycles. In a cycle t t t for which t m o d 3 = 0 t \bmod3 = 0 t mod 3 = 0 , the ancillas of the subsampled stabilizers are reset and inter-module gates are used to unitarily prepare a cat state on the shared ancilla qubits. In cycles where t m o d 3 = 1 t \bmod3 = 1 t mod 3 = 1 , local CNOT (or CZ) gates within a module are used to couple data and ancilla qubits, synchronized for all stabilizers (subsampled and full-rate). Finally, for cycles t m o d 3 = 2 t \bmod3 = 2 t mod 3 = 2 , the inverse of the unitary cat-state encoding circuit is applied to the ancilla qubits of the subsampled stabilizers, followed by measurement of all the ancillas. One of these ancillas is used to measure the stabilizer, while the remaining s − 1 s - 1 s − 1 ancillas are flag qubits. We still use the alternating (forward-backward) schedule for the multi-rate circuits by reversing the order of the data-ancilla CNOT (or CZ) gates in cycles for which t m o d 2 = 1 t \bmod2 = 1 t mod 2 = 1 .
Figure S32. Timeline of a multi-rate syndrome extraction circuit for modular hyperbolic codes. Full-rate stabilizers (including intra-module bulk stabilizers and inter-module edge stabilizers extracted via two-qubit Bell pairs) are extracted and measured in every cycle (t = 0 , 1 , 2 , … t = 0, 1, 2, \ldots t = 0 , 1 , 2 , … ), with detectors D t D_t D t comparing syndromes between consecutive cycles (D t = S t ⊕ S t − 1 D_t = S_t \oplus S_{t-1} D t = S t ⊕ S t − 1 ). Subsampled corner stabilizers, which have higher weight and require multi-qubit cat states with preparation and measurement depth scaling with the cat size across multiple module seams, are executed across a 3-cycle sequence (t m o d 3 ∈ { 0 , 1 , 2 } t \bmod3 \in\{0,1,2\} t mod 3 ∈ { 0 , 1 , 2 } ): Phase 1 (t m o d 3 = 0 t \bmod3 = 0 t mod 3 = 0 ) prepares the multi-qubit cat state across seams while data qubits remain idle; Phase 2 (t m o d 3 = 1 t \bmod3 = 1 t mod 3 = 1 ) applies local data-ancilla CNOT gates, synchronized with the full-rate schedules; Phase 3 (t m o d 3 = 2 t \bmod3 = 2 t mod 3 = 2 ) unencodes the cat state and measures the root ancilla (syndrome S t S_t S t ) alongside leaf flag ancillas. Subsampled detectors compare syndromes across Δ t = 3 \Delta t = 3 Δ t = 3 cycles (D t = S t ⊕ S t − 3 D_t = S_t \oplus S_{t-3} D t = S t ⊕ S t − 3 , e.g. D 5 = S 5 ⊕ S 2 D_5 = S_5 \oplus S_2 D 5 = S 5 ⊕ S 2 ).
In Figure S33 we show simulations that compare the multi-rate and uniform rate syndrome extraction circuits for small regular { 4 , s } \{4,s\} { 4 , s } modular hyperbolic surface codes with L = 5 L = 5 L = 5 and for s ∈ { 6 , 8 , 10 , 12 } s \in\{6,8,10,12\} s ∈ { 6 , 8 , 10 , 12 } . We find that the multi-rate circuits, for which corner stabilizers are measured every three cycles, have better (lower) logical error rates than the uniform circuits for which every stabilizer is measured each cycle. The improvement increases with the stabilizer weight s s s . This improvement can be explained by the fact that the uniform schedule requires the data qubits to idle while the corner stabilizers’ cat states are encoded and unencoded.
Figure S33. Simulations comparing uniform and multi-rate syndrome extraction circuits for L = 5 L = 5 L = 5 , d = 10 d = 10 d = 10 regular { 4 , s } \{4,s\} { 4 , s } modular hyperbolic surface codes. The top panel of four plots uses a square module partitioning, whereas the bottom four plots use a rectangular module partitioning. The multi-rate circuits measure the corner stabilizers once every three cycles, whereas the uniform-rate schedule measures all stabilizers every cycle. For all circuits we use an alternating (forward-backward) schedule for the data-ancilla CNOT/CZ ordering.
Symmetrical Canonical Logical Basis for Hyperbolic Codes
The logical operators for hyperbolic color and surface codes are associated with the topology of the underlying closed hyperbolic tiling. In particular, they are related to the homologically non-trivial cycles of the surface.
A closed orientable surface Σ g \Sigma_g Σ g of genus g g g has 2 g 2g 2 g independent homologically non-trivial cycles and these cycles can be grouped into g g g pairs, called symplectic pairs , in order to define a canonical homology basis B = { ( α 1 , β 1 ) , … , ( α g , β g ) } \mathcal{B} = \{(\alpha_1,\beta_1),\ldots,(\alpha_g,\beta_g)\} B = {( α 1 , β 1 ) , … , ( α g , β g )} . We define the intersection number ⟨ α , β ⟩ ∈ F 2 \langle\alpha,\beta\rangle\in\mathbb{F}_2 ⟨ α , β ⟩ ∈ F 2 of two non-trivial cycles α \alpha α , β \beta β as their number of geometric crossings modulo 2 and we say that the two cycles cross when this number is 1 (when they geometrically cross each other an odd number of times). In a canonical homology basis, symplectic pairs cross an odd number of times only with their partner cycle and cross an even number of times with any cycle from another symplectic pair. Figure S34 illustrates an example for an arbitrary genus-3 surface.
Figure S34. Canonical homology basis on an orientable genus-3 surface Σ 3 \Sigma_3 Σ 3 . Each handle i i i supports a symplectic pair of cycles ( α i , β i ) (\alpha_i, \beta_i) ( α i , β i ) . Partner cycles in each pair cross each other an odd number of times and cross cycles of other symplectic pairs an even number of times.
On a tiled surface, a cycle is a closed loop of edges. The cycle is homologically trivial if the edges of the cycle form the boundary of a set of tiling faces. Otherwise, it is homologically non-trivial (it wraps around a handle of the surface). Since stabilizers are defined on the faces of the underlying hyperbolic tiling for hyperbolic color and surface codes, homologically trivial cycles of the hyperbolic tiling correspond to the stabilizers of the code, while the non-trivial cycles are associated with the logical operators. However, the precise way a logical Pauli operator is constructed from a non-trivial cycle differs between color and surface codes, as we explain in the rest of this section.
Color Code Logical Basis
For hyperbolic color codes, we associate the logical operators with the homologically non-trivial cycles on the primal three-colorable tiling T \mathcal{T} T (see Figure S35 ), using the colored structure of the edges. Every edge of the color code tiling separates two faces of the same color, and we assign it that color through the map c : E → { R , G , B } c : E \to\{R, G, B\} c : E → { R , G , B } , so that red faces are separated by red edges, and likewise for green and blue. A homologically non-trivial cycle α \alpha α consists of edges of all three colors, whereas a cycle whose edges use only two colors bounds a set of faces and is homologically trivial [1 , 2 ] .
Figure S35. Canonical logical basis for the genus-2 semi-hyperbolic color code 8.8.8-16-L2. (a,c) Two symplectic pairs of homologically non-trivial cycles on the tiling. (b,d) The 4 logical X (top) and 4 logical Z (bottom) operators derived from each pair by restricting the cycle support to green and blue edges, giving 8 logical qubits in total.
Following [1 ] , a logical Pauli operator of the color code is obtained from a non-trivial cycle α \alpha α by restricting its support to a single color. For each color C ∈ { R , G , B } C \in\{R, G, B\} C ∈ { R , G , B } , the monochromatic substring
α C : = { e ∈ α ∣ c ( e ) = C } (36) \alpha_C := \{e \in\alpha\mid c(e) = C\} \tag*{(36)} α C := { e ∈ α ∣ c ( e ) = C } (36)
is the set of color-C C C edges of α \alpha α , and we write V ( α C ) ⊆ V V(\alpha_C) \subseteq V V ( α C ) ⊆ V for the set of vertices incident to an edge in α C \alpha_C α C . The substring α C \alpha_C α C supports both an X ‾ \overline{X} X - and a Z ‾ \overline{Z} Z -type logical operator,
X ‾ C α : = ⨂ v ∈ V ( α C ) X v , Z ‾ C α : = ⨂ v ∈ V ( α C ) Z v , (37) \overline{X}^{\alpha}_{C}:=\bigotimes_{v\in V(\alpha_C)}X_v,\qquad\overline{Z}^{\alpha}_{C}:=\bigotimes_{v\in V(\alpha_C)}Z_v, \tag*{(37)} X C α := v ∈ V ( α C ) ⨂ X v , Z C α := v ∈ V ( α C ) ⨂ Z v , (37)
obtained by placing an X X X (respectively Z Z Z ) on the two data qubits at the endpoints of each color-C C C edge of α \alpha α .
This restriction to color-C C C edges is equivalent to the shrunk-lattice construction of Ref. [1 ] . There, a color-C C C string is defined on the shrunk lattice, obtained by contracting every color-C C C face of T \mathcal{T} T to a single vertex and keeping only the color-C C C edges. We define logical operators on monochromatic substrings throughout, and it underlies the weighted shortest-cycle search we use to compute color-code distances in Section S10 A.
Monochromatic substring operators of X X X or Z Z Z type supported on the same non-trivial cycle are not all independent. The product of any two of the same Pauli type equals the third up to stabilizers, for example X ‾ R α ≃ X ‾ B α X ‾ G α \overline{X}^{\alpha}_{R}\simeq\overline{X}^{\alpha}_{B}\overline{X}^{\alpha}_{G} X R α ≃ X B α X G α . The cycle α \alpha α therefore carries four independent logical operators, for example X ‾ B α \overline{X}^{\alpha}_{B} X B α , X ‾ G α \overline{X}^{\alpha}_{G} X G α , Z ‾ B α \overline{Z}^{\alpha}_{B} Z B α and Z ‾ G α \overline{Z}^{\alpha}_{G} Z G α . The operators on α \alpha α mutually commute, since any two substrings on the same cycle overlap on an even number of qubits. The anticommuting operators are instead supported across the symplectic pair ( α , β ) (\alpha,\beta) ( α , β ) , where a substring on α \alpha α and a substring on β \beta β of different color and different Pauli type overlap an odd number of times, e.g. X ‾ B α \overline{X}^{\alpha}_{B} X B α anticommutes with Z ‾ G β \overline{Z}^{\beta}_{G} Z G β , X ‾ G α \overline{X}^{\alpha}_{G} X G α with Z ‾ B β \overline{Z}^{\beta}_{B} Z B β , and similarly with the roles of α \alpha α and β \beta β exchanged (see Figure S35 ). This groups the eight operators obtained from α \alpha α and β \beta β into four anticommuting pairs, defining four logical qubits per symplectic pair,
X ‾ 1 : = X ‾ G α , Z ‾ 1 : = Z ‾ B β , X ‾ 2 : = X ‾ B α , Z ‾ 2 : = Z ‾ G β , X ‾ 3 : = X ‾ G β , Z ‾ 3 : = Z ‾ B α , X ‾ 4 : = X ‾ B β , Z ‾ 4 : = Z ‾ G α . (38) \begin{aligned}
\overline{X}_1&:=\overline{X}^{\alpha}_{G}, & \overline{Z}_1&:=\overline{Z}^{\beta}_{B},\\
\overline{X}_2&:=\overline{X}^{\alpha}_{B}, & \overline{Z}_2&:=\overline{Z}^{\beta}_{G},\\
\overline{X}_3&:=\overline{X}^{\beta}_{G}, & \overline{Z}_3&:=\overline{Z}^{\alpha}_{B},\\
\overline{X}_4&:=\overline{X}^{\beta}_{B}, & \overline{Z}_4&:=\overline{Z}^{\alpha}_{G}. \tag*{(38)}
\end{aligned} X 1 X 2 X 3 X 4 := X G α , := X B α , := X G β , := X B β , Z 1 Z 2 Z 3 Z 4 := Z B β , := Z G β , := Z B α , := Z G α . (38)
Starting from a canonical homology basis B = { ( α 1 , β 1 ) , … , ( α g , β g ) } \mathcal{B}=\{(\alpha_1,\beta_1),\ldots,(\alpha_g,\beta_g)\} B = {( α 1 , β 1 ) , … , ( α g , β g )} of g g g symplectic pairs and defining the Pauli operators on their monochromatic substrings using two colors yields a symplectic basis for the k = 4 g k=4g k = 4 g logical qubits of the hyperbolic color code. Furthermore, fine-graining a hyperbolic tiling with a Euclidean tiling does not change the topology of the surface, therefore, we can always search for a canonical homology basis on the primal hyperbolic tiling and then lift its non-trivial cycles to the fine-grained semi-hyperbolic tiling (we describe the lifting procedure in detail in Section S9). Fine-graining does, however, increase the length of the non-trivial cycles, and hence the number of qubits in the support of the logical operators, boosting the code distance. Figure S36 illustrates this for a symplectic pair ( α , β ) (\alpha,\beta) ( α , β ) of the 8.8.8-32 semi-hyperbolic color code: the same pair of non-trivial cycles is shown for fine-graining parameters L = 1 L=1 L = 1 , L = 2 L=2 L = 2 and L = 3 L=3 L = 3 . As L L L increases, each cycle is lifted to a longer path on the fine-grained tiling, so that the logical operators and its support grow in weight while their homology class is preserved.
Figure S36. A homologically non-trivial seed cycle (solid RGB lines) and its symplectic partner (dashed RGB line) on the 8.8.8-32 semi-hyperbolic color code, shown for fine-graining parameters L = 1 L = 1 L = 1 , L = 2 L = 2 L = 2 and L = 3 L = 3 L = 3 using a quadrilateral (K = 2 K=2 K = 2 ) module partition with M = ∣ G + ∣ = 16 M = |G^{+}| = 16 M = ∣ G + ∣ = 16 modules. At L = 1 L = 1 L = 1 (left), both the primal cycle (solid RGB lines) and the corresponding dual cycle (purple) are shown on the base hyperbolic tiling. At L = 2 L = 2 L = 2 (middle) and L = 3 L = 3 L = 3 (right), the primal cycle is lifted to the fine-grained tiling, where it follows the module boundaries along the path traced by the dual cycle. Together, the symplectic pair ( α , β ) (\alpha,\beta) ( α , β ) defines four logical qubits via the monochromatic substrings of any two of the three edge colors.
In our work we require an additional structure from the canonical logical basis. We construct it using the symmetries of the tiling, particularly the orientation-preserving automorphisms Aut + ( T ) = G + = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T})=G^{+}=\langle\rho,\sigma\rangle Aut + ( T ) = G + = ⟨ ρ , σ ⟩ that correspond to global rotations and translations of the tiling. We restrict to the orientation-preserving symmetries since we can realize these symmetries as fault-tolerant automorphism circuits with minimal additional seam connectivity (described in Section S7). The module partition we focus on is quadrilateral (K = 2 K=2 K = 2 ) modules for which the modules are in correspondence with group elements of G + G^{+} G + . Our aim is therefore a symmetric basis, in which the homologically non-trivial cycles are related to one another by the action of G + G^{+} G + , so that the corresponding logical operators can be mapped onto one another by these automorphism circuits. We build the basis from seed cycles . First we enumerate a pool of short seed-cycle candidates: we perform a graph search from every vertex of the tiling, find and classify each non-trivial cycle by its homology class, and keep the shortest representative of each class. We order the cycles in the candidate pool by their length, starting from the systole which is the shortest non-trivial cycle of the tiling. We then take the orbit of a seed cycle under G + G^{+} G + . Rotating the tiling maps the seed to other non-trivial cycles of equal length, sweeping it across many homology classes and giving a pool of equal-length candidates from which we search for g g g cycles that pair up into a symplectic basis. We try the systole first, then proceed through successive seed cycles in order of increasing weight, until the orbits together contain a complete basis. We give a complete account of how the symmetric canonical homology basis is constructed in Section S9, explaining non-trivial cycle enumeration, the generation of seed-cycle orbits under the orientation-preserving group G + = ⟨ ρ , σ ⟩ G^{+}=\langle\rho,\sigma\rangle G + = ⟨ ρ , σ ⟩ , and the symplectic-pair search.
Since the modules of the quadrilateral partition correspond to elements of G + G^{+} G + , the symmetric structure of the canonical logical basis has a natural description on the module partition, which we illustrate in Figure S37 and Figure S38 for the 8.8.8-32 color code. Recall from Section S3 A that each quadrilateral module is formed by pairing adjacent triangles of the base triangular tiling across an edge of one chosen color (here the red edges). Removing the dual edges of that color leaves a reduced dual graph whose remaining (blue and green) dual edges lie along the module boundaries, so a non-trivial cycle can be represented by its dual cycle running along these boundaries. Lifting a primal cycle to the fine-grained tiling, it follows the module boundaries along the path traced by this dual cycle, and the corresponding logical operator can be supported on either side of the boundary. Furthermore, the non-trivial dual cycles can be labeled by group elements: associating a chosen seed cycle with the identity element e e e , its orbit under G + G^{+} G + produces the remaining cycles in its orbit, each labeled by the group element g ∈ G + g \in G^{+} g ∈ G + that maps the seed onto it. The group elements corresponding to the non-trivial cycles that form a canonical basis are shown as colored nodes in Figure S38 which makes explicit how every cycle in the basis is obtained from the seed by a global rotation of the tiling. For the 8.8.8-32 color code (genus g = 3 g=3 g = 3 ) the orbit of a single seed cycle under G + G^{+} G + produces six non-trivial cycles that form all three symplectic pairs, so this one seed suffices to construct the full logical basis. The dashed lines in Figure S38 show the partner cycles of each symplectic pair and Figure S38 illustrates the right Cayley distance between them. If the ribbon extractor is attached to the seed cycle γ \gamma γ , the cycle x γ x\gamma x γ is brought under it by the automorphism x − 1 x^{-1} x − 1 , so switching from measuring x γ x\gamma x γ to measuring y γ y\gamma y γ requires the automorphism y − 1 x y^{-1}x y − 1 x . Its word length ∣ x − 1 y ∣ |x^{-1}y| ∣ x − 1 y ∣ in the generators { ρ ± 1 , σ ± 1 } \{\rho^{\pm1},\sigma^{\pm1}\} { ρ ± 1 , σ ± 1 } is the distance between x x x and y y y in the right Cayley graph of G + G^{+} G + . This is the minimum number of elementary moves ρ , ρ − 1 , σ , σ − 1 \rho,\rho^{-1},\sigma,\sigma^{-1} ρ , ρ − 1 , σ , σ − 1 needed to bring a cycle under the extractor when it is measuring the partner cycle, and determines the depth of the automorphism circuits required to switch between the cycles within a symplectic pair. Note that this in general differs from the left Cayley distance ∣ y x − 1 ∣ |yx^{-1}| ∣ y x − 1 ∣ , which is the length of the automorphism y x − 1 yx^{-1} y x − 1 mapping x γ x\gamma x γ onto y γ y\gamma y γ . We discuss the general case of an extractor attached to a cycle h γ h\gamma hγ in § 1.8 (see Equation (50) ).
Figure S37. Construction of a dual cycle along module boundaries for the 8.8.8-32 color code with a quadrilateral (K = 2 K=2 K = 2 ) module partition. a The base triangular tiling T △ \mathcal{T}^{\triangle} T △ with its three edge colors (overlaid on the three-colorable primal tiling T \mathcal{T} T ). In the K = 2 K=2 K = 2 partition, each quadrilateral module is formed by pairing adjacent triangles across edges of a chosen color, here the red edges. b Removing the red edges from the dual tiling leaves a reduced graph consisting of only the blue and green dual edges, on which dual cycles lying on module boundaries can be found. c A homologically non-trivial primal cycle (RGB edges). d The corresponding non-trivial dual cycle (purple) on the quadrilateral module partition, with each module labeled by its group element g ∈ G + = ⟨ ρ , σ ⟩ g \in G_{+}=\langle\rho,\sigma\rangle g ∈ G + = ⟨ ρ , σ ⟩ .
Figure S38. Symplectic pairs and automorphism paths for the 8.8.8-32 color code (genus g = 3 g = 3 g = 3 ) with a quadrilateral (K = 2 K=2 K = 2 ) module partition. Each quadrilateral module is labeled by an element of G + = ⟨ ρ , σ ⟩ G^+ = \langle\rho, \sigma\rangle G + = ⟨ ρ , σ ⟩ with ∣ G + ∣ = 16 |G^+| = 16 ∣ G + ∣ = 16 . a The dual seed cycle γ \gamma γ (purple) is associated with the identity element e e e . Its orbit under G + G^+ G + contains six homologically non-trivial cycles of three symplectic pairs, where each cycle g γ g\gamma g γ is labeled by the group element g g g that maps the seed cycle to it via left multiplication (the automorphism). For example, the cycle labeled by ρ \rho ρ is the image of γ \gamma γ under a global ρ \rho ρ rotation. Dashed lines connect the two cycles within each symplectic pair. b Automorphism paths between symplectic partners on the Cayley graph of G + G^+ G + . Each label d d d for a pair ( g γ , h γ ) (g\gamma, h\gamma) ( g γ , hγ ) denotes the distance between g g g and h h h on the right Cayley graph, corresponding to the minimum number of elementary automorphism moves ρ , ρ − 1 , σ , σ − 1 \rho, \rho^{-1}, \sigma, \sigma^{-1} ρ , ρ − 1 , σ , σ − 1 needed to bring one cycle under an extractor that is measuring its symplectic partner. These distances determine the depth of the automorphism circuits required to rotate between cycles within a symplectic pair. In general G + G^+ G + is not Abelian, although the quotient G + ≅ Z 4 × Z 4 G^+ \cong\mathbb{Z}_4 \times\mathbb{Z}_4 G + ≅ Z 4 × Z 4 defining this particular tiling happens to be Abelian.
The dual cycle described above runs along the module boundaries, obtained by removing the red edges and searching the reduced blue–green dual graph. An alternative is to search on the red edges instead, giving a dual cycle that passes through the interior of the modules in its support, as shown in Figure S39 . The modules are still defined by pairing triangles across red edges, but now each module crossed by the cycle is split into its two constituent triangular modules along that red edge. This exposes an internal module boundary through which the logical operator can be accessed, which is convenient for logical measurement with the ribbon extractor of Section S6, since it separates the seam used for logical readout from the seams used for memory and automorphisms. Only the modules in the support of the seed cycle are split in this way, while all other modules remain quadrilateral.
Figure S39. An alternative dual cycle that cuts through the middle of the modules, for the 8.8.8-32 color code with a quadrilateral (K = 2 K=2 K = 2 ) module partition. This is the counterpart to Figure S37 , where the dual cycle instead runs along the module boundaries. a The base triangular tiling T △ T^\triangle T △ with each quadrilateral module labeled by its group element g ∈ G + = ⟨ ρ , σ ⟩ g \in G^+ = \langle\rho, \sigma\rangle g ∈ G + = ⟨ ρ , σ ⟩ . Each module pairs two triangular tiles across a red edge. Rather than removing the red edges as in Figure S37 , here we search for the non-trivial dual cycle on the red edges, so that it passes through the interior of the modules. b The resulting non-trivial dual cycle (purple) on the hyperbolic tiling (L = 1 L = 1 L = 1 ), passing through the middle of the modules in its support. c The dual cycle (purple) together with its primal seed cycle (RGB edges) lifted to the fine-grained 8.8.8-32-L 3 L3 L 3 tiling. Only the modules in the support of the dual cycle are split into two triangular modules, exposing an internal boundary for logical measurement, while all other modules remain quadrilateral.
A single seed orbit does not always yield a complete basis. When it does not, we may accept a partial basis, in which fewer than g g g symplectic pairs, and hence fewer than the full k = 4 g k=4g k = 4 g logical qubits, are covered by the orbit of a single cycle. This may sometimes be a favorable trade-off. The covered logicals are all related to one seed cycle by automorphisms, and can be measured with a single ribbon extractor (Section S6), with the remaining logicals handled separately. For the 8.8.8-400 code, for example, one seed cycle covers 100 of the 104 logical qubits, so a single extractor suffices for 100 logical qubits. To search for a complete basis, we can enlarge the candidate pool by taking the combined orbits of pairs of seed cycles, then triplets, and so on. Table S3 reports how many seed cycles are used for a range of 8.8.8 color codes and how many logicals their orbits generate.
Table S3. Symmetric canonical logical bases for selected 8.8.8 hyperbolic color codes, constructed from the automorphism orbits of seed cycles. Seeds is the number of seed cycles used. Logicals is the number of logical operators generated by their orbits under the orientation-preserving automorphisms ⟨ ρ , σ ⟩ \langle\rho,\sigma\rangle ⟨ ρ , σ ⟩ , all of equal Weight . Coverage gives these against the total number of logical qubits of the code k = 4 g k = 4g k = 4 g .
To summarize, the canonical basis of symplectic pairs is built from the orbits of seed cycles, and this structure significantly simplifies logical measurement. Each seed cycle and its orbit under G + G^{+} G + is handled by a single ribbon extractor (Section S6), which measures the logical operators on the seed cycle, while the automorphism circuits (Section S7) map the images in the orbit back onto it. The logical operators are associated with non-trivial cycles, the smallest of which is the systole, the shortest non-trivial cycle of the tiling. Since the systole scales as O ( log ∣ G ∣ ) O(\log|G|) O ( log ∣ G ∣ ) , this upper bounds the weight of the shortest logical operators to O ( log ∣ G ∣ ) O(\log|G|) O ( log ∣ G ∣ ) base tiles (see Section S10). After fine-graining, these tiles are grouped into modules, so the shortest logical operators are supported on only O ( log M ) O(\log M) O ( log M ) of the M M M modules, with weight O ( L log M ) O(L\log M) O ( L log M ) at fine-graining parameter L L L . Each such operator can moreover be made to lie on the module boundaries (Figure S37 ) or cut through the middle of the module which is then split into two triangular modules (Figure S39 ). Logical measurement then requires only minimal additional seam connectivity, never addressing qubits in the bulk, and the modules themselves remain planar.
Surface Code Logical Basis
Unlike color codes, hyperbolic surface codes are not self-dual, and their X X X - and Z Z Z -type operators are supported on different structures. In the two-colorable representation, the stabilizers are supported on the faces of the tiling, with the two face colors carrying the two stabilizer types, e.g. red faces support X X X -stabilizers and blue faces support Z Z Z -stabilizers. To describe the logical operators it is convenient to pass to the equivalent cell complex representation, obtained by collapsing every red face to a vertex and associating data qubits with the edges connecting the new vertices, as illustrated in Figure S40 . In the resulting cell complex C \mathcal{C} C , the 2-cells (faces) support Z Z Z -stabilizers, the 1-cells (edges) support data qubits, and the 0-cells (vertices) support X X X -stabilizers. This is captured by the chain complex
Figure S40. Cell complex description of a semi-hyperbolic surface code. (a) The two-colorable tiling ( T L □ ) ∗ (T^\square_L)^* ( T L □ ) ∗ with red and blue faces. (b) Cell complex C \mathcal{C} C overlaid on the two-colorable ( T L □ ) ∗ (T^\square_L)^* ( T L □ ) ∗ tiling. Red faces are shrunk to vertices and new edges connect the new vertices. Qubits are now associated with edges of the tiling. (c) Cell complex tiling T c e l l \mathcal{T}_{\mathrm{cell}} T cell : Z Z Z -stabilizers are associated with faces, data qubits with edges and X X X -stabilizers are associated with vertices. Examples of weight-4 and weight-6 stabilizer generators are shown. Homologically trivial cycles of C \mathcal{C} C are products of Z Z Z -stabilizers and non-trivial cycles give logical Z ‾ \overline{Z} Z operators, while on the dual cell complex C ∗ \mathcal{C}^* C ∗ trivial cycles are products of X X X -stabilizers and non-trivial cycles give logical X ‾ \overline{X} X operators.
C 2 → ∂ 2 C 1 → ∂ 1 C 0 , (39) C_2 \xrightarrow{\partial_2} C_1 \xrightarrow{\partial_1} C_0, \tag*{(39)} C 2 ∂ 2 C 1 ∂ 1 C 0 , (39)
where H Z = ∂ 2 T H_Z = \partial_2^{\mathsf{T}} H Z = ∂ 2 T and H X = ∂ 1 H_X = \partial_1 H X = ∂ 1 .
On C \mathcal{C} C , homologically trivial cycles are products of Z Z Z -stabilizers while homologically non-trivial cycles give logical Z ‾ \overline{Z} Z operators. On the dual cell complex C ∗ \mathcal{C}^* C ∗ , trivial cycles are products of X X X -stabilizers while non-trivial cycles give logical X ‾ \overline{X} X operators. A logical Z ‾ \overline{Z} Z on a cycle and a logical X ‾ \overline{X} X on a cocycle anticommute precisely when the cycle and cocycle cross, i.e. when their intersection number is 1. To build the canonical basis we take g g g symplectic pairs of non-trivial cycles ( α 1 , β 1 ) , … , ( α g , β g ) (\alpha_1,\beta_1),\ldots,(\alpha_g,\beta_g) ( α 1 , β 1 ) , … , ( α g , β g ) on C \mathcal{C} C . Each α i , β i \alpha_i,\beta_i α i , β i carries a logical Z ‾ \overline{Z} Z , giving 2 g 2g 2 g mutually commuting Z ‾ \overline{Z} Z operators. The anticommuting X ‾ \overline{X} X partners are the dual cocycles: α i ∗ \alpha_i^* α i ∗ crosses β i \beta_i β i and β i ∗ \beta_i^* β i ∗ crosses α i \alpha_i α i , so ( Z ‾ β i , X ‾ α i ∗ ) (\overline{Z}_{\beta_i},\overline{X}_{\alpha_i^*}) ( Z β i , X α i ∗ ) and ( Z ‾ α i , X ‾ β i ∗ ) (\overline{Z}_{\alpha_i},\overline{X}_{\beta_i^*}) ( Z α i , X β i ∗ ) form the 2 g 2g 2 g anticommuting logical qubit pairs, giving k = 2 g k=2g k = 2 g logical qubits on a genus-g g g surface.
Figure S40 shows a semi-hyperbolic surface code together with its cell complex description. For the canonical basis, however, we work with the base quadrilateral tiling T □ T^\square T □ : we search for a canonical homology basis there, related by automorphisms as for the color codes, and then interpret the X X X - and Z Z Z -type logical operators by relating the cycles to the cell complex tiling. The combinatorial problem we solve is therefore the same for hyperbolic color and surface codes, and is further explained in Section S9.
We utilize a technique called code surgery, which is a generalization of surface code lattice surgery [20 ] , to access the logical information stored in our modular hyperbolic memory. This access is provided in the form of fault-tolerant measurements of logical Pauli operators, which can be utilized to implement different computational primitives such as teleportation. The high-level idea can be summarized as follows: given a logical operator we intend to measure, we initialize a set of ancilla data qubits and define a new stabilizer code called the deformed code (supported on the original data qubits and ancilla data qubits). In the deformed code, the operator we intend to measure (which is of Hamming weight at least the code distance d d d ) will become a product of new stabilizer checks (which are often of constant Hamming weight). Therefore, by measuring the constant-weight checks of the deformed code, we also measure the high-weight logical operator of the original code. Fault tolerance of this procedure is then guaranteed by guaranteeing the distance of the deformed code is not reduced and by repeating the measurement of the deformed code for sufficiently many rounds (typically d d d rounds).
The space- and time-costs of surgery procedures are determined by the ancilla systems and the associated deformed codes. Construction of these systems and codes has been the focus of a line of recent works [21 , 22 , 23 , 24 , 25 , 26 , 27 ] , for which we refer readers to section 3 of Ref. [26 ] as a brief review. For our semi-hyperbolic codes, we construct surgery gadgets called ribbon extractors using techniques from [21 , 22 , 26 ] . In this section, we detail the construction of these extractors, the deformed codes we use for measurements, and their architectural utilities. Our presentation will be specific to ribbon extractors on hyperbolic color codes with 8.8.8 tiling. The same methods can be applied to hyperbolic color codes with other tilings or hyperbolic surface codes.
We begin by finding a non-trivial cycle in the base code. This cycle and its associated logical operators will be supported on the boundary qubits of a collection of modules. One such cycle of interest is given in Figure S41 ; we will refer to such a cycle (given in cyan) as a seed loop. The highlighted set of edges represent a set of qubits where a given logical operator is supported, such qubits all belong to stabilizer checks that are at the boundaries of modules forming the code. Note, there is a freedom in choosing a logical representative residing along a seed loop, namely one can choose equivalent logical representatives to be on either, or both sides, of the seed loop. Logical representatives of the same Pauli type and color (as will be described below) will be logically equivalent. See Figure S42 for an example of a set of connected edges on either side of the seed loop that can harbor logical operators.
Figure S41. Choosing a seed loop that contains a logical representative in the semi-hyperbolic color code.
Figure S42. Extractor connectivity for measuring logical operators along a seed loop. Solid lines represent in-module connectivity while dashed lines represent inter-module connectivity. Surgery checks on the first row of surgery gadget can couple to the qubits of the corresponding color in the base code via inter-module connection to the associated base code ancilla measurement qubits. Each shaded extractor module box corresponds to an individual module which are connected in a 1D-chain manner to one another along with the base code, thus forming a ribbon extractor.
Along each seed loop there exist four different independent logical Pauli operators, two of both X X X and Z Z Z type, all of which commute. These logical operators can be chosen to live along the edges of a given color, that is they form a continuous set of edges connecting faces of the same color. As a result, we can label the resulting logical operators as X ‾ B , X ‾ R , Z ‾ B , Z ‾ R \overline{X}_B,\overline{X}_R,\overline{Z}_B,\overline{Z}_R X B , X R , Z B , Z R (where the B B B and R R R labels refer to the blue and red logicals, we forgo the superscript label from § 1.5 A as we are focusing on a single loop). Note, that while there is also a green logical, it would be equivalent to the product of the logicals of the other two colors X ‾ G ≃ X ‾ B X ‾ R \overline{X}_G \simeq\overline{X}_B\overline{X}_R X G ≃ X B X R .
We will denote the stabilizers that straddle both sides of the seed loop, and as such share data qubits between more than one module, as boundary stabilizers . Note that all the weight-6 boundary stabilizers have half of their data qubit support on one module, and half on another module on either side of the boundary seed loop. For the weight-8 corner stabilizers, the stabilizer can either have a 4-4 or 2-6 split on either side of the seed loop.
We will now describe the connectivity of the extractor gadget (see Figure S42 ) that will be used to implement logical measurements via code surgery. We will detail the exact stabilizers to be measured for a given desired logical in the subsequent section.
The ribbon extractor consists of layers of ancilla check qubits and ancilla data qubits. Note that a surgery check, which is a stabilizer we use to perform surgery measurement, can be implemented by one or more ancilla check qubits. For readability, in the rest of this section we always differentiate between ‘checks’ and ‘check qubits’. There will be a total of 2 ℓ + 1 2\ell+ 1 2 ℓ + 1 layers, for an integer ℓ \ell ℓ to be specified later. The first layer of the extractor is constructed as follows.
For every boundary stabilizer, we will associate a surgery check that can access a subset of qubits belonging to the corresponding stabilizer through the associated ancilla check qubits (white circles). In Figure S42 , these surgery check qubits are colored according to the colors of the boundary stabilizers. For reasons which we will explain later, the surgery checks associated to the blue boundary stabilizers are implemented using two ancilla check qubits, as well as the surgery checks associated to the corner stabilizers. We will refer to these surgery checks as ‘wide’. The remaining ‘standard’ surgery checks are each implemented with one ancilla check qubit.
In particular, the first layer of the ribbon extractor is a closed loop of alternating surgery checks (which are further connected to check qubits in the code) and ancilla data qubits.
The second layer of the extractor is constructed as follows.
For each ancilla data qubit from the first layer, we add one ancilla check qubit (colored orange in Figure S42 ). This orange check will act on the data qubit from the first layer, as well as two adjacent ancilla qubits in the second layer.
Similar to the first layer, the second layer is also a closed loop of alternating ancilla checks and data qubits, connected to the first layer in an almost 1-to-1 fashion.
Once we construct the first two layers, we repeat them for ℓ − 1 \ell-1 ℓ − 1 times such that the ( 2 i + 1 ) (2i+1) ( 2 i + 1 ) -th layer is connected to the 2 i 2i 2 i -th layer in an almost 1-to-1 fashion. Finally, we add one final copy of the first layer as the ( 2 ℓ + 1 ) (2\ell+1) ( 2 ℓ + 1 ) -th layer, and connect it to the 2 ℓ 2\ell 2 ℓ -th layer. This completes the construction of the ribbon extractor [28 ] .
We can calculate the space-cost of ribbon extractors (total number of ancilla data and check qubits) from the parameters of corresponding seed loops. Suppose the chosen seed loop traverses the boundaries of t t t triangles. A boundary of a triangle has L + 1 L+1 L + 1 adjacent plaquettes, and a seed loop traverses t L tL t L plaquettes, t t t of which are corner plaquettes. We will choose the seed loops such that the corner plaquettes are always green or red. As a result, out of the t L tL t L plaquettes traversed t t t of them are blue, and none of them are corners. On the first layer of a ribbon extractor, we therefore have t L + 2 t tL+2t t L + 2 t ancilla check qubits (accounting for the blue and corner wide checks) and t L tL t L ancilla data qubits. On the second layer, we have t L + 2 t tL+2t t L + 2 t ancilla data qubits and t L + 2 t tL+2t t L + 2 t ancilla (orange) check qubits, because each wide check from the first layer needs an orange check qubit acting on its two adjacent data qubits in the second layer. In total, on the first two layers, we need t ( 2 L + 4 ) t(2L+4) t ( 2 L + 4 ) ancilla check qubits and t ( 2 L + 2 ) t(2L+2) t ( 2 L + 2 ) ancilla data qubits. We repeat these two layers for ℓ − 1 \ell-1 ℓ − 1 times, and finish with another copy of the first layer. As a result, the total number of ancilla qubits in a ribbon extractor is
Space cost of ribbon extractor = [ t ( 2 L + 4 ) + t ( 2 L + 2 ) ] ⋅ ℓ + t ( 2 L + 2 ) = t ( ( 4 L + 6 ) ℓ + 2 L + 2 ) . (40) \text{Space cost of ribbon extractor}=[t(2L+4)+t(2L+2)]\cdot\ell+t(2L+2)=t((4L+6)\ell+2L+2). \tag*{(40)} Space cost of ribbon extractor = [ t ( 2 L + 4 ) + t ( 2 L + 2 )] ⋅ ℓ + t ( 2 L + 2 ) = t (( 4 L + 6 ) ℓ + 2 L + 2 ) . (40)
As we will discuss in Section S6C, for a code of distance d d d we will choose ℓ = ⌈ d / 2 ⌉ − 1 \ell=\lceil d/2\rceil-1 ℓ = ⌈ d /2 ⌉ − 1 to ensure that the surgery procedure has phenomenological fault distance d d d . With this choice, the above equation simplifies to
Space cost of ribbon extractor = { t ( ( 2 L + 3 ) ( d − 1 ) − 1 ) for d even , t ( ( 2 L + 3 ) d − 1 ) for d odd . (41) \text{Space cost of ribbon extractor}=
\begin{cases}
t((2L+3)(d-1)-1) & \text{for } d\text{ even},\\
t((2L+3)d-1) & \text{for } d\text{ odd}.
\end{cases} \tag*{(41)} Space cost of ribbon extractor = { t (( 2 L + 3 ) ( d − 1 ) − 1 ) t (( 2 L + 3 ) d − 1 ) for d even , for d odd . (41)
We see that the leading factor is 2 t L d 2tLd 2 t L d . The example code we used for Figure S42 has parameters [ 6400 , 104 , 30 ] [6400,104,30] [ 6400 , 104 , 30 ] , with L = 4 L=4 L = 4 , t = 10 t=10 t = 10 and total qubit count 14400. Putting these numbers in, we see that the qubit count of a ribbon extractor is up to 3180, which is roughly 22.1% of that of the code. Choosing L = 3 L=3 L = 3 instead of 4, we get a [ 3600 , 104 , 22 ] [3600,104,22] [ 3600 , 104 , 22 ] code, with total qubit count 8400 and the same seed loop where t = 10 t=10 t = 10 . The associated ribbon extractor uses up to 1880 qubits, which is roughly 22.4% of that of the code. It should be noted that the choice of wide checks is motivated for tilings of L > 3 L>3 L > 3 and as such may be suboptimal for L = 3 L=3 L = 3 , therefore the associated overhead could potentially be reduced.
Logical Measurement via Surgery
Given the ribbon extractor, to measure a logical operator P ‾ C \overline{P}_C P C , we will define a new stabilizer group supported on the code and extractor. We first describe this stabilizer group for measuring an X X X logical operator of any color X ‾ \overline{X} X , the case for Z Z Z logical operators will follow by symmetry. We will return to measuring the product of an X X X and Z Z Z logical later.
Prepare all ancilla data qubits in the surgery gadget in ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ . To measure the X ‾ C 1 \overline{X}_{C_1} X C 1 (color C 1 C_1 C 1 ):
Choose one side of the seed loop. On the first layer of the ribbon extractor, for every surgery check of the other two colors C 2 C_2 C 2 , C 3 C_3 C 3 , the surgery check will have X X X support on the qubits on the chosen side of the seed loop belonging to the associated boundary stabilizer. It will also have X X X support on the (three to four) neighboring ancilla data qubits in the extractor modules. For the surgery check of color C 1 C_1 C 1 , only measure the X X X support on the extractor module (no support on the data qubits of the original code), see Figure S43 (a) for an example of the support for measuring X ‾ B \overline{X}_{B} X B .
Figure S43. Measurement of a blue logical X X X operator, X ‾ B \overline{X}_{B} X B . (a) Surgery checks that are red or green have support on the corresponding data qubits on one side of the seed loop. Blue surgery checks only retain support in the ancilla system. (b) Z Z Z boundary stabilizers are modified to gain support in the surgery ancilla qubits in order to commute with the new surgery checks.
lizers, namely the boundary Z Z Z stabilizers, whose original support will anti-commute with these measurements. To restore commutativity, they will have to gain support on the ancilla data qubits on the first layer, see Figure S43 . They will gain support on a given ancilla data qubit in the first layer if their corresponding neighboring X X X surgery check had been extended into the data qubits of the code.
For subsequent odd layers, the surgery checks (colored red, green or blue) act on adjacent data qubits by X X X . Note that the regular surgery checks have weight 4, while the wide surgery checks have weight 6.
On the even layers of the ribbon extractor, for each orange ancilla check qubit, we define a Z Z Z stabilizer that acts on its adjacent data qubits. These Z Z Z checks have weight 2 or 4, and they commute with the surgery checks defined above.
We now prove the following crucial claim.
Claim 1. The product of all surgery checks (from all odd layers) equals the X X X logical operator of color C 1 C_1 C 1 on the base code (X ‾ C 1 \overline{X}_{C_1} X C 1 ).
Proof. We begin with a few definitions: we say an edge is adjacent to a given face if it is one of the boundary edges of the face, while an edge is incident to a face if it touches one and only one of the vertices of the face. We have chosen a path for the logical operators which is a continuous set of edges, alternating in color (where the color of an edge is defined in the standard way for color codes as an edge incident to two faces of that color). Each edge can be characterized in one of the following two ways:
An edge is adjacent to a single boundary face and is not incident to any other boundary face.
An edge is adjacent to a single boundary face and is incident to one or two other boundary faces.
Without loss of generality, let us assume we want to measure a blue (B B B ) logical X X X operator. We want to argue that by multiplying the surgery checks, of which the red (R R R ) and green (G G G ) colored surgery checks on layer one act on the base code non-trivially, the resulting support will be the support of all the blue edges along the logical path. Let us first show that any qubit belonging to a blue edge will have support. We will work this out case by case among the edges above.
If a blue edge is only adjacent to a single boundary face, that face must be of color R R R or G G G and as such the corresponding surgery check on layer one will have support on this edge. Moreover, since it is not incident to any other boundary face, this support cannot be canceled out by another surgery check.
Similarly to the case above, the support of the edge will have to be measured by the R R R or G G G surgery check to which it is adjacent. Any other face to which this edge is incident must be a blue face (since this is a blue edge). Since the blue surgery checks do not act on the base code, the support on these blue edges cannot be canceled out.
Next, we must show that any qubit along the logical boundary path that does not belong to a B B B edge, that is the endpoint of an R R R and G G G edge, must not have support in the overall measurement. There are two cases for such qubits:
The only boundary stabilizer to which they belong is blue, as such the measurement has no support on such qubits.
The qubit belongs to two boundary stabilizers. Given the qubit lies at the end point of red and green edges, the corresponding boundary stabilizers to which it belongs must be red and green, and the two corresponding surgery checks must cancel out its support.
Therefore we have established that on the data qubits in the base code, the product of all the surgery checks is supported exactly on the blue X X X logical operator. On the ancilla data qubits in the ribbon extractor, we note that every ancilla data qubit is acted on by exactly two surgery checks, whose Pauli action cancels on the qubit. We conclude that the product of all the surgery checks equals the blue X X X logical operator.
:::
Corollary 1. Measurement of the Z Z Z logical of color C 1 C_1 C 1 is identical in construction to that of the X X X logical except that the support of the surgery checks on the code qubits is of Z Z Z -type (however, it remains of X X X -type on the ancilla qubits). As a result, only the X X X boundary stabilizers are now deformed to gain Z Z Z support on the ancilla qubits.
Corollary 2. Measurement of the Y Y Y logical of color C 1 C_1 C 1 is identical in construction to that of the X X X logical except that the support of the surgery checks on the code qubits is of Y Y Y -type (however, it remains of X X X -type on the ancilla qubits). As a result, both the X X X and Z Z Z boundary stabilizers are now deformed to gain Z Z Z support on the ancilla qubits.
In order to measure the product of two logical operators of different types, we combine the technique of measuring each logical X and Z. Namely, the surgery checks will gain X support on one side of the seed loop and Z support on the other (depending on the color), see Figure S44 for an example. The original boundary stabilizers would have to be deformed in a similar manner to guarantee commutativity.
Figure S44. Measurement of X ‾ B Z ‾ R \overline{X}_{B}\overline{Z}_{R} X B Z R . Green surgery checks gain support of X and Z type on the data qubits on respective sides of the seed loop, while red (blue) surgery checks only gain X (Z) support. All surgery checks only have X support on the surgery ancilla qubits.
Corollary 3. In order to measure the product operator X ‾ C 1 Z ‾ C 2 \overline{X}_{C_1}\overline{Z}_{C_2} X C 1 Z C 2 , that is the product of logical X of color C 1 C_1 C 1 and logical Z of color C 2 C_2 C 2 , all surgery checks on layer one of colors C 2 C_2 C 2 and C 3 C_3 C 3 will have X support on the data qubits on one side of the seed loop, while surgery checks on layer one of color C 1 C_1 C 1 and C 3 C_3 C 3 will have Z support on the data qubits on the other side of the seed loop. All surgery checks will have their associated X support on the ancilla data qubits in the extractor. The original X and Z boundary stabilizers of the code will gain Z support on the ancilla qubits following the same procedure as the measurement of X ‾ C 1 \overline{X}_{C_1} X C 1 and Z ‾ C 2 \overline{Z}_{C_2} Z C 2 individually.
Fault Tolerance
Given the extractor system and the deformed codes, we now show that the surgery protocol is fault-tolerant. Specifically, we will show that the deformed codes have the same distance d d d as the original code. Following standard arguments [22 , 23 ] , this implies that the surgery protocol has phenomenological fault distance d d d .
In order to prove that the deformed codes have sufficient distances, one must show that the original logical operators of the code cannot be weight-reduced by multiplying by the new stabilizers of the deformed code or any new gauge logical operators. We will begin by arguing that no new gauge logical qubits are introduced by the ribbon extractor before arguing that the new stabilizers of the code cannot reduce the weight of a logical operator to be below that of the distance of the original code.
Claim 2. The ribbon extractor measures a target logical operator P P P in the base code without introducing any other new logical qubits.
Proof. From our previous calculations around Equation (40) , we can count the number of new data qubits and stabilizers introduced by the ribbon extractor. There are ℓ + 1 \ell+1 ℓ + 1 odd layers, each with t L tL t L new data qubits and t L tL t L new stabilizers, and ℓ \ell ℓ even layers, each with t ( L + 2 ) t(L+2) t ( L + 2 ) new data qubits and t ( L + 2 ) t(L+2) t ( L + 2 ) new stabilizers. It is straightforward to verify the following claim of independence: there is no product of deformed code stabilizers, with a non-trivial combination of extractor stabilizers, that results in identity. Therefore, the number of logical degrees of freedom in the overall system cannot be more than k k k .
However, this is not quite the end of the story. As when we take the product of all stabilizers whose support is of X X X type in the ribbon extractor, the resulting support is the logical operator P P P from the base code to be measured, therefore we explicitly have eliminated one of the logical degrees of freedom of the original code! Equivalently, the rank of stabilizers should have increased by one more than the number of new stabilizers. We can observe this directly. In the original code, the Z Z Z stabilizers are redundant in the sense that the product of all blue and red/green stabilizers give identity. However, in the deformed code, the product of all blue and red/green (original and deformed) stabilizers equals the operator that is all Z Z Z on the data qubits of the first layer of the ribbon extractor [29 ] . Therefore, this degree of redundancy is removed as we deform the code and we conclude that the deformed code has k − 1 k-1 k − 1 logical degrees of freedom.
Claim 3. Given a thickening of at least d / 2 d/2 d /2 layers, the distance of the deformed code through surgery measurement remains distance d d d .
Proof. Suppose we are given some logical operator Q Q Q of weight w w w in the base code, we would like to show that the weight of this operator cannot be reduced to be less than the distance d d d by multiplying by the new surgery stabilizers of the code.
Let us first consider the case when the ancilla system is added to measure a blue (B B B ) logical X X X . Given none of the newly introduced Z Z Z stabilizers in the ribbon extractor are supported on the base code, they cannot contribute to a distance reduction of the Z Z Z logical operator. Moreover, multiplying by any deformed Z Z Z stabilizer will only end up increasing the support of the logical Z Z Z operator, as such any logical Z Z Z cannot see their distance reduced by a ribbon extractor built for measuring a logical X X X operator.
We will consider the set of neighboring R l R_l R l , G c G_c G c , R r R_r R r surgery stabilizers where G c G_c G c is the corner stabilizer, and R l R_l R l , R r R_r R r are the left- and right-neighboring surgery stabilizers of G c G_c G c (associated with the neighboring boundary stabilizers). Without loss of generality our arguments will also apply for G R G GRG GR G faces. We will consider different scenarios of multiplying by the new surgery stabilizers and how support of the logical operator is deformed on the base code plus the first two layers of the ancilla graph.
Consider multiplying by only the G c G_c G c surgery stabilizers, that is the one associated with a corner stabilizer of the original code. The surgery stabilizer can have support of weight-2, 4, or 6 on the base code. Note the support of G c G_c G c will be weight-4 on the ancilla code.
Weight-2 support on base code: the weight of Q G c QG_c Q G c must increase by at least 2 when compared to Q Q Q , as the support on the base code could be canceled but 4 qubits of support is gained in the ancilla system.
Weight-4 support on base code: the weight of Q G c QG_c Q G c must be at least as large as Q Q Q .
Weight-6 support on base code: If the overlap between G c G_c G c and Q Q Q is at most 5, then the weight of Q G c QG_c Q G c must be at least as large as Q Q Q . If the overlap is 6, then indeed the weight of Q G c QG_c Q G c is decreased by 2, however in such a case since the overlap of Q Q Q with G c G_c G c is 6, it means that the overlap of Q Q Q with the associated logical X X X stabilizer of the code is 6, as such by multiplying by that stabilizer we can find an equivalent logical operator of weight w − 4 w-4 w − 4 , thus in such a scenario the weight w w w must be lower bounded by d + 4 d+4 d + 4 . Therefore reducing the weight of Q G c QG_c Q G c by 2 still bounds the weight of such an operator to be at least of weight d + 2 d+2 d + 2 .
Therefore, multiplying Q Q Q by the surgery stabilizer G c G_c G c associated with a corner stabilizer either cannot reduce the weight of Q Q Q or bounds the product of Q G c QG_c Q G c to be of weight at least d + 2 d+2 d + 2 .
Now we will consider the multiplication by a single R R R surgery stabilizer, without loss of generality assume R l R_l R l . Since R l R_l R l has weight-3 support on the base code and weight-3 in the ancilla code, if the overlap of Q Q Q and R l R_l R l is at most 2, then the weight of Q R l QR_l Q R l will increase by 2. If their overlap is three, then the weight of Q R l QR_l Q R l remains w w w , however in such a scenario Q Q Q must have at least weight-4 overlap with the associated R R R boundary stabilizer of the base code, as such the weight of Q Q Q would be at least d + 2 d+2 d + 2 in such a scenario (as multiplying by that boundary stabilizer could reduce the weight of the chosen representative Q Q Q by 2). Therefore, Q R l QR_l Q R l will be of weight at least w w w or d + 2 d+2 d + 2 .
Now let us consider multiplying Q Q Q by R l G c R_lG_c R l G c . Again there are three scenarios to consider based on the support of G c G_c G c on the base code being either 2, 4, or 6. Note the support of R l G c R_lG_c R l G c will be weight-5 on the ancilla code.
R l G c R_lG_c R l G c weight-3 support on base code: the weight of Q R l G c QR_lG_c Q R l G c must increase by at least 2 when compared to Q Q Q , as the support on the base code could be canceled but 5 qubits of support is gained in the ancilla system.
R l G c R_lG_c R l G c weight-5 support on base code: the weight of Q R l G c QR_lG_c Q R l G c must be at least as large as Q Q Q .
R l G c R_lG_c R l G c weight-7 support on base code: If the overlap between R l G c R_lG_c R l G c and Q Q Q is at most 6, then the weight of Q R l G c QR_lG_c Q R l G c must be at least as large as Q Q Q . If the overlap is 7, then indeed the weight of Q R l G c QR_lG_c Q R l G c is decreased by 2, however in such a case since the overlap of Q Q Q with G c G_c G c is at least 5, it means that the overlap of Q Q Q with the associated
original G G G X X X stabilizer of the code is 6, as such by multiplying by that stabilizer we can find an equivalent logical operator of weight w − 4 w-4 w − 4 , thus in such a scenario the weight w w w must be lower bounded by d + 4 d+4 d + 4 . Therefore reducing the weight of Q R l G c QR_lG_c Q R l G c by 2 still bounds the weight of such an operator to be at least of weight d + 2 d+2 d + 2 .
Finally, let us consider multiplying Q Q Q by R l G c R r R_lG_cR_r R l G c R r . Again there are three scenarios to consider based on the support of G c G_c G c on the base code. Note the support of R l G c R r R_lG_cR_r R l G c R r will be weight-6 on the ancilla code.
R l G c R r R_lG_cR_r R l G c R r weight-8 support on base code: If the overlap between R l G c R r R_lG_cR_r R l G c R r and Q Q Q is at most 7, then the weight of Q R l G c R r QR_lG_cR_r Q R l G c R r must be at least as large as Q Q Q . If the overlap is 8, then indeed the weight of Q R l G c R r QR_lG_cR_r Q R l G c R r is decreased by 2, however in such a case the weight-8 overlap is a result of 4 edges of the same color whose overall endpoint would be faces of the same color that could be connected via two other edges of the same color in the base code. As a result, in this case we can lower bound the weight w w w of Q Q Q by d + 4 d+4 d + 4 . Therefore reducing the weight of Q R l G c R r QR_lG_cR_r Q R l G c R r by 2 still bounds the weight of such an operator to be at least of weight d + 2 d+2 d + 2 .
Therefore we can conclude that multiplying Q Q Q by any combination of R l R_l R l , G c G_c G c , R r R_r R r is lower bounded by the weight w w w of Q Q Q or d + 2 d+2 d + 2 , and the case of d + 2 d+2 d + 2 is due to the existence of a local deformation of the representative Q Q Q that bounds the weight away from the distance d d d of the code. These bounds will apply for any sequence of R l G c R r R_lG_cR_r R l G c R r or G l R c G r G_lR_cG_r G l R c G r ancilla checks between blue ancilla checks which we have chosen to be weight-4 and are only supported on the ancilla code, therefore they cannot result in a reduction of weight. This concludes that the first layer of checks cannot reduce the weight of any other logical operator Q Q Q when measuring a blue logical X X X .
We now consider the surgery checks associated with measuring a red (R R R ) logical X X X . Here, the B B B and G G G surgery checks will be extended into the base code following the procedure previously laid out. We would again like to consider another logical operator Q Q Q in the base code and show that by multiplying by the new surgery checks we cannot reduce the weight of Q Q Q to be below the distance of the code.
Consider first neighboring B b B_b B b and G b G_b G b surgery checks that do not correspond to those associated with a corner stabilizer (we label them with the subscript b b b for bulk). Since G b G_b G b has weight-3 support on the base code and weight-3 in the ancilla code, if the overlap of Q Q Q and G b G_b G b is at most 2, then the weight of Q G b QG_b Q G b will increase by 2. If their overlap is three, then the weight of Q G b QG_b Q G b remains w w w . The exact same argument holds true for multiplying by only B b B_b B b , however Q B b QB_b Q B b would have an additional qubit of support since it has weight-4 in the ancilla, thus Q B b QB_b Q B b will be of weight at least w + 1 w+1 w + 1 . Finally, since B b G b B_bG_b B b G b has weight-5 support in the ancilla and only weight-4 support on the base code, Q B b G b QB_bG_b Q B b G b will always be at least of weight w + 1 w+1 w + 1 .
Finally, as argued previously, multiplying by only a surgery check G c G_c G c associated with a corner stabilizer either cannot reduce the weight of Q Q Q or bounds the product of Q G c QG_c Q G c to be of weight at least d + 2 d+2 d + 2 (due to the possibility of local weight reduction from the associated corner stabilizer).
Thus, considering the potential multiplication of different combinations of B b B_b B b , G b G_b G b pairs and G c G_c G c surgery checks, individually none of them can cause the distance to be reduced below the distance d d d . The final piece is potentially multiplying by red surgery checks that only have support on the ancilla system. Multiplying by red surgery checks can only reduce the weight if the red surgery check is weight-3 and both neighboring blue and green surgery checks have also multiplied the logical operator Q Q Q (they have to be blue and green because the only weight-3 red surgery checks are those associated with non-corner stabilizers). However, as we have previously seen, if Q Q Q is multiplied by any B b B_b B b surgery check then the weight of such an operator is guaranteed to have already increased by 1, thus the potential decrease in weight from multiplying by red surgery check is harmless.
As a final part to prove the distance preservation, we must argue that the weight obtained on the second layer of ancilla checks cannot be reduced without gaining some additional support in the ancilla. Indeed, any support of a representative on the second layer of ancilla qubits can be multiplied with the associated surgery check of X X X -type on the third layer and move its support up to the fourth layer. This process can be repeated up until the point of multiplying by the top layer of surgery X X X stabilizers, however support will be also gained at the endpoints of chains of surgery checks, and that support will be as large as the number of X X X stabilizer layers in the ancilla system. Therefore, to guarantee that the distance of a representative is lower bounded by d d d , we need the height of the number of X X X stabilizers in the ancilla system to be d / 2 d/2 d /2 since the support of d / 2 d/2 d /2 is gained at both endpoints.
We have argued that the ribbon extractor for measuring a blue or red logical X X X operator cannot reduce the distance of the other logical operators in the base code. By symmetry between green and red colors, measuring a green logical X X X will also not cause a distance reduction. In addition, due to the symmetry of the construction, measurement of a logical Z Z Z operator using the ribbon extractor will also not result in a distance reduction. Therefore, the only remaining case to be considered would be the measurement of a product of logical X X X and Z Z Z operators of different color. However, as presented in Corollary 3, the construction of the ribbon extractor for the measurement of the product operator X ˉ C 1 Z ˉ C 2 \bar{X}_{C_1}\bar{Z}_{C_2} X ˉ C 1 Z ˉ C 2 will have surgery checks whose support on the base code will mirror that of the individual logical X X X and Z Z Z constructions, only jointly. This implies by the same arguments previously outlined, that the remaining logical X X X and Z Z Z representatives of the base code cannot have their distance reduced since if such a reduction existed it would imply existence in the ribbon extractors for the individual measurements of logical X X X or Z Z Z .
Figure S45. Reduction of support of a blue X X X string on the base code. (a) The weight-8 X X X string (faded and dashed) on the base code can be reduced to a weight-6 operator on the ancilla qubits (square) of the surgery gadgets by multiplying by the ancilla checks. (b) The original weight-8 X X X string (faded and dashed) on the base code has an equivalent representation as a weight-4 X X X string (solid circle) as their endpoints are the same. The equivalence can be seen under multiplication by the three corresponding boundary stabilizers.
In the previous subsections we have described measuring logical Pauli operators of the modular hyperbolic memory. These forms of measurement can be used in a model of measurement-based logical computation, however the computation would have to be facilitated with the introduction of resource states to complete universal computation. This could be achieved by preparing ancillary resource states in external codes, via techniques such as magic state cultivation or distillation. In addition, it may be advantageous to have an external compute region, which would be a set of logical qubits encoded in some other code that is specifically designed for the purpose of facilitating computation. Regardless of which of the above models are used to complete the universal set of operations required to run a quantum algorithm, we require a means to do joint logical Pauli measurements between logical qubits in the hyperbolic code and some external code. We can re-purpose the ribbon extractor for this task, using the top boundary of the ribbon extractor to couple to a logical qubit of the external code, thereby using the extractor to jointly measure the product of logical Paulis between the hyperbolic memory, P ‾ m \overline{P}_m P m , and the compute code P ‾ c \overline{P}_c P c .
We provide an example of such a design in Figure S46 , where the bottom boundary of the ribbon extractor is coupled to the hyperbolic memory as previously discussed. However, we now couple the top boundary to another code block, in the presented example it is a surface code. The connectivity at the top boundary would then be used to extend the surgery checks onto the support of a logical operator (in the example it would be X ‾ c \overline{X}_c X c ) of the surface code given by connected modules. Therefore, the product of all of the surgery checks would result in the measurement of P ‾ m X ‾ c \overline{P}_m\overline{X}_c P m X c .
Figure S46. Ribbon extractor to measure the product P ‾ m X ‾ c \overline{P}_m\overline{X}_c P m X c of a logical Pauli operator P ‾ m \overline{P}_m P m of the hyperbolic code and the logical X ‾ c \overline{X}_c X c of the surface code. The ribbon extractor is formed from connected modules (cyan) whose bottom boundary is connected to the hyperbolic code, while the top boundary is connected to a surface code that itself is formed from a connected set of modules (orange). The ribbon extractor has a total of 2 ℓ + 1 2\ell+1 2 ℓ + 1 layers, with one extra layer at top boundary used to connect to the surface code.
Automorphism Circuits
Code automorphisms can be used to implement certain logical Clifford gates in modular hyperbolic codes. A code automorphism is a permutation of the physical qubits that maps the stabilizer group onto itself.
For modular hyperbolic color codes, the global symmetries of the base tiling correspond to code automorphisms (since the stabilizer generators are defined from the faces of the tiling, and the codes are self-dual CSS codes). The symmetry group of the base tiling maps the set of generators of the stabilizer group to itself (rather than just mapping the stabilizer group to itself) so is in general a subgroup of the full automorphism group. However, for all but the smallest tilings, we find that the tiling’s symmetry group is isomorphic to the group of code automorphisms.
The modular hyperbolic surface codes are not self dual, and recall that the basis of a stabilizer (X or Z) is determined by the color of its corresponding face in the tiling (red or blue). A global isometry that is a symmetry of the base tiling either preserves the face coloring, in which case it directly corresponds to a code automorphism, or swaps the red and blue face colors, in which case it is a code automorphism up to a global application of a Hadamard gate on each physical qubit. The specific subgroup of the automorphism group that we propose to implement does preserve face colors (and therefore does not require a layer of Hadamards).
Automorphism Circuits for Color Codes
We first explain our automorphism circuits using the modular hyperbolic color codes. The hyperbolic surface codes use a similar approach with quadrilateral groups instead of triangle groups. We use a quadrilateral module partition of the modular hyperbolic color codes (Figure S47 and right panel of Figure S7 ), in which adjacent triangles of T △ \mathcal{T}^{\triangle} T △ are paired across a chosen edge color (green, a b b b mirror, in Figure S47 ) into left cosets g ⟨ b ⟩ g\langle b\rangle g ⟨ b ⟩ . Because every generator a , b , c a,b,c a , b , c reverses orientation, each quadrilateral module { g , g b } \{g,gb\} { g , g b } contains one triangle g ∈ G + = Δ + ( r , s , t ) / Γ g\in G^{+}=\Delta^{+}(r,s,t)/\Gamma g ∈ G + = Δ + ( r , s , t ) /Γ of even word length and one triangle g b gb g b of odd word length. Choosing the even-length triangle g ∈ G + g \in G^{+} g ∈ G + as the reference triangle of each module labels the modules by the elements of G + G^{+} G + and fixes a consistent internal 2D coordinate system ( g , x , y ) (g,x,y) ( g , x , y ) across all modules (the compass in the inset of Figure S47 ). As explained in Section S1 G, an automorphism A h A_h A h defined by left multiplication by h ∈ G + h \in G^{+} h ∈ G + maps the reference triangle g g g of module g g g to the reference triangle h g ∈ G + hg \in G^{+} h g ∈ G + of module h g hg h g , and maps g b gb g b to ( h g ) b (hg)b ( h g ) b . Applying A h A_h A h therefore maps ( g , x , y ) (g,x,y) ( g , x , y ) to ( h g , x , y ) (hg,x,y) ( h g , x , y ) , permuting modules while preserving the internal rotation and orientation of every module.
Figure S47. Quadrilateral (K = 2 K=2 K = 2 ) modules of the 8.8.8-32 color code, labeled by the orientation-preserving subgroup G + = Δ + ( 4 , 4 , 4 ) / Γ G^{+}=\Delta^{+}(4,4,4)/\Gamma G + = Δ + ( 4 , 4 , 4 ) /Γ . a The base triangular tiling T △ \mathcal{T}^{\triangle} T △ , with each triangle labeled by a word in the reflections a a a , b b b , c c c that reaches it from the identity triangle e e e (purple), and each edge colored by its mirror (a a a red, b b b green, c c c blue). Boundaries labeled with the same letter A–L are identified. b The 16 quadrilateral modules, formed by pairing adjacent triangles across their green edge (b b b mirror) into left cosets g ⟨ b ⟩ g\langle b\rangle g ⟨ b ⟩ . Because b b b reverses orientation, each module contains exactly one even-length word g ∈ G + g\in G^{+} g ∈ G + (circled in green, in the middle of each module), which labels the module. Left multiplication by any h ∈ G + h\in G^{+} h ∈ G + maps g ↦ h g g\mapsto hg g ↦ h g and g b ↦ ( h g ) b gb\mapsto(hg)b g b ↦ ( h g ) b , permuting the 16 modules while preserving the internal coordinate system (compass, inset) of every module. c The same partition on the fine-grained semi-hyperbolic code, with data qubits (filled circles), ancilla qubits (open circles), and inter-module seams (dashed lines).
In Figure S48 we show how such an automorphism can be implemented with physical circuits. Figure S48 shows the local structure of a circuit on an L = 4 L = 4 L = 4 modular hyperbolic color code that uses an additional seam of inter-module couplers on the east and west boundary of the module to implement one step of one such permutation. Repeating this circuit for L = 4 L = 4 L = 4 steps completes the permutation. Figure S48 shows a circuit that instead uses the north and south boundaries of the modules to implement a permutation of the modules. Since each SWAP gate swaps a data qubit and an ancilla qubit, we can use the standard identity
Figure S48. Examples of circuits that implement a permutation of the modules that preserves their internal rotation and orientation. We can use these circuits to implement automorphisms in modular hyperbolic codes. a , By adding additional seams (inter-module couplers) on the east and west boundary of each module we can use SWAP gates to implement one such permutation. The four layers of gates shown in the figure implement one step of the automorphism circuit (repeating this step L L L times completes the automorphism, and in this example L = 4 L = 4 L = 4 ). b , By adding additional seams on the north and south boundaries we can implement a different automorphism. Here the three layers of gates implement one step of the automorphism circuit, and again repeating it L = 4 L = 4 L = 4 times completes the automorphism. c , Using each of these two circuits to implement one of the two generators of the automorphism group △ + ( r , s , t ) / Γ \triangle^{+}(r,s,t)/\Gamma △ + ( r , s , t ) /Γ , we can implement the full automorphism group using fixed connectivity. The connectivity required uses two seams on each side of the module. One seam is used for automorphisms (connectivity defined by left multiplication) and the other for syndrome extraction (connectivity defined by right multiplication). The overall connectivity of the modules then corresponds to the union of the edge sets in a Left Cayley graph and Right Cayley graph. One node (module) of this vertex-transitive graph is shown in c , where each arrow represents a seam of inter-module couplers leaving the edge and connecting the same pair of modules.
∣ 0 ⟩ ∣ ψ ⟩ → SWAP ∣ ψ ⟩ ∣ 0 ⟩ = ∣ 0 ⟩ ∣ ψ ⟩ → CNOT 1 → 2 CNOT 2 → 1 ∣ ψ ⟩ ∣ 0 ⟩ \lvert0\rangle\lvert\psi\rangle\xrightarrow{\operatorname{SWAP}} \lvert\psi\rangle\lvert0\rangle
=
\lvert0\rangle\lvert\psi\rangle\xrightarrow{\operatorname{CNOT}_{1\to2}\operatorname{CNOT}_{2\to1}} \lvert\psi\rangle\lvert0\rangle ∣ 0 ⟩ ∣ ψ ⟩ SWAP ∣ ψ ⟩ ∣ 0 ⟩ = ∣ 0 ⟩ ∣ ψ ⟩ CNOT 1 → 2 CNOT 2 → 1 ∣ ψ ⟩ ∣ 0 ⟩
to implement each SWAP gate with two CNOT gates by initializing the ancilla in ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ . Furthermore, we can ensure fault-tolerance by applying a Z Z Z reset to each qubit in the ∣ 0 ⟩ \lvert0\rangle ∣ 0 ⟩ state between SWAPs, ensuring that a single fault does not propagate to more than one data qubit [30 ] .
To implement the automorphisms corresponding to the full orientation-preserving subgroup △ + ( r , s , t ) / Γ \triangle^{+}(r,s,t)/\Gamma △ + ( r , s , t ) /Γ we need only implement automorphisms A ρ A_{\rho} A ρ and A σ A_{\sigma} A σ corresponding to left multiplication by the generators ρ \rho ρ and σ \sigma σ . For a standard quadrilateral partition of a modular hyperbolic color code, we add a new seam from the north boundary of each module g g g to the south boundary of module ρ g \rho g ρ g . We also add a new seam from the east boundary of each module g g g to the west boundary of module σ g \sigma g σ g . This allows us to use walking circuits with the north/south seams to implement A ρ A_{\rho} A ρ and a walking circuit with the east/west seams to implement A σ A_{\sigma} A σ . Note that the existing inter-module couplers required for the code connectivity (syndrome extraction) instead use right multiplication (i.e. each module g g g is connected to g ρ g\rho g ρ , g ρ − 1 g\rho^{-1} g ρ − 1 , g σ g\sigma g σ and g σ − 1 g\sigma^{-1} g σ − 1 ). Therefore, the overall connectivity of the modular architecture required for syndrome extraction and automorphisms corresponds to that of a superposed left Cayley graph and right Cayley graph, where each module is a node and left and right edges correspond to automorphism and memory seams, respectively (see Figure S48 ).
Automorphism Circuits for Surface Codes
In Figure S49 we show analogous circuits for modular hyperbolic surface codes, capable of implementing automorphisms using either additional inter-module couplers on the east and west boundaries (left panel) or on the north and south boundary (right panel). Let us assume that the quadrilateral tiling has the symmetries of an orientation-preserving quadrilateral group □ + ( r , s , t , u ) / Γ \square^{+}(r,s,t,u)/\Gamma □ + ( r , s , t , u ) /Γ (see Section S1B), i.e. the dual of the quadrilateral tiling is the Cayley graph of □ + ( r , s , t , u ) / Γ \square^{+}(r,s,t,u)/\Gamma □ + ( r , s , t , u ) /Γ . Let us also suppose that we use the rectangular module partition, for which we choose a module as the fundamental domain of □ + ( r , s , t , u ) / Γ \square^{+}(r,s,t,u)/\Gamma □ + ( r , s , t , u ) /Γ and label each module with an element g ∈ □ + ( r , s , t , u ) / Γ g \in\square^{+}(r,s,t,u)/\Gamma g ∈ □ + ( r , s , t , u ) /Γ . It is preferable to implement only two distinct automorphisms so that only one additional seam needs to be added to each module boundary. For example, we can implement a generator A ρ A_{\rho} A ρ (where ρ ∈ □ + ( r , s , t , u ) / Γ \rho\in\square^{+}(r,s,t,u)/\Gamma ρ ∈ □ + ( r , s , t , u ) /Γ ) using the east-west automorphism circuit and A σ A_{\sigma} A σ (where σ ∈ □ + ( r , s , t , u ) / Γ \sigma\in\square^{+}(r,s,t,u)/\Gamma σ ∈ □ + ( r , s , t , u ) /Γ ) using the north-south automorphism circuit. However note that, unlike the triangle groups, the quadrilateral groups are not necessarily two-generated (in general they require three generators ρ \rho ρ , σ \sigma σ and τ \tau τ , see Section S1B), and so ρ \rho ρ and σ \sigma σ alone in general generate a subgroup of □ + ( r , s , t , u ) / Γ \square^{+}(r,s,t,u)/\Gamma □ + ( r , s , t , u ) /Γ .
Figure S49. Circuits for implementing automorphisms in a modular hyperbolic surface code, using a rectangular partition of an L = 5 L = 5 L = 5 modular hyperbolic surface code as an example. Left: One step of an “east-west” automorphism circuit that uses additional seams on the east and west boundaries of the module to implement a permutation of the modules. Each step of the circuit consists of three layers, and implementing the full automorphism requires repeating this step 2 L = 10 2L = 10 2 L = 10 times. Right: One step of a “north-south” automorphism circuit that uses additional seams on the north and south boundaries of the module to implement a permutation of the modules. Each step of the circuit requires three layers (shown) and repeating this step L = 5 L = 5 L = 5 times completes the permutation.
However, in practice we find that many quadrilateral groups □ + ( r , s , t , u ) / Γ \square^{+}(r,s,t,u)/\Gamma □ + ( r , s , t , u ) /Γ are in fact two-generated, and so just the east-west and north-south circuits alone are enough to generate the full group.
Stabilizer Dislocation and Logical Error Rates
While the automorphism circuits preserve the code distance (since errors cannot propagate between data qubits), we expect their logical error rates (LERs) to be higher than that of syndrome extraction alone (idling). One reason that the LER can increase is that only a subset of the stabilizers can continue to be measured while the automorphism is being implemented. Concretely, between two of the L L L consecutive steps of the automorphism circuit, we can continue to measure the stabilizers that were contained fully within a module (before the automorphism circuit was implemented). Each of these stabilizer measurements can be compared to a prior measurement of the same stabilizer to form a detector. However, some of the stabilizer generators become dislocated during the automorphism circuit (marked with red squares in Figure S50 ). These dislocated stabilizer generators can only be measured again after all L L L steps of the automorphism circuit have been completed. While we have not yet simulated the full automorphism circuits, we have simulated modified memory experiments that turn off the stabilizers on the boundary of each module for a number of cycles, as a simple way to model the impact of stabilizer dislocation. As is shown in Figure S51 , turning off the boundary stabilizers for a few rounds only leads to a modest increase in logical error rate (< 10 × <10\times < 10 × increase when turning off boundary stabilizers for 5 rounds). We leave further optimization and full simulation of the automorphisms to future work. In particular, we expect that the use of time-dynamic circuits [31 , 32 , 33 , 34 ] may lead to reduced circuit depth relative to the SWAP-gate-based circuits we have presented, as was demonstrated with the walking circuits for the Euclidean surface code in [31 ] .
Figure S50. An illustration of the stabilizer structure within a module for each step of an automorphism circuit, for an L = 4 L=4 L = 4 modular hyperbolic color code with a quadrilateral module partition. Each step of the circuit (Figure S48 ) moves the quantum information up by one plaquette within the module. In this example we show each of the L = 4 L=4 L = 4 steps of the automorphism circuit that uses seams on the north and south boundaries. Some of the stabilizers can still be measured between consecutive steps of the automorphism circuit, however some of the stabilizer generators become dislocated . A stabilizer generator is dislocated if the data qubits in its support are no longer adjacent to the necessary measure qubits using the fixed connectivity of the device (and therefore cannot be measured). In each step of the automorphism circuit we have annotated the plaquettes supporting dislocated stabilizer generators with a red square, whereas the plaquettes supporting stabilizers that can be measured using device connectivity within the time step are marked with a green square. Each plaquette is given the color of the corresponding pair of X X X and Z Z Z stabilizers it supports (i.e. the colors move with the quantum information) and plaquettes that support qubits spanning two dislocated stabilizers are bicolored (for each dislocated stabilizer generator within the plaquette, we color that portion of the plaquette with the stabilizer’s color). Data qubits are not explicitly drawn but are at the vertices of the hexagonal grid.
Figure S51. Simulations of a distance 20 modular hyperbolic surface code derived from a { 4 , 6 } \{4,6\} { 4 , 6 } regular tiling with 48 faces, L = 5 L = 5 L = 5 fine-graining and a square module partition. We use a modular SI1000 noise model with p = 0.1 % p = 0.1\% p = 0.1% and p s e a m = 1 % p_{\mathrm{seam}} = 1\% p seam = 1% . Each circuit is 100 rounds and consists of alternating between n u m g a p \mathit{num}_{\mathrm{gap}} num gap cycles of syndrome extraction where stabilizers on the module boundary are not measured, and n u m f u l l \mathit{num}_{\mathrm{full}} num full cycles of full syndrome extraction. Here full syndrome extraction corresponds to measuring the weight-six stabilizers at the corners of the modules once every three cycles, and measuring all other stabilizers (including those on the sides of the modules) every cycle.
In order to reduce the overall boundary connectivity of the architecture when a surgery ancilla system is added, we can split some of the quadrilateral modules each into two triangular modules. This allows us to use the boundary of the triangular modules (corresponding to the interior of the quadrilateral module it was derived from) as an access point for the ribbon extractor, without increasing the overall boundary connectivity of the architecture. The automorphism circuit can be adapted to this non-uniform partition, as shown in Figure S52 .
Figure S52. We can use a non-uniform module partition that uses a mixture of quadrilateral and triangular modules in a modular hyperbolic code. This can be useful for reducing the total qubit connectivity degree while implementing both automorphisms and surgery. For example, we can choose a representative of a logical operator that cuts through the middle of quadrilateral modules, and then we can split these modules into triangular modules. In this figure we show how the automorphism circuits of Figure S48 can be generalized to handle such a non-uniform partition where some quadrilateral modules have been split into a pair of triangular modules.
Module Frames and Complements of the Module Subgroup
The automorphism circuits described above rely on each module being labeled by an element of a subgroup of G G G , such that implementing an automorphism corresponds to left multiplication by an element of the same group. This ensures that the automorphism corresponds to a permutation of the modules that leaves the internal coordinates ( x , y ) (x,y) ( x , y ) of each module fixed, which is a requirement of the walking circuits. This property is guaranteed to hold for the quadrilateral (K = 2 K=2 K = 2 ) module partition on orientable surfaces, where each module is labeled with an element of the orientation-preserving subgroup G + G^+ G + . In general, however, it is not guaranteed that a module partitioning scheme will admit a suitable labeling of each module by an element of a subgroup. In particular, in this section we will focus our attention on the octagon (K = 8 K=8 K = 8 ) module partition, where each module is a left coset of the order-eight dihedral subgroup g ⟨ b , c ⟩ ≅ D 4 ≤ G g\langle b,c\rangle\cong D_4\leq G g ⟨ b , c ⟩ ≅ D 4 ≤ G . If we were to attempt to implement automorphisms as left multiplication by elements of G + G^+ G + , for example, this would require implementing the automorphism g → σ g g\to\sigma g g → σ g . However, σ : = b c ∈ G + \sigma:=bc\in G^+ σ := b c ∈ G + rotates the identity octagon module around its center, which does not preserve its internal coordinate system and cannot be implemented using our walking circuits.
In this section we will show that, even with octagon module partitions (or any partition into cosets), it can often still be possible to implement automorphisms using walking circuits. As we will show, the requirement is that we can find a subgroup Λ ≤ G \Lambda\leq G Λ ≤ G such that each module contains exactly one element of Λ \Lambda Λ , and which is used to define its internal coordinate system. The implementable automorphisms are then left multiplication by elements of Λ \Lambda Λ . Equivalently, for a module partition defined by left cosets of a subgroup D ≤ G D\leq G D ≤ G (e.g., ∣ D ∣ = 2 |D|=2 ∣ D ∣ = 2 for quadrilaterals, or ∣ D ∣ = 8 |D|=8 ∣ D ∣ = 8 for octagons) this corresponds to finding a subgroup complement Λ \Lambda Λ of D D D in G G G , by definition satisfying:
Λ ∩ D = { e } , Λ D = G . (42) \Lambda\cap D=\{e\},\qquad\Lambda D=G. \tag*{(42)} Λ ∩ D = { e } , Λ D = G . (42)
We will further show that we can find complements Λ \Lambda Λ for octagon partitions of several of the most promising modular hyperbolic color codes considered in this work.
We will explain this condition using octagon module partitions as an example, following Figure S53 , but note that the same condition holds for any partition into left cosets. Let us first assume that Λ ⊆ G \Lambda\subseteq G Λ ⊆ G is just a subset of the elements of G G G , such that each module g D gD g D (D = ⟨ b , c ⟩ ≅ D 4 D = \langle b,c\rangle\cong D_4 D = ⟨ b , c ⟩ ≅ D 4 ) contains exactly one triangle corresponding to an element of Λ \Lambda Λ . We will refer to the triangle in a module corresponding to an element of Λ \Lambda Λ as the module’s frame . We further label each triangle in a module by its slot d ∈ D d \in D d ∈ D , where by definition the module’s frame is assigned the slot e e e , and the remaining slots are determined by right multiplication by the generators b b b , c c c of D = ⟨ b , c ⟩ D = \langle b,c\rangle D = ⟨ b , c ⟩ . The frame alone (along with the generator labels { a , b , c } \{a,b,c\} { a , b , c } of its three sides) is sufficient to define the module’s internal coordinate system. The inset of Figure S53 shows an octagon module with each of its triangles labeled by its slot d ∈ D d \in D d ∈ D , and with the compass signifying its internal coordinate system. Note that we normalize Λ \Lambda Λ such that it contains the identity element e ∈ Λ e \in\Lambda e ∈ Λ corresponding to the frame of the identity module.
Figure S53. Octagon (K = 8 K=8 K = 8 ) modules of the 8.8.8-32 color code and a complement of the module subgroup (Section S7 E), with panels as in Figure S47 . a The base triangular tiling T △ T^{\triangle} T △ , labeled as in Figure S47 . b The four octagon modules, which are the left cosets g ⟨ b , c ⟩ g\langle b,c\rangle g ⟨ b , c ⟩ of the order-eight dihedral subgroup D = ⟨ b , c ⟩ ≅ D 4 D=\langle b,c\rangle\cong D_4 D = ⟨ b , c ⟩ ≅ D 4 : the eight triangles meeting at a corner b ∩ c b\cap c b ∩ c , or equivalently the eight triangles of one red octagonal face of T T T (Section S3 A iii). Each triangle is labeled and colored by its slot d ∈ D d\in D d ∈ D , and the word at the center of each module (circled in red) is its element of the complement Λ \Lambda Λ . Of the 12 complements of D D D for this code we show Λ = ⟨ ρ ⟩ = { e , a b , a b a b , b a } ≅ Z 4 \Lambda=\langle\rho\rangle=\{e,ab,abab,ba\}\cong\mathbb{Z}_4 Λ = ⟨ ρ ⟩ = { e , ab , abab , ba } ≅ Z 4 , the cyclic subgroup generated by the rotation ρ = a b \rho=ab ρ = ab , which is both normal (φ ( a ) = b \varphi(a)=b φ ( a ) = b ) and orientation preserving. c The corresponding partition of the fine-grained color code tiling T T T for L = 2 L=2 L = 2 , in which each module is the set of qubits residing within one red octagonal face. Inset A single octagon module with its eight slots and the internal coordinate system (compass) shared by all modules, together with the corresponding fine-grained planar module for L = 2 L=2 L = 2 , including data qubits (filled circles), ancilla qubits (hollow circles) and couplers (lines).
Notice that every triangle g ∈ G g \in G g ∈ G factorizes as
g = λ d ( λ ∈ Λ , d ∈ D ) , (43) g = \lambda d \qquad(\lambda\in\Lambda,\ d \in D), \tag*{(43)} g = λ d ( λ ∈ Λ , d ∈ D ) , (43)
where λ ∈ Λ \lambda\in\Lambda λ ∈ Λ labels the module and d ∈ D d \in D d ∈ D is the slot of g g g in the module. As an example, see the example of the octagon module partition of the 8.8.8-32 code in Figure S53 , with triangles labeled by their group element g ∈ G g \in G g ∈ G in Figure S53 and factorized into their frame λ ∈ Λ \lambda\in\Lambda λ ∈ Λ and slot d ∈ D d \in D d ∈ D in Figure S53 .
Now consider left multiplication by some group element h ∈ G h \in G h ∈ G , corresponding to an automorphism. Our automorphism circuits require that this preserves the internal coordinate system of each module, which corresponds to mapping module frames to module frames. Since e ∈ Λ e \in\Lambda e ∈ Λ , requiring that the identity frame maps to a frame, e → h e ∈ Λ e \to he \in\Lambda e → h e ∈ Λ , implies that the allowable automorphisms must be a subset of Λ \Lambda Λ . Furthermore, if we want every element λ ∈ Λ \lambda\in\Lambda λ ∈ Λ to map frames to frames as an automorphism, this requires that every element λ ∈ Λ \lambda\in\Lambda λ ∈ Λ maps a frame λ ′ ∈ Λ \lambda' \in\Lambda λ ′ ∈ Λ to a frame λ λ ′ ∈ Λ \lambda\lambda' \in\Lambda λ λ ′ ∈ Λ , which is true if and only if Λ \Lambda Λ is closed under multiplication. Therefore a partition into left cosets of D D D admits a full group of ∣ Λ ∣ = ∣ G ∣ / ∣ D ∣ |\Lambda| = |G|/|D| ∣Λ∣ = ∣ G ∣/∣ D ∣ frame-preserving automorphisms A λ : ( λ ′ , x , y ) → ( λ λ ′ , x , y ) \mathcal{A}_{\lambda} : (\lambda',x,y) \to(\lambda\lambda',x,y) A λ : ( λ ′ , x , y ) → ( λ λ ′ , x , y ) if and only if Λ \Lambda Λ is a subgroup complement of D D D in G G G (Equation (42) ).
For quadrilateral modules (D = ⟨ b ⟩ D = \langle b\rangle D = ⟨ b ⟩ ) partitioning an orientable surface, we can always use Λ : = G + \Lambda:= G^+ Λ := G + , which automatically satisfies Equation (42) . Furthermore, G + = ⟨ ρ , σ ⟩ G^+ = \langle\rho,\sigma\rangle G + = ⟨ ρ , σ ⟩ is two-generated, and therefore only requires one additional seam of inter-module couplers at each of the four boundaries of the module (one for each generator and its inverse, see Figure S48 ). For octagon modules (D = ⟨ b , c ⟩ D = \langle b,c\rangle D = ⟨ b , c ⟩ , ∣ D ∣ = 8 |D| = 8 ∣ D ∣ = 8 ) there is no guarantee that a complement Λ \Lambda Λ satisfying Equation (42) will exist for any given tiling, nor that such a complement would be two-generated. However we will now show that two-generated complements often do exist, which we find by a combinatorial search.
Given a group G G G and a module partitioning into left cosets g D gD g D , a naive search for a complement Λ \Lambda Λ might attempt to find the elements of Λ \Lambda Λ by brute force, picking one element from each coset g D gD g D and checking for group closure. However, such a brute-force search would clearly be intractable; after fixing the identity element in the identity module, there remain ∣ D ∣ ∣ Λ ∣ − 1 |D|^{|\Lambda|-1} ∣ D ∣ ∣Λ∣ − 1 sets to try, amounting to 8 49 ≈ 10 44 8^{49} \approx10^{44} 8 49 ≈ 1 0 44 combinations for the 8.8.8-400 code, for example. Instead, we enumerate all complements efficiently by exploiting structure in the problem. Rather than searching for elements of Λ \Lambda Λ directly, we instead search for consistent slot labelings using an efficient generalized graph coloring algorithm, and from that we extract Λ \Lambda Λ as the set of triangles assigned slot e e e .
Our search makes use of the following observation. Take any triangle g g g , which has a unique factorization g = λ d g = \lambda d g = λ d (where λ ∈ Λ \lambda\in\Lambda λ ∈ Λ , d ∈ D d \in D d ∈ D ) defining its slot label d d d . If we multiply g g g on the right by any element x ∈ G x \in G x ∈ G we obtain g x = λ d x = λ λ ′ d ′ gx = \lambda dx = \lambda\lambda'd' g x = λ d x = λ λ ′ d ′ , where here λ ′ d ′ \lambda'd' λ ′ d ′ is the unique factorization of d x dx d x . Since λ λ ′ ∈ Λ \lambda\lambda' \in\Lambda λ λ ′ ∈ Λ (from group closure of Λ \Lambda Λ ) we see that the slot d ′ d' d ′ of g x gx g x depends only on x x x and the slot d d d of g g g , and is completely independent of which module g g g is in. As a consequence, for any valid complement Λ \Lambda Λ , every element x ∈ G x \in G x ∈ G defines a permutation of the slot labels π x \pi_x π x . Any complement Λ \Lambda Λ is therefore fully defined by how the three generators a a a , b b b and c c c of G G G permute the slot labels. Since each generator is self-inverse (a reflection), we know that π x : x ∈ { a , b , c } \pi_x : x \in\{a,b,c\} π x : x ∈ { a , b , c } is an involution of the slot labels D D D . Additionally, for the octagon modules where D = ⟨ b , c ⟩ D = \langle b,c\rangle D = ⟨ b , c ⟩ , we already know how b b b and c c c permute the slot labels by considering their action on the identity module ⟨ b , c ⟩ \langle b,c\rangle ⟨ b , c ⟩ (they are fixed). Therefore enumerating complements Λ \Lambda Λ corresponds to enumerating possible involutions π a \pi_a π a of the slot labels D D D defined by generator a a a . There are 764 possible involutions of the 8 elements of D D D to check when enumerating octagon module complements, and this is fixed irrespective of the size of the tiling, unlike the brute-force approach. We can check whether each of these 764 involutions defines a valid complement Λ \Lambda Λ using a breadth-first search (BFS) on the tiling T Δ T^\Delta T Δ . For each candidate π a \pi_a π a , we start the BFS by labeling the identity triangle with the identity slot label e e e and then propagate the slot labels across T Δ T^\Delta T Δ by applying the involution π x \pi_x π x each time a mirror x ∈ { a , b , c } x \in\{a,b,c\} x ∈ { a , b , c } is crossed, where π a \pi_a π a is the candidate involution and π b \pi_b π b and π c \pi_c π c are fixed by the known action of b b b and c c c on slot labels. Each time a mirror is crossed that closes a cycle (reaching a triangle that already has a slot label) we check for consistency of the slot label, and break if an inconsistent slot label is observed.
We do not require that Λ \Lambda Λ be a normal subgroup Λ ⊴ G \Lambda\trianglelefteq G Λ ⊴ G , but if Λ \Lambda Λ is normal then the slot labeling takes a particularly simple form. To see why, take two elements g 1 , g 2 ∈ G g_1,g_2 \in G g 1 , g 2 ∈ G which factorize as g 1 = λ 1 d 1 g_1 = \lambda_1d_1 g 1 = λ 1 d 1 and g 2 = λ 2 d 2 g_2 = \lambda_2d_2 g 2 = λ 2 d 2 (where $\lambda_1,\lambda_2 \in \Lambda and d 1 , d 2 ∈ D d_1,d_2\in D d 1 , d 2 ∈ D . Taking their product, we have
g 1 g 2 = ( λ 1 d 1 ) ⋅ ( λ 2 d 2 ) = λ 1 ⋅ ( d 1 λ 2 d 1 − 1 ) ⋅ ( d 1 d 2 ) . (44) g_1g_2=(\lambda_1d_1)\cdot(\lambda_2d_2)=\lambda_1\cdot(d_1\lambda_2d_1^{-1})\cdot(d_1d_2). \tag*{(44)} g 1 g 2 = ( λ 1 d 1 ) ⋅ ( λ 2 d 2 ) = λ 1 ⋅ ( d 1 λ 2 d 1 − 1 ) ⋅ ( d 1 d 2 ) . (44)
Now if Λ \Lambda Λ is normal then d 1 λ 2 d 1 − 1 ∈ Λ d_1\lambda_2d_1^{-1}\in\Lambda d 1 λ 2 d 1 − 1 ∈ Λ , which implies that the slot of g 1 g 2 g_1g_2 g 1 g 2 is just the product d 1 d 2 d_1d_2 d 1 d 2 of the slots of the individual triangles g 1 g_1 g 1 and g 2 g_2 g 2 . Letting φ : G → D \varphi:G\to D φ : G → D denote the map from each triangle to its slot, we have shown that the normality of Λ \Lambda Λ implies that
φ ( x y ) = φ ( x ) φ ( y ) for all x , y ∈ G . \varphi(xy)=\varphi(x)\varphi(y)\quad\text{for all }x,y\in G. φ ( x y ) = φ ( x ) φ ( y ) for all x , y ∈ G .
Therefore φ \varphi φ is a group homomorphism, and the slot φ ( g ) \varphi(g) φ ( g ) of any g ∈ G g\in G g ∈ G is the product of the slots φ ( x ) \varphi(x) φ ( x ) of the generators x ∈ { a , b , c } x\in\{a,b,c\} x ∈ { a , b , c } in the word of g g g . Since φ ( b ) = b \varphi(b)=b φ ( b ) = b and φ ( c ) = c \varphi(c)=c φ ( c ) = c are fixed for octagon modules, a normal complement Λ \Lambda Λ is fully defined by the slot of φ ( a ) \varphi(a) φ ( a ) , which must be one of the six involutions { e , b , c , b c b , c b c , b c b c } \{e,b,c,bcb,cbc,bcbc\} { e , b , c , b c b , c b c , b c b c } in D = ⟨ b , c ⟩ D=\langle b,c\rangle D = ⟨ b , c ⟩ . An example of a normal complement is shown in Figure S53 , which in this case is defined by φ ( a ) = b \varphi(a)=b φ ( a ) = b . Note that normality of Λ \Lambda Λ implies that G G G is the semidirect product G = Λ ⋊ D G=\Lambda\rtimes D G = Λ ⋊ D .
We enumerated the complements of the octagon module subgroup for the most promising 8.8.8 color code tilings at L = 2 L=2 L = 2 , and present the results in Table S4 , including a comparison with quadrilateral module partitions. We find that complements Λ \Lambda Λ for ∣ D ∣ = 8 |D|=8 ∣ D ∣ = 8 do exist for most of these codes, including the smallest four codes in Figure 3 of the main text, corresponding to Coxeter quotient groups △ ( 4 , 4 , 4 ) i \triangle(4,4,4)_i △ ( 4 , 4 , 4 ) i for i ∈ { 32 , 40 , 58 , 109 } i\in\{32,40,58,109\} i ∈ { 32 , 40 , 58 , 109 } . Examples of complements for these tilings are visualized in Figure S53 and Figure S54 .
Figure S54. Examples of complements Λ ≤ G \Lambda\le G Λ ≤ G of the octagon module dihedral subgroup D D D (where ∣ D ∣ = 8 |D| = 8 ∣ D ∣ = 8 ) for three 8.8.8 hyperbolic tilings with Coxeter quotients △ ( 4 , 4 , 4 ) i \triangle(4,4,4)_i △ ( 4 , 4 , 4 ) i for i ∈ { 32 , 58 , 109 } i \in\{32, 58, 109\} i ∈ { 32 , 58 , 109 } . As done in Figure S53 we label each octagon module with its element of Λ \Lambda Λ (circled in red) and each triangle is labeled with its slot d ∈ D d \in D d ∈ D . For each tiling we provide one example of a complement, of the many counted in Table S4 . a, The △ ( 4 , 4 , 4 ) 32 \triangle(4,4,4)_{32} △ ( 4 , 4 , 4 ) 32 tiling, for which there is no Λ \Lambda Λ that is either orientation-preserving or normal. b, The △ ( 4 , 4 , 4 ) 58 \triangle(4,4,4)_{58} △ ( 4 , 4 , 4 ) 58 tiling, with a normal Λ \Lambda Λ shown satisfying φ ( a ) = b \varphi(a) = b φ ( a ) = b . c, The △ ( 4 , 4 , 4 ) 109 \triangle(4,4,4)_{109} △ ( 4 , 4 , 4 ) 109 tiling, which has two octagon module complements, neither of which are orientation-preserving or normal. We show one such complement, with the triangles colored by their slot label.
For the code with group △ ( 4 , 4 , 4 ) 109 \triangle(4,4,4)_{109} △ ( 4 , 4 , 4 ) 109 , recall that we have an excellent symmetrical logical basis which allows a single seed cycle to be used to access 100 of the 104 logical qubits in the code using the quadrilateral module partition. We find that this same tiling does admit two complements of its octagon module subgroup, listed in the 8.8.8-400 row of Table S4 , which means that we can implement frame-preserving automorphism circuits. Since the octagon complement Λ \Lambda Λ is 4 × 4\times 4 × smaller than G + G^+ G + (where ∣ Λ ∣ = 50 |\Lambda|=50 ∣Λ∣ = 50 and ∣ G + ∣ = 200 |G^+|=200 ∣ G + ∣ = 200 ) we in general might expect to need more than one seed cycle to access all the logicals in the same basis using this smaller number of automorphisms. We compute the number of seed cycles numerically by assigning two cycles in the basis to the same seed cycle class if they are related by left multiplication by an element λ ∈ Λ \lambda\in\Lambda λ ∈ Λ . We find that we need 4 seed cycles, instead of one, to cover all the cycles in this same homology basis using the octagon modules. One could simply construct 4 ribbon extractors, one to measure each of these seed cycles, however we note that each module in the ribbon extractor has only one outgoing seam of inter-module couplers at its boundary, and additional inter-module couplers could be used to couple the same ribbon extractor to all four seed cycles (using additional seams on both sides of the cylindrical ribbon).
Compilation and Resource Estimate of a Ripple-Carry Adder
In order to estimate the time overhead of implementing quantum algorithms using our modular hyperbolic memory architecture, we compile a quantum arithmetic circuit to automorphism moves, ribbon extractor measurements and compute region operations. We use the ripple-carry adder of Ref. [35 ] , which we refer to as the CDKM adder.
The CDKM Addition Circuit
The CDKM adder is a ripple-carry quantum addition circuit introduced in Ref. [35 ] . It adds two n n n -bit numbers a a a and b b b in place: the low n n n bits of the sum are written to the b b b register, and the carry-out c n c_n c n (the high bit of the sum) is XORed into an extra qubit z z z . On computational basis states it acts as
∣ a ⟩ ∣ b ⟩ ∣ c 0 = 0 ⟩ ∣ z ⟩ ↦ ∣ a ⟩ ∣ ( a + b ) m o d 2 n ⟩ ∣ 0 ⟩ ∣ z ⊕ c n ⟩ , c n = ⌊ a + b 2 n ⌋ (45) |a\rangle|b\rangle|c_0=0\rangle|z\rangle\mapsto|a\rangle|(a+b)\bmod2^n\rangle|0\rangle|z\oplus c_n\rangle,\qquad c_n=\left\lfloor\frac{a+b}{2^n}\right\rfloor \tag*{(45)} ∣ a ⟩ ∣ b ⟩ ∣ c 0 = 0 ⟩ ∣ z ⟩ ↦ ∣ a ⟩ ∣ ( a + b ) mod 2 n ⟩ ∣0 ⟩ ∣ z ⊕ c n ⟩ , c n = ⌊ 2 n a + b ⌋ (45)
where c 0 c_0 c 0 is the single ancilla (the carry-in), initialised in and returned to ∣ 0 ⟩ |0\rangle ∣0 ⟩ . With z z z initialised to ∣ 0 ⟩ |0\rangle ∣0 ⟩ , the b b b register together with z z z holds the full ( n + 1 ) (n+1) ( n + 1 ) -bit sum a + b a+b a + b . An example of a CDKM adder, for n = 3 n=3 n = 3 , is shown in Figure S55 . The adder is composed primarily of two types of gates (or “blocks”): the MAJ (majority) and UMA (unmajority-and-add) gates, each consisting of one Toffoli and two CNOTs (see Figure S55 ), and acting on basis states as
Figure S55. Top: the MAJ and UMA blocks. Bottom: the n = 3 n = 3 n = 3 adder. c 0 c_0 c 0 and z z z never leave the compute region; the 2 n 2n 2 n qubits a i , b i a_i, b_i a i , b i live in the memory.
MAJ : ∣ c , b , a ⟩ ↦ ∣ c ⊕ a , b ⊕ a , maj ( a , b , c ) ⟩ (46) \operatorname{MAJ}: \ |c,b,a\rangle\mapsto|c\oplus a,b\oplus a,\operatorname{maj}(a,b,c)\rangle \tag*{(46)} MAJ : ∣ c , b , a ⟩ ↦ ∣ c ⊕ a , b ⊕ a , maj ( a , b , c )⟩ (46)
UMA : ∣ c ⊕ a , b ⊕ a , maj ( a , b , c ) ⟩ ↦ ∣ c , a ⊕ b ⊕ c , a ⟩ (47) \operatorname{UMA}: \ |c\oplus a,b\oplus a,\operatorname{maj}(a,b,c)\rangle\mapsto|c,a\oplus b\oplus c,a\rangle \tag*{(47)} UMA : ∣ c ⊕ a , b ⊕ a , maj ( a , b , c )⟩ ↦ ∣ c , a ⊕ b ⊕ c , a ⟩ (47)
where maj ( a , b , c ) = a b ⊕ b c ⊕ c a \operatorname{maj}(a,b,c)=ab\oplus bc\oplus ca maj ( a , b , c ) = ab ⊕ b c ⊕ c a is the majority function.
Compilation Overview
We implement the adder by combining the modular hyperbolic memory with a small compute region. The ribbon extractor and automorphisms are used to teleport logical qubits between the memory and compute region, and all logical gates (CNOTs and Toffoli gates) are applied directly in the compute region.
To implement the teleportation we use the standard circuit identities shown in Figure S56 , for teleporting a memory qubit q q q to or from a compute qubit c c c . A load operation requires two ribbon measurements, a joint X ‾ q X ‾ c \overline{X}_q\overline{X}_c X q X c measurement followed by a single-qubit Z ‾ q \overline{Z}_q Z q measurement. The store operation requires only a single X ‾ q X ‾ c \overline{X}_q\overline{X}_c X q X c measurement followed by a single-qubit Z ‾ c \overline{Z}_c Z c measurement in the compute region (which can just be a transversal Z Z Z measurement of a surface code, for example). The teleportation (load and store combined) therefore costs three ribbon measurements. Additionally, automorphisms are needed to move the X ‾ q \overline{X}_q X q and Z ‾ q \overline{Z}_q Z q logical operators into the extractor’s slot, which corresponds to moving between the two cycles in a symplectic pair. For simplicity we will leave the c 0 c_0 c 0 and z z z qubits in the compute region, and only store the a a a and b b b registers in the hyperbolic memory.
Figure S56. Standard circuits for teleporting a qubit into and out of memory using Pauli measurements. Measurements which touch the memory, and therefore use the ribbon extractor, are shaded in grey. The dashed boxes signify Pauli feedback that can be tracked by the classical control system in the accumulated Pauli frame. a, A load operation, teleporting a qubit q q q from memory into the compute region. A joint measurement X ‾ q X ‾ c \overline{X}_q\overline{X}_c X q X c followed by a single measurement Z ‾ q \overline{Z}_q Z q . b, A store operation, which teleports a qubit from the compute region back into the memory. We measure X ‾ q X ‾ c \overline{X}_q\overline{X}_c X q X c followed by a single-qubit measurement Z ‾ c \overline{Z}_c Z c in the compute region (e.g. a transversal measurement of a surface code patch).
We will assume that each ribbon extractor measurement takes α d \alpha d α d cycles to achieve the desired logical fidelity, where d d d is the distance of the hyperbolic memory and where we expect α ≈ 1 \alpha\approx1 α ≈ 1 . Each basic automorphism move (implementing one of the generators { ρ , ρ − 1 , σ , σ − 1 } \{\rho,\rho^{-1},\sigma,\sigma^{-1}\} { ρ , ρ − 1 , σ , σ − 1 } ) is a walking circuit described in Section S7, which we assume takes κ L \kappa L κ L cycles. We will focus on the quadrilateral module partition of the hyperbolic color codes, for which we estimate that κ ≈ 2 \kappa\approx2 κ ≈ 2 is achievable with some additional circuit optimizations inspired by Ref. [31 ] . We will let N R N_R N R denote the number of ribbon measurements used for the adder, and let N A N_A N A denote the number of automorphisms. The time attributed to ribbon measurements and automorphisms is then
T = α d N R + κ L N A . (48) T = \alpha d N_R + \kappa L N_A. \tag*{(48)} T = α d N R + κ L N A . (48)
For each M A J i \mathrm{MAJ}_i MAJ i or U M A i \mathrm{UMA}_i UMA i block in the adder, at least one of the three qubits it acts on (one of its operands) is already located in the compute region at the end of the prior operation (or initialized there, in the case of c 0 c_0 c 0 ). Therefore we only need to load at most two of the three operands before each block, and to store at most two operands to make room for the operands loaded for the next block. Furthermore, we allocate C ≥ 3 C \ge3 C ≥ 3 qubits in the compute region for memory qubits (C C C operand slots). In the middle of the adder (between M A J n − 1 \mathrm{MAJ}_{n-1} MAJ n − 1 and U M A n − 1 \mathrm{UMA}_{n-1} UMA n − 1 ) we can therefore retain C C C qubits in the compute region, since the last C C C operands used by M A J i \mathrm{MAJ}_i MAJ i blocks are the first C C C needed by the U M A i \mathrm{UMA}_i UMA i blocks. This saves one store and one load for each of the C C C operand slots, while the remaining 2 n − C 2n-C 2 n − C operand qubits each require the full two loads and two stores throughout the adder. Since each combined load and store requires three ribbon measurements, this leads to
N R = 3 ( 4 n − C ) (49) N_R = 3(4n-C) \tag*{(49)} N R = 3 ( 4 n − C ) (49)
ribbon measurements needed for an n n n -bit adder. We will choose C = 5 C=5 C = 5 , and hence have N R = 12 n − 15 N_R=12n-15 N R = 12 n − 15 . Note that this corresponds to Belady’s cache replacement policy [36 ] (when a slot is needed, storing the operand whose next use is furthest in the future), which minimizes the number of loads, and hence stores (each loaded qubit is stored exactly once), for a fixed order of blocks.
With N R N_R N R determined (and independent of the hyperbolic memory code used) the rest of this section will be focused on estimating the number of automorphism moves N A N_A N A , which does depend on the tiling and logical basis. We also make the simplifying assumption that the ribbon extractor can measure any of the C C C operand slot X X X logicals in the compute region for teleportation. This could be achieved, for example, by using additional inter-module couplers, or instead by allocating additional routing space in the compute region (such that the ribbon extractor only needs to measure a single logical there to access all C C C qubits). We leave a detailed study of this aspect of the compilation to future work.
Coarse Upper Bound on the Number of Automorphism Moves
Before optimizing the number of automorphism moves, we will first compute a very coarse upper bound on N A N_A N A . We will be focusing primarily on the 8.8.8 8.8.8 8.8.8 modular hyperbolic color code with symmetry group △ ( 4 , 4 , 4 ) 109 \triangle(4,4,4)_{109} △ ( 4 , 4 , 4 ) 109 (the 8.8.8-400 code in Table S3 ), using the logical basis generated by the orbit of a single seed cycle γ \gamma γ under G + = ⟨ ρ , σ ⟩ G^+ = \langle\rho,\sigma\rangle G + = ⟨ ρ , σ ⟩ . This tiling is used to construct modular hyperbolic color codes with parameters [ [ 3600 , 104 , 22 ] ] [[3600,104,22]] [[ 3600 , 104 , 22 ]] at L = 3 L=3 L = 3 and [ [ 6400 , 104 , 30 ] ] [[6400,104,30]] [[ 6400 , 104 , 30 ]] at L = 4 L=4 L = 4 .
For this code, the seed cycle γ \gamma γ has trivial stabilizer in G + G^+ G + , so each cycle in its orbit can be written uniquely as C x = x γ C_x=x\gamma C x = x γ for some x ∈ G + x\in G^+ x ∈ G + . An automorphism move by a generator s ∈ { ρ ± 1 , σ ± 1 } s\in\{\rho^{\pm1},\sigma^{\pm1}\} s ∈ { ρ ± 1 , σ ± 1 } maps every cycle γ y \gamma y γ y to s y γ sy\gamma sy γ , so a sequence of moves s 1 , … , s k s_1,\ldots,s_k s 1 , … , s k applies the automorphism s k ⋯ s 1 s_k\cdots s_1 s k ⋯ s 1 . If we attach the ribbon extractor to the cycle h γ h\gamma hγ , then the cycle C x C_x C x is under the extractor once we have applied a sequence of moves corresponding to the automorphism h x − 1 h x^{-1} h x − 1 . Switching from measuring C x 1 C_{x_1} C x 1 to measuring C x 2 C_{x_2} C x 2 therefore requires a sequence of moves with product ( h x 2 − 1 ) ( h x 1 − 1 ) − 1 = h x 2 − 1 x 1 h − 1 (h x_2^{-1})(h x_1^{-1})^{-1}=h x_2^{-1}x_1h^{-1} ( h x 2 − 1 ) ( h x 1 − 1 ) − 1 = h x 2 − 1 x 1 h − 1 , i.e.
M ( x 1 , x 2 ) = ∣ h x 1 − 1 x 2 h − 1 ∣ (50) M(x_1,x_2)=\left|h x_1^{-1}x_2 h^{-1}\right| \tag*{(50)} M ( x 1 , x 2 ) = h x 1 − 1 x 2 h − 1 (50)
automorphism moves, where ∣ ⋅ ∣ \lvert\cdot\rvert ∣ ⋅ ∣ is the word length in the generators { ρ ± 1 , σ ± 1 } \{\rho^{\pm1},\sigma^{\pm1}\} { ρ ± 1 , σ ± 1 } (a word and its inverse have the same length since this set is closed under inverses). Equivalently, each move s s s changes the label of the cycle under the extractor from x x x to x h − 1 s h − 1 xh^{-1}sh^{-1} x h − 1 s h − 1 , i.e. by right multiplication. For h = e h=e h = e , M ( x 1 , x 2 ) M(x_1,x_2) M ( x 1 , x 2 ) is therefore the right Cayley distance ∣ x 1 − 1 x 2 ∣ \lvert x_1^{-1}x_2\rvert ∣ x 1 − 1 x 2 ∣ between x 1 x_1 x 1 and x 2 x_2 x 2 , rather than the left Cayley distance ∣ x 2 x 1 − 1 ∣ \lvert x_2x_1^{-1}\rvert ∣ x 2 x 1 − 1 ∣ (the length of the automorphism mapping C x 1 C_{x_1} C x 1 onto C x 2 C_{x_2} C x 2 ). For general h h h it is the right Cayley distance with respect to the conjugated generators h − 1 s h h^{-1}sh h − 1 s h , and so choosing h h h is equivalent to choosing the centres of rotation of the generators relative to the extractor. Since conjugation by h h h is an isomorphism of Cayley graphs, the maximum number of automorphism moves needed to move from one logical operator to another under the ribbon extractor is, for any h h h , the diameter of the Cayley graph,
D = diam Cay ( G + , { ρ ± 1 , σ ± 1 } ) . (51) D=\operatorname{diam}\operatorname{Cay}\left(G^+,\{\rho^{\pm1},\sigma^{\pm1}\}\right). \tag*{(51)} D = diam Cay ( G + , { ρ ± 1 , σ ± 1 } ) . (51)
Given that each ribbon extractor measurement requires at most D D D automorphism moves, we obtain the coarse upper bound N A ≤ D N R N_A\le DN_R N A ≤ D N R . This gives a total time attributed to ribbon measurements and automorphisms of at most
T ≤ 3 ( α d + κ D L ) ( 4 n − C ) (52) T\le3(\alpha d+\kappa DL)(4n-C) \tag*{(52)} T ≤ 3 ( α d + κ D L ) ( 4 n − C ) (52)
cycles.
For the △ ( 4 , 4 , 4 ) 109 \triangle(4,4,4)_{109} △ ( 4 , 4 , 4 ) 109 tiling we have D = 6 D=6 D = 6 . For a 50-bit adder, and assuming α = 1 \alpha=1 α = 1 , κ = 2 \kappa=2 κ = 2 and C = 5 C=5 C = 5 , Equation (52) gives T ≤ 33 , 930 T\le33,930 T ≤ 33 , 930 cycles (679 per bit) at L = 3 L=3 L = 3 and T ≤ 45 , 630 T\le45,630 T ≤ 45 , 630 cycles (913 per bit) at L = 4 L=4 L = 4 . Notice that around 62% of the cycles are attributable to automorphisms at both L = 3 L=3 L = 3 and L = 4 L=4 L = 4 . However, we will now explain how a small number of important but straightforward optimizations can significantly reduce the number of automorphisms required.
Minimizing Within-Pair Switches
We will call an automorphism that moves the extractor (i.e. changes which cycle is under the extractor) from a cycle in one symplectic pair to a cycle in a different symplectic pair a jump . A jump takes at most D D D basic automorphism moves. We will refer to an automorphism that moves the extractor from one cycle to its partner within a symplectic pair a switch .
Each load operation requires measuring the X ‾ q \overline{X}_q X q and Z ‾ q \overline{Z}_q Z q logical operators of the same logical qubit q q q stored in the hyperbolic memory, where one of these is measured jointly with a compute region logical (e.g. M X ‾ q X ‾ c M_{\overline{X}_q\overline{X}_c} M X q X c in Figure S56 ). Measuring these two logical operators consecutively requires a switch. Given that this can be a common operation, it makes sense to optimize it. As we will now explain, for this code (using our symmetric basis for it), an appropriate choice of extractor location can reduce the number of moves needed for a switch from 5 to 1.
In our basis, every symplectic pair has the same automorphism mapping one cycle to its partner: the i i i -th pair consists of the cycles α i = y i γ \alpha_i = y_i\gamma α i = y i γ and β i = y i w ± 1 γ \beta_i = y_iw^{\pm1}\gamma β i = y i w ± 1 γ for some y i ∈ G + y_i \in G^+ y i ∈ G + , where w = σ 2 ρ σ 2 w = \sigma^2\rho\sigma^2 w = σ 2 ρ σ 2 . By Equation (50) , a switch requires M ( y i , y i w ± 1 ) = ∣ h w ± 1 h − 1 ∣ M(y_i,y_iw^{\pm1}) = \lvert hw^{\pm1}h^{-1}\rvert M ( y i , y i w ± 1 ) = ∣ h w ± 1 h − 1 ∣ moves, which is independent of i i i . For h = e h=e h = e this is ∣ w ∣ = 5 \lvert w\rvert= 5 ∣ w ∣ = 5 . However, since σ 4 = e \sigma^4=e σ 4 = e we have w = σ 2 ρ σ − 2 w=\sigma^2\rho\sigma^{-2} w = σ 2 ρ σ − 2 , and so choosing the extractor location h = σ 2 h=\sigma^2 h = σ 2 gives h w h − 1 = ρ hwh^{-1}=\rho h w h − 1 = ρ . With this choice, every switch is a single ρ \rho ρ or ρ − 1 \rho^{-1} ρ − 1 move (as for the pair shown in Figure 4 a of the main text). Of the 200 possible extractor locations h ∈ G + h\in G^+ h ∈ G + , 8 have this property.
We can choose an ordering of ribbon measurements where the two measurements in each load operation are always implemented consecutively (i.e. M Z ‾ q M_{\overline{Z}_q} M Z q immediately follows M X ‾ q X ‾ c M_{\overline{X}_q\overline{X}_c} M X q X c ). Moving the ribbon extractor from M X ‾ q X ‾ c M_{\overline{X}_q\overline{X}_c} M X q X c to M Z ‾ q M_{\overline{Z}_q} M Z q then always costs one switch (a single automorphism move). All other automorphisms cost at most one jump. This leads to at most ( 4 n − C ) D (4n-C)D ( 4 n − C ) D moves for the stores, ( 4 n − C ) D (4n-C)D ( 4 n − C ) D moves for the M X ‾ q X ‾ c M_{\overline{X}_q\overline{X}_c} M X q X c in each load, and ( 4 n − C ) (4n-C) ( 4 n − C ) for the M Z ‾ q M_{\overline{Z}_q} M Z q in each load. In total this gives N A ≤ ( 2 D + 1 ) ( 4 n − C ) = 2 D + 1 3 N R N_A \le(2D+1)(4n-C)=\frac{2D+1}{3}N_R N A ≤ ( 2 D + 1 ) ( 4 n − C ) = 3 2 D + 1 N R automorphism moves, or
T ≤ 3 ( α d + 2 D + 1 3 κ L ) ( 4 n − C ) (53) T \le3\left(\alpha d+\frac{2D+1}{3}\kappa L\right)(4n-C) \tag*{(53)} T ≤ 3 ( α d + 3 2 D + 1 κ L ) ( 4 n − C ) (53)
cycles. Using the same assumptions as before, the number of cycles drops to 28,080 at L = 3 L=3 L = 3 (562 per bit) and 37,830 at L = 4 L=4 L = 4 (757 per bit).
Grouping Qubits into Pairs
We can reduce the number of moves further by storing operand qubits that are accessed in close succession in the same symplectic pair of homologically nontrivial cycles. Each symplectic pair of cycles ( α i , β i ) (\alpha_i,\beta_i) ( α i , β i ) stores four logical qubits, which we now use to store operand qubits a 2 i , b 2 i , a 2 i + 1 a_{2i}, b_{2i}, a_{2i+1} a 2 i , b 2 i , a 2 i + 1 and b 2 i + 1 b_{2i+1} b 2 i + 1 , choosing X q X_q X q supported on α i \alpha_i α i and Z ‾ q \overline{Z}_q Z q on β i \beta_i β i for all four. This swaps the logical Pauli bases of two of the qubits relative to the convention in § 1.5 , purely for notational convenience; equivalently, we could keep that convention and interchange X X X and Z Z Z in the teleportation circuits of those two qubits, so that their joint measurement is M Z ‾ q Z ‾ c M_{\overline{Z}_q\overline{Z}_c} M Z q Z c on α i \alpha_i α i and their single measurement is M X ‾ q M_{\overline{X}_q} M X q on β i \beta_i β i .
We refer to the loads and stores performed before a block (or at the end, when all qubits are returned to memory) as a step . With C = 3 C=3 C = 3 , the qubits in each step have at most three consecutive bit indices (e.g. before M A J i \mathrm{MAJ}_i MAJ i we store a i − 2 a_{i-2} a i − 2 and b i − 1 b_{i-1} b i − 1 and load b i b_i b i and a i a_i a i ), so each step involves at most two symplectic pairs. Moreover, at most one of these pairs is acted on by both stores and loads, and can be checked for each type of step. We can therefore handle the pairs one at a time while performing every store before every load, which frees space in the compute region: first a pair with only stores (if any), then a pair with both, then a pair with only loads. On each pair, the stores and the joint measurements of the loaded qubits both measure M X ‾ q X ‾ c M_{\overline{X}_q\overline{X}_c} M X q X c , acting on α i \alpha_i α i , and are followed by the measurements M Z ‾ q M_{\overline{Z}_q} M Z q on β i \beta_i β i . Each pair therefore costs at most one jump to reach it and one switch from α i \alpha_i α i to β i \beta_i β i (a pair with only stores needs no switch), so each step requires at most 2 D + 2 2D+2 2 D + 2 automorphism moves. There are 2 n 2n 2 n non-empty steps, giving N A ≤ 4 ( D + 1 ) n ≈ D + 1 3 N R N_A\le4(D+1)n\approx\frac{D+1}{3}N_R N A ≤ 4 ( D + 1 ) n ≈ 3 D + 1 N R . Here we have used the memory schedule for C = 3 C=3 C = 3 , for which N R = 3 ( 4 n − 3 ) N_R=3(4n-3) N R = 3 ( 4 n − 3 ) (only six more ribbon measurements than for C = 5 C=5 C = 5 ), so that
T ≤ 3 α d ( 4 n − 3 ) + 4 ( D + 1 ) κ L n (54) T \le3\alpha d(4n-3)+4(D+1)\kappa Ln \tag*{(54)} T ≤ 3 α d ( 4 n − 3 ) + 4 ( D + 1 ) κ L n (54)
cycles. Using the same assumptions as before, this gives 21,402 cycles at L = 3 L=3 L = 3 (428 per bit) and 28,930 cycles at L = 4 L=4 L = 4 (579 per bit).
Compute Region
The logic in the compute region can be implemented in parallel to the ribbon extractor measurements and automorphisms, and has a negligible impact on the overall runtime of the adder. After a load’s joint measurement M X q X c M_{X_qX_c} M X q X c , the subsequent M Z q M_{Z_q} M Z q only determines a Pauli correction to the qubit in the compute region. The next M A J i \mathrm{MAJ}_i MAJ i or U M A i \mathrm{UMA}_i UMA i block can therefore begin immediately after the joint measurements, and the Pauli frame can be propagated through its CNOTs once it has been determined. The Toffoli, implemented with a ∣ C C Z ⟩ |CCZ\rangle ∣ C C Z ⟩ state, only needs the Pauli frame before the Clifford corrections. Meanwhile, the extractor performs the M Z q M_{Z_q} M Z q measurements and the automorphism moves to the next step’s stores (which act only on the memory), taking roughly 2 α d + ( D + 1 ) κ L 2\alpha d+(D+1)\kappa L 2 α d + ( D + 1 ) κ L cycles. This is comparable to the duration of a block (≈ 4 d \approx4d ≈ 4 d plus the decoder reaction time), so only a small fraction of the compute time remains exposed. We also note that the duration of the block can be reduced to just the reaction time using AutoCCZ states and a sufficiently large compute region [37 ] .
Algorithms for Finding a Short Canonical Homology Basis
As explained in § 1.5 , finding a canonical logical basis for a hyperbolic code reduces to finding a canonical homology basis of the underlying tiling: for an orientable surface this corresponds to a set of g g g symplectic pairs of homologically non-trivial cycles. For the color codes we search for these cycles directly on the three-colorable hyperbolic tiling T \mathcal{T} T , whereas for the surface codes we use the base quadrilateral tiling T □ \mathcal{T}^{\square} T □ . In either case the homology basis search is the same combinatorial problem on a hyperbolic tiling. We therefore drop the color/surface distinction for the remainder of this section and simply consider a finite, closed and orientable hyperbolic tiling denoted T \mathcal{T} T .
We fix the following notation. We write T \mathcal{T} T for the hyperbolic tiling and T ∗ \mathcal{T}^{*} T ∗ for its dual, and denote the primal graph by G = ( V , E , F ) G=(V,E,F) G = ( V , E , F ) , with vertices V V V , edges E E E and faces F F F . The dual graph G ∗ G^{*} G ∗ has one vertex per face of T \mathcal{T} T and one dual edge e ∗ ∈ E ∗ e^{*}\in E^{*} e ∗ ∈ E ∗ per primal edge e ∈ E e\in E e ∈ E , with a one-to-one correspondence between primal and dual edges E ∗ ↔ E E^{*}\leftrightarrow E E ∗ ↔ E . A cycle is a closed loop of primal edges, and a closed loop of dual edges is a cocycle . Two cycles combine by their symmetric difference γ i ⊕ γ j \gamma_i\oplus\gamma_j γ i ⊕ γ j (the cycle of edges belonging to exactly one of them, with edges common to both removed). Under this operation the cycles form a group, and its quotient by the cycles that bound sets of faces (the trivial cycles) is the first homology group H 1 ( Σ g ; F 2 ) H_1(\Sigma_g;\mathbb{F}_2) H 1 ( Σ g ; F 2 ) . Taking the symmetric difference of a trivial cycle with a non-trivial γ \gamma γ leaves the homology class of the non-trivial cycle unchanged, so many different cycles represent the same class. Two such cycles are homologous , and there are 2 g 2g 2 g independent non-trivial classes. We write [ γ ] [\gamma] [ γ ] for the class of γ \gamma γ .
We also recall the intersection number of § 1.5 . For two cycles γ i , γ j \gamma_i,\gamma_j γ i , γ j we write ⟨ γ i , γ j ⟩ ∈ F 2 \langle\gamma_i,\gamma_j\rangle\in\mathbb{F}_2 ⟨ γ i , γ j ⟩ ∈ F 2 , equal to 1 if they cross an odd number of times and 0 otherwise. This number depends only on the homology classes, so homologous cycles have the same intersection number with every other cycle. For a candidate set { γ 1 , … , γ m } \{\gamma_1,\ldots,\gamma_m\} { γ 1 , … , γ m } we collect these numbers into the cycle intersection matrix M ∈ { 0 , 1 } m × m M\in\{0,1\}^{m\times m} M ∈ { 0 , 1 } m × m , with the symmetric zero-diagonal matrix with M i j = ⟨ γ i , γ j ⟩ M_{ij}=\langle\gamma_i,\gamma_j\rangle M ij = ⟨ γ i , γ j ⟩ . Finding a canonical homology basis then amounts to selecting 2 g 2g 2 g cycles and reordering the rows and columns of the corresponding 2 g × 2 g 2g\times2g 2 g × 2 g submatrix of M M M so that it equals the symplectic matrix
Ω = ⨁ i = 1 g ( 0 1 1 0 ) ∈ { 0 , 1 } 2 g × 2 g . (55) \Omega=\bigoplus_{i=1}^{g}\begin{pmatrix}0&1\\1&0\end{pmatrix}\in\{0,1\}^{2g\times2g}. \tag*{(55)} Ω = i = 1 ⨁ g ( 0 1 1 0 ) ∈ { 0 , 1 } 2 g × 2 g . (55)
A homology basis of 2 g 2g 2 g independent non-trivial cycles can be computed efficiently, for example via tree–cotree decomposition [38 ] , and brought into canonical form by Gaussian elimination over F 2 \mathbb{F}_2 F 2 . This does not, however, yield geometrically short cycles. Each cycle γ ⊆ E \gamma\subseteq E γ ⊆ E has a length ∣ γ ∣ |\gamma| ∣ γ ∣ given by its number of edges, and Gaussian elimination corresponds to taking symmetric differences of cycles, which typically lengthens them. Conversely, Erickson and Whittlesey give a polynomial-time algorithm for the shortest homology basis , but without the canonical constraint [39 Theorem 4.3] . We are not aware of an efficient algorithm that returns a shortest basis in canonical form directly, and related problems are NP-hard [40 , 41 ] . In any case, we need more than a short canonical basis: we need one that is additionally symmetrical , in the sense that its cycles lie in the orbit of a small number of seed cycles as described in § 1.5 . In this section, we describe algorithms to find a short canonical homology basis of T \mathcal{T} T by enumerating short non-trivial cycles from every vertex.
The symmetries we use are the orientation-preserving automorphisms Aut + ( T ) = G + = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T})=G^{+}=\langle\rho,\sigma\rangle Aut + ( T ) = G + = ⟨ ρ , σ ⟩ , that can be implemented as fault-tolerant automorphism circuits (Section S7). Relating the basis cycles by these rotations means that only a seed cycle needs its own ribbon extractor for logical measurement (Section S6), while every other cycle in its orbit is mapped onto the seed by an automorphism circuit. The automorphisms map non-trivial cycles to non-trivial cycles of the same length and preserve intersection numbers, so the orbit of a cycle consists of cycles of equal length in potentially distinct homology classes.
At a high level, our algorithms enumerate non-trivial cycles by graph search from every vertex of T \mathcal{T} T , recording the length ∣ γ ∣ |\gamma| ∣ γ ∣ and class [ γ ] [\gamma] [ γ ] of each and keeping only the shortest representative per homology class encountered. We use these as seed cycles. Starting from the shortest one or two, we generate their full orbit under Aut + ( T ) = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T}) = \langle\rho, \sigma\rangle Aut + ( T ) = ⟨ ρ , σ ⟩ , producing a candidate set whose cycles are related by tiling symmetries. This ensures the resulting canonical pairs map to each other by global rotations. We then compute the intersection number for all candidate pairs and extract a subset forming ≤ g \leq g ≤ g mutually compatible symplectic pairs by a clique or backtracking search.
Figure S57 outlines our algorithms for constructing a canonical homology basis of a hyperbolic tiling T \mathcal{T} T of genus g g g . Phase 1 builds a homology coordinate system via a tree-cotree decomposition and homology label assignment for every edge of the primal graph (Algorithms 1–2, explained in Section S9 A). Phase 2 enumerates non-trivial cycles from every vertex using breadth-first search (BFS) (Algorithm 3, Section S9 B). Phase 3 generates the orbit of seed cycles under Aut + ( T ) = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T}) = \langle\rho, \sigma\rangle Aut + ( T ) = ⟨ ρ , σ ⟩ (Algorithm 4, Section S9 C). Phase 4 constructs a canonical basis of k f o u n d ≤ g k_{\mathrm{found}} \leq g k found ≤ g symplectic pairs from the cycle intersection matrix via a clique or backtracking search (Algorithms 6–7, Section S9 D).
Figure S57. Algorithm outline for constructing a canonical homology basis of a hyperbolic tiling T \mathcal{T} T of genus g g g (Sections S9 A–S9 D). Phase 1 builds a homology coordinate system via a tree-cotree decomposition and homology label assignment, producing the label map ϕ : E → { 0 , 1 } 2 g \phi: E \to\{0,1\}^{2g} ϕ : E → { 0 , 1 } 2 g (Algorithm 1–Algorithm 2). Phase 2 enumerates homologically non-trivial cycles by BFS from every vertex, retaining the shortest representative per homology class encountered (Algorithm 3). Phase 3 generates the orbit of seed cycles under the orientation-preserving automorphism group Aut + ( T ) = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T}) = \langle\rho, \sigma\rangle Aut + ( T ) = ⟨ ρ , σ ⟩ (Algorithm 4). Phase 4 constructs a canonical basis of k f o u n d ≤ g k_{\mathrm{found}} \le g k found ≤ g symplectic pairs from the cycle intersection matrix via a clique or backtracking search (Algorithm 6–Algorithm 7).
Homology Coordinate System
We start with the primal graph G = ( V , E , F ) \mathcal{G}=(V,E,F) G = ( V , E , F ) of the hyperbolic tiling T \mathcal{T} T . In order to classify the homology class [ γ ] [\gamma] [ γ ] of any cycle we enumerate, we construct a map ϕ : E → { 0 , 1 } 2 g \phi: E \to\{0,1\}^{2g} ϕ : E → { 0 , 1 } 2 g assigning to each edge a 2 g 2g 2 g -bit vector. The homology class of any cycle γ \gamma γ is then identified by the bit-vector label
h ( γ ) = ⨁ e ∈ γ ϕ ( e ) ∈ { 0 , 1 } 2 g , h(\gamma) = \bigoplus_{e\in\gamma}\phi(e) \in\{0,1\}^{2g}, h ( γ ) = e ∈ γ ⨁ ϕ ( e ) ∈ { 0 , 1 } 2 g ,
obtained by taking the bit-wise XOR of the labels of its edges. The induced map h h h on homology classes is an isomorphism H 1 ( Σ g ; F 2 ) ≅ F 2 2 g H_1(\Sigma_g;\mathbb{F}_2)\cong\mathbb{F}_2^{2g} H 1 ( Σ g ; F 2 ) ≅ F 2 2 g : the 2 2 g − 1 2^{2g}-1 2 2 g − 1 non-trivial homology classes correspond to the 2 2 g − 1 2^{2g}-1 2 2 g − 1 non-zero elements of { 0 , 1 } 2 g \{0,1\}^{2g} { 0 , 1 } 2 g , and the trivial class corresponds to the zero vector 0 ∈ { 0 , 1 } 2 g \mathbf{0}\in\{0,1\}^{2g} 0 ∈ { 0 , 1 } 2 g . Two cycles are homologous if and only if they share the same label. We describe how we construct ϕ \phi ϕ using Algorithm 1 and Algorithm 2, closely following Erickson and Whittlesey [39 ] .
Tree-cotree decomposition (Algorithm 1). We begin by identifying a set of 2 g 2g 2 g edges of G \mathcal{G} G whose associated cycles form a basis of H 1 ( Σ g ; F 2 ) H_1(\Sigma_g;\mathbb{F}_2) H 1 ( Σ g ; F 2 ) via the tree-cotree decomposition [38 ] . We first find a spanning tree T T T of G \mathcal{G} G . Every non-tree edge e ∉ T e\notin T e ∈ / T closes exactly one cycle, formed by e e e together with the unique path in T T T connecting its endpoints. We then take a spanning cotree C ∗ C^* C ∗ of the dual graph G ∗ \mathcal{G}^* G ∗ , restricted to the dual edges that do not cross any edge of T T T . The edges lying in neither T T T nor in the cotree C ∗ C^* C ∗ are the generator edges L = { ℓ 1 , … , ℓ 2 g } L=\{\ell_1,\ldots,\ell_{2g}\} L = { ℓ 1 , … , ℓ 2 g } , and the cycle closed by each ℓ i \ell_i ℓ i is a generator cycle.
There are exactly 2 g 2g 2 g generator edges, by a simple count. The spanning tree T T T uses ∣ V ∣ − 1 |V|-1 ∣ V ∣ − 1 edges, and the cotree C ∗ C^* C ∗ , being a spanning tree of the dual graph on its ∣ F ∣ |F| ∣ F ∣ vertices, uses ∣ F ∣ − 1 |F|-1 ∣ F ∣ − 1 edges. Every primal edge lies in exactly one of T T T , the cotree C ∗ C^* C ∗ (as a dual edge), or the leftover set L L L , so
∣ L ∣ = ∣ E ∣ − ( ∣ V ∣ − 1 ) − ( ∣ F ∣ − 1 ) = ∣ E ∣ − ∣ V ∣ − ∣ F ∣ + 2 = 2 − χ = 2 g , |L|=|E|-(|V|-1)-(|F|-1)=|E|-|V|-|F|+2=2-\chi=2g, ∣ L ∣ = ∣ E ∣ − ( ∣ V ∣ − 1 ) − ( ∣ F ∣ − 1 ) = ∣ E ∣ − ∣ V ∣ − ∣ F ∣ + 2 = 2 − χ = 2 g ,
using the Euler characteristic χ = ∣ V ∣ − ∣ E ∣ + ∣ F ∣ = 2 − 2 g \chi=|V|-|E|+|F|=2-2g χ = ∣ V ∣ − ∣ E ∣ + ∣ F ∣ = 2 − 2 g of a closed orientable surface of genus g g g . This count matches dim H 1 ( Σ g , F 2 ) \dim H_1(\Sigma_g,\mathbb{F}_2) dim H 1 ( Σ g , F 2 ) and since the generator cycles are independent, they form a basis [38 ] . Consequently every cycle on Σ g \Sigma_g Σ g is homologous to a symmetric difference of generator cycles, so its homology class is the sum of the corresponding generator classes. This makes the generators the natural basis for the homology label map ϕ \phi ϕ , where each bit of ϕ ( e ) \phi(e) ϕ ( e ) records whether edge e e e crosses the cocycle associated with one generator.
As described in Algorithm 1, T T T is obtained by breadth-first search (BFS) from a root vertex r ∈ V r\in V r ∈ V . The dual graph G ∗ \mathcal{G}^* G ∗ has one vertex per face of T T T and one edge e ∗ e^* e ∗ per primal edge e e e . Removing the dual edges crossed by T T T leaves a subgraph E ~ ∗ = E ∗ ∖ { e ∗ : e ∈ T } \widetilde{E}^*=E^*\setminus\{e^*:e\in T\} E ∗ = E ∗ ∖ { e ∗ : e ∈ T } , and any spanning tree of E ~ ∗ \widetilde{E}^* E ∗ is a valid cotree C ∗ C^* C ∗ . The generator edges are then the edges that remain: L = E ∖ ( T ∪ { e : e ∗ ∈ C ∗ } ) L=E\setminus(T\cup\{e:e^*\in C^*\}) L = E ∖ ( T ∪ { e : e ∗ ∈ C ∗ }) .
Algorithm 1: Tree-Cotree Decomposition [38 ]
Input:
A primal graph G = ( V , E , F ) \mathcal{G}=(V,E,F) G = ( V , E , F ) embedded on a closed orientable surface Σ g \Sigma_g Σ g of genus g g g ;
The corresponding dual graph G ∗ = ( V ∗ , E ∗ , F ∗ ) \mathcal{G}^*=(V^*,E^*,F^*) G ∗ = ( V ∗ , E ∗ , F ∗ ) .
Output:
A primal spanning tree T ⊆ E T\subseteq E T ⊆ E ;
A dual spanning cotree C ∗ ⊆ E ∗ C^*\subseteq E^* C ∗ ⊆ E ∗ ;
A set of generator edges L ⊆ E L\subseteq E L ⊆ E with ∣ L ∣ = 2 g |L|=2g ∣ L ∣ = 2 g , one per independent non-trivial cycle.
Method:
Run BFS on G \mathcal{G} G from a root r ∈ V r\in V r ∈ V to obtain spanning tree T T T .
Let E ~ ∗ : = E ∗ ∖ { e ∗ : e ∈ T } \widetilde{E}^*:=E^*\setminus\{e^*:e\in T\} E ∗ := E ∗ ∖ { e ∗ : e ∈ T } be the dual edges not crossed by any primal tree edge. Compute any spanning tree C ∗ C^* C ∗ of E ~ ∗ \widetilde{E}^* E ∗ .
Set L : = E ∖ ( T ∪ { e ∈ E : e ∗ ∈ C ∗ } ) L:=E\setminus(T\cup\{e\in E:e^*\in C^*\}) L := E ∖ ( T ∪ { e ∈ E : e ∗ ∈ C ∗ }) . Assert ∣ L ∣ = 2 g |L|=2g ∣ L ∣ = 2 g .
Return T T T , C ∗ C^* C ∗ , L L L .
Homology Label Assignment (Algorithm 2). Given the generator edges L L L and cotree C ∗ C^* C ∗ from Algorithm 1, we assign a 2 g 2g 2 g -bit label ϕ ( e ) ∈ { 0 , 1 } 2 g \phi(e)\in\{0,1\}^{2g} ϕ ( e ) ∈ { 0 , 1 } 2 g to every edge e ∈ E e\in E e ∈ E , where bit i i i records whether e e e crosses the i i i -th generator cocycle (the closed loop of dual edges crossing generator ℓ i \ell_i ℓ i ). In Algorithm 2 each generator edge ℓ i \ell_i ℓ i is assigned a unique bitmask with only the i i i -th bit set to 1. This bitmask is then propagated to all other edges by tracing the two faces (dual vertices) on either side of ℓ i \ell_i ℓ i back to the cotree root r ∗ r^* r ∗ , and bit i i i is flipped for every other primal edge crossed by this cocycle.
Homologically Non-Trivial Cycle Enumeration
With the homology label map ϕ : E → { 0 , 1 } 2 g \phi:E\to\{0,1\}^{2g} ϕ : E → { 0 , 1 } 2 g established, we enumerate homologically non-trivial cycles on G \mathcal{G} G and classify each by its homology class.
Algorithm 2: Homology Label Assignment [39 ]
Input:
A dual spanning cotree C ∗ C^* C ∗ with root r ∗ ∈ V ∗ r^* \in V^* r ∗ ∈ V ∗ , as produced by Algorithm 1;
Generator edges L = { ℓ 1 , … , ℓ 2 g } L = \{\ell_1,\ldots,\ell_{2g}\} L = { ℓ 1 , … , ℓ 2 g } , as produced by Algorithm 1.
Output: A homology label map ϕ : E → { 0 , 1 } 2 g \phi:E\to\{0,1\}^{2g} ϕ : E → { 0 , 1 } 2 g , where bit i i i of ϕ ( e ) \phi(e) ϕ ( e ) is 1 1 1 if and only if primal edge e e e crosses the i i i -th generator cocycle, P ℓ i P_{\ell_i} P ℓ i .
Method:
Initialize the homology label map. Set ϕ ( e ) : = 0 ∈ { 0 , 1 } 2 g \phi(e):=0\in\{0,1\}^{2g} ϕ ( e ) := 0 ∈ { 0 , 1 } 2 g for all e ∈ E e\in E e ∈ E .
Assign a unique bitmask to each generator edge. For each i = 1 , … , 2 g i=1,\ldots,2g i = 1 , … , 2 g , set ϕ ( ℓ i ) : = b i \phi(\ell_i):=b_i ϕ ( ℓ i ) := b i , where b i ∈ { 0 , 1 } 2 g b_i\in\{0,1\}^{2g} b i ∈ { 0 , 1 } 2 g is the unique 2 g 2g 2 g -bit bitmask with only the i i i -th bit set:
b i [ j ] : = { 1 if j = i , 0 otherwise. b_i[j]:=
\begin{cases}
1 & \text{if } j=i,\\
0 & \text{otherwise.}
\end{cases} b i [ j ] := { 1 0 if j = i , otherwise.
These 2 g 2g 2 g bitmasks form a standard basis for { 0 , 1 } 2 g \{0,1\}^{2g} { 0 , 1 } 2 g and will be propagated across the dual cotree C ∗ C^* C ∗ in the following steps.
Propagate each generator’s bit across the dual cotree. For each i = 1 , … , 2 g i=1,\ldots,2g i = 1 , … , 2 g :
(a) Let F A , F B ∈ V ∗ F_A,F_B\in V^* F A , F B ∈ V ∗ be the two dual vertices (faces of the primal tiling) on either side of generator edge ℓ i \ell_i ℓ i .
(b) Trace both F A F_A F A and F B F_B F B back to the cotree root r ∗ r^* r ∗ via the unique tree paths
P A : = TreePath ( C ∗ , F A , r ∗ ) , P B : = TreePath ( C ∗ , F B , r ∗ ) . P_A:=\operatorname{TreePath}(C^*,F_A,r^*),\qquad
P_B:=\operatorname{TreePath}(C^*,F_B,r^*). P A := TreePath ( C ∗ , F A , r ∗ ) , P B := TreePath ( C ∗ , F B , r ∗ ) .
(c) Form the XOR P A ⊕ P B P_A\oplus P_B P A ⊕ P B , consisting of dual edges touched an odd number of times.
P ℓ i : = ( P A ⊕ P B ) ∪ { ℓ i ∗ } P_{\ell_i}:=(P_A\oplus P_B)\cup\{\ell_i^*\} P ℓ i := ( P A ⊕ P B ) ∪ { ℓ i ∗ }
is the generator cocycle crossing ℓ i \ell_i ℓ i .
(d) For each dual edge e ∗ ∈ P A ⊕ P B e^*\in P_A\oplus P_B e ∗ ∈ P A ⊕ P B , flip bit i i i of the label of the corresponding primal edge e e e :
ϕ ( e ) [ i ] : = ϕ ( e ) [ i ] ⊕ 1. \phi(e)[i]:=\phi(e)[i]\oplus1. ϕ ( e ) [ i ] := ϕ ( e ) [ i ] ⊕ 1.
Result. Every primal edge e ∈ E e\in E e ∈ E carries a label ϕ ( e ) ∈ { 0 , 1 } 2 g \phi(e)\in\{0,1\}^{2g} ϕ ( e ) ∈ { 0 , 1 } 2 g , where ϕ ( e ) [ i ] = 1 \phi(e)[i]=1 ϕ ( e ) [ i ] = 1 indicates that e e e crosses the i i i -th generator cocycle. An edge e e e with ϕ ( e ) = 0 \phi(e)=0 ϕ ( e ) = 0 does not cross any generator cocycle.
Return ϕ \phi ϕ .
We remark that Erickson and Whittlesey [39 ] find the shortest homology basis by re-running the tree-cotree decomposition from every vertex as root, each time generating only the 2 g 2g 2 g generator cycles associated with that choice of spanning tree, for a total of O ( g n ) O(gn) O ( g n ) candidate cycles, where n = ∣ V ∣ n=|V| n = ∣ V ∣ . Their choice of C ∗ C^* C ∗ as the maximum spanning tree weighted by BFS distance is essential for guaranteeing that the generator cycles produced at each root are as short as possible. In our algorithm, we perform the tree-cotree decomposition only once, from a single fixed root, solely to establish the homology label map ϕ \phi ϕ . The homology labels ϕ \phi ϕ computed from this fixed decomposition are then used throughout Phase 2, which enumerates a much richer candidate set by running BFS from every vertex and collecting all cycles closed by non-tree edges, producing O ( n 2 ) O(n^2) O ( n 2 ) candidate cycles in total. The choice of C ∗ C^* C ∗ therefore has no effect on the lengths of the cycles we find in Phase 2.
Cycle Enumeration (Algorithm 3). We enumerate short homologically non-trivial cycles by running BFS from every vertex v ∈ V v\in V v ∈ V . For each root v v v , a BFS spanning tree T v T_v T v is grown, and each non-tree edge e c = ( u , w ) ∈ E ∖ T v e_c=(u,w)\in E\setminus T_v e c = ( u , w ) ∈ E ∖ T v closes a cycle
γ = TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) . \gamma=\operatorname{TreePath}(T_v,v,u)\oplus\{e_c\}\oplus\operatorname{TreePath}(T_v,w,v). γ = TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) .
whose homology label is computed as h ( γ ) = ⨁ e ∈ γ ϕ ( e ) h(\gamma)=\bigoplus_{e\in\gamma}\phi(e) h ( γ ) = ⨁ e ∈ γ ϕ ( e ) . Cycles with h ( γ ) = 0 h(\gamma)=0 h ( γ ) = 0 are trivial and discarded. Since BFS produces shortest-path trees, γ \gamma γ is no longer than any closed walk through v v v and e c e_c e c . Running BFS from every vertex produces O ( n 2 ) O(n^2) O ( n 2 ) candidate cycles in total. Only the shortest representative per homology class is retained and the candidate set L \mathcal{L} L is sorted by cycle length. Each cycle is stored compactly as a tuple ( ∣ γ ∣ , h ( γ ) , v , e c ) (|\gamma|,h(\gamma),v,e_c) ( ∣ γ ∣ , h ( γ ) , v , e c ) , where ∣ γ ∣ |\gamma| ∣ γ ∣ is the number of edges in γ \gamma γ , h ( γ ) ∈ { 0 , 1 } 2 g ∖ { 0 } h(\gamma)\in\{0,1\}^{2g}\setminus\{\mathbf{0}\} h ( γ ) ∈ { 0 , 1 } 2 g ∖ { 0 } is its homology label, v ∈ V v\in V v ∈ V is the BFS root, and e c ∈ E e_c\in E e c ∈ E is the non-tree edge that closes the cycle. The pair ( v , e c ) (v,e_c) ( v , e c ) is sufficient to reconstruct γ \gamma γ uniquely: given root v v v and non-tree edge e c = ( u , w ) e_c=(u,w) e c = ( u , w ) , run BFS from v v v to obtain T v T_v T v , then recover γ = TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) \gamma=\operatorname{TreePath}(T_v,v,u)\oplus\{e_c\}\oplus\operatorname{TreePath}(T_v,w,v) γ = TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) .
Algorithm 3: Non-Trivial Cycle Enumeration
Input:
A primal graph G = ( V , E ) \mathcal{G} = (V, E) G = ( V , E ) ;
A homology label map ϕ : E → { 0 , 1 } 2 g \phi: E \to\{0,1\}^{2g} ϕ : E → { 0 , 1 } 2 g , as produced by Algorithm 2.
Output: A set L \mathcal{L} L of homologically non-trivial cycles, containing the shortest enumerated representative of each homology class encountered, sorted in increasing order of cycle length ∣ γ ∣ |\gamma| ∣ γ ∣ . Each cycle is stored as a tuple ( ∣ γ ∣ , h ( γ ) , v , e c ) (|\gamma|, h(\gamma), v, e_c) ( ∣ γ ∣ , h ( γ ) , v , e c ) : ∣ γ ∣ |\gamma| ∣ γ ∣ is the number of edges in γ \gamma γ , h ( γ ) ∈ { 0 , 1 } 2 g ∖ { 0 } h(\gamma) \in\{0,1\}^{2g} \setminus\{0\} h ( γ ) ∈ { 0 , 1 } 2 g ∖ { 0 } is its homology label, v ∈ V v \in V v ∈ V is the BFS root, and e c ∈ E e_c \in E e c ∈ E is the closing edge.
Method:
Set L : = ∅ \mathcal{L} := \varnothing L := ∅ .
For each vertex v ∈ V v \in V v ∈ V , run BFS on G \mathcal{G} G from v v v to obtain a spanning tree T v T_v T v .
For each non-tree edge e c = ( u , w ) ∈ E ∖ T v e_c = (u,w) \in E \setminus T_v e c = ( u , w ) ∈ E ∖ T v , form the cycle
γ : = TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) \gamma:= \operatorname{TreePath}(T_v,v,u) \oplus\{e_c\} \oplus\operatorname{TreePath}(T_v,w,v) γ := TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) and compute its homology label:
h ( γ ) : = ⨁ e ∈ γ ϕ ( e ) . h(\gamma) := \bigoplus_{e \in\gamma} \phi(e). h ( γ ) := e ∈ γ ⨁ ϕ ( e ) . If h ( γ ) ≠ 0 h(\gamma) \ne0 h ( γ ) = 0 , the cycle is non-trivial. If L \mathcal{L} L contains no cycle with label h ( γ ) h(\gamma) h ( γ ) , add ( ∣ γ ∣ , h ( γ ) , v , e c ) (|\gamma|,h(\gamma),v,e_c) ( ∣ γ ∣ , h ( γ ) , v , e c ) to L \mathcal{L} L . If L \mathcal{L} L already contains a cycle γ ′ \gamma' γ ′ with h ( γ ′ ) = h ( γ ) h(\gamma') = h(\gamma) h ( γ ′ ) = h ( γ ) and ∣ γ ′ ∣ > ∣ γ ∣ |\gamma'| > |\gamma| ∣ γ ′ ∣ > ∣ γ ∣ , replace it with γ \gamma γ . Otherwise discard γ \gamma γ .
Sort L \mathcal{L} L by cycle length ∣ γ ∣ |\gamma| ∣ γ ∣ in increasing order.
Return L \mathcal{L} L .
Note: The tuple ( v , e c ) (v,e_c) ( v , e c ) is sufficient to reconstruct γ \gamma γ uniquely: given root v v v and closing edge e c = ( u , w ) e_c = (u,w) e c = ( u , w ) , run BFS from v v v to obtain T v T_v T v ; then γ = TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) \gamma= \operatorname{TreePath}(T_v,v,u) \oplus\{e_c\} \oplus\operatorname{TreePath}(T_v,w,v) γ = TreePath ( T v , v , u ) ⊕ { e c } ⊕ TreePath ( T v , w , v ) .
Automorphism Orbit Generation
The candidate set L \mathcal{L} L from Algorithm 3 contains, for each homology class it encounters, the shortest enumerated representative. However, for the hyperbolic tilings we consider, we do not search for a canonical basis directly from L \mathcal{L} L . Instead, we exploit the orientation-preserving automorphism group Aut + ( T ) = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T}) = \langle\rho,\sigma\rangle Aut + ( T ) = ⟨ ρ , σ ⟩ of the tiling to generate a structured candidate set L a u t \mathcal{L}_{\mathrm{aut}} L aut whose cycles are related by the tiling symmetries.
The motivation is architectural: the automorphisms ρ \rho ρ and σ \sigma σ are implemented as walking circuits on the semi-hyperbolic tiling, and logical operators related by these automorphisms can be mapped to each other by the corresponding circuits. A canonical basis drawn from the orbit of a seed cycle under Aut + ( T ) \operatorname{Aut}^{+}(\mathcal{T}) Aut + ( T ) therefore yields logical operators with this desirable symmetry structure.
Seed Cycle Orbit Generation (Algorithm 4). We select one or more short cycles from L \mathcal{L} L as seed cycles and apply every element τ ∈ Aut + ( T ) \tau\in\operatorname{Aut}^{+}(\mathcal{T}) τ ∈ Aut + ( T ) to each seed, generating a family of image cycles { τ ( γ s ) } \{\tau(\gamma_s)\} { τ ( γ s )} . Recall that Aut + ( T ) = G + = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T}) = G^{+} = \langle\rho,\sigma\rangle Aut + ( T ) = G + = ⟨ ρ , σ ⟩ is the orientation-preserving subgroup of the quotient group G G G , so that each τ \tau τ acts by left multiplication, mapping the tile labeled by the group element g g g to the tile labeled g g g (Section S1). This permutation of the tiles is straightforward to compute by a traversal of the Cayley graph of Aut + ( T ) \operatorname{Aut}^{+}(\mathcal{T}) Aut + ( T ) . Since automorphisms are isometries of the tiling, each image cycle inherits the length of the seed. We then compute the homology labels of the image cycles with ϕ \phi ϕ . The shortest representative per homology label is retained as before, producing L a u t \mathcal{L}_{\mathrm{aut}} L aut . In practice we find that a small number of seed cycles can already generate a large fraction of the logical operators. For several of the examples in Table S3 , a single seed cycle generates almost all of them.
Canonical Homology Basis
Given the candidate set L a u t \mathcal{L}_{\mathrm{aut}} L aut produced by Algorithm 4 (or alternatively the candidate set L \mathcal{L} L produced by Algorithm 3), we now describe algorithms to find a canonical homology basis.
Cycle Intersection Matrix (Algorithm 5). We compute the intersection numbers of the cycles in L a u t \mathcal{L}_{\mathrm{aut}} L aut (or L \mathcal{L} L ). For each pair of cycles γ i , γ j \gamma_i,\gamma_j γ i , γ j in the candidate set, the intersection number ⟨ γ i , γ j ⟩ ∈ F 2 \langle\gamma_i,\gamma_j \rangle\in\mathbb{F}_2 ⟨ γ i , γ j ⟩ ∈ F 2 records whether the two cycles cross an odd number of times on Σ g \Sigma_g Σ g , as defined in § 1.5 . This is a topological invariant of their homology classes. We therefore only need to count crossings geometrically for the 2 g 2g 2 g generator cycles of Algorithm 1: every Algorithm 4: Seed Cycle Orbit Generation via Tiling Automorphisms
Input:
A set L \mathcal{L} L of non-trivial cycles sorted by length, as produced by Algorithm 3;
The orientation-preserving automorphism group Aut + ( T ) = ⟨ ρ , σ ⟩ \operatorname{Aut}^{+}(\mathcal{T}) = \langle\rho, \sigma\rangle Aut + ( T ) = ⟨ ρ , σ ⟩ of the tiling T \mathcal{T} T .
Output: A candidate set L a u t \mathcal{L}_{\mathrm{aut}} L aut containing, for each homology label occurring in the orbits of the seed cycles under Aut + ( T ) \operatorname{Aut}^{+}(\mathcal{T}) Aut + ( T ) , the shortest such image cycle.
Method:
Set L a u t : = ∅ \mathcal{L}_{\mathrm{aut}} := \varnothing L aut := ∅ .
Select one or more short cycles from L \mathcal{L} L as seed cycles .
For each seed cycle γ s \gamma_s γ s and each group element τ ∈ Aut + ( T ) \tau\in\operatorname{Aut}^{+}(\mathcal{T}) τ ∈ Aut + ( T ) , apply τ \tau τ to γ s \gamma_s γ s to obtain the image cycle τ ( γ s ) \tau(\gamma_s) τ ( γ s ) and compute its homology label h ( τ ( γ s ) ) h(\tau(\gamma_s)) h ( τ ( γ s )) .
For each image cycle τ ( γ s ) \tau(\gamma_s) τ ( γ s ) : if L a u t \mathcal{L}_{\mathrm{aut}} L aut contains no cycle with label h ( τ ( γ s ) ) h(\tau(\gamma_s)) h ( τ ( γ s )) , add τ ( γ s ) \tau(\gamma_s) τ ( γ s ) to L a u t \mathcal{L}_{\mathrm{aut}} L aut ; if L a u t \mathcal{L}_{\mathrm{aut}} L aut already contains a longer cycle with the same label, replace it.
Return L a u t \mathcal{L}_{\mathrm{aut}} L aut .
other cycle is homologous to a symmetric difference of these, its homology label h ( γ ) h(\gamma) h ( γ ) records which ones, and its intersection numbers can then be inferred algebraically from those of the generator cycles. Collecting them gives the cycle intersection matrix M ∈ { 0 , 1 } m × m M \in\{0,1\}^{m \times m} M ∈ { 0 , 1 } m × m introduced above, where m m m is the size of the candidate set.
Symplectic pair search (Algorithm 6, Algorithm 7). Given the intersection matrix M ∈ { 0 , 1 } m × m M \in\{0,1\}^{m \times m} M ∈ { 0 , 1 } m × m , we seek a maximum collection of mutually compatible symplectic pairs. A pair ( γ i , γ j ) (\gamma_i,\gamma_j) ( γ i , γ j ) is a candidate symplectic pair if M i j = 1 M_{ij} = 1 M ij = 1 , i.e. the two cycles cross an odd number of times. Two candidate pairs ( γ i , γ j ) (\gamma_i,\gamma_j) ( γ i , γ j ) and ( γ k , γ l ) (\gamma_k,\gamma_l) ( γ k , γ l ) are compatible if none of the four cross terms between them is 1: M i k = M i l = M j k = M j l = 0 M_{ik} = M_{il} = M_{jk} = M_{jl} = 0 M ik = M i l = M j k = M j l = 0 . A canonical basis then corresponds to a choice of 2 g 2g 2 g cycles for which the 2 g × 2 g 2g \times2g 2 g × 2 g submatrix of M M M , obtained by selecting those rows and the corresponding columns, equals the symplectic matrix Ω \Omega Ω of Eq. (55) .
While a canonical basis can always be constructed from any homology basis by Gaussian elimination over F 2 \mathbb{F}_2 F 2 , this corresponds to taking symmetric differences of cycles, which can increase cycle lengths and yields cycles that are no longer images of a seed cycle under Aut + ( T ) \operatorname{Aut}^{+}(\mathcal{T}) Aut + ( T ) , so they lose the symmetry structure and cannot be mapped onto one another by the automorphism circuits. The key constraint here is therefore that we must not alter the cycles themselves. We must instead find the symplectic structure by selecting 2 g 2g 2 g cycles from the candidate set and ordering them, so that the corresponding 2 g × 2 g 2g \times2g 2 g × 2 g submatrix of M M M equals Ω \Omega Ω while the cycle lengths are preserved. This is equivalent to the induced matching problem on the graph defined by M M M , which is NP-complete in general [42 ] .
In practice, our solvers find complete bases for the smaller tilings we consider, while for larger tilings we often obtain only k f o u n d < g k_{\mathrm{found}} < g k found < g pairs within our computational budget. We use two exact search strategies: a reduction to a maximum clique search (Algorithm 6) and a backtracking search (Algorithm 7).
Algorithm 6 reduces the search to a maximum clique problem on a compatibility graph K \mathcal{K} K that we construct. The vertices of K \mathcal{K} K are all candidate symplectic pairs P = { ( γ i , γ j ) : M i j = 1 , i < j } \mathcal{P} = \{(\gamma_i,\gamma_j) : M_{ij} = 1, i < j\} P = {( γ i , γ j ) : M ij = 1 , i < j } , and an edge connects two vertices if and only if the corresponding pairs are compatible. A clique of size g g g in K \mathcal{K} K corresponds to a complete canonical basis of g g g symplectic pairs, whereas a maximum clique of size k f o u n d < g k_{\mathrm{found}} < g k found < g yields a partial basis. A maximum clique in K \mathcal{K} K can then be obtained using standard clique-finding solvers [43 ] .
Algorithm 7 instead searches for the symplectic pairs directly. It builds up a canonical basis one pair at a time, adding a pair of crossing cycles at each step and backtracking whenever the remaining cycles can no longer be extended to g g g mutually compatible pairs. If no complete basis exists it returns FAILURE ; partial bases are obtained by searching for fewer pairs. This provides an alternative to the clique reduction of Algorithm 6, and in practice either algorithm suffices for the tilings we consider.
To summarize, we introduce computational methods to search for a symmetrical canonical homology basis. Enumerating homologically non-trivial cycles, classifying them by homology class, and generating the automorphism orbits all run in polynomial time. The computational bottleneck is the symplectic pair search: finding cycles whose intersection submatrix matches the canonical symplectic form is equivalent to finding a maximum induced matching, which is NP-complete in general [42 ] . Algorithm 6 and Algorithm 7 solve it exactly, but their cost grows with the genus. For larger tilings, the search slows down and covering all g g g pairs becomes increasingly difficult, so we do not always find a complete basis and instead obtain k f o u n d ≤ g k_{\mathrm{found}} \leq g k found ≤ g pairs. Some examples of the bases we find are given in Table S3 , and an extensive list of codes is provided in the extended tables section (§ 1.12 ). Even for the 8.8.8-400 code [ [ 400 , 104 , 8 ] ] [[400,104,8]] [[ 400 , 104 , 8 ]] , a single weight-12 seed cycle covers 100 of the 104 logical qubits.
Algorithm 5: Cycle Intersection Matrix
Input:
A set L \mathcal{L} L or L a u t \mathcal{L}_{\mathrm{aut}} L aut of m m m non-trivial cycles { γ 1 , … , γ m } \{\gamma_1,\ldots,\gamma_m\} { γ 1 , … , γ m } , as produced by Algorithm 3 and/or Algorithm 4.
Output: The cycle intersection matrix M ∈ { 0 , 1 } m × m M \in\{0,1\}^{m\times m} M ∈ { 0 , 1 } m × m , where M i j = ⟨ γ i , γ j ⟩ ∈ F 2 M_{ij} = \langle\gamma_i,\gamma_j\rangle\in\mathbb{F}_2 M ij = ⟨ γ i , γ j ⟩ ∈ F 2 is 1 if γ i \gamma_i γ i and γ j \gamma_j γ j cross an odd number of times and 0 otherwise, with M i i = 0 M_{ii}=0 M ii = 0 .
Method:
Set M ∈ { 0 , 1 } m × m M \in\{0,1\}^{m\times m} M ∈ { 0 , 1 } m × m to the zero matrix.
For each pair i < j i<j i < j , set M i j = M j i : = ⟨ γ i , γ j ⟩ ∈ F 2 M_{ij}=M_{ji}:=\langle\gamma_i,\gamma_j\rangle\in\mathbb{F}_2 M ij = M j i := ⟨ γ i , γ j ⟩ ∈ F 2 , the F 2 \mathbb{F}_2 F 2 -valued intersection number of γ i \gamma_i γ i and γ j \gamma_j γ j as defined in § 1.5 .
Return M M M .
Algorithm 6: Symplectic Cycle Pair Search via Maximum Clique
Input:
A set L \mathcal{L} L or L a u t \mathcal{L}_{\mathrm{aut}} L aut of m m m non-trivial cycles { γ 1 , … , γ m } \{\gamma_1,\ldots,\gamma_m\} { γ 1 , … , γ m } , as produced by Algorithm 3 and/or Algorithm 4;
The cycle intersection matrix M ∈ { 0 , 1 } m × m M \in\{0,1\}^{m\times m} M ∈ { 0 , 1 } m × m , as produced by Algorithm 5;
The genus g g g of the surface Σ g \Sigma_g Σ g .
Output: A canonical homology basis B = { ( α 1 , β 1 ) , … , ( α k f o u n d , β k f o u n d ) } \mathcal{B}=\{(\alpha_1,\beta_1),\ldots,(\alpha_{k_{\mathrm{found}}},\beta_{k_{\mathrm{found}}})\} B = {( α 1 , β 1 ) , … , ( α k found , β k found )} of k f o u n d ≤ g k_{\mathrm{found}}\leq g k found ≤ g symplectic pairs, where each pair ( α l , β l ) = ( γ i l , γ j l ) (\alpha_l,\beta_l)=(\gamma_{i_l},\gamma_{j_l}) ( α l , β l ) = ( γ i l , γ j l ) satisfies ⟨ α l , β l ⟩ = 1 \langle\alpha_l,\beta_l\rangle=1 ⟨ α l , β l ⟩ = 1 and ⟨ γ , γ ′ ⟩ = 0 \langle\gamma,\gamma'\rangle=0 ⟨ γ , γ ′ ⟩ = 0 for any γ ∈ { α l , β l } \gamma\in\{\alpha_l,\beta_l\} γ ∈ { α l , β l } and γ ′ ∈ { α l ′ , β l ′ } \gamma'\in\{\alpha_{l'},\beta_{l'}\} γ ′ ∈ { α l ′ , β l ′ } with l ≠ l ′ l\neq l' l = l ′ . A complete basis has k f o u n d = g k_{\mathrm{found}}=g k found = g ; a partial basis k f o u n d < g k_{\mathrm{found}}<g k found < g identifies k f o u n d k_{\mathrm{found}} k found valid symplectic pairs.
Method:
Identify symplectic pairs. Let P : = { ( γ i , γ j ) : M i j = 1 , i < j } \mathcal{P}:=\{(\gamma_i,\gamma_j):M_{ij}=1,\ i<j\} P := {( γ i , γ j ) : M ij = 1 , i < j } be the set of all candidate symplectic pairs. If P = ∅ \mathcal{P}=\varnothing P = ∅ , return Failure.
Build the compatibility graph. Construct a graph K \mathcal{K} K with vertex set P \mathcal{P} P , where an edge connects ( γ i , γ j ) (\gamma_i,\gamma_j) ( γ i , γ j ) and ( γ k , γ l ) (\gamma_k,\gamma_l) ( γ k , γ l ) if and only if M i k = M i l = M j k = M j l = 0 M_{ik}=M_{il}=M_{jk}=M_{jl}=0 M ik = M i l = M j k = M j l = 0 , i.e. the two pairs are mutually non-crossing.
Find a maximum clique. Apply the clique-finding algorithm of [43 ] to K \mathcal{K} K . Return the largest maximal clique found as B \mathcal{B} B .
Algorithm 7: Symplectic Cycle Pair Search via Backtracking
Input:
A set L \mathcal{L} L or L a u t \mathcal{L}_{\mathrm{aut}} L aut of m m m non-trivial cycles { γ 1 , … , γ m } \{\gamma_1,\ldots,\gamma_m\} { γ 1 , … , γ m } , as produced by Algorithm 3 and/or Algorithm 4;
The cycle intersection matrix M ∈ { 0 , 1 } m × m M \in\{0,1\}^{m \times m} M ∈ { 0 , 1 } m × m , as produced by Algorithm 5;
The genus g g g of the surface Σ g \Sigma_g Σ g .
Output: A canonical homology basis B = { ( α 1 , β 1 ) , … , ( α k f o u n d , β k f o u n d ) } \mathcal{B} = \{(\alpha_1,\beta_1),\ldots,(\alpha_{k_{\mathrm{found}}},\beta_{k_{\mathrm{found}}})\} B = {( α 1 , β 1 ) , … , ( α k found , β k found )} of k f o u n d ≤ g k_{\mathrm{found}} \le g k found ≤ g symplectic pairs, where each pair ( α l , β l ) = ( γ i l , γ j l ) (\alpha_l,\beta_l) = (\gamma_{i_l},\gamma_{j_l}) ( α l , β l ) = ( γ i l , γ j l ) is selected from the candidate cycles, or Failure if no solution is found within the time limit.
Method:
Preprocessing. Iteratively remove any cycle γ i \gamma_i γ i that does not cross any other remaining cycle, i.e. satisfying M i j = 0 M_{ij}=0 M ij = 0 for all active j j j . Repeat until no further removals occur. Let A ⊆ { 1 , … , m } A \subseteq\{1,\ldots,m\} A ⊆ { 1 , … , m } denote the surviving indices. If ∣ A ∣ < 2 g |A| < 2g ∣ A ∣ < 2 g , return Failure.
Row ordering heuristic. Sort the active cycles in A A A in non-decreasing order of their crossing degree deg ( i ) : = ∣ { j ∈ A : M i j = 1 } ∣ \deg(i) := |\{j \in A : M_{ij}=1\}| deg ( i ) := ∣ { j ∈ A : M ij = 1 } ∣ , so that cycles participating in fewer candidate pairs are tried first.
Backtracking search. Call Solve ( 1 , ∅ , ∅ , ∅ , g ) \operatorname{Solve}(1,\varnothing,\varnothing,\varnothing,g) Solve ( 1 , ∅ , ∅ , ∅ , g ) , where Solve ( t , R , C , F , g ′ ) \operatorname{Solve}(t,R,C,F,g') Solve ( t , R , C , F , g ′ ) is the recursive procedure:
(a) If g ′ = 0 g'=0 g ′ = 0 , return the accumulated solution.
(b) If the number of remaining active cycles after position t t t is less than g ′ g' g ′ , return Failure (pigeonhole pruning).
(c) Degree pruning. Among active cycles from position t t t onward that are not in R ∪ C ∪ F R \cup C \cup F R ∪ C ∪ F , count how many participate in at least one candidate pair with another available cycle. If this count is less than g ′ g' g ′ , return Failure.
(d) For each cycle γ i \gamma_i γ i from position t t t onward (skipping if i ∈ R ∪ C ∪ F i \in R \cup C \cup F i ∈ R ∪ C ∪ F ):
i. For each γ j \gamma_j γ j with j > i j > i j > i , j ∉ R ∪ C ∪ F j \notin R \cup C \cup F j ∈ / R ∪ C ∪ F , and M i j = 1 M_{ij}=1 M ij = 1 :
A. Set R ′ ← R ∪ { i } R' \leftarrow R \cup\{i\} R ′ ← R ∪ { i } , C ′ ← C ∪ { j } C' \leftarrow C \cup\{j\} C ′ ← C ∪ { j } .
B. Compute the new conflict set F ′ ← F ∪ { l ≠ j : M i l = 1 } ∪ { l ≠ i : M j l = 1 } F' \leftarrow F \cup\{l \ne j : M_{il}=1\} \cup\{l \ne i : M_{jl}=1\} F ′ ← F ∪ { l = j : M i l = 1 } ∪ { l = i : M j l = 1 } .
C. Recurse: call Solve ( i + 1 , R ′ , C ′ , F ′ , g ′ − 1 ) \operatorname{Solve}(i+1,R',C',F',g'-1) Solve ( i + 1 , R ′ , C ′ , F ′ , g ′ − 1 ) .
D. If the recursive call succeeds, return its solution. Otherwise, backtrack.
(e) Return Failure.
Lifting Homology Labels to Semi-Hyperbolic Tilings
Let T \mathcal{T} T be a hyperbolic tiling for which we find a canonical homology basis, and let T ∗ \mathcal{T}^{*} T ∗ be its dual. We want to lift this basis to the fine-grained tiling T ( L ) = ( T ( L ) ∗ ) ∗ \mathcal{T}_{(L)} = (\mathcal{T}^{*}_{(L)})^{*} T ( L ) = ( T ( L ) ∗ ) ∗ , obtained by fine-graining T ∗ \mathcal{T}^{*} T ∗ with parameter L ∈ Z > 0 L \in\mathbb{Z}_{>0} L ∈ Z > 0 to get T ( L ) ∗ \mathcal{T}^{*}_{(L)} T ( L ) ∗ and then taking its dual. Let G = ( V , E ) \mathcal{G}=(V,E) G = ( V , E ) be the primal graph of T \mathcal{T} T and let ϕ : E → { 0 , 1 } 2 g \phi:E \to\{0,1\}^{2g} ϕ : E → { 0 , 1 } 2 g be the homology label map constructed from T \mathcal{T} T by Algorithm 2. Write G ( L ) = ( V ( L ) , E ( L ) ) \mathcal{G}_{(L)}=(V_{(L)},E_{(L)}) G ( L ) = ( V ( L ) , E ( L ) ) for the primal graph of T ( L ) \mathcal{T}_{(L)} T ( L ) . Since fine-graining does not alter the topology of Σ g \Sigma_g Σ g , the homology group H 1 ( Σ g ; F 2 ) H_1(\Sigma_g;\mathbb{F}_2) H 1 ( Σ g ; F 2 ) is unchanged and ϕ \phi ϕ can be lifted to G ( L ) \mathcal{G}_{(L)} G ( L ) . Every edge e ∈ E ( L ) e \in E_{(L)} e ∈ E ( L ) either crosses a segment of exactly one subdivided dual edge e ^ ∗ ∈ E ∗ \hat{e}^{*} \in E^{*} e ^ ∗ ∈ E ∗ of T ∗ \mathcal{T}^{*} T ∗ , in which case it inherits the label ϕ ( e ^ ) \phi(\hat{e}) ϕ ( e ^ ) , or lies entirely within a Euclidean patch and carries the zero label 0 0 0 . This defines the lifted homology label map ϕ ( L ) : E ( L ) → { 0 , 1 } 2 g \phi_{(L)}:E_{(L)} \to\{0,1\}^{2g} ϕ ( L ) : E ( L ) → { 0 , 1 } 2 g , constructed by Algorithm 8.
Algorithm 8: Homology Label Lifting
Input:
The hyperbolic tiling T \mathcal{T} T with primal graph G = ( V , E ) \mathcal{G} = (V,E) G = ( V , E ) ;
The homology label map ϕ : E → { 0 , 1 } 2 g \phi: E \to\{0,1\}^{2g} ϕ : E → { 0 , 1 } 2 g , as produced by Algorithm 2;
The fine-grained tiling T ( L ) = ( T ( L ) ∗ ) ∗ \mathcal{T}_{(L)} = (\mathcal{T}^{*}_{(L)})^{*} T ( L ) = ( T ( L ) ∗ ) ∗ with edge set E ( L ) E_{(L)} E ( L ) , obtained by fine-graining T ∗ \mathcal{T}^{*} T ∗ with parameter L L L and taking the dual;
For each edge e ∈ E ( L ) e \in E_{(L)} e ∈ E ( L ) , the identity of the dual edge e ^ ∗ ∈ E ∗ \hat{e}^{*} \in E^{*} e ^ ∗ ∈ E ∗ of T ∗ \mathcal{T}^{*} T ∗ it crosses, if any.
Output: A lifted homology label map ϕ ( L ) : E ( L ) → { 0 , 1 } 2 g \phi_{(L)} : E_{(L)} \to\{0,1\}^{2g} ϕ ( L ) : E ( L ) → { 0 , 1 } 2 g .
Method:
Initialize ϕ ( L ) ( e ) : = 0 \phi_{(L)}(e) := 0 ϕ ( L ) ( e ) := 0 for all e ∈ E ( L ) e \in E_{(L)} e ∈ E ( L ) .
For each edge e ∈ E ( L ) e \in E_{(L)} e ∈ E ( L ) that crosses a dual edge e ^ ∗ ∈ E ∗ \hat{e}^{*} \in E^{*} e ^ ∗ ∈ E ∗ of T ∗ \mathcal{T}^{*} T ∗ , set
ϕ ( L ) ( e ) : = ϕ ( e ^ ) . \phi_{(L)}(e) := \phi(\hat{e}). ϕ ( L ) ( e ) := ϕ ( e ^ ) .
Return ϕ ( L ) \phi_{(L)} ϕ ( L ) .
Note:
The homology class of any cycle γ ⊆ E ( L ) \gamma\subseteq E_{(L)} γ ⊆ E ( L ) on the fine-grained tiling is computed as
h ( γ ) = ⨁ e ∈ γ ϕ ( L ) ( e ) ∈ { 0 , 1 } 2 g , h(\gamma) = \bigoplus_{e \in\gamma} \phi_{(L)}(e) \in\{0,1\}^{2g}, h ( γ ) = e ∈ γ ⨁ ϕ ( L ) ( e ) ∈ { 0 , 1 } 2 g ,
in exact analogy with the hyperbolic case. Cycles with h ( γ ) = 0 h(\gamma) = 0 h ( γ ) = 0 are trivial and discarded; non-zero labels identify the homology class.
Computing distances of semi-hyperbolic codes
While the logical error rate under circuit-level noise with practical decoding is the most robust metric with which we assess the codes considered in this work, another important metric is the code distance. Determining the distance of the semi-hyperbolic color and surface codes is important both for filtering viable code candidates, as well as for estimating the performance of codes (via extrapolation) at system sizes and error rates that are currently beyond the reach of our decoders or Monte Carlo sampling budget. In our search for promising codes, we constructed over 10 4 10^4 1 0 4 tilings, and for each tiling we constructed up to 7 semi-hyperbolic codes using L ∈ { 1 , 2 , … , 7 } L \in\{1,2,\ldots,7\} L ∈ { 1 , 2 , … , 7 } . Furthermore, many codes of interest have very large block lengths, some with as many as n ≈ 10 5 n \approx10^5 n ≈ 1 0 5 data qubits. We emphasize that while these codes can be large, they can still be dense and therefore useful if they comprise a large fraction of the storage in a utility-scale quantum computer (and do not encode many more logical qubits than are needed).
Computing the distances of these large codes, not least doing so fast enough to filter through such a large database of tilings, was beyond the capabilities of the distance finding methods in the literature [44 ] , including even the graphlike distance finding methods such as the stim method stim.Circuit.shortest_graphlike_error [14 ] . Fortunately, we were able to develop fast and accurate distance finding methods by adapting the methods for finding short homology bases (see Section S9) while exploiting the symmetries of the tilings to dramatically reduce the search space without loss of accuracy.
Monochromatic Cycle Distance Upper Bound for Semi-Hyperbolic Color Codes
For semi-hyperbolic color codes, the shortest logical error is not guaranteed to correspond to a monochromatic substring α C \alpha_C α C of a homologically nontrivial cycle in the three-colorable tiling as defined in § 1.5 A (i.e. a cycle in a shrunk lattice of [1 ] ). We will refer to the shortest error corresponding to a monochromatic substring α C \alpha_C α C (for C ∈ { R , G , B } C \in\{R,G,B\} C ∈ { R , G , B } ) as the shortest stringlike error. The shortest stringlike color code logical, while not always minimum weight, is a very useful upper bound for the distance in practice and is usually tight (as we will show). We now define the shortest stringlike error more explicitly. As explained in § 1.5 A, associated with a homologically non-trivial cycle α \alpha α in the three-colorable tiling, there is both an X X X -type and a Z Z Z -type logical operator associated with each monochromatic substring α C \alpha_C α C (for C ∈ { R , G , B } C \in\{R,G,B\} C ∈ { R , G , B } ). For example, the logical X ‾ R α \overline{X}^{\alpha}_R X R α is the Pauli operator with X X X support on the two qubits at the endpoints of each red edge in α \alpha α . Concretely,
X ‾ C α : = ⨂ v ∈ V ( α C ) X v , Z ‾ C α : = ⨂ v ∈ V ( α C ) Z v , (56) \overline{X}^{\alpha}_C := \bigotimes_{v\in V(\alpha_C)} X_v,\qquad\overline{Z}^{\alpha}_C := \bigotimes_{v\in V(\alpha_C)} Z_v, \tag*{(56)} X C α := v ∈ V ( α C ) ⨂ X v , Z C α := v ∈ V ( α C ) ⨂ Z v , (56)
where α C : = { e ∈ α ∣ c ( e ) = C } \alpha_C := \{e \in\alpha\mid c(e) = C\} α C := { e ∈ α ∣ c ( e ) = C } denotes the set of edges of color C C C contained in the cycle α \alpha α , and V ( α C ) ⊆ V V(\alpha_C) \subseteq V V ( α C ) ⊆ V is the set of vertices incident to at least one edge in α C \alpha_C α C .
Because the edges in α C \alpha_C α C are disjoint along any cycle α \alpha α on a trivalent tiling, every edge e = ( u , w ) ∈ α C e = (u,w) \in\alpha_C e = ( u , w ) ∈ α C contributes exactly two distinct vertices. The weight (number of physical data qubits in the support) of a monochromatic stringlike operator associated with color C C C is therefore
∣ X ‾ C α ∣ = ∣ Z ‾ C α ∣ = ∣ V ( α C ) ∣ = 2 ∣ α C ∣ . (57) \left|\overline{X}^{\alpha}_C\right| = \left|\overline{Z}^{\alpha}_C\right| = \left|V(\alpha_C)\right| = 2\left|\alpha_C\right|. \tag*{(57)} X C α = Z C α = ∣ V ( α C ) ∣ = 2 ∣ α C ∣ . (57)
The weight of the shortest stringlike error associated with the cycle α \alpha α is given by
w s t r i n g ( α ) : = min C ∈ { R , G , B } 2 ∣ α C ∣ , (58) w_{\mathrm{string}}(\alpha) := \min_{C\in\{R,G,B\}} 2\left|\alpha_C\right|, \tag*{(58)} w string ( α ) := C ∈ { R , G , B } min 2 ∣ α C ∣ , (58)
and the shortest stringlike error across the entire code is obtained by minimizing w s t r i n g ( α ) w_{\mathrm{string}}(\alpha) w string ( α ) over all homologically non-trivial cycles α \alpha α .
To compute the shortest stringlike error of a semi-hyperbolic color code efficiently, we adapt the cycle enumeration procedure of Section S9. We first establish a homology coordinate system on the three-colorable tiling via the tree-cotree decomposition (Section S9 A), which assigns a 2 g 2g 2 g -bit homology label ϕ ( e ) \phi(e) ϕ ( e ) to each edge.
Instead of an unweighted BFS, which minimizes the total edge length ∣ α ∣ |\alpha| ∣ α ∣ , we determine the minimum-weight representative for each color C ∈ { R , G , B } C \in\{R,G,B\} C ∈ { R , G , B } by running a shortest-path search on a weighted graph. Specifically, for a target color C C C , we define the edge weight function
w C ( e ) : = 2 δ c ( e ) , C = { 2 if c ( e ) = C , 0 if c ( e ) ≠ C . (59) w_C(e) := 2\delta_{c(e),C} =
\begin{cases}
2 & \text{if } c(e)=C,\\
0 & \text{if } c(e)\ne C.
\end{cases} \tag*{(59)} w C ( e ) := 2 δ c ( e ) , C = { 2 0 if c ( e ) = C , if c ( e ) = C . (59)
Under this weighting, the length of any cycle α \alpha α under w C w_C w C corresponds exactly to ∣ X C α ∣ |X_C^\alpha| ∣ X C α ∣ . We then find the shortest homologically non-trivial cycle using Dijkstra’s algorithm. Because edges with c ( e ) ≠ C c(e) \ne C c ( e ) = C carry zero weight, paths traversing connected components of non-C C C edges do not accrue cost, which mirrors traversing the shrunk lattice of color C C C [1 ] .
Running this search from every vertex across large semi-hyperbolic lattices (n ≈ 10 5 n \approx10^5 n ≈ 1 0 5 ) remains computationally expensive. To accelerate the search, we exploit the global symmetries of the tiling described in Section S1 G. Recall that each base triangle in T △ T^\triangle T △ corresponds uniquely to an element g ∈ G = △ ( r , s , t ) / Γ g \in G = \triangle(r,s,t)/\Gamma g ∈ G = △ ( r , s , t ) /Γ . Because the data qubits of the semi-hyperbolic color code sit on the vertices of the dual tiling ( T L △ ) ∗ (T^\triangle_L)^* ( T L △ ) ∗ , each physical vertex v ∈ V v \in V v ∈ V lies within the interior of a base triangle. We can therefore define π : V → G \pi: V \to G π : V → G , which maps each vertex v ∈ V v \in V v ∈ V to the group element labeling the base triangle that contains it. Left multiplication by an element h ∈ G h \in G h ∈ G induces a global isometry A h A_h A h of the tiled surface, which acts as a code automorphism that preserves cycle weights, edge colors, and homological non-triviality.
Suppose α C min \alpha_C^{\min} α C m i n is a minimum-weight stringlike error of color C C C . Because any cycle confined entirely within a single Euclidean base triangle is contractible (homologically trivial), α C min \alpha_C^{\min} α C m i n must cross between distinct base triangles. Therefore, α C min \alpha_C^{\min} α C m i n must contain at least one edge ( u , v ) (u,v) ( u , v ) that crosses a base triangle edge, i.e. such that π ( u ) ≠ π ( v ) \pi(u) \ne\pi(v) π ( u ) = π ( v ) .
Applying the automorphism A π ( u ) − 1 A_{\pi(u)^{-1}} A π ( u ) − 1 associated with the inverse element π ( u ) − 1 ∈ G \pi(u)^{-1} \in G π ( u ) − 1 ∈ G maps the base triangle π ( u ) \pi(u) π ( u ) directly onto the identity fundamental domain e e e . The resulting image cycle
α ~ C : = A π ( u ) − 1 ( α C min ) (60) \widetilde{\alpha}_C := A_{\pi(u)^{-1}}\left(\alpha_C^{\min}\right) \tag*{(60)} α C := A π ( u ) − 1 ( α C m i n ) (60)
has identical weight to α C min \alpha_C^{\min} α C m i n , while still belonging to a non-trivial homology class. The image vertex u ~ : = A π ( u ) − 1 ( u ) \widetilde{u} := A_{\pi(u)^{-1}}(u) u := A π ( u ) − 1 ( u ) satisfies π ( u ~ ) = e \pi(\widetilde{u}) = e π ( u ) = e and is incident to an edge connecting the fundamental triangle e e e to an adjacent base triangle.
As a result, we do not need to initiate the Dijkstra search from all ∣ V ∣ = L 2 ∣ G ∣ |V| = L^2|G| ∣ V ∣ = L 2 ∣ G ∣ vertices in the fine-grained lattice. It is sufficient to restrict the candidate source vertices to
B : = { u ∈ V ∣ π ( u ) = e and ∃ ( u , v ) ∈ E such that π ( v ) ≠ e } , (61) \mathcal{B} := \left\{u \in V \mid\pi(u) = e \text{ and } \exists\,(u,v) \in E \text{ such that } \pi(v) \ne e\right\}, \tag*{(61)} B := { u ∈ V ∣ π ( u ) = e and ∃ ( u , v ) ∈ E such that π ( v ) = e } , (61)
which is the 1D ring of vertices situated along the perimeter of the fundamental triangle e e e (Figure S58 ). Minimizing the resulting cycle weights over all source vertices u ∈ B u \in\mathcal{B} u ∈ B and all three colors C ∈ { R , G , B } C \in\{R,G,B\} C ∈ { R , G , B } is guaranteed to recover a globally shortest stringlike error. Because ∣ B ∣ = O ( L ) |\mathcal{B}| = O(L) ∣ B ∣ = O ( L ) , this restricts the search from O ( L 2 ∣ G ∣ ) O(L^2|G|) O ( L 2 ∣ G ∣ ) sources to just O ( L ) O(L) O ( L ) sources, reducing the total distance-finding runtime by a factor of ∣ G ∣ |G| ∣ G ∣ without compromising accuracy.
Figure S58. We find the distances of semi-hyperbolic color and surface codes by adapting the methods of Section S9 and exploiting the symmetries of the tilings to improve efficiency. After establishing a homology coordinate system via the tree-cotree decomposition (Section S9 A), the shortest homologically non-trivial cycles are found via graph search initiated from a reduced source set B \mathcal{B} B . Global tiling automorphisms guarantee that at least one representative of a minimum-weight homologically non-trivial cycle passes through any chosen fundamental domain, allowing B \mathcal{B} B to be restricted to a single tile rather than all vertices in the code. a, For semi-hyperbolic color codes, B \mathcal{B} B is restricted to the vertices of the dual tiling ( T L △ ) ∗ (T_L^\triangle)^* ( T L △ ) ∗ within the fundamental triangle of the base tiling T △ T^\triangle T △ (purple boundary), or further restricted to those incident to inter-triangle crossing edges (purple vertices) without loss of accuracy. A red shortest stringlike error passing through this fundamental domain is highlighted. b, For semi-hyperbolic surface codes, B \mathcal{B} B is restricted to the cell complex vertices associated with a single fundamental quadrilateral of the symmetry group (purple boundary), where candidate source vertices adjacent to the boundary of the quadrilateral (highlighted in purple) suffice to find shortest non-trivial cycles.
Restricted Lattice Distance Lower Bound for Semi-Hyperbolic Color Codes
While the weight of the shortest stringlike error d s t r i n g d_{\mathrm{string}} d string provides an efficient upper bound on the color code distance, d ≤ d s t r i n g d \le d_{\mathrm{string}} d ≤ d string , a general color code logical operator can branch (since each single-qubit error anti-commutes with three stabilizers), potentially resulting in a lower physical weight. While we do find that d = d s t r i n g d = d_{\mathrm{string}} d = d string holds for the vast majority of codes we consider, we do find some codes (mostly distance 2) where it does not. A simple example is the Bolza code, which has distance 2 despite its shortest stringlike error having weight 4, as shown in Figure S59 . In this section we show that we can also efficiently compute a useful lower bound on the distance of the color code. When this lower bound matches the stringlike upper bound d s t r i n g d_{\mathrm{string}} d string , as is often the case, we can efficiently certify the true distance.
Figure S59. The minimum-weight stringlike error is an upper bound on the distance, but the true minimum-weight error may have lower weight, as shown here for the Bolza color code (with L = 1 L = 1 L = 1 ). a, A minimum-weight stringlike error (weight 4), consisting of X errors at the endpoints of the red edges α R \alpha_R α R in a minimum-length homologically nontrivial cycle α \alpha α . b, The true distance of the Bolza color code is 2. A minimum-weight (non-stringlike) error is shown. Each X error anti-commutes with the same triplet of stabilizers. c, The red, green and blue restricted lattices are shown on top of the tiling (combined, they form the dual tiling T △ T^\triangle T △ ). We will show how the shortest homologically nontrivial cycles in the restricted lattices can be used to provide a lower bound on the distance.
We will demonstrate the lower bound for the X X X distance, namely for X X X -type errors x ∈ F 2 n x \in\mathbb{F}_2^n x ∈ F 2 n , and will denote the code’s Z Z Z parity check matrix by H ∈ F 2 m 2 × n H \in\mathbb{F}_2^{m_2 \times n} H ∈ F 2 m 2 × n and the Z Z Z logical matrix by L ∈ F 2 k 2 × n L \in\mathbb{F}_2^{k_2 \times n} L ∈ F 2 k 2 × n . The X X X distance d d d is then
d : = min x ∈ F 2 n ∖ { 0 } H x = 0 L x ≠ 0 ∣ x ∣ . (62) d := \min_{\substack{x \in\mathbb{F}_2^n \setminus\{0\}\\ Hx=0\\ Lx\ne0}} |x|. \tag*{(62)} d := x ∈ F 2 n ∖ { 0 } H x = 0 Lx = 0 min ∣ x ∣. (62)
It is sufficient to consider the X X X distance only, since color codes are self-dual, and hence have identical X X X and Z Z Z distances.
Our lower bound makes use of the red, green and blue restricted lattices often used by color code decoders [45 , 46 ] . Before proving the distance lower bound more formally, we first sketch the argument, which goes as follows:
We define the map (used in color code decoders) from an X X X -type error x ∈ F 2 n x \in\mathbb{F}_2^n x ∈ F 2 n to a set of edges in each of the restricted lattices, its C C C -restriction Res C ( x ) \operatorname{Res}_C(x) Res C ( x ) .
We show that the weight of the C C C -restriction cannot exceed the weight of the error itself, ∣ Res C ( x ) ∣ ≤ ∣ x ∣ |\operatorname{Res}_C(x)| \le|x| ∣ Res C ( x ) ∣ ≤ ∣ x ∣ .
A logical error x x x , with trivial syndrome H x = 0 Hx = 0 H x = 0 and non-trivial logical action L x ≠ 0 Lx \ne0 Lx = 0 , has a C C C -restriction that is homologically non-trivial for at least two of the three colors C ∈ { R , G , B } C \in\{R, G, B\} C ∈ { R , G , B } .
This implies that the median of the systoles s C r e s s_C^{\mathrm{res}} s C res for each of the restricted lattices is a lower bound on the distance d r e s : = median ( s R r e s , s G r e s , s B r e s ) ≤ d d_{\mathrm{res}} := \operatorname{median}(s_R^{\mathrm{res}}, s_G^{\mathrm{res}}, s_B^{\mathrm{res}}) \le d d res := median ( s R res , s G res , s B res ) ≤ d .
Let us first define the restricted lattices [45 , 46 ] . Recall that the base triangular tiling T △ T^\triangle T △ , the dual of the color code tiling T T T , has vertices colored { R , G , B } \{R, G, B\} { R , G , B } corresponding to the faces of T T T . Each edge e : = ( u , v ) ∈ T △ e := (u,v) \in T^\triangle e := ( u , v ) ∈ T △ is assigned a color c ( e ) ∈ { R , G , B } ∖ { c ( u ) , c ( v ) } c(e) \in\{R, G, B\} \setminus\{c(u), c(v)\} c ( e ) ∈ { R , G , B } ∖ { c ( u ) , c ( v )} that complements the colors of the two vertices at its endpoints. Equivalently, each edge in T △ T^\triangle T △ is assigned the same color as the edge it crosses in T T T . For each color C ∈ { R , G , B } C \in\{R, G, B\} C ∈ { R , G , B } we form the C C C -restricted lattice R C \mathcal{R}_C R C , whose edge set is all the edges of color C C C in T △ T^\triangle T △ . Its vertices are the dual vertices of the other two colors { R , G , B } ∖ { C } \{R, G, B\} \setminus\{C\} { R , G , B } ∖ { C } . The vertices of color C C C (and their incident edges) are deleted, each replaced with a face bounded by the remaining surrounding edges. See Figure S60 for an illustration of the restricted lattices.
Figure S60. The restricted lattices of the 8.8.8 hyperbolic color code with parameters [ [ 32 , 12 , 4 ] ] [[32,12,4]] [[ 32 , 12 , 4 ]] and symmetry group △ ( 4 , 4 , 4 ) 40 \triangle(4,4,4)_{40} △ ( 4 , 4 , 4 ) 40 . a, The degree-3 tiling of octagons is the color code tiling T \mathcal{T} T , with a data qubit associated with each vertex. The dual triangular tiling T △ \mathcal{T}^{\triangle} T △ is also shown, with each edge colored with the same color C ∈ { R , G , B } C \in\{R,G,B\} C ∈ { R , G , B } as the primal edge in T \mathcal{T} T that it crosses. Each vertex of T △ \mathcal{T}^{\triangle} T △ inherits the color of the primal face it is dual to. An edge e ∗ = ( u , w ) ∈ T △ e^{*}=(u,w)\in\mathcal{T}^{\triangle} e ∗ = ( u , w ) ∈ T △ connects vertices of two distinct colors, and its color c ( e ∗ ) c(e^{*}) c ( e ∗ ) is assigned the third color, satisfying { c ( e ∗ ) , c ( u ) , c ( w ) } = { R , G , B } \{c(e^{*}),c(u),c(w)\}=\{R,G,B\} { c ( e ∗ ) , c ( u ) , c ( w )} = { R , G , B } . An X X X error on a single data qubit corresponding to a vertex x ∈ T x\in\mathcal{T} x ∈ T is shown. The C C C -restriction Res C ( x ) \operatorname{Res}_{C}(x) Res C ( x ) of an error on such a vertex x ∈ T x\in\mathcal{T} x ∈ T is the unique adjacent edge e ∗ e^{*} e ∗ of color c ( e ∗ ) = C c(e^{*})=C c ( e ∗ ) = C in T △ \mathcal{T}^{\triangle} T △ . We have highlighted in grey the edges Res R ( x ) \operatorname{Res}_{R}(x) Res R ( x ) , Res G ( x ) \operatorname{Res}_{G}(x) Res G ( x ) and Res B ( x ) \operatorname{Res}_{B}(x) Res B ( x ) of the X X X error on x x x . b, The edges of the green restricted lattice R G \mathcal{R}_{G} R G are shown. R G \mathcal{R}_{G} R G is formed by removing each green vertex from T △ \mathcal{T}^{\triangle} T △ and its incident red and blue edges to form a face. The edges of R G \mathcal{R}_{G} R G are the green edges of T △ \mathcal{T}^{\triangle} T △ . The Pauli operator y ∈ F 2 n y\in\mathbb{F}_{2}^{n} y ∈ F 2 n corresponding to a green X X X stabilizer is shown, as well as its restriction Res G ( y ) \operatorname{Res}_{G}(y) Res G ( y ) , a face of the green restricted lattice. Any stabilizer has C C C -restrictions that are homologically trivial. c, A weight-four logical X X X -type error z ∈ F 2 n z\in\mathbb{F}_{2}^{n} z ∈ F 2 n is shown (a blue monochromatic stringlike error X B α X_{B}^{\alpha} X B α ) as well as its C C C -restriction Res C ( z ) \operatorname{Res}_{C}(z) Res C ( z ) on the three restricted lattices (all highlighted). A logical error has a homologically non-trivial C C C -restriction for at least two of the three colors. Here Res R ( z ) \operatorname{Res}_{R}(z) Res R ( z ) and Res G ( z ) \operatorname{Res}_{G}(z) Res G ( z ) are homologically non-trivial and Res B ( z ) \operatorname{Res}_{B}(z) Res B ( z ) is trivial (an empty cycle). Since each single-qubit error contributes at most one edge in its C C C -restriction (and two errors with the same restriction cancel modulo 2), the weight of a C C C -restriction is a lower bound on the weight of the error, ∣ Res C ( z ) ∣ ≤ ∣ z ∣ |\operatorname{Res}_{C}(z)|\leq|z| ∣ Res C ( z ) ∣ ≤ ∣ z ∣ . Here ∣ Res R ( z ) ∣ = ∣ Res G ( z ) ∣ = 4 |\operatorname{Res}_{R}(z)|=|\operatorname{Res}_{G}(z)|=4 ∣ Res R ( z ) ∣ = ∣ Res G ( z ) ∣ = 4 and ∣ Res B ( z ) ∣ = 0 |\operatorname{Res}_{B}(z)|=0 ∣ Res B ( z ) ∣ = 0 . The second smallest of the three systoles therefore lower bounds the distance. Concretely d r e s : = median ( s R r e s , s G r e s , s B r e s ) ≤ d d_{\mathrm{res}}:=\operatorname{median}(s_{R}^{\mathrm{res}},s_{G}^{\mathrm{res}},s_{B}^{\mathrm{res}})\leq d d res := median ( s R res , s G res , s B res ) ≤ d where s C r e s s_{C}^{\mathrm{res}} s C res is the systole of the restricted lattice R C \mathcal{R}_{C} R C . In this example d r e s = 4 ≤ d ≤ d s t r i n g = 4 d_{\mathrm{res}}=4\leq d\leq d_{\mathrm{string}}=4 d res = 4 ≤ d ≤ d string = 4 certifies that the distance is 4.
Each data qubit corresponds to a vertex v v v in T T T and the corresponding triangular face τ v \tau_v τ v in the dual triangular lattice T △ T^\triangle T △ . Each data qubit is therefore incident to exactly one edge in each restricted lattice R C \mathcal{R}_C R C . We denote by e C ( v ) e_C(v) e C ( v ) the C C C -colored edge belonging to τ v \tau_v τ v , i.e. the edge in R C \mathcal{R}_C R C adjacent to v v v (see Figure S60 ). Since color codes are self-dual, it is sufficient to consider only X X X -type errors, and then Z Z Z -type errors can be handled similarly. We represent a physical Pauli X X X error using a binary vector x ∈ F 2 n x \in\mathbb{F}_2^n x ∈ F 2 n , corresponding to the Pauli operator ⨂ i X i x i \bigotimes_i X_i^{x_i} ⨂ i X i x i . The C C C -restriction Res C ( x ) \operatorname{Res}_C(x) Res C ( x ) of an error x x x is a set of edges (1-chain) in the restricted lattice obtained by mapping each error on a qubit v v v to its edge e C ( v ) e_C(v) e C ( v ) in R C \mathcal{R}_C R C ,
Res C ( x ) : = ∑ v ∈ V x v e C ( v ) ∈ C 1 ( R C ; F 2 ) . (63) \operatorname{Res}_C(x) := \sum_{v \in V} x_v e_C(v) \in C_1(\mathcal{R}_C; \mathbb{F}_2). \tag*{(63)} Res C ( x ) := v ∈ V ∑ x v e C ( v ) ∈ C 1 ( R C ; F 2 ) . (63)
While each qubit error maps to a single edge in the restricted lattice R C \mathcal{R}_C R C , each edge in R C \mathcal{R}_C R C is the image of two qubit errors, which can cancel modulo 2. Concretely, [ Res C ( x ) ] e ∗ = x u + x v ( m o d 2 ) [\operatorname{Res}_C(x)]_{e^*} = x_u + x_v \pmod2 [ Res C ( x ) ] e ∗ = x u + x v ( mod 2 ) , where e ∗ e^* e ∗ is the edge in R C \mathcal{R}_C R C that is the dual of edge e = ( u , v ) e = (u,v) e = ( u , v ) in T T T . See the blue restriction in Figure S60 for an example. As a result, the weight of an error ∣ x ∣ |x| ∣ x ∣ is lower bounded by the weight of its C C C -restriction,
∣ Res C ( x ) ∣ ≤ ∣ x ∣ . (64) |\operatorname{Res}_C(x)| \le|x|. \tag*{(64)} ∣ Res C ( x ) ∣ ≤ ∣ x ∣. (64)
We now show that any logical error x ∈ F 2 n x \in\mathbb{F}_2^n x ∈ F 2 n , by definition satisfying H x = 0 Hx = 0 H x = 0 and L x ≠ 0 Lx \ne0 Lx = 0 , must have a C C C -restriction Res C ( x ) \operatorname{Res}_C(x) Res C ( x ) that is homologically non-trivial in at least two of the three colors C ∈ { R , G , B } C \in\{R, G, B\} C ∈ { R , G , B } . This follows directly from Theorem 6.4 of [45 ] and Theorem 2 of [46 ] , however we present a self-contained argument here for completeness. First we show that any error x x x with trivial syndrome (H x = 0 Hx = 0 H x = 0 ) has a C C C -restriction that is a cycle for every color C ∈ { R , G , B } C \in\{R, G, B\} C ∈ { R , G , B } . First, notice that each vertex in R R \mathcal{R}_R R R is the dual of a green or blue face in T T T . If an X X X error x x x commutes with a green or blue Z Z Z stabilizer, it implies that there must be an even number of edges in its restriction Res R ( x ) \operatorname{Res}_R(x) Res R ( x ) incident to the corresponding vertex in R R \mathcal{R}_R R R . Therefore if x x x commutes with all green and blue Z Z Z stabilizers this implies that Res R ( x ) \operatorname{Res}_{R}(x) Res R ( x ) must be a cycle in R R \mathcal{R}_{R} R R , and the same argument applied to the other restricted lattices suffices to show that all C C C -restrictions are cycles if H x = 0 H x=0 H x = 0 . To see why the cycle must further be homologically non-trivial, we first observe that every face of R C \mathcal{R}_{C} R C is the C C C -restriction of an X X X stabilizer associated with a C C C -colored plaquette in T \mathcal{T} T (see Figure S60 ). Therefore, if an error x x x has homologically trivial restrictions in all three lattices, each Res C ( x ) \operatorname{Res}_{C}(x) Res C ( x ) is a sum of faces of R C \mathcal{R}_{C} R C , and multiplying x x x by a product of physical face stabilizers of each color yields an equivalent operator x ′ x' x ′ whose restricted chains are all empty: Res R ( x ′ ) = Res G ( x ′ ) = Res B ( x ′ ) = 0 \operatorname{Res}_{R}(x')=\operatorname{Res}_{G}(x')=\operatorname{Res}_{B}(x')=0 Res R ( x ′ ) = Res G ( x ′ ) = Res B ( x ′ ) = 0 . Because each dual edge of R C \mathcal{R}_{C} R C carries the parity x u ′ + x v ′ ( m o d 2 ) x'_{u}+x'_{v}\pmod2 x u ′ + x v ′ ( mod 2 ) of the errors at the vertices of the primal edge ( u , v ) (u,v) ( u , v ) of color C C C , an empty restriction forces x u ′ = x v ′ x'_{u}=x'_{v} x u ′ = x v ′ across every primal edge of that color. Having all three restrictions empty therefore propagates equality across every red, green, and blue edge of the tiling. Since T \mathcal{T} T is connected, x ′ x' x ′ must be either 0 (the identity) or 1 (the product of all red face stabilizers), both of which have trivial logical action L x ′ = 0 Lx'=0 L x ′ = 0 . Therefore, by contraposition, any non-trivial logical error (H x = 0 Hx=0 H x = 0 and L x ≠ 0 Lx\neq0 Lx = 0 ) must have a homologically non-trivial restriction Res C ( x ) \operatorname{Res}_{C}(x) Res C ( x ) in at least one color C C C . Now let h C : = [ Res C ( x ) ] ∈ H 1 ( Σ g ; F 2 ) h_{C}:=[\operatorname{Res}_{C}(x)]\in H_{1}(\Sigma_{g};\mathbb{F}_{2}) h C := [ Res C ( x )] ∈ H 1 ( Σ g ; F 2 ) denote the homology class of Res C ( x ) \operatorname{Res}_{C}(x) Res C ( x ) . Notice that the sum of the three C C C -restrictions of a single qubit error on qubit v v v is the boundary of the corresponding triangle τ v ∈ T △ \tau_{v}\in\mathcal{T}^{\triangle} τ v ∈ T △ . Therefore for any error x x x , the sum of the three homology classes is trivial:
h R + h G + h B = 0 in H 1 ( Σ g ; F 2 ) . (65) h_{R}+h_{G}+h_{B}=0 \quad\text{in } H_{1}(\Sigma_{g};\mathbb{F}_{2}). \tag*{(65)} h R + h G + h B = 0 in H 1 ( Σ g ; F 2 ) . (65)
Consequently, a non-trivial logical operator cannot have exactly one homologically non-trivial C C C -restriction, and therefore must be homologically non-trivial for at least two of the colors.
For each color C C C with h C ≠ 0 h_{C}\neq0 h C = 0 , we have ∣ x ∣ ≥ ∣ Res C ( x ) ∣ ≥ s C r e s |x|\geq|\operatorname{Res}_{C}(x)|\geq s_{C}^{\mathrm{res}} ∣ x ∣ ≥ ∣ Res C ( x ) ∣ ≥ s C res . Because this holds for at least two colors, ∣ x ∣ |x| ∣ x ∣ is bounded below by the second-smallest of the three systoles, which is their median:
d r e s : = median ( s R r e s , s G r e s , s B r e s ) ≤ d . (66) d_{\mathrm{res}}:=\operatorname{median}(s_{R}^{\mathrm{res}},s_{G}^{\mathrm{res}},s_{B}^{\mathrm{res}})\leq d. \tag*{(66)} d res := median ( s R res , s G res , s B res ) ≤ d . (66)
Combining this with the stringlike upper bound we have
d r e s ≤ d ≤ d s t r i n g . (67) d_{\mathrm{res}}\leq d\leq d_{\mathrm{string}}. \tag*{(67)} d res ≤ d ≤ d string . (67)
The restricted lattice systoles can be computed efficiently using essentially the same methods as described for the upper bound computation in Section S10 A, using unweighted BFS searches on the restricted lattices after establishing their homology coordinate system using a tree-cotree decomposition, and again restricting the BFS to source vertices contained within a fundamental triangle to speed up the search without loss of accuracy. Whenever d r e s = d s t r i n g d_{\mathrm{res}} = d_{\mathrm{string}} d res = d string , the code distance is certified exactly, using only efficient graph algorithms.
Distance Computation for Semi-Hyperbolic Surface Codes
For semi-hyperbolic surface codes, the minimum-weight logical Z Z Z (X X X ) errors correspond to the shortest homologically non-trivial cycles in the primal (dual) cell complex T c e l l T_{\mathrm{cell}} T cell (Figure S40 ). We compute the code distance d = min ( d X , d Z ) d = \min(d_X,d_Z) d = min ( d X , d Z ) by exploiting the symmetries of the tiling in an analogous way. After establishing a homology coordinate system on T c e l l T_{\mathrm{cell}} T cell and its dual via tree-cotree decomposition, we find the shortest non-trivial cycles using a BFS.
As in the color code case, any homologically non-trivial cycle must cross between neighboring fundamental domains of the underlying tiling’s symmetry group (whether a quadrilateral reflection group □ ( r , s , t , u ) \square(r,s,t,u) □ ( r , s , t , u ) or a triangle group Δ ( 2 , 4 , q ) \Delta(2,4,q) Δ ( 2 , 4 , q ) ). Global automorphisms therefore allow us to restrict the BFS source vertices to a small subset of boundary vertices B \mathcal{B} B contained within a single fundamental domain (Figure S58 ). This preserves exactness while reducing the number of search sources from O ( L 2 ∣ G ∣ ) O(L^2|G|) O ( L 2 ∣ G ∣ ) to O ( L ) O(L) O ( L ) .
We benchmarked the runtime and accuracy of our distance finding methods that we have described in this section, and compared them against the existing methods. The methods we compare against for the semi-hyperbolic color codes are the connected cluster algorithm [47 , 48 ] , and the stim hypergraph search method stim.Circuit.search_for_undetectable_logical_errors [14 ] . The connected cluster algorithm is exact but has complexity n ( Δ − 1 ) d − 1 n(\Delta-1)^{d-1} n ( Δ − 1 ) d − 1 for a code with check weight Δ \Delta Δ and distance d d d . The stim hypergraph search method is a heuristic with tunable parameters to adjust the size of the search, and only produces an upper bound on the distance. For the semi-hyperbolic surface codes, we compare our systole search method (Section S10 C) against the stim method stim.Circuit.shortest_graphlike_error and connected cluster method. We refer the reader to [44 ] for a comparison of a broader range of existing exact and heuristic distance finding methods for hyperbolic surface and color codes with n < 1200 n < 1200 n < 1200 .
Our runtime comparisons are shown in Figure S61 . Empirically, across the system sizes we benchmarked, our systole search methods for both color and surface codes are an excellent fit to a runtime scaling of t ∝ n t \propto n t ∝ n . In the limit of large system sizes we expect the complexity to become t ∝ ∣ B ∣ n ⌈ 2 g / w ⌉ t \propto|\mathcal{B}|n^{\lceil2g/w\rceil} t ∝ ∣ B ∣ n ⌈ 2 g / w ⌉ , where B \mathcal{B} B is the set of source nodes (restricted to a fundamental domain). By contrast, the stim and connected cluster methods have a much steeper scaling with n n n (and are exponential in d d d ), and are therefore too slow to be practical for system sizes above around 10 3 10^3 1 0 3 –10 4 10^4 1 0 4 qubits. This demonstrates the importance of our efficient distance finding methods for evaluating codes with large system sizes relevant to utility-scale quantum computation.
Figure S61. A comparison of the runtime of different distance finding methods for the color codes and surface codes in the tables in § 1.12 . For both color and surface codes we plot the runtime (measured using AMD EPYC 7B13 processors) against the number of data qubits in the code. In both plots, dashed lines show least-squares fits of log t \log t log t against log n \log n log n over all codes shown, corresponding to a power law t ∝ n α t \propto n^{\alpha} t ∝ n α with the exponents given in the legend. We set a timeout of 600 seconds per code for all methods and open markers are runs that did not complete within this budget. a , Runtimes of distance-finding methods for semi-hyperbolic color codes. We compare the stringlike color code distance upper bound of Section S10 A (d s t r i n g d_{\mathrm{string}} d string ), the restricted lattice lower bound of Section S10 B (d r e s d_{\mathrm{res}} d res ), the stim.Circuit.search_for_undetectable_logical_errors method from Stim [14 ] , and the connected cluster method of Ref. [47 ] as implemented in [48 ] . For the stim method we set dont_explore_detection_event_sets_with_size_above=5, dont_explore_edges_with_degree_above=3 and dont_explore_edges_increasing_symptom_degree=False. Note that for the stim and connected cluster methods there is a setup cost associated with how the methods are called which hides the true algorithmic scaling for small (n < 500 n < 500 n < 500 ) codes. b , Runtimes of distance finding methods for semi-hyperbolic surface codes using the systole search method of Section S10 C, compared to the Stim stim.Circuit.shortest_graphlike_error method and the connected cluster algorithm [47 , 48 ] .
The connected cluster method, being exact, is very useful for evaluating the accuracy (tightness) of our color code distance bounds for small system sizes. In Table S5 we compare our efficient distance bounds with each other for 32,689 tilings we constructed, as well as comparing them to the connected cluster (exact) distance for the subset of codes we could run it on within a time budget of 300 seconds. We find that the distance is efficiently certified (d r e s = d s t r i n g d_{\mathrm{res}}=d_{\mathrm{string}} d res = d string ) for a large fraction of the codes (88% to 100% of codes depending on L L L ). When comparing to the exact distance computed with connected cluster, we find that the exact distance matches the upper bound d s t r i n g d_{\mathrm{string}} d string for all codes for which connected cluster finished at L = 3 L=3 L = 3 and L = 4 L=4 L = 4 , and with a > 98 % >98\% > 98% agreement for L = 1 L=1 L = 1 and L = 2 L=2 L = 2 . This suggests that the stringlike distance d s t r i n g d_{\mathrm{string}} d string is an excellent estimate of the true distance for most codes, despite being only an upper bound. Furthermore, in Table S6 we show that we only observe a loose bound d s t r i n g > d d_{\mathrm{string}}>d d string > d at L = 2 L=2 L = 2 for tilings where the L = 1 L=1 L = 1 code has true distance d = 2 d=2 d = 2 and the loose upper bound d s t r i n g = 4 d_{\mathrm{string}}=4 d string = 4 .
Table S5. Accuracy of the distance bounds for the 228,716 semi-hyperbolic color codes we constructed, split by side length L L L . We write d C C d_{\mathrm{CC}} d CC for the exact distance returned by the connected cluster search [47 ] , which is exhaustive and therefore exact whenever it terminates within its budget. “All codes” covers every code at that L L L and the condition d r e s = d s t r i n g d_{\mathrm{res}}=d_{\mathrm{string}} d res = d string certifies the distance exactly. “Connected cluster completed” is restricted to the codes for which the connected cluster algorithm [47 , 48 ] was run (we restricted the search to n ≤ 2000 n \le2000 n ≤ 2000 ) and finished (we set a timeout of 300 seconds).
Table S6. Tightness of the stringlike upper bound for a base (L = 1 L = 1 L = 1 ) color code and for the fine-grained (L = 2 L = 2 L = 2 ) code built from the same tiling, over the 24,413 base tilings whose distance the connected cluster search was run on and for which it finished. Every fine-grained L = 2 L = 2 L = 2 code with a tight upper bound also had a tight upper bound at L = 1 L = 1 L = 1 . Base codes with a loose bound are itemized by the gap d s t r i n g → d C C d_{\mathrm{string}} \to d_{\mathrm{CC}} d string → d CC . “L = 2 L = 2 L = 2 undet.” counts tilings for which the connected cluster algorithm did not complete (or was not attempted). Every fine-grained code we find with a loose bound is a fine-grained version of an L = 1 L = 1 L = 1 code whose bound is already loose with a true distance d C C = 2 d_{\mathrm{CC}} = 2 d CC = 2 and upper bound d s t r i n g = 4 d_{\mathrm{string}} = 4 d string = 4 .
Additional Numerical Simulations
Asymmetry of X and Z Bases for Modular Hyperbolic Surface Codes with Even Side Length L
For quantum hardware with approximately isotropic noise (no X / Z X/Z X / Z bias), it is generally desirable for a code to perform equally well in both the X X X bias and Z Z Z bias. For modular hyperbolic color codes this is guaranteed (at least in a code capacity setting), since the codes are all self-dual. In this section we study X / Z X/Z X / Z asymmetries of modular hyperbolic surface codes, including how this differs for odd and even side length L L L . As shown in Figure S62 , for modular hyperbolic surface codes derived from regular tilings, the structure of the X X X and Z Z Z stabilizers is identical for odd L L L . In particular, the number of X X X and Z Z Z stabilizers of each size is identical, and the X X X and Z Z Z stabilizers can be swapped by applying a symmetry of the tiling. In contrast, for even L L L , the structure of X X X and Z Z Z stabilizers is no longer identical. This results in asymmetric X X X and Z Z Z logical error rates for even L L L , as shown in Figure S63 . In fact, the overall logical error rate of an even-L L L modular hyperbolic code (for these regular tilings) barely improves on the odd (L − 1 L - 1 L − 1 ) code derived from the same tiling.
Figure S62. Stabilizer structure of modular hyperbolic surface codes derived from { 4 , 6 } \{4,6\} { 4 , 6 } regular tilings. Each blue plaquette denotes a Z Z Z stabilizer with support on its vertices, and similarly each red plaquette denotes an X X X stabilizer. a, For odd side length (here L = 3 L = 3 L = 3 ) the weight-6 stabilizers at the four corners of each base face alternate between X X X and Z Z Z type. b, For even side length (here L = 4 L = 4 L = 4 ) the weight-6 stabilizers are all of the same Pauli type (here all weight-six stabilizers are Z Z Z -type).
Figure S63. Logical error rate per round per logical vs. side length L L L for small modular hyperbolic surface codes derived from { 4 , s } \{4,s\} { 4 , s } regular tilings. We use an SI1000 noise model with p = 0.001 p=0.001 p = 0.001 and p s e a m = 0.01 p_{\mathrm{seam}}=0.01 p seam = 0.01 .
We now study this asymmetry in more detail more generally for quadrilateral tilings. Consider a quadrilateral tiling of a closed hyperbolic surface with face configuration V a . b . c . d V_{a.b.c.d} V a . b . c . d , for example constructed from a □ ( r , s , t , u ) \square(r,s,t,u) □ ( r , s , t , u ) quadrilateral group where ( a , b , c , d ) = ( 2 r , 2 s , 2 t , 2 u ) (a,b,c,d) = (2r,2s,2t,2u) ( a , b , c , d ) = ( 2 r , 2 s , 2 t , 2 u ) . The vertices of each square have degrees a a a , b b b , c c c and d d d (going clockwise around the square). We label each vertex based on which corner of the quadrilateral fundamental domain it is in the image of. Specifically, we label a vertex as a a a -type if it is in the image of the degree-a a a vertex of the fundamental domain, and similarly for b b b -type, c c c -type and d d d -type. Therefore, in a slight abuse of notation, an a a a -type vertex has degree a a a , and similarly for b b b -type, c c c -type and d d d -type vertices. Let N a N_a N a be the number of a a a -type vertices (with degree a a a ), and similarly for N b N_b N b , N c N_c N c and N d N_d N d . We now count the number of faces ∣ F ∣ |F| ∣ F ∣ , edges ∣ E ∣ |E| ∣ E ∣ and vertices ∣ V ∣ |V| ∣ V ∣ in the tiling. First, since all faces are quadrilaterals we know that 4 ∣ F ∣ = 2 ∣ E ∣ 4|F| = 2|E| 4∣ F ∣ = 2∣ E ∣ . Since each face is incident to one vertex of each type we also know that
a N a = b N b = c N c = d N d = ∣ F ∣ . (68) aN_a = bN_b = cN_c = dN_d = |F|. \tag*{(68)} a N a = b N b = c N c = d N d = ∣ F ∣. (68)
Therefore, written in terms of the number of faces ∣ F ∣ |F| ∣ F ∣ , there are ∣ F ∣ x \frac{|F|}{x} x ∣ F ∣ x x x -type vertices and therefore the number of vertices ∣ V ∣ |V| ∣ V ∣ in total is
∣ V ∣ = ∣ F ∣ ( 1 a + 1 b + 1 c + 1 d ) (69) |V| = |F|\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d}\right) \tag*{(69)} ∣ V ∣ = ∣ F ∣ ( a 1 + b 1 + c 1 + d 1 ) (69)
and the number of edges ∣ E ∣ = 2 ∣ F ∣ |E| = 2|F| ∣ E ∣ = 2∣ F ∣ .
We now count the number of X X X and Z Z Z stabilizers for a V a . b . c . d V_{a.b.c.d} V a . b . c . d tiling of side length L L L . We start with the case of even L L L , for which all the “corner” stabilizers (each centered on a vertex of the base tiling) are of the same Pauli type. Consistent with Figure S62 , we will assume that these ∣ V ∣ |V| ∣ V ∣ corner stabilizers are all Z Z Z -type. We next count the stabilizers that are fully internal to a face of the base tiling. For an even side length L L L , these form an ( L − 1 ) × ( L − 1 ) (L-1)\times(L-1) ( L − 1 ) × ( L − 1 ) square grid with ( L − 1 ) 2 + 1 2 \frac{(L-1)^2+1}{2} 2 ( L − 1 ) 2 + 1 Z Z Z stabilizers and ( L − 1 ) 2 − 1 2 \frac{(L-1)^2-1}{2} 2 ( L − 1 ) 2 − 1 X X X stabilizers. Finally, along each edge of the base tiling we have L 2 \frac{L}{2} 2 L X X X stabilizers and ( L 2 − 1 ) \left(\frac{L}{2}-1\right) ( 2 L − 1 ) Z Z Z stabilizers. Putting this together, the number of X X X stabilizers N X e v e n N_X^{\mathrm{even}} N X even for even L L L is
N X e v e n = L 2 2 ∣ F ∣ (70) N_X^{\mathrm{even}} = \frac{L^2}{2}|F| \tag*{(70)} N X even = 2 L 2 ∣ F ∣ (70)
while the number of Z Z Z stabilizers is
N Z e v e n = ( L 2 2 + 1 a + 1 b + 1 c + 1 d − 1 ) ∣ F ∣ . (71) N_Z^{\mathrm{even}} = \left(\frac{L^2}{2}+\frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d}-1\right)|F|. \tag*{(71)} N Z even = ( 2 L 2 + a 1 + b 1 + c 1 + d 1 − 1 ) ∣ F ∣. (71)
For odd L L L , the square grid of stabilizers fully contained within each base face contains ( L − 1 ) 2 2 \frac{(L-1)^2}{2} 2 ( L − 1 ) 2 X X X stabilizers and the same number of Z Z Z stabilizers. There are also L − 1 2 \frac{L-1}{2} 2 L − 1 X X X stabilizers (and the same number of Z Z Z stabilizers) supported on each base edge of the tiling. The Pauli basis of the corner stabilizers alternates around the four corners of each base face. Let us assume that the a a a -type and c c c -type vertices each support X X X stabilizers and the b b b -type and d d d -type vertices each support Z Z Z stabilizers. This leads to a number of X X X stabilizers N X o d d N_X^{\mathrm{odd}} N X odd for odd L L L
N X o d d = ( L 2 2 + 1 a + 1 c − 1 2 ) ∣ F ∣ (72) N_X^{\mathrm{odd}} = \left(\frac{L^2}{2}+\frac{1}{a}+\frac{1}{c}-\frac{1}{2}\right)|F| \tag*{(72)} N X odd = ( 2 L 2 + a 1 + c 1 − 2 1 ) ∣ F ∣ (72)
and a number of Z Z Z stabilizers
N Z o d d = ( L 2 2 + 1 b + 1 d − 1 2 ) ∣ F ∣ . (73) N_Z^{\mathrm{odd}} = \left(\frac{L^2}{2}+\frac{1}{b}+\frac{1}{d}-\frac{1}{2}\right)|F|. \tag*{(73)} N Z odd = ( 2 L 2 + b 1 + d 1 − 2 1 ) ∣ F ∣. (73)
For even L L L , there are fewer Z Z Z stabilizers than X X X stabilizers, N Z e v e n < N X e v e n N_Z^{\mathrm{even}} < N_X^{\mathrm{even}} N Z even < N X even , provided
1 a + 1 b + 1 c + 1 d < 1 (74) \frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d}<1 \tag*{(74)} a 1 + b 1 + c 1 + d 1 < 1 (74)
which is exactly the condition under which the tiling is hyperbolic. For odd L L L , we have that N Z o d d < N X o d d N_Z^{\mathrm{odd}} < N_X^{\mathrm{odd}} N Z odd < N X odd provided that
1 b + 1 d < 1 a + 1 c . (75) \frac{1}{b}+\frac{1}{d}<\frac{1}{a}+\frac{1}{c}. \tag*{(75)} b 1 + d 1 < a 1 + c 1 . (75)
We can apply this to the tilings used in the simulations in Figure S63 . The tilings are regular { 4 , s } \{4,s\} { 4 , s } tilings, and so we can set a = b = c = d = s a=b=c=d=s a = b = c = d = s in the formulas above. For odd L L L , we have exactly the same number of X X X and Z Z Z stabilizers (of each weight), whereas for even L L L we always have fewer Z Z Z stabilizers (and they are higher weight), which we intuitively would expect to negatively impact the code’s ability to detect and correct X X X errors. This is consistent with the numerical simulations, which have a higher logical error rate for the Z Z Z memory experiments (which are sensitive to X X X -type logical errors).
Tables of Modular Hyperbolic Codes
In Table S10 and Table S11 , we list hyperbolic color codes and surface codes derived from closed base tilings (L = 1 L=1 L = 1 ). In Table S12 to Table S14 , we list modular hyperbolic color codes across side lengths L = 2 L=2 L = 2 (with face valency 8 and octagon modules, K = 8 K=8 K = 8 ), L = 3 L=3 L = 3 (with quadrilateral modules, K = 2 K=2 K = 2 ), and L = 4 L=4 L = 4 (K = 2 K=2 K = 2 ). In Table S15 and S16, we list modular hyperbolic surface codes for side length L = 5 L=5 L = 5 (with rectangle modules, K = 2 K=2 K = 2 ) and L = 3 L=3 L = 3 (with big square modules, K = 4 K=4 K = 4 on quadrilateral tilings with vertex valency 4). Each table lists codes on the Pareto frontier over n n n , d d d , k d 2 / n kd^2/n k d 2 / n , and maximum stabilizer weight. The Pareto frontiers restricted to 8.8.8 tilings are given for each side length in Table S7 to Table S9 , and are combined in Table M2 . Note that the Symmetry Group column labels the parent group used in the subgroup search, whereas the Tiling column gives the actual face or vertex sizes of the resulting quotient tiling (which can be smaller if a rotation generator has reduced order in the quotient).
Table S7. Hyperbolic color codes on the Pareto frontier for 8.8.8 tilings and L = 2 L=2 L = 2 . Here M 8 M_8 M 8 is the number of octagon modules and N M 8 N_{M_8} N M 8 is the number of physical qubits (data and ancilla) in the code using the octagon module partition. Orientable: whether the manifold is orientable. k d 2 / n kd^2/n k d 2 / n : code figure of merit. Distances quoted as a range are bounded below and above by the methods of Section S10.
Table S12. Modular hyperbolic color codes for side length L = 2 L=2 L = 2 with octagon modules (K = 8 K=8 K = 8 base triangles per module) on three-colorable tilings (color code tilings) where at least one of the polygons meeting each vertex in the base tiling is an octagon. M 8 M_8 M 8 : number of octagon modules. N M 8 N_{M8} N M 8 : total physical qubits in the modular layout including both data qubits and ancilla qubits. N M 8 / k N_{M8}/k N M 8 / k : physical-to-logical qubit overhead. Orientable: whether the manifold is orientable. k d 2 / n kd^2/n k d 2 / n : code figure of merit.
Table S14. TABLE S14. Modular hyperbolic color codes for side length L = 4 L=4 L = 4 with quadrilateral modules (K = 2 K=2 K = 2 base triangles per module). M 2 M_2 M 2 : number of quadrilateral modules. N M 2 N_{M2} N M 2 : total physical qubits in the modular layout including both data qubits and ancilla qubits. N M 2 / k N_{M2}/k N M 2 / k : physical-to-logical qubit overhead. Automorphism Bases: logical basis operator coverage k f o u n d / g k_{\mathrm{found}}/g k found / g and generator seed weights w w w (length of the shortest homologous dual cycle found for each seed) and w 1 w_1 w 1 (the same, restricted to dual edges of a single colour, with one colour per basis chosen to minimise the total), showing Pareto-optimal bases with ≥ 85 % \geq85\% ≥ 85% coverage or the single highest-coverage basis if < 85 % <85\% < 85% . Cov.: maximum basis coverage percentage. Pair: mean number of automorphism moves between measuring the two cycles of a symplectic pair with a fixed extractor. Cayley: mean and maximum of the same over all pairs of basis loops. Both are right Cayley graph distances among basis automorphisms, with the extractor placed to minimise Pair (then the maximum, then the mean), for the listed basis with the highest coverage. k d 2 / n kd^2/n k d 2 / n : code figure of merit.
Table S16. Modular hyperbolic surface codes for side length L = 3 L=3 L = 3 with big square modules (K = 4 K=4 K = 4 base quadrilaterals per module) on quaid tilings where at least one vertex in each base face has valency 4 (i.e. four quadrilaterals meet at the vertex). M 4 M_4 M 4 : number of big square modules. N M 4 N_{M_4} N M 4 : total physical qubits in the modular layout including both data qubits and ancilla qubits. N M 4 / k N_{M_4}/k N M 4 / k : physical-to-logical qubit overhead. G r o t G_{\mathrm{rot}} G rot : order of the orientation-preserving rotational symmetry subgroup relative to target. Orientable: whether the manifold is orientable. k d 2 / n kd^2/n k d 2 / n : code figure of merit.
Table S16.
Supplementary References
[1 ] H. Bombin and M. A. Martin-Delgado, Topological quantum distillation, Phys. Rev. Lett. 97, 180501 (2006).
[2 ] C. Vuillot and N. P. Breuckmann, Quantum pin codes, IEEE Transactions on Information Theory 68, 5955 (2022).
[3 ] O. Higgott and N. P. Breuckmann, Constructions and performance of hyperbolic and semi-hyperbolic Floquet codes, PRX Quantum 5, 040327 (2024).
[4 ] N. P. Breuckmann and B. M. Terhal, Constructions and noise threshold of hyperbolic surface codes, IEEE Transactions on Information Theory 62, 3731 (2016).
[5 ] F. Rober, LINS, provides an algorithm for computing the normal subgroups of a finitely presented group up to some given index bound., Version 0.9, https://gap-packages.github.io/LINS/ (2024), GAP package.
[6 ] GAP, GAP — Groups, Algorithms, and Programming, Version 4.13.1, The GAP Group (2024).
[7 ] H. Bombin and M. A. Martin-Delgado, Optimal resources for topological two-dimensional stabilizer codes: Comparative study, Phys. Rev. A 76, 012305 (2007).
[8 ] N. Delfosse, Tradeoffs for reliable quantum information storage in surface codes and color codes, in 2013 IEEE International Symposium on Information Theory (2013) pp. 917–921.
[9 ] N. P. Breuckmann, C. Vuillot, E. Campbell, A. Krishna, and B. M. Terhal, Hyperbolic and semi-hyperbolic surface codes for quantum storage, Quantum Science and Technology 2, 035007 (2017).
[10 ] E. Sutcliffe, B. Jonnadula, C. Le Gall, A. E. Moylett, and C. M. Westoby, Distributed quantum error correction based on hyperbolic Floquet codes, in 2025 IEEE International Conference on Quantum Computing and Engineering (QCE), Vol. 01 (2025) pp. 649–657.
[11 ] P. Baireuther, M. D. Caio, B. Criger, C. W. J. Beenakker, and T. E. O’Brien, Neural network decoder for topological color codes with circuit level noise, New Journal of Physics 21, 013003 (2019).
[12 ] S. Vittal, A. Javadi-Abhari, A. W. Cross, L. S. Bishop, and M. Qureshi, Flag-proxy networks: Overcoming the architectural, scheduling and decoding obstacles of quantum LDPC codes, in Proceedings of the 2024 57th IEEE/ACM International Symposium on Microarchitecture, MICRO ’24 (IEEE Press, 2024) p. 718–734.
[13 ] M. A. Tremblay, N. Delfosse, and M. E. Beverland, Constant-overhead quantum error correction with thin planar connectivity, Phys. Rev. Lett. 129, 050504 (2022).
[14 ] C. Gidney, Stim: a fast stabilizer circuit simulator, Quantum 5, 497 (2021).
[15 ] E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, Journal of Mathematical Physics 43, 4452 (2002).
[16 ] Y. Tomita and K. M. Svore, Low-distance surface codes under realistic quantum noise, Phys. Rev. A 90, 062320 (2014).
[17 ] C. Gidney, Answer to “preserving distance during stabilizer measurements by alternating interaction order from round to round?”, Quantum Computing Stack Exchange (2025), answer 41264, posted 22 February 2025.
[18 ] N. Berthusen and D. Gottesman, Partial Syndrome Measurement for Hypergraph Product Codes, Quantum 8, 1345 (2024).
[19 ] S. Gupta, S. Bhambay, N. Alavisamani, N. Walton, and T. Vasantam, Boundary-aware stabilizer scheduling for distributed quantum error correction (2026), arXiv:2604.22471.
[20 ] D. Horsman, A. G. Fowler, S. Devitt, and R. V. Meter, Surface code quantum computing by lattice surgery, New Journal of Physics 14, 123011 (2012).
[21 ] L. Z. Cohen, I. H. Kim, S. D. Bartlett, and B. J. Brown, Low-overhead fault-tolerant quantum computing using long-range connectivity, Science Advances 8, eabn1717 (2022).
[22 ] A. Cross, Z. He, P. Rall, and T. Yoder, Improved QLDPC Surgery: Logical Measurements and Bridging Codes (2024), arXiv:2407.18393 [quant-ph].
[23 ] D. J. Williamson and T. J. Yoder, Low-overhead fault-tolerant quantum computation by gauging logical operators, Nature Physics 22, 598–603 (2026).
[24 ] B. Ide, M. G. G. Dauga, P. J. Nadkarni, and G. Dauphinais, Fault-Tolerant Logical Measurements via Homological Measurement, Phys. Rev. X 15, 021088 (2025).
[25 ] E. Swaroop, T. Jochym-O’Connor, and T. J. Yoder, Universal adapters between quantum low-density parity check codes, PRX Quantum 7, 010324 (2026).
[26 ] Z. He, A. Cowtan, D. J. Williamson, and T. J. Yoder, Extractors: QLDPC architectures for efficient Pauli-based computation (2025), arXiv:2503.10390 [quant-ph].
[27 ] A. C. Yuan, A. Cowtan, Z. He, T.-C. Lin, and D. J. Williamson, Parsimonious quantum low-density parity-check code surgery (2026), arXiv:2603.05082 [quant-ph].
[28 ] For readers familiar with modern code surgery methods, the construction we described is very similar to thickening, which is a common technique used in various prior works on surgery [21 , 23 , 26 ] . A technical difference is that some surgery checks in the first layer are wide (implemented with two ancilla (check qubits), which act on two ancilla data qubits in the second layer. This design choice helps ensure the deformed code has sufficient distance in the surgery protocol.
[29 ] In the modern graph surgery language, this Z operator on the extractor is a ‘cycle check’. Normally we need to measure these cycle checks, but in our case of the ribbon extractor this cycle check is a product of deformed stabilizers. [22 , 23 , 26 ] .
[30 ] S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, and T. J. Yoder, High-threshold and low-overhead fault-tolerant quantum memory, Nature 627, 778 (2024).
[31 ] M. McEwen, D. Bacon, and C. Gidney, Relaxing Hardware Requirements for Surface Code Circuits using Time-dynamics, Quantum 7, 1172 (2023).
[32 ] C. Gidney and C. Jones, New circuits and an open source decoder for the color code (2023), arXiv:2312.08813.