Fault-tolerant gates via homological product codes

A method for the implementation of a universal set of fault-tolerant logical gates is presented using homological product codes. In particular, it is shown that one can fault-tolerantly map between different encoded representations of a given logical state, enabling the application of different classes of transversal gates belonging to the underlying quantum codes. This allows for the circumvention of no-go results pertaining to universal sets of transversal gates and provides a general scheme for fault-tolerant computation while keeping the stabilizer generators of the code sparse.


Introduction
Quantum error correction extends qubit coherence times through error mitigation and will be a requirement for any large-scale quantum computation. In this vein, tremendous research efforts have been placed on finding quantum error correcting codes that may be realizable in both the near and distant future. Among the leading candidates for experimental implementation are 2D topological stabilizer codes, such as the toric code [1,2], which allow for the correction of errors by measuring small-weight local checks while protecting logical information in highly non-local degrees of freedom [3][4][5][6][7]. These codes are experimentally appealing due to their stabilizers being low-weight, thus minimizing the effect of noise during measurement. They can be generalized to higher spatial dimensions, again with the stabilizer generators being relatively low-weight, and provide theoretically simple implementations of different classes of fault-tolerant logic [8][9][10][11][12][13]. The motivation for quantum error correcting codes to have geometrically local stabilizers (in a given dimension) is to simplify experimental architectures, yet this may not necessarily be a hard requirement. However, the need for low-weight stabilizer checks is much stronger, as larger weight checks lead to more noise propagation, and generally lower threshold error rates. The theory of quan-Tomas Jochym-O'Connor: tjoc@caltech.edu tum low-density parity check (LDPC) codes has been developed to address such concerns and finding good codes with low-weight checks remains a very active area of research [14][15][16][17][18][19]. Moreover, LDPC constructions can be used to construct codes with very little overhead for fault-tolerant computation, relying on the preparation of logical ancillary states [20][21][22][23]. This work will not focus on the development of such codes, but rather will center on how to generally use such codes for the purposes of fault-tolerant computation.
Obtaining a universal set of fault-tolerant gates is complicated by the existence of no-go results for such constructions using only transversal gates [24,25]. However, many alternative schemes have been developed to circumvent this restriction. They rely on the preparation of special ancillary states and gate teleportation [26][27][28], or tailored fault-tolerant constructions for certain classes of codes [8,[29][30][31][32][33][34][35][36]. This work extends the set of fault-tolerant alternatives, presenting a scheme for fault-tolerant logic on any CSS code while keeping the underlying stabilizer measurements low-weight.
We present a method for implementing fault-tolerant logical gates in a homological product code [16]. Namely, given the homological product of two quantum codes, we show how to map in a fault-tolerant manner between the encoded homological product logical state to a logical state specified by one of the two codes. Then, if the underlying codes have a set of transversal gates, such logical gates can be applied and the state can be re-encoded back into the full codespace faulttolerantly. There are no restrictions on the underlying codes, other than having to be defined by a boundary operator δ : C → C such that δ 2 = 0 in the linear space C. In particular, by using versions of the 2D and 3D color codes [9,37] as the underlying codes in the construction, a universal set of fault-tolerant operations can be implemented. The mapping between different representations of the code follows a similar construction to Ref. [30], where one of the two codes is unencoded while the other provides the protection. The key difference between the methods is that the stabilizers of the homological product can remain low-weight, unlike those in a concatenated model. Moreover, we present a decoding method to address errors that may occur during the unencoding of one of the two codes. Given certain properties of the underlying codes, this will result in a finite probability error threshold along the lines of Ref. [38] as well as potential protection against measurement errors.
The article is organized as follows: In Sec. 2 we review the theory of CSS codes defined by chain complexes and the construction of the homological product codes, carefully considering their underlying structure. In Sec. 3 we present the main result, a fault-tolerant method to implement a logical gate using homological product codes as well as discuss a simple decoding procedure. In Sec. 4 we present examples of codes that exhibit a set of universal fault-tolerant gates, expanding on the notions of code padding and doubling. Finally, we conclude with some remarks and open questions in Sec. 5.

Single sector theory
We begin by reviewing the connection between CSS codes and homology. Namely, as in Ref. [16], we focus on single sector theory 1 in Z 2 , that is a chain complex defined by a linear space C and a linear boundary operator δ : C → C, such that δ 2 = 0. We can then use such a boundary operator to define a CSS code [39,40], that is a stabilizer code whose generators can be expressed as either X-type or Z-type.
Let C be a n-dimensional binary space Z n 2 , then δ will be a n × n binary matrix. The (perhaps overcomplete) generating set of X stabilizers will be given by the rows of δ, that is for a given row, a generator S Xi will have X support on the qubits with a 1 in the given row. Similarly, the Z stabilizers will be defined by the columns of the matrix. Given δ 2 = 0, we are thus assured commutativity of the stabilizers. The number of independent generators of both type will be rank(δ), and as such the number of logical qubits of the code will be k = n − 2rank(δ).
For the remainder of this section we shall focus on the reverse implication. That is, given a CSS code whose X and Z stabilizer spaces are of the same dimension, one can construct a boundary operator δ of a single-sector theory. The results presented are a fairly straightforward corollary of Lemma 3 from Ref. [16], yet we include them here for completeness and to review some important concepts, namely the canonical boundary operator. Lemma 1. Given a CSS code on n qubits, whose X and Z stabilizer spaces are each of cardinality 2 l , therefore encoding k = n − 2l qubits. Then, there exists a invertible matrix W , and canonical boundary operator δ 0 defined as: such that δ = W δ 0 W −1 , where the rows (columns) of δ contain a set of generators of the X (Z) stabilizer group.
Proof. Given the existence of a CSS code, by the Gottesman-Knill theorem [41] there exists a unitary operator U composed solely of CNOT gates that maps |ψ ⊗ |0 ⊗l ⊗ |+ ⊗l to the encoded stabilizer code, where l = (n − k)/2 and |ψ is a k-qubit state. This statement can be expressed in terms of matrix manipulation on Z 2 , where δ 0 will represent the initial state of the stabilizers before the application of the encoding circuit, that is the rows of δ 0 represent the initial |+ states, and the columns the initial |0 states. A CNOT gate with qubit i as control, and qubit j as target can then be expressed according to the invertible matrix: where w k is the standard basis column vector one nonzero entry at position k. The action of W i,j by conjugation maps column c j to the sum of columns c i ⊕ c j , and row r i to the sum of rows r i ⊕ r j . This is the exact action required from a CNOT, as it maps X i to X i X j and Z j to Z i Z j . Note, as required for a valid representation of a CNOT gate, where again we are working modulo 2. Then, the encoding operation W can be broken into its CNOT components and can be expressed as W = W i N ,j N · · · W i2,j2 W i1,j1 . As such, will be a valid representation of the stabilizers of the code. Since W is a valid representation of the encoding circuit of the code, the rows (columns) of δ will remain a valid representation of the X (Z) stabilizers since they were so for δ 0 .
smallest integer w such that there exists a set of generators of the code whose weights are at most w while any given qubit participates in at most w stabilizer checks.

Corollary 2.
Given a CSS code on n qubits with an equal number of X and Z stabilizers and sparsity t, then a boundary operator δ can be constructed such that no row or column will have more than t 2 non-zero entries.
Proof. Given some sparse representative set of stabilizers {S Xi , S Zi }, as in the proof of Lemma 1, a unitary circuit W can be chosen that maps Z k+i → S Zi and X k+l+i → S Xi . Consider the right action of W −1 in terms of its action on the canonical boundary operator: where on the right side of the equality we have a matrix whose rows are either all-zero or a binary representation s Xi of the stabilizer S Xi . This follows from the fact that the right application of W −1 results in the propagation of the initial X stabilizers to their final generator form. Then, by the sparsity of the stabilizer generators, each row will be of weight at most t and each column will have weight at most t. Now consider the left application of W applied to δ 0 W −1 , thus completing the conjugation, the resulting matrix W δ 0 W −1 will have rows that will be sums of the different rows of δ 0 W −1 . Moreover, each row of W δ 0 W −1 will be a sum of at most t rows s Xi , and will as such be of weight at most t 2 . Finally, since a given row can map to at most t other rows, each non-zero entry within a column of δ 0 W −1 can map to at most t entries within that column. Therefore, since there were at most w non-zeros entries in a column of δ 0 W −1 , there can be at most t 2 non-zeros in each column of W δ 0 W −1

Homological Product Construction
Given two complexes (C 1 , δ 1 ), (C 2 , δ 2 ) with their associated spaces and single sector boundary operators, we define a new operator as in Ref. [16], acting on C 1 ⊗ C 2 . It follows from δ 2 i = 0 that ∂ 2 = 0, again since we are working in Z 2 . Therefore, (C 1 ⊗ C 2 , ∂) is a valid single sector complex, defining its own quantum CSS code.
We now restate some important properties of the homological product.

Lemma 3 ([16])
. Let (C 1 , δ 1 ), (C 2 , δ 2 ) be complexes defining codes with k 1 , and k 2 logical operators, respectively. Let ∂ = δ 1 ⊗ 1 + 1 ⊗ δ 2 , then the resulting complex (C 1 ⊗ C 2 , ∂) will encode k = k 1 k 2 logical qubits and ker ∂ = ker δ 1 ⊗ ker δ 2 + im ∂. (7) Suppose that w a is the sparsity of δ a . Moreover, let d X a , d Z a be the X and Z distances for the corresponding codes. Then, the weight and distances of the new code can be bounded according to the parameters of the original code.

Lemma 4 ([16]
). The sparsity of ∂ is upper bounded by w 1 + w 2 . The X and Z distance of the new code satisfy the following bounds:

Encoding the homological product code
In this subsection, we review some facts about the encoding circuit for ∂ [16]. As eluded to in Sec- where δ a,0 are the canonical boundary operators for δ a . The matrices W a are binary representatives of the encoding circuit for the given code, and as such, by taking their tensor product we obtain the encoding operation for ∂. That is: where we have defined ∂ 0 to be the canonical boundary operator for ∂. We can express ∂ 0 in matrix form as follows: where k i are the number of logical qubits and l i = (n i − k i )/2 is the number of X/Z stabilizers of the given code code.
It is worth further exploring the form of ∂ 0 , as this will be informative of how the logical information is encoded in the code. Each row and column of ∂ 0 will be of weight at most 2. Moreover, if a given row has 2 nonzeros entries, say at positions q i and q j , then any column with a non-zero entry at q i will also have a non-zero entry at position q j in order to satisfy commutativity. As such, these rows and columns represent an initial entangled Bell pair between qubits q i and q j since they will be stabilized by the operators X qi X qj and Z qi Z qj .  Figure 1: Initial state of the homological product code prior to encoding [16]. Each circle represents a qubit, with the black qubits representing those holding the logical information to be encoded. Blue qubits are prepared in the |0 state, while red qubits are prepared in |+ . The yellow qubits joined by an oscillating edge are prepared in a Bell pair The initial state can be pictorially represented by Fig. 1, where along a fixed row and column, the states in C 1 and C 2 are fixed, respectively. Then, the tensor product binary operators W 1 ⊗ 1 and 1 ⊗ W 2 will have geometric meaning in this picture. Note for the remainder of this work, we will denote U i as the physical encoding unitaries composed of CNOT gates acting on the quantum states whose binary representation is given by W i . Thus U 1 will couple qubits within vertical bands, while U 2 will couple qubits within horizontal bands, as represented in Fig. 2. 3 Fault-tolerant logical gates 3.1 Partial decoding of the homological product code The key idea for expanding the set of available faulttolerant logical gates will be for the two underlying codes composing the homological product to have different complimentary sets of transversal gates. Then, we can achieve the application of these logical gates by only decoding one of the two underlying codes, while remaining protected by the other. This is reminiscent of the scheme for implementing fault-tolerant gates using two concatenated codes [30], with the added advantage that the stabilizers remain low-weight in the case of the homological product.
The main result is that, while we decode one of the (b) C 2 encoder Figure 2: Schematic representation of the support of the encoding circuits for each of the codes underlying the homological product code, defined by the boundary operator ∂ = δ1 ⊗ 1 + 1 ⊗ δ2. The overall encoding circuit has a binary representation of the operator W1 ⊗ W2, which acts on the initial state represented in Fig. 1. That is, the physical encoding unitary U1 for the code C1 will act on every column on qubits from Fig. 1, and conversely the physical encoding unitary U2 will act on every row.
codes, we still remain fully protected by the other code. While errors may potentially propagate during the application of the decoding process, they can still be corrected as long as the number of faults is less than half the distance of the underlying code protecting the information (that is the code that remains encoded at all times). The main Theorem is a variant of Lemma 4 stated above (originally Lemma 2 from Ref. [16]), yet is proved using the concept of error bands.
Recall the homological product is defined by the complex (C 1 ⊗ C 2 , ∂), where C i are binary spaces. The complex defines a code with n 1 n 2 physical qubits, which we label (i, j) where 1 ≤ i ≤ n 1 and 1 ≤ j ≤ n 2 . Then, a Pauli operator P is supported only on (i, j) if Tr (i ,j ) =(i,j) (P ) = P i,j = 0, we will therefore denote such Pauli operators P i,j . We will call the error band E 1 a to be all possible Pauli operators of the form j P a,j , that is a product of any Pauli operators P i,j with i = a. Conversely, the error band E 2 a will be all possible Pauli operators of the form j P j,a . Moreover, we will say that a Pauli error E is supported on the set {e 1 , · · · e l } of error bands E 1 a if the operator is supported by the qubits composing those error bands, that is E ⊆ E 1 e1 ∪· · ·∪E 1 e l . A Pauli operator supported on a set of error bands E 2 a is defined similarly and whether the operator is supported on error bands E 1 a or E 2 a should be clear from context. Note that the unitary U 1 will only couple qubits within a fixed error bands E 1 a , while conversely U 2 will only couple qubits within fixed error bands E 2 a .
Theorem 5. Let (C 1 , δ 1 ), (C 2 , δ 2 ) be complexes and let (C 1 ⊗ C 2 , ∂) be the homological product code constructed Proof. Consider an error E supported on fewer than d 2 error bands E 1 a , let the affected bands be denoted by the set {e 1 , · · · , e l }, that is E ⊆ E 1 e1 ∪· · ·∪E 1 e l , where l < d 2 . Since any error can be expressed in the Pauli basis, if we show any Pauli error supported on the above set cannot support a logical operator, E cannot support a logical operator. As such, without loss of generality, suppose E is a Pauli error. Consider the modified error E = U † 1 EU 1 , where U 1 is the encoding unitary for the code C 1 . Then, if we can show that E cannot support a logical operator on the new codespace after applying U † 1 , then by unitary equivalence it cannot on the homological product codespace.
Any logical operator must commute with all of the stabilizers of the code. The modified codespace is given by the boundary operator ∂ 1,0 = (W −1 1 ⊗1)∂(W 1 ⊗1) = δ 1,0 ⊗ 1 + 1 ⊗ δ 2 , that is it will correspond to k 1 logical codeblocks encoded in the code (C 2 , δ 2 ) along with accompanying encoded ancilla state 2 . This can be viewed visually by considering the initial unencoded state in Fig. 1 followed by the encoding operation of Fig. 2b. Therefore, in order for E to support a logical error, it will have to support a logical operator on one of the first k 1 error bands E 2 a . Without loss of generality, consider the first error band E 2 1 , that is the first row of qubits in Figs. 1-2, and the support of E on that band, Therefore, the weight of the Pauli operator given by E 1 is limited by the number of initial error bands E 1 a on which the error was supported, that is: wt(E 1 ) ≤ l < d 2 , and as such since any logical operator supported on the band E 2 1 must be of weight at least d 2 , the error E 1 cannot support a logical error. Since this will be true for all encoded logical bands supported on E 2 a , with a ≤ k 1 , the error E cannot support a non-trivial logical error.
To conclude, since E cannot support a logical error on the code specified by the boundary operator ∂ 1,0 , then E = U 1 E U † 1 cannot support a logical operator on the code specified by ∂ = (W 1 ⊗ 1)∂ 1,0 (W −1 1 ⊗ 1).
Equipped with Theorem 5, we propose the following scheme to implement a fault-tolerant logical gate. Suppose the logical gate G 1 can be implemented transversally on the single-qubit partition of the code induced by the complex (C 1 , δ 1 ), that is it can be implemented by applying gates that are each individually supported 2 An encoded ancillary state is a fixed state that contains no non-trivial logical information, yet still may be partially encoded. on single qubits of the code. Then, in order to apply the logical gate G 1 on the logical state of the homological code (C 1 ⊗ C 2 , ∂), we begin by unencoding the code (C 2 , δ 2 ), that is we apply the unitary 1⊗U † 2 . At this point, the first k 2 blocks of n 1 qubits remain encoded in the code (C 1 , δ 1 ), while the the remaining blocks are in an encoded ancillary state. Therefore, we can apply the transversal implementation of the logical gate G 1 on any of the k 2 logical states we desire. We complete the logical gate application by then reencoding into the code (C 1 ⊗ C 2 , ∂) by applying 1 ⊗ U 2 .
The proposed scheme is fault-tolerant in that, it will be able to correct against up to (d 1 − 1)/2 faults throughout the process. Any error P a,b that occurs during the application of either 1 ⊗ U −1 2 , 1 ⊗ U 2 , or the transversal gate can spread to a high-weight error, yet such an error will remain within a single error band E 2 a . This follows as the application of 1 ⊗ U 2 only ever couples qubits within the same error band E 2 a . Similarly, a transversal gate with respect to the code (C 1 , δ 1 ) will not couple different error bands E 2 a , by definition. Therefore, any single fault P a,b can result in an error that is contained within the error band E 2 a . Since any logical error must be supported on at least d 1 such error bands, any error affecting less than half of such error bands must remain correctible by the Knill-Laflamme condition [42].
By symmetry, given a transversal gate G 2 on the single-qubit partition of the code (C 2 , δ 2 ), a faulttolerant implementation of G 2 can be achieve by applying U † 1 ⊗ 1, followed by the transversal gate, and a reencoding U 1 ⊗ 1. Such a fault-tolerant gate will be able to correct against up to (d 2 − 1)/2 faults.

Correcting errors
In the last section, we showed how even when decoding one of the two codes, we can always protect against at least (d i − 1)/2 faults. However, the encoding/decoding operations may generally have O(n c i ) time steps 3 , and as such, errors will accumulate within a given error band (assuming an independent non-Markovian error processes), resulting in an error with probability: p e O(n c i ), where p e is the physical error rate. This is undesirable from the perspective of fault tolerance, as we hope that for a given family of codes, by growing the distance, the probability of incurring a logical error decreases exponentially below some threshold value. Yet, if the underlying error rate is growing polynomially with the distance, this yields a pseudothreshold for each code, rather than a global threshold for a code family.
In this section, we present a simple decoding algorithm for the homological product code, based on the decoding algorithm of the individual codes composing the homological product. While the presented scheme will likely be far from ideal in many settings, it will serve as a proof of principle decoder as well as provide a means to correct against errors during the implementation of the fault-tolerant logical gates. This will help alleviate the concern errors accumulating within an error band due to the encoding/decoding having a macroscopic number of individual time steps. As will be discussed at the end of this subsection, in some cases this will guarantee a fault-tolerance threshold against independent noise. However, the existence and value of such a threshold would have to be studied on a case-by-case basis.
Consider the homological product code as specified in the previous subsection, with a boundary operator ∂ = δ 1 ⊗ 1 + 1 ⊗ δ 2 . Moreover, suppose we have recovery operators R i for each code that returns the code to the codespace and corrects with certainty when the weight of the error is below half the distance of the respective code. We present the following Corollary to Theorem 5, which follows directly from the proof of that result.
The above Corollary states that given a correctible error, as stated by Theorem 5, conjugating that error by either decoding operator U † i will result in a correctible error on the remaining encoded states in the code C j .
We propose the following decoding algorithm. Given an encoded state in the traditional homological product code, we measure the syndromes of the code as specified by the row (X type) and columns (Z type) of the boundary operator ∂. Now, given these measurement outcomes, we can map them onto syndrome outcomes for either of the two code, using the following procedure. Without loss of generality, suppose we would like to map them onto the syndromes of the code C 2 . We know the modified boundary operator ∂ 1,0 = (W −1 1 ⊗1)∂(W 1 ⊗1) = δ 1,0 ⊗1+1⊗δ 2 corresponds to k 1 logical states that are encoded in the code C 2 . Specifically, the first k 1 n 2 rows and columns of ∂ 1,0 will correspond to the stabilizers of the code C 2 , see Eq. 12 for an example, replacing δ 2,0 with δ 2 . Suppose we mea-sured a given stabilizer S l of the original stabilizer code such that ES l = (−1) b l S l E, that is b l ∈ {0, 1} records the stabilizer measurement outcome. Then since the encoding circuit is Clifford, and S is Pauli, we can efficiently classically compute the form of the transformed syndrome S l = U † 1 S l U 1 . Moreover, S l will keep the same commutation relation with the transformed error E , that is E S l = (−1) b l U † 1 S l EU 1 = (−1) b l S l E . Therefore, we can use the transformed stabilizers S l to determine the syndrome of E in the code C 2 . To find the appropriate recovery Pauli operator Q we use the known decoder of C 2 , and transform Q back into a recovery operator for the original code by classically computing Q = U 1 Q U † 1 , which is again efficient since U 1 is a Clifford circuit.
We can then generalize the above method to address a build up of errors throughout the fault-tolerant process presented in Sec. 3.1. Suppose, without loss of generality, we want to implement the logical gate G 2 which is transversal for the code C 2 . Then, we would start with unencoding C 1 by applying where V i are the CNOT gates used in constructing the encoding unitary U 1 . After the application of each V † i , the code will be partially unencoded and the resulting boundary operator will be of the form If we assume that throughout the application of each V i operator the generators of the code remain sparse, then we can measure these generators after each application V i in order to address the errors that occurred during the application of that gate. The errors are then corrected by classically mapping the stabilizer generators ∂ 1,i onto those of ∂ 1,0 , and using, as outlined above, the decoder of C 2 to correct for the resulting errors.
A final remark on the stabilizer generators of ∂ 1,i . As stated above, if we were to measure them after every application of V i , V † i , we would like them to remain sparse. In general, while the initial and final boundary operators ∂ 1,0 and ∂ are certainly sparse, there will be no guarantee that the intermediary matrices remain sparse as well. However, for many common codes, such as topological codes, this can be achieved by choosing an appropriate encoding unitary. Roughly speaking, the idea is to build up the non-local logical operators of a topological code by growing the code at its boundary in a systematic manner [43]. Moreover, if the stabilizers remain sparse at every time step, and the distance of each of the respective codes scale as n αi i for some positive power of α i , then we can invoke the result Ref. [38] to prove the existence of a fault tolerance threshold. Moreover, as outlined in Ref. [38], if the syndrome measurements are repeated then we may overcome measurement errors as well and still have a finite error threshold. Finally, repeated measurements may even be avoided if the underlying codes have single-shot correction properties [44,45]. An explicit construction of a decoder applied to this setting remains an interesting open problem.

Universal constructions
In this section, we explore an explicit example of a family of codes for implementing a universal set of faulttolerant operations using the construction from Section 3.1. We will focus on the Clifford + T universal gate set [46]. Let the code C 1 be the 2D color code with distance d 1 encoding a single logical qubit. The code has parameters [[c 1 d 2 1 , 1, d 1 ]], for a constant c 1 , and can implement any Clifford gate transversally [9,37]. The code C 2 will be composed of the gauge-fixed 3D color code. That is, a particular choice of the 3D color code where volume cell terms are of both X and Z type, while the face terms are only of Z type. The resulting code has a transversal implementation of a T = diag(e −iπ/8 , e iπ/8 ), a non-Clifford gate and code pa- , for a constant c 2 [8,9]. However, due to the asymmetry in the number of X and Z stabilizer generators, arising from having to fix the face terms to be Z-type, the resulting code cannot be directly used in the single-sector homological product code construction. We present two alternative code constructions of C 2 , one based on code padding, and one using two complementary copies and re-encoding them in the [ [4,2,2]] repetition code.

Code padding
Suppose we have a CSS code C that we want to use in a universal fault-tolerant implementation of a homological product code, and moreover assume without loss of generality there are more Z generators than X generators. In order to use the code C in a homological product code construction, as presented, we must have the same number of independent X and Z stabilizers. A rather simple alternative code that we can use is to pad the original code with extra ancillary qubits in the |+ state, thus adding an extra set of single-qubit X generators. The resulting code will have the same distance as the original code, where all non-trivial logical Pauli operators can be supported on the original qubits of the code. For example, in the case of the smallest gaugefixed 3D color code, the 15-qubit Reed-Muller code, we can pad the code with an extra 6 |+ qubits, resulting in a [ [21,1,3]] code. While this extra padding of qubits does not change the base code other than trivially alternating the number of underlying stabilizer generators, these generators will play a role in the homological product, via the initial entanglement present in the unencoded state, represented by ∂ 0 . Therefore, the universal scheme for implementing a set of fault-tolerant logical operations that can correct an arbitrary single qubit error will use the Steane and padded Reed-Muller codes, which are the smallest distance 3 versions of the 2D and padded 3D color codes, respectively. The overall scheme will have coding parameters [[147, 1, 3 * ]], where 3 * corresponds to the minimum fault-tolerant distance of the overall scheme, not necessarily the distance of the homological code itself. The stabilizer measurements will be of weight at most 15, see Appendix A. This is a large improvement over requiring measuring stabilizers of weight 28 in the concatenated scheme [30], which leads to punitive threshold values and qubit overheads [47][48][49].

Code doubling
The process of code doubling was first presented in Refs. [50,51] for converting between Majorana fermion codes and stabilizer codes. We will outline the general logical procedure for any CSS code here, yet it can be generalized for arbitrary stabilizer code rather similarly.
Consider a CSS code A (1) of n physical qubits with stabilizer generators S (1) j , where X i is a list of qubits in the support of S (1) Xi and the use of the superscript (1) will become clear shortly. Similarly, the Z stabilizers are given by S j . Consider now a rotated version of A (1) where each of the X stabilizers are replaced by Z stabilizers and viceversa, call this code A (2) . More explicitly, the X and Z stabilizers of A (2) are given by: S j . Therefore, the different superscripts represent different blocks of n qubits.
These two codes are then re-encoded into the [ [4,2,2]] repetition code, whose encoding circuit is given in Fig. 3. The third block of qubits will be initially prepared as |0 ⊗n , while the fourth block will be prepared as |+ ⊗n . Consider how the stabilizers are transformed under the action of the circuit in Fig. 3: Note that we can combine the mapped stabilizers with those of the repetition code in order to recognize a complete symmetry between the X and Z stabilizers of the code. While it may immediately follow from the presented construction, one can show that the above construction is equivalent to concatenating the [ [4,2,2]] code with the code A (1) and its rotated compliment A (2) . Moreover, the distance of the new code will be twice that of the original code. Therefore, this concatenated code provides a code that can be used in the homological product code construction. Choosing the code A (1) to be the gauge-fixed 3D color code along with its rotated compliment A (2) , we can use these codes in conjunction with the 2D color code for the purposes of universal fault-tolerant computation via homological product codes. To perform any logical Clifford gate, it will be sufficient to decode the [[4, 2, 2]] repetition code, followed by the decoding of A (i) , for either or both i ∈ {1, 2}, depending on which codeblock one would like to apply the desired Clifford gate transversally.
In order to implement the T gate fault-tolerantly, one would first decode the 2D color code, as specified in Sec. 3.1. At this point, one could not directly apply the non-Clifford gate transversally, as the two encoded codeblocks will still be further encoded in the [[4, 2, 2]] code. However, one can then decode the [ [4,2,2]] code by applying the circuit of Fig. 3 in reverse. This will preserve the protection guaranteed by Theorem 5 as each block of 4-qubits will belong to the same error band, allowing the application of a transversal T gate bookended by fault-tolerant operations.
A final note regarding code doubling: since the stabilizers are symmetrized, the code will gain a transversal Hadamard gate. The logical result of the transversal Hadamard will be to implement logical Hadamard followed by logical SWAP between the two logical qubits. As such, for this particular operation, code doubling allows for a rapid implementation of this logical gate without having to decode one of the codes in the homological product.

Conclusion
This work introduces a method for implementing a set of logical gates using homological product codes, applicable to any set of CSS codes. Namely, we show that if the underlying codes composing the homological product have complementary classes of transversal gates, then this scheme can be used to implement a faulttolerant universal gate set. Moreover, if the underlying codes have stabilizer generators that are sparse, the construction will remain sparse, allowing for the implementation of a fault-tolerant gate set that does not require measurement of high-weight operators. This method is particularly interesting for the theory of quantum LDPC codes, where the hope would be to construct codes with good parameters and sets of transversal gates. If one were able to find such codes, this may lead to an alternative method for implementing universal fault-tolerant computation with constant overhead, in a similar manner to recent results that used special ancillary states to obtain a universal set of gates [20][21][22][23]. A recent result exploring the connection between homological product codes and single-shot error correction highlights a potential avenue for constructing codes with interesting transversal gates [45], yet new constructions remain elusive.
The presented scheme relies on decoding one of the two codes composing the homological product, applying the transversal gate, and re-encoding. The encoding/decoding process may indeed spread errors in a dramatic way, yet due to the protection of the other code, the global operation remains fault-tolerant. If the encoder/decoder of each code preserves the sparsity of the code after each gate, then modified stabilizers may be measured during the encoding/decoding process, allowing for increased protection. Moreover, this should imply the existence of a finite error probability threshold due to the stabilizer generators always being low weight as long as the distance grows as a positive power of the number of qubits [38]. tute for Theoretical Physics in the form of the Sherman Fairchild Fellowship as well as support from the Institute for Quantum Information and Matter (IQIM), an NSF Physics Frontiers Center (NFS Grant PHY-1733907).