Bias-tailored quantum LDPC codes

Bias-tailoring allows quantum error correction codes to exploit qubit noise asymmetry. Recently, it was shown that a modified form of the surface code, the XZZX code, exhibits considerably improved performance under biased noise. In this work, we demonstrate that quantum low density parity check codes can be similarly bias-tailored. We introduce a bias-tailored lifted product code construction that provides the framework to expand bias-tailoring methods beyond the family of 2D topological codes. We present examples of bias-tailored lifted product codes based on classical quasi-cyclic codes and numerically assess their performance using a belief propagation plus ordered statistics decoder. Our Monte Carlo simulations, performed under asymmetric noise, show that bias-tailored codes achieve several orders of magnitude improvement in their error suppression relative to depolarising noise.


Introduction
All current quantum computing architectures are subject to the same fundamental problem: quantum bits (qubits) are extremely susceptible to error. To counter this, quantum error correction (QEC) [1,2] must be incorporated into the quantum computing stack. With an appropriate choice of QEC code, it is in principle possible to build arbitrarily large fault tolerant quantum computers. However, the trade-off is that QEC can considerably increase the device overhead in terms of the total number of qubits required.
Quantum codes are commonly designed and benchmarked under the assumption that their qubits are subject to depolarising noise for which X (bit), Z (phase) and Y -type Pauli errors occur with equal probability. In practice, however, physical qubits are subject to biased noise where one species of error is stronger than the others. For example, in some su-Joschka Roffe: joschka@roffe.eu, https://roffe.eu perconducting qubit architectures phase-noise dominates by as much as five orders of magnitude [3][4][5]. A bias-tailored quantum code is designed to exploit knowledge of such noise asymmetry to improve QEC performance. Previous studies have shown that biastailored QEC codes, implemented in conjunction with bias-preserving two-qubit gates [6], could considerably reduce the overhead associated with achieving fault tolerant quantum computation.
In recent work by Bonilla Ataides et al. [7], it was shown that a variant of the surface code -the XZZX code -can achieve remarkable performance under biased noise. The XZZX surface code is obtained from the standard surface code via a local modification of stabilisers [8][9][10]. The principal advantage of the XZZX surface code is that its structure simplifies to a set of decoupled repetition codes in the infinite-bias regime. As such, the XZZX surface code is readily decodable with a threshold upper-bounded at 50% for infinite-bias. This infinite-bias threshold considerably improves on the corresponding threshold of 10.9% [11] for the standard surface code.
The surface code can be embedded onto a geometrically local architecture where gates are only performed between nearest-neighbours. This makes the surface code (and its variants) an attractive QEC scheme for the current generation of quantum architectures which typically have constrained inter-qubit connectivity [5,12,13]. Despite this, the surface code may not be a practical solution for fault tolerance in full-scale quantum computers. The main drawback is that it has poor rate: each surface code patch encodes only a single logical qubit. As such, quantum computers based on the surface code will require high-qubit overheads [14].
Several no-go results suggest the construction of local (or near-local) high-rate, high-distance QEC codes will not be feasible [15][16][17]. Fortunately, various technologies are currently in development that promise long-range inter-qubit connectivity [18][19][20][21]. On these platforms it will be possible to run quantum low density parity check (LDPC) codes in place of the surface code [22,23]. Such quantum LDPC codes encode mul-tiple qubits per logical block and promise a route to efficient fault tolerant quantum computation.
In classical communication, LDPC codes are some of the best performing error correction protocols, underpinning technologies such as the 5G mobile standard, Gigabit Ethernet and WiFi (802.11n, 802.11ac) [24,25]. At first, it was not known whether it would be possible to construct quantum LDPC codes with parameter scaling comparable to the bestknown classical protocols. However, a series of recent advances have shown that asymptotically good quantum LDPC do exist [26][27][28]. Most recently, Pantaleev and Kalachev introduced lifted product codes as a family of quantum LDPC codes with finite-rate and linear block-length-to-distance scaling [28,29]. With the underlying theoretical foundation now set, the challenge remains in engineering quantum LDPC codes into practical architectures for scalable fault tolerant quantum computing.

Summary of results
In this paper, we introduce a bias-tailored lifted product that enables the construction of quantum LDPC codes that exploit qubit noise asymmetry. Our biastailored lifted product is obtained via a local Clifford transformation of the stabilisers of the original lifted product introduced by Pantaleev and Kalachev [28]. The new stabilisers ensure that in the limit of infinitebias, the effective distance of the quantum code is increased. This enables bias-tailored lifted product codes to harness the increased code capacity of biased error channels.
We construct explicit examples of bias-tailored lifted product codes based on classical quasi-cyclic codes [30]. These codes have complex syndrome patterns meaning they cannot be decoded using the minimum-weight perfect matching algorithms that work well for topological codes. Instead, we show that bias-tailored lifted product codes can be efficiently decoded using a belief propagation plus ordered statistics decoder (BP+OSD) [31,32]. The decoding routine uses a method that improves performance by exploiting knowledge of correlations that arise between the bit-and phase-decoding components due to Pauli-Y errors. This procedure is outlined in detail in Appendix D, and our simulation scripts are available open source on Github [33].
To benchmark bias-tailored lifted product codes, we perform extensive BP+OSD decoding simulations across a number of bias regimes and compare to the case of depolarising noise. Our results show that the bias-tailored lifted product achieves improved logical error suppression for any biased error channel in which X-or Z-Pauli noise dominates. In the limit of infinitebias, we observe logical error rates several orders of magnitude less than that obtained for depolarising noise. In contrast, quantum LDPC codes constructed from the original lifted product typically suffer from a reduction in code performance with increasing noise asymmetry. We also demonstrate that quantum codes can be specifically designed to respond better to Zbias compared to X-bias (or vice-versa).
We conjecture that the bias-tailored lifted product provides a versatile framework for the construction of codes that respond well to noise asymmetry. As an example of the construction's utility, we demonstrate that an XZZX toric code can be directly derived from the bias-tailored lifted product. Similar to the XZZX surface code, the XZZX toric code responds well to noise-asymmetry due to the fact it decouples to a set of independent repetition codes in the infinitebias limit. Additionally, the XZZX toric code benefits from twisted periodic boundary conditions that lead to logical operators that wrap around the lattice. We show that both of these features arise automatically from the bias-tailored lifted product of two repetition codes. This demonstrates that the bias-tailored lifted product applies not just to the construction of random quantum LDPC codes, but also to structured topological codes.
This paper is structured as follows. In Section 2, we cover background in classical coding theory. This includes a description of how quasi-cyclic LDPC codes are constructed from base protographs. Section 3 outlines the essential elements of the stabiliser framework for QEC relevant to this work. In particular, we describe how quantum LDPC codes can be obtained from classical codes via product constructions. In Section 4, we present our methods for bias-tailoring QEC codes. We begin by unpicking the essential characteristics that enable XZZX codes to respond well to biased error models. We then show that the XZZX toric code can be described as a special case of a lifted product we refer to as the bias-tailored lifted product. This provides the framework through which the concept of bias tailoring can be generalised to quantum LDPC codes. Finally, in Section 5, we present the findings of our Monte Carlo decoding simulations of quantum LDPC codes under different bias regimes.

Binary codes
A classical binary error correction code C describes a redundant mapping of a k-bit string b to an nbit codeword c, where n > k 1 . The codewords c ∈ C = nullspace(H) are the null-space vectors of an m×n binary parity check matrix H such that H · c mod 2 = 0 (note that from this point onward, 1 We use bold symbols to denote binary strings. For example, b = 01. When involved in matrix operations we assume these binary strings are equivalent to column vectors. Eg. b = 01 = [0, 1] T . we will assume mod 2 arithmetic for operations involving bit strings and parity check matrices). By the rank-nullity theorem, the number of bits k encoded by code C is related to the rank of the parity check matrix H such that k = n − rank(H). The code distance d is defined as the minimum Hamming weight d = min(wt(c)) of a non-zero codeword c ∈ C. If a codeword c ∈ C is subject to an error e, this error can be detected by computing the code syndrome s = H · (c + e) = H · e. Code syndromes are nonzero for all errors e of Hamming weight less than the code distance wt(e) < d. We adopt the convention of labelling classical codes in terms of the [n, k, d] notation, where n is the block length (codeword length), k is the dimension (number of encoded bits) and d is the code distance. Another important figure of merit is the code rate r, defined as the ratio of encoded bits to the block length r = k/n. Example 2.1. The parity check matrix for a lengththree closed-loop repetition code is given below The codewords of H rep 3 are given by C = nullspace(H rep 3 ) = {000, 111}. The block length of this code is n = 3. By the rank-nullity theorem, the number of encoded bits is k = n − rank(H) = 1. The lowest-weight non-zero codeword is 111 giving a code distance of d = 3. The [n, k, d] code parameters of H rep 3 are therefore [3,1,3]. As an example of error detection, the error e = 100 would give a syndrome s = H · e = 101. The distance of a repetition code can be improved simply by increasing the length of the codewords (increasing the number of repetitions). In general, a length-n repetition code will have code parameters [n, k, d] = [n, 1, n].

Factor graphs
The factor graph of a code is a bipartite graph with an adjacency matrix given by the parity check matrix H: the columns of H (data bits) map to the round nodes and the rows of H (check bits) map to the square nodes. As an example, Fig. 1 shows a factor graph representation of the length-three repetition code. The corresponding adjacency matrix is given by H rep 3 defined in Eq. (1). From the factor graph, we see that larger repetition codes can be obtained simply by increasing the length of the loop. In addition to providing a useful visualisation of the code, factor graphs serve a purpose in code design, analysis and decoding [32,34].

Quasi-cyclic LDPC codes
Low density parity check (LDPC) codes are classical binary codes with sparse factor graphs. More concisely, a code is labelled (l, q)-LDPC when the column and row weights of its parity check matrix are upper bounded by l and q respectively. There are many methods for constructing high-performance LDPC codes for a variety of use cases. In the setting of classical communication, one of the most widely used methods is the quasi-cyclic construction [30].
The fundamental building blocks of quasi-cyclic codes are circulant permutation matrices. We define a circulant permutation matrix λ t L as the matrix obtained by shifting the columns of an L×L identity matrix 1 L by t positions to the right. As an example, the 3×3 circulant permutation matrix with shift parameter t = 1 is given by It is clear that after L shifts, the circulant permutation matrix λ L L is equal to the identity λ L L = λ 0 In general, circulant permutation matrices obey the cyclic property The set {λ 0 L , λ 1 L , ..., λ L−1 L } of L distinct permutation matrices -including the identity -forms a basis of a vector space A L over the binary field F 2 . Any element α ∈ A L can be written as a linear combination of the elements from this basis: where a l ∈ F 2 . The product of any two circulant permutation matrices is also a permutation matrix, and it holds: In general, for any pair of elements α, β ∈ A L . Hence, A L is a ring and we refer to it as the ring of circulants 2 . The binary codes introduced in Section 2.1 have parity check matrices with coefficients in F 2 . To construct a quasi-cyclic code, we first define an m ×n matrix A ∈ A m ×n L with coefficients in the ring of circulants A L . This matrix is sometimes referred to as a protograph and provides a compact means of representing a large quasi-cyclic code in terms of its constituent permutation matrices. We indicate by B(.) the mapping that transforms a protograph to its binary representation The binary matrix B(A) is obtained from A by replacing each coefficient We define the weight of α ∈ A L as the number of non zero terms in the decomposition defined in We associate to each protograph A ∈ A m ×n L , a weight enumerator matrix W ∈ Z m ×n such that W ij = wt(A ij ). Since each permutation matrix has rows and columns of weight one, it is easy to verify that the row/column weight of W equates the row/column weight of the binary matrix B(A). This equivalence allows us to bound the sparsity of the quasi-cyclic LDPC code with parity check matrix B(A) in terms of the protograph A. A protograph whose weight enumerator matrix has row and column weights upper-bounded by l and q respectively yields an (l, q)-LDPC code.

Example 2.2.
Consider the quasi-cyclic code defined by the following 2×3 protograph The weight enumerator matrix of A L is given by The column and row weights of W are upper bounded by three and three respectively. Any parity check matrix B(A L ) derived from the protograph A L will 2 A ring A is a set equipped with addition and multiplication such that it is a group under addition and it is closed under multiplication. Since permutation matrices λ t L satisfy the polynomial equation x L − 1 = 0, A L can be expressed as a quotient ring F 2 [x]/(x L − 1). For more details, see, for instance, [35]. therefore be (3, 3)-LDPC. When L = 3, the protograph A 3 yields a [9,3,3] code with the following parity check matrix Example 2.3. The family of distance-L closed-loop repetition codes can be interpreted as quasi-cyclic codes defined by the following 1×1 protograph The weight enumerator matrix of A rep L is W = [2]. As such, for any L > 1, the repetition code with parity 3 ) is equal to the parity check matrix of the distance-three repetition code defined in Eq. (1).

Stabiliser codes
Similar to classical binary codes, a stabiliser QEC code describes a redundant mapping from a K-qubit state |ψ to an N -qubit logical state |ψ L . Qubit errors are described by linear combinations of matrices from the basis {1, X, Y, Z} ∈ G, where G is the Pauli group 3 . The logical states are defined so that they project onto the (+1) eigenspace of a group of Pauli operators S ⊂ G N known as the code stabilisers such that S |ψ L = (+1) |ψ L for all S ∈ S. If the logical state is subject to a Pauli error E that anti-commutes with a stabiliser S ∈ S, then the measurement of this stabiliser projects onto the (−1) eigenspace S j E |ψ L = (−1) |ψ L . The results of the stabiliser measurements form a syndrome that can be decoded to determine the best recovery operation.
Stabiliser codes with dimension K > 0 have a set of logical operators that allow computation directly on the encoded states. The logical operators are defined as operators that commute with all of the code stabilisers, but are themselves not stabilisers. The encoded quantum information is lost when the code is subject to a Pauli error that is equivalent to a nontrivial logical operator. The minimum weight of a logical operator therefore gives the distance D of a quantum code. In general, QEC codes are labelled in 3 The single-qubit Pauli group G 1 = I, X, Y, Z where 1 = terms of an [[N, K, D]] notation, where the N is total number of qubits, K is the number of encoded logical qubits and D is the code distance. Note the use of double brackets to differentiate quantum codes from classical codes.
There is a useful mapping for Pauli operators that allows stabiliser QEC codes to be expressed in terms of a binary representation. For single Pauli operators this mapping acts as follows: 1 → (0|0), X → (1|0), Y → (1|1) and Z → (0|1). In general, an n-qubit Pauli operator G can be mapped to 2N -bit binary vector of the form where g x is a n-bit binary vector set to 1 in the qubit locations where G acts with an X-operator. Similarly, g z marks the qubit locations where G acts with a Z operator. A Y -Pauli operator acting on qubit i results in a 1 in the corresponding position of both vectors g x and g z . As an example, the two-qubit operator G = X 1 Y 2 maps to the binary representation g = (11|01).
Using the binary representation, a QEC code can be written in terms of an M ×2N parity matrix, , where each row corresponds to one of the M stabiliser generators. For an error e Q = (e X |e Z ) the code syndrome is given by (13) In the following sections we will see the binary representation of stabiliser codes facilitates the repurposing of existing classical codes into quantum codes. Another useful feature of the binary representation is that it enables the straightforward verification of various code properties. For example, the condition that code stabilisers commute amounts to verifying that H X and H Z satisfy the following constraint

Calderbank, Shor and Steane (CSS) codes
The Calderbank, Shor and Steane (CSS) family is a subset of QEC codes that have disjoint X-and Z-type stabilisers such that each stabiliser is made up either exclusively of X-type Pauli operators, or exclusively of Z-type Pauli operators [36][37][38]. In the binary representation, the parity matrix of a CSS code has the form For CSS codes, the stabiliser commutativity constraint defined in Eq. (14) simplifies to verifying that H X · H T Z = 0. The structure of CSS codes allows bit and phase-flips to be corrected using separate classical codes. However, the commutativity constraint on stabiliser codes means that it is not simply possible to re-purpose any classical code as the H X and H Z matrices of a CSS code. Various constructions exist that allow classical codes to be converted to CSS codes. In this work, we focus on two such constructions: the hypergraph product [39] and the lifted product [28,31].

Hypergraph product codes
The hypergraph product is a method for creating a quantum code from any two classical seed codes [39,40]. To construct a hypergraph product code, we first choose the seed codes: Given seed codes H 1 and H 2 , the parity check matrix of the hypergraph product code is as follows The above code H HGP has parameters [[N, . The specific advantage of the hypergraph product is that any pair of classical codes can be used as the seed matrices: it is straightforward to verify that the stabiliser commutivity constraint holds for all pairs H 1 and H 2 . Another useful property is that the hypergraph product preserves the sparsity of the seed codes (up to a constant additive factor). The hypergraph product of two LDPC codes therefore yields a quantum code with an LDPC parity check matrix.
Both the H X and H Z components of the matrix in Eq. (16) are formed from a concatenation of two blocks of qubits. We refer to the first block of n 1 n 2 qubits as sector one and the second block of m 1 m 2 qubits as sector two.
Example 3.1. The CSS toric code is constructed from the hypergraph product by choosing closed-loop repetition codes as the seed codes H 1 and H 2 . Fig. 2 shows the factor graph of a toric code constructed from the hypergraph product of a length-three repetition code (H 1 = H rep 3 ) and a length-two repetition code (H 2 = H rep 2 ). Here, the circular nodes represent the data qubits and the square nodes the check qubits which measure the stabilisers. The solid edges denote Z-type Pauli checks and are drawn according to the adjacency matrix H Z , whilst the dashed edges represent X-type checks and are drawn according to H X . Boundary edges are labelled to indicate which qubit they connect to on the opposite side of the lattice. We see that each column of the toric code contains a copy of the seed code H 1 , whilst each row contains a copy of seed code H 2 . By convention, we define a toric code lattice to have dimension n 1 × n 2 . The depicted code has parameters [[12, 2, 2]] defined on a 3 × 2 lattice. Repetition codes have square parity check matrices which means that n 1,2 = m 1,2 for the seed codes H 1 and H 2 . Consequently, toric codes have an equal number of qubits in both sector one and sector two. In Fig 2, the sector one qubits are labelled one to six (filled in white) and the sector two qubits six to twelve (filled in grey). Bigger toric codes can be constructed by using larger repetition codes as the hypergraph seeds.

Lifted product codes
The hypergraph product construction described by Eq. (16) is applied to a pair of seeds codes defined by binary parity check matrices. The lifted product applies the same operation, but to a pair of seed protographs, which are matrices with coefficients in the ring of circulants A L as defined in Section 2.3. Before introducing the lifted product, we describe the transpose operation for elements in A L . For an element α = L−1 i=0 a i λ i L , we define its transpose α T as Mapped to binary, the identity protograph is an size- L is given by which maps to a size-9 identity matrix 1 9 . The iden- Finally, we note that the tensor product between two protographs is well defined as a simple extension of the standard tensor product to the ring of circulants: the tensor product between As an example, the tensor product between E 2 ∈ A 2×2 L and A ∈ A m×n L gives the following block protograph To construct a lifted product code, we first choose two protographs: Given these protographs, the lifted product defines a quantum protograph A Q Note that this has the same form as the hypergraph product given by Eq. (16). The CSS parity check matrix corresponding to A Q is given by where B(.) is the mapping defined in Eq. (7) that returns the binary representation of a protograph. The length of the lifted product code is given by N = L(m 1 m 2 + n 1 n 2 ). Despite similarities to the hypergraph product, the lifted product is different to the hypergraph product of B(A 1 ) and B(A 2 ), which would have length N = L 2 (m 1 m 2 + n 1 n 2 ). The crucial difference is that the lifted product applies B(.) after forming block matrix of Eq. (21) rather than before.

Example 3.3. Consider the following protograph
When L = 13, B(A 13 ) is a (4, 4)-LDPC matrix which yields a code with parameters [52,3,26]. We generated this protograph using the progressive edge growth (PEG) technique for quasi-cyclic codes [41]. The PEG method proceeds by randomly generating protograph elements under the constraint that each new term does not decrease the code girth below a certain target value. Here, the code girth is defined as the minimum-length loop in the code factor graph.
Factor graphs with high-girth are beneficial as smalllength loops can cause decoders based on belief propagation to fail. More specific details concerning decoding methods are discussed in Section 5. The parity check matrix B(A 13 ) has minimum-girth six. The code distance d = 26 was determined via an exhaustive search over all codewords. By applying the lifted product to two copies of A 13 , we obtain a quantum code with parameters [[416, 18, d ≤ 20]]. There is no known method of computing the code distance of a generic lifted product code given the distances of the seed codes. However, we can obtain a heuristic indication of the code performance by running simulations. The upper-bound d ≤ 20 on the code distance is an estimate based on the minimum-weight logical operator observed after extensive decoding simulation with the BP+OSD decoder. By comparison, the [[400, 16,6]] hypergraph product code from Example 3.2 has a similar code rate but a minimum distance of six.

Error model
We now explore how QEC codes can be designed to exploit noise asymmetry. To characterise the qubit bias, we consider an error model in which each qubit is independently subject to a Pauli channel E Q (ρ) of the form (24) where ρ is the density matrix of the single-qubit state and p X , p Y and p Z are the physical error rates for X-, Y -and Z-type errors respectively. The total error rate p is given by the sum over the three error types p = p X + p Y + p Z . Under this channel, the noise bias η i is defined where p i , p j ∈ {p X , p Y , p Z }. For example, the Zerror bias is η Z = 0.5 for depolarising noise where In this regime, the quantum syndrome equation defined in Eq.(13) simplifies to s Q = H X · e Z , as the probability of obtaining either an X-or Y -error is zero. The performance of the code therefore depends exclusively on the H X component of the quantum parity check matrix. Similarly, for infinite X-bias η X = ∞, the syndrome equation simplifies to s Q = H Z · e X leaving the code performance dependent on H Z . From this, we see that tailoring a QEC code to a specific bias-type involves ensuring that the relevant sub-component of the quantum parity check matrix (H X or H Z ) is itself a good code, both in terms of its distance and the ease of its decoding.
How do we expect the capacity of the quantum error channel to change with increasing bias? A partial answer to this question can be obtained by applying the Shannon noisy coding theorem to obtain a quantity known as the Hashing threshold. The Hashing threshold gives a lower bound 4 on the physical error rate below which a quantum code can in theory arbitrarily suppress the error rate. For the quantum channel defined in Eq. (24), the Hashing threshold for depolarising noise is 18.9%. As the bias is increased (for X-,Y -or Z-noise), the Hashing threshold increases rapidly until converging to a value of 50% in the limit of infinite-bias. The Hashing threshold provides the theoretical motivation for bias-tailoring: the higher the bias, the higher the channel capacity. A more detailed discussion of the Hashing threshold can be found in Appendix C.

The CSS toric code under biased noise
We first consider the behaviour of the standard CSS code (as presented in Example 3.1) in different bias regimes. Under depolarising noise the upper bound on the threshold of the CSS toric code is 18.9% as determined by mapping the code Hamiltonian to the classically disordered eight-bond Ising model [11]. Thresholds close to this upper bound have been numerically observed via Monte Carlo simulations of the toric code using decoders based on minimum-weight perfect matching [42,43]. From this we see that under depolarising noise, the toric code matches the Hashing threshold of 18.9%. However, as the bias is increased, the toric code's threshold begins to drop counter to what we would expect from the Hashing threshold. To explore why this occurs, we consider the infinite Xbias regime where the performance of the toric code relies exclusively on the measurement and decoding of its Z-stabilisers. Fig. 3 shows the factor graph of the H Z subcomponent of the [ [12,2,2]] toric code introduced in Example 3.1. The nodes shaded in red depict a weight-two X-logical operator that spans the lattice. In the limit of infinite X-bias, this toric code therefore has distance d X = 2. By again mapping to a statistical physics model, the threshold of H Z (and H X ) component of the toric code under infinitebias is upper bounded at 10.9% [11]. This is considerably lower than the Hashing threshold of 50% in the infinite-bias regime. It is here that we see the weakness of the CSS toric code when it comes asymmetric channels: its H Z and H X sub-components are themselves not good classical codes. Consequently, the CSS toric code is unable to leverage the increase in channel capacity that comes with increased bias.

The XZZX toric code
The XZZX surface code is a modified version of the CSS surface code that has recently been shown to perform exceptionally well under biased-noise [7,8,10]. The XZZX surface code, as presented in [7,8,10], is defined on a rotated lattice with periodic boundary conditions. The improved performance of the XZZX surface code relative to the standard CSS code can be attributed to two factors: 1) a redefinition of the stabilisers that results in H X and H Z sub-components reducing to a set of decoupled repetition codes with a threshold of 50%; 2) twisted periodic boundary conditions that lead to longer logical operators in the infinite-bias limit. In this paper, we explore an XZZX protocol based on the CSS toric code and defined on a rectangular lattice. In this setting, we will see that both XZZX modifications -stabiliser redefinition and boundary twists -can be directly derived from the lifted product.
To construct a XZZX code, the first step is to redefine the stabilisers of the hypergraph product via an operation we refer to as a Hadmard rotation. The The above parity check matrix has mixed-type stabilisers, and is therefore no longer a CSS code. Fig. 4 shows the factor graph of the XZZX toric code obtained by applying a Hadamard rotation to the [ [12,2,2]] CSS toric code depicted in Fig. 2. The key difference is that all Z-check edges now act horizontally whilst all X-check edges act vertically. Every parity check qubit measures the same XZZX stabiliser which lends the code its name. In addition to transforming the stabilisers, the Hadmard rotation also transforms the logical operators. For any CSS hypergraph product code, a basis of logical operators can be written in the form where we again separate the operators into the components that act on the sector one qubits and sector two qubits. In addition to transforming the code stabilisers, the Hadmard rotation also transforms the logical operators so that they read From the above, it follows that the Hadamard rotation does not alter the weight of any logical operator   Fig. 5, where we see that it now consists of a set of decoupled closed-loop repetition codes. The threshold of the repetition code is upper-bounded at 50%. As a result, the upper-bound on the threshold of the XZZX toric code grows from 18.9% to 50% with increasing noise bias. Herein lies the principal benefit of the XZZX construction: the Hadamard rotation modifies the stabilisers so that the H X and H Z components are built from copies of the seed codes (and their transposes). Therefore, provided the seeds codes are themselves good classical codes, the resultant XZZX hypergraph product will also be a good code in the limit of infinite-bias. In the case of the XZZX code, the seeds are repetition codes and the resultant infinite-bias threshold saturates the Hashing bound.

The XZZX toric code with twisted boundary conditions
In the infinite X-bias regime, the [[12, 2, 2]] XZZX toric code has logical-X distance d X = 2. The nodes filled in red Fig. 5 show an example of a minimumweight logical operator that spans the lattice. One way of improving the infinite-bias distance d X is to increase the width of the lattice: this amounts to using a longer repetition code as the seed H 2 . The disadvantage of this method is that it results in more qubits and a reduction in the code rate. An alternative, more qubit-efficient technique for improving d X , is to modify the code via a boundary twist. In the CSS toric code derived from the hypergraph product, boundary checks connect to qubits on the opposite side of the lattice. Fig. 6 shows an XZZX toric code where the boundary conditions for the H Z component have been twisted so that each boundary check connects instead to the qubit shifted one row below on the opposite side of the lattice. The resultant code has an improved distance of d = 3 giving it parameters [ [12,2,3]]. In the infinite-bias regime, the distance is increased even further. Fig. 7 shows a logical operator (red nodes) on the H Z sub-component of the twisted code. We see that this logical operator has weight six and covers all the qubits in sector one. Similarly, a second independent logical operator can be defined that covers all sector two qubits. In the limit of infinite X-bias, the X-distance is therefore d X = 6.
In general, we define an XZZX twisted toric code on an n 1 × n 2 lattice where n 1 corresponds to the number of data qubits spanning the lattice vertically and n 2 the number of data qubits spanning the lattice horizontally. Eg. the lattice depicted in Fig. 6 has lattice parameters n 1 = 3 and n 2 = 2. The parity check matrix of the XZZX twisted toric code is written where N is the qubit block length N = 2n 1 n 2 . We see that the above differs from Eq. (26) in that the H Z component has been rewritten in terms of two repetition codes of length N/2. The first repetition codes wraps around the sector one qubits and the second around the sector two qubits. Note that for the example in this section, we have twisted only the H Z component. An equivalent XZZX code could be constructed by instead twisting the H X component. In the CSS setting, boundary twists have previously been used to improve code performance by Kovalev and Pryadko [10]. Boundary twists have also served a role in the recent discoveries of high-performance quantum LDPC codes [26,27].

Lifted product representation of the XZZX toric code
Following the boundary twist, the parity check matrix of the XZZX twisted toric code given by Eq. (29) can no longer be derived from the hypergraph product. In this section, we show that the XZZX twisted toric code is in fact an instance of a lifted product code.
In order to recast the XZZX twisted code as a lifted product we need to find a protograph representation of the parity check matrix in Eq. (29). From Example 2.3, we note that the parity check matrix of the repetition code H rep N/2 can be expressed in terms of the following protograph Here N = 2n 1 n 2 where n 1 and n 2 are the vertical and horizontal widths of the lattice respectively. By inspection of the factor graph in Fig. 6, we see that the X-parity checks connect qubit i to qubit (i + n 2 ) mod N/2. Using this periodicity, we find that The protograph representation of Eq. (29) is then given by where where E 1 is a 1×1 instance of the identity protograph defined in Eq. (18). Using this relation, we can rewrite Eq. (32) as follows Now, note the similarity of the above to the lifted product defined in Eq. (21). The protograph for the XZZX toric code, Eq. (33), is simply the lifted product of the 1×1 seed protographs, A 1 and A 2 , followed by Hadamard rotation on the second block of N/2 qubits. It is clear that this form of the lifted product encapsulates both the stabiliser redefinition and boundary twists that give the XZZX twisted toric code such high performance under biased noise.

The bias-tailored lifted product
In the previous section we saw that the XZZX twisted toric code can be described as a special case of the lifted product applied to two 1×1 protographs. However, we need not be restricted to this special case: any combination of seed protographs A 1 and A 2 can be used to construct quantum LDPC codes. Given two seed protographs, A 1 ∈ A m 1 ×n 1 L with dimensions m 1 ×n 1 and A 2 ∈ A m 2 ×n 2 L with dimensions m 2 ×n 2 , we can define a bias-tailored lifted product code with the following protograph where E m is a m × m instance of the identity protograph defined in Eq. (18). The above defines a non-CSS code with a parity check matrix given by B(A Q ).
Here we see that the A Z protograph consists of a set of decoupled copies of the the seed protograph A and its transpose. Both the code B(A) and its transpose B(A T ) have parameters [52,3,26]. Consequently the infinate bias X-distance is d X = 26. This compares favourably to the distance of d ≤ 20 for depolarising noise.

Numerical results
To assess the performance of bias-tailored quantum LDPC codes we numerically estimate the logical error rates under various bias regimes. To this end, we run Monte Carlo simulations to randomly generate errors weighted according to an instance of the biased noise channel defined in Eq. (24). These errors are then corrected using the recovery operation output by a 3. Decode the syndrome to obtain a recovery vector r ∈ F 2N 2 . 4. Calculate the residual error r = e + r.

5.
Check if r is a stabiliser. This amounts to verifying that r ∈ rowspace(H). If r is a stabiliser then the decoding is successful. If not, then r is a logical operator meaning the decoding has failed.
The fraction of failed runs gives the simulated block error rate P L of the quantum code. The block error rate tells us the total probability of an error occurring on any of the logical qubits. However, it does not take into account the number of logical qubits encoded by the code. A more useful metric for quantifying code performance is the word error rate P W defined as where K is the number of encoded logical qubits. The word error rate can be thought of as the logicalerror-rate-per-logical-qubit and is particularly useful for comparing quantum LDPC codes of different sizes.
For small logical error rates, the word error rate approximates to P W ≈ P L /K. When decoding CSS codes, a common strategy is to treat the X-and Z-stabilisers as two separate codes. The quantum code can then be decoded using two factor graphs of size N instead of decoding the full quantum parity check matrix of size 2N . Depending upon the complexity scaling of the decoding algorithm, this can result in considerable reductions in runtime. Biastailored lifted product codes are not CSS. However, their stabilisers are locally equivalent to a CSS code, differing only by the Hadamard rotation. Using this equivalence, we have found that the decoding graph can still be decoupled into two separate components of length N . A disadvantage of this simplification is that the resultant decoder ignores correlations between the two factor graphs that arise when a Y -error occurs.
To counter this, we have developed a routine that implements a Bayesian update on the error channel of the second round of decoding conditional on the output of the first round of decoding. More details about our decoding procedures can be found in Appendix D.

Decoding methods
In our simulations we use one of two decoding methods: 1) minimum-weight perfect matching (MWPM) or 2) belief propagation plus ordered statistics decoding (BP+OSD). We now briefly describe each method.
Minimum-weight perfect matching (MWPM) is a decoding method that can be applied to any code where error chains produce pair-like syndromes [44,45]. More concisely, MWPM requires any chain-like error e to trigger a syndrome s = H · e of weight two such that wt(s) = 2. On a factor graph, the triggered parity checks exist at the ends of the chain of errors. Given an ensemble of syndromes, the task of the MWPM matching decoder is to find the set of error chains (matchings) with the lowest total weight. Examples of codes with parity check matrices that are amenable to MWPM decoding include: repetition codes, surface codes, toric codes, XZZX surface codes and XZZX toric codes. Note that at the boundary surface codes produce syndromes with weight one. However, this problem can be resolved by adding boundary nodes to the factor graph and assigning their error probability to zero. In this work we use the PyMatching implementation of MWPM [46] to decode instances of the CSS and XZZX toric code.
Belief propagation plus ordered statistics decoding (BP+OSD) is a versatile decoding method for quantum LDPC codes [31]. In contrast to MWPM, BP+OSD can decode codes which produce syndromes of weight greater than two. This makes it suitable for random codes constructed from the lifted product. The first step in BP+OSD is to apply the belief propagation (BP) algorithm, a standard technique for decoding classical LDPC codes [34,47]. Belief propagation exploits the structure of a code's factor graph to efficiently compute the probability of each bit being errored given a measured syndrome. In general, BP can decode codes in time linear to the block length provided the factor graph is sufficiently sparse and has a low-density of short-length loops. For quantum codes, the latter requirement is problematic as quan-  tum degeneracy necessarily leads to loop-like structures in the quantum factor graph. Consequently, the BP algorithm fails when degeneracy means there are multiple low-weight solutions for a certain syndrome. To counter this, the second stage of BP+OSD invokes a post-processing routine known as ordered statistics decoding (OSD) [48]. The OSD step involves inverting the parity check matrix to yield a unique solution to the decoding problem thus removing any ambiguity due to quantum degeneracy. To ensure a lowweight solution is obtained, OSD uses the output of BP to choose a high-probability subset of qubits over which the inversion is performed. Numerical simulations have shown BP+OSD to be a highly-performant decoder for hypergraph product codes [31,49], lifted product [31] codes, 2D topological codes [49] and 3D topological codes [50]. For this work, we make use of the BP+OSD implementation included in the LDPC package [51].

Toric codes with twisted boundaries
We first present the finding of our numerical investigations of toric codes with twisted boundaries. As described in Section 4, such codes can be derived from the lifted product. We consider toric codes defined on a rectangular lattice with dimensions n × (n − 1). These lattice parameters are chosen because they lead to the best code distances relative to the block length.
For each instance of the n × (n − 1) lattice, we construct two codes: 1) the twisted CSS toric code and 2) the XZZX twisted toric code. The twisted CSS toric code has parity check matrices derived from the lifted product defined in Eq.(21) with seed protographs Here, the block length is N = 2n(n−1). The XZZX twisted toric code is defined from the same protographs A 1 and A 2 using the bias-tailored lifted product defined in Eq. (34). Fig. 6 depicts an example of an XZZX twisted toric on a 3 × 2 qubit lattice. Fig. 8 shows the MWPM decoding curves for a CSS and XZZX twisted toric code under different bias regimes for a fixed physical error rate of p = 0.06. Each code is defined on a lattice with dimensions 16 × 15 giving code parameters [[480, 2, 16]]. The Xbias η X is plotted on the x-axis and the word error rate on the y-axis. For depolarising noise, the word error rate of the two codes is equal. With increasing bias, however, the decoding performance of the two codes immediately begins to differ. For the CSS code, the word error rate begins to rise, eventually converging to a value of approximately ten times the depolarising error rate. In contrast, increasing the bias for the XZZX version of the code leads to an exponential reduction in the word error rate. This effect can be attributed to the fact that XZZX codes decouple to independent copies of their seed codes in the high-bias regime. The full quantum code distance for depolarising noise is d = 16, whereas the infinite bias distance for X-errors is d X = 240; an improvement in code performance is therefore expected as the bias is increased. For the standard CSS version of the code, no decoupling occurs, and the distance remains d = 16 in all bias regimes.

Quantum LDPC codes
We numerically investigate two quantum LDPC codes constructed from the bias-tailored lifted product. The first is the [[416, 18, d ≤ 20]] code whose construction is outlined in Example 4.1. The second is a biased-tailored lifted product code with parameters [[882, 24, d ≤ 24]]. This code was first presented in CSS form in [31], and the corresponding protographs can be found in Appendix B. For both codes, the performance is accessed by running simulations using the BP+OSD decoder. The lower bounds on the distances are estimated from the weights of the smallest observed logical operators during these simulations. Fig. 9 shows the decoding plot of word error rate against X-bias for the [[416, 18, d ≤ 20]] lifted product code for physical error rates in the range 0.06 ≤ p ≤ 0.10. As the X-bias η X is increased we initially see an exponential decrease in the error rate. However, the decoding curve plateaus for η X > 10. To understand why this levelling-off occurs we refer to Eq. (35) which gives the quantum protograph A Z of the [[416, 18, d ≤ 20]] code in the limit of infinite Xbias. Here we see that the code has decoupled to a set of independent copies of the seed protograph A and its transpose A T . Both A and A T have distance 26 when converted into binary form, giving an infinitebias X-distance of d X = 26 for the [[416, 18, d ≤ 20]] code. As the X-bias is increased, we therefore see a reduction in the word error rate until a level commensurate with the classical performance of the seed codes is reached. From this point on, the word error rate plateaus as the code performance cannot exceed that of the original seed codes. The reason we do not see a similar plateau for the XZZX toric code in Fig. 8 is that it has an infinite-bias X-distance of d X = 240. The bias at which this code will plateau is therefore well beyond the regime which can be realistically simulated.
The [[416, 18, d ≤ 20]] code is constructed from the bias-tailored lifted product of a pair of identical protographs. We therefore expect its performance to be the same for X-and Z-bias. In contrast, the [[882, 24, d ≤ 24]] code takes two different protographs as input (see Appendix B for the exact form of the seed protographs). The decoding plot for the the biastailored [[882, 24, d ≤ 24]] code is shown in Fig. 10 for increasing values of both the X-and Z-bias. For both bias-types, we again see an immediate reduction in the word error rate. However, the X-bias curves plateau at a word error rates approximately two orders of magnitude higher than the corresponding curves for Z-bias. This implies that of the two protographs, the one used to define the X-stabilisers corresponds to the better classical code.  In Fig. 10, we also note that the decoding curves of the [[882, 24, d ≤ 24]] reach a minimum before levelling off at an increased value. This effect arises because of the specific form of the error model we are using. As the bias is increased, the error rate for the H Z component of the decoder increases whilst the error rate for H X component decreases. At a certain value of η X , the error rate for the H X component is so low that the effective decoder failure rate is zero. As such, increasing η X further simply results in a larger error rate for H Z , and therefore leads to an increase in the overall word error rate.

Qubit overheads for quantum memories
The specific advantage of quantum LDPC codes over surface codes is their higher rate. Fig. 11 Figure 11: Decoding comparison between a bias-tailored lifted product code and two XZZX twisted toric codes. The toric codes are decoded using MWPM whilst the bias-tailored lifted code uses BP+OSD. For all simulations shown in this plot, the physical error rate is fixed at p = 0.06. Error bars show three times the standard deviation.
toric code could be used so that the 18 logical qubits can be encoded with reduced overhead. However, it is clear from decoding plot for the [[180, 2, 10]] XZZX twisted toric code that this strategy imposes a severe penalty in terms of the word error rate. As the bias is increased, the word error rate of the [[416, 18, d ≤ 20]] code initially drops faster than the twisted toric code. Due to the plateau effect, we would expect the word rate of the lifted product code to eventually intersect with that of the [[544, 2, 17]] twisted toric code. However, this would occur at an unrealistically high bias.

Summary & outlook
Physical qubits are typically subject to asymmetric noise where one species of error dominates over the other. As such, bias-tailoring provides a ripe opportunity for reducing the overhead of a QEC code. Prior to this work, studies conducted on the XZZX surface code have shown that it achieves remarkable performance in the high-bias regime. In this paper, we have extended these findings to show that bias-tailoring is also possible for the wider family of quantum LDPC codes.
Our principal result is the introduction of the biastailored lifted product as a method for constructing quantum codes for asymmetric noise channels. This is obtained via a modification of the stabilisers of the original lifted product defined in [28]. We first showed that the XZZX toric code can be viewed as a special-case of the bias-tailored lifted product: both the stabiliser redefinition and boundary twists that characterise the XZZX toric code arise naturally from bias-tailored lifted product applied to two repetition codes. When applied to pairs of classical LDPC codes, the bias-tailored lifted product yields quantum LDPC codes with high-rate and good block-lengthto-distance scaling. From this, we see that the biastailored lifted product provides a general framework for bias-tailoring, encapsulating both known examples of topological codes as well as quantum LDPC codes constructed using random methods.
We constructed examples of bias-tailored lifted product codes based on classical quasi-cyclic LDPC codes. Our Monte Carlo simulations of these codes under BP+OSD decoding showed that they outperform the toric codes for all realistic values of the bias. From this it is clear: connectivity-permitting, it is highly beneficial to consider a quantum LDPC encoding over the surface or toric code.
The performance of bias-tailored quantum LDPC codes derived from lifted products depends upon the quality of original seeds codes. This is due to fact that in the infinite-bias regime, the quantum code reduces to decoupled copies of the seed codes. As a result, it is important that the seed codes are optimised as much as possible. In this work, we have derived codes using the lifted product of quasi-cyclic codes. However, the lifted product can be applied to other families of codes. For instance, in [29], it is shown that quantum LDPC codes can be obtained using the lifted products of expander codes. It would be interesting to see whether such alternative constructions could yield codes at finite sizes (eg. < 1000 qubits) that are competitive with quasi-cyclic lifted quantum LDPC codes.
In this paper, we have considered a noise model were each qubit is subject to the same biased depolarising channel. In practice, however, each qubit on a quantum computer will be subject to a unique depolarising error channel: there is therefore the potential for the bias-tailoring to be more fine-grained. This idea has been explored for surface codes in [52] and [53]. In [52], random code deformations are investigated, whilst in [53] a scheme for individually biastailoring each qubit is proposed. It would be interesting to see whether similar improvements in the performance of bias-tailored quantum LDPC codes can be achieved for non-identically distributed error models. Another interesting direction for future research would be to consider the bias tailoring of higherdimensional topological codes, as has recently been explored for various families of codes defined on 3D lattices in [54].
All the simulations in this paper were carried out under the assumption of perfect syndrome readout. A natural follow up to this work is therefore to study code performance under a more realistic circuit-level noise model. As part of this, a necessary consideration is that certain quantum circuit elements can transform one error type to another. For example, a two-qubit controlled-Z gate propagates X-errors into Z-errors. Such propagation can negate the benefit of using a bias-tailored code. To counter this, it is necessary to engineer bias-preserving two qubit gates. It has been proposed that the XZZX surface code could retain its high-bias performance via an implementation involving Kerr-cat qubits [55]. Similarly, biaspreserving gates will need to be engineered into the design of the non-local architectures used to implement quantum LDPC codes.
In the surface code, stabiliser extraction circuits are made fault tolerant by repeating measurements and decoding over time. A similar strategy could be pursued for quantum LDPC codes. However, this is likely to introduce a large decoding overhead due to the large the number of repetitions required for fault tolerance [56]. Additionally, decoding in this context must be carried out over an extensive space-time factor graph, a complication than can impact the benefits derived from bias-tailoring [57].
An alternative strategy for constructing fault tolerant quantum error correction codes is to use a socalled single-shot code. Single-shot codes are designed to have redundant stabilisers that are protected by a classical code [58]. This allows imperfect measurements to be corrected, and the quantum code to be decoded using only a single round of stabiliser measurements. In [59], it was established that single-shot codes can be constructed using higher-dimensional homological products. Building on this, it has been shown that single-shot quantum LDPC codes can be efficiently decoded using BP+OSD [50,60]. An interesting avenue for future research would be to investigate the construction of higher dimensional lifted products codes and their single-shot properties. For instance, a bias-tailored quantum LDPC code could be obtained by taking the lifted 3D hypergraph product over the ring of circulants. Such a code would be single-shot for one species of Pauli error. Extending this concept, fully single-shot codes could be obtained from lifted variants of the 4D hypergraph product.
The BP+OSD decoder serves as a general-purpose decoder for quantum LDPC codes. While the belief propagation component operates in O(N ) time, where N represents the block-length of the code, the ordered statistics component necessitates Gaussian elimination with an O(N 3 ) runtime. Depending on the clock cycle of the selected qubit architecture, the OSD postprocessing might present an obstacle to real-time decoding of quantum LDPC codes [61]. As a result, exploring alternative decoding strategies is crucial. One possibility is that the OSD decoding stage could be replaced by an alternative post-processing decoder such as union find [62,63], small set-flip [64] or probabilistic flip [65]. Another strategy is to directly optimise the BP algorithm itself, for example through the use of machine learning, to derive improved update rules [66]. Finally, there are BP-variants that are specifically designed to mitigate the effects of trapping sets in quantum codes. These include generalised belief propagation [67], stabiliser inactivation [68] and memory belief propagation [69]. Such methods could reduce, or even remove, the need for resource intensive post-processing.
It has long been known, both in theory and practice, that classical codes can (near) saturate the Shannon limit. Recently, it has been proved that optimal families of lifted product codes exist with linear distance to block-length scaling [29]. An interesting avenue for future work would be to study the numerical performance of such codes under different bias regimes. In particular, this could cast light on the ultimate capacity of quantum channels beyond the Hashing bound.

The planet
The carbon footprint associated with the numerical simulations in this paper are summarised below. For context, 138kg is the amount of carbon that would be emitted by the average German car over a journey of approximately 1000km. The CO 2 emission per kWh used in the above table was the average value in Germany during 2020 according to European Environment Agency. The 138kg emitted will be offset by donating to Atmosfair (https://atmosfair.de), a not-for-profit that promotes, develops and finances renewable energies in over fifteen countries worldwide. Guidance on the reporting the carbon cost of scientific research can be found in [76].

A Parity check matrices
In Example 3.2, a hypergraph product code is constructed from seed codes with the parameters [16,4,6]. The parity check matrix H for these seed codes is given below:

B Protographs
The [[882, 24, d ≤ 24]] code is constructed from the bias-tailored lifted product with L = 63 of the following seed protographs The upper-bound on the minimum distance is an estimate based on the lowest-weight logical operator observed during simulation with the BP+OSD decoder. This code is equivalent to the CSS generalised hypergraph product code of the same size first presented in [31].

C The Hashing bound under biasednoise
Given a noisy channel, what is the maximum amount of information that can be reliably transferred using error correction? In the classical setting, the answer to this question is given by the Shannon noisy coding theorem [77]. For a given error channel, the Shannon noisy coding theorem tells us that good error correction codes exist with the ability to arbitrarily suppress the logical error rate. However, the rate r = k/n of such good codes must fall below a certain value known as the Shannon limit. To illustrate, we consider the simple case of the classical binary symmetric error channel where each bit is independently subject to a bit-flip with probability p X . For this channel, the Shannon limit r S is given by where H(p X ) is the binary entropy defined as The Shannon limit implies that perfect error correction is in principle possible with error correction codes with code rate r ≤ r S , whilst it is impossible with code rate r > r S . Various classical error correction codes -including LDPC, turbo, and polar codesare known to be optimal in the sense that they operate at rates approaching the Shannon limit whilst being efficiently decodable [47,[78][79][80]. The Shannon noisy coding theorem can be directly extended to quantum channels. This provides a Shannon limit for stabiliser codes referred to as the Hashing bound. For the noisy quantum channel E Q (ρ) defined in Eq. (24) the Hashing bound r H is given by [81] r H = 1 − H Q (p).
Here, H Q (p) is the Pauli entropy function defined as where p is the total physical error rate p = p X + p Y + p Z . It should be noted that the Hashing bound is derived using methods from classical information theory: quantum effects such as entanglement and degeneracy, which increase the actual capacity of the quantum channel [82], are not accounted for. As such, the Hashing bound should be treated as a lower-limit on the achievable rate of reliable information transfer over a quantum channel. In fact, in certain settings, stabiliser codes have been shown to achieve logical error rate suppression beyond the Hashing bound [7,83]. Quantifying the true capacity of a quantum channel remains an open problem. Given an existing error correction code with a known rate it is possible to calculate its operational regime by calculating the Hashing probability p H (r). The Hashing probability is the value obtained for the total physical probability p when r H in Eq. (42) is set to a fixed value r H = r, which is readily obtained using a numerical solver. The Hashing probability p H (r) tells us the physical error rate below which it is possible to arbitrarily suppress the logical error rate.
The toric code and its topological cousins are often benchmarked in terms of the code threshold p T H . Provided the physical error rate of the qubits is below the threshold p < p T H , increasing the size of a code will reduce the logical error rate p L . In the sub-threshold regime, and in the limit of large block lengths where the code rate r → 0, we expect the logical error rate to be arbitrarily suppressed lim r→0 p L = 0. For these codes, an estimate of the code threshold can therefore be derived from the zerorate Hashing probability p H (0).
We now explore how adjusting the qubit bias affects the Hashing limit of the quantum channel. Fig. 12 shows the Hashing probability plotted against the Xbias for code error rates between R = 10% and R = 0.
Here the X-bias is increased setting p Y = p Z and raising the value of p X whilst keeping the total physical error rate fixed p = p X + p Y + p Z . The red line shows the zero-rate Hashing probability and therefore gives an estimate of the code threshold. At the origin, which corresponds to depolarising noise where p X = p Y = p Z , the zero-rate Hashing limit is 18.9%. As the bias grows, the Hashing limit rises until converging to a value of 50%. In the infinite-bias regime, it is clear that the Hashing bound defined in Eq. (42) is equivalent to the classical Shannon limit in Eq. (40).
Analysing the quantum noise model in terms of the Hashing bound implies that there is much to be gained from accounting for noise asymmetry in the design of quantum codes. Up to this point, we have explored the zero-rate Hashing bound that only applies to codes, such as the toric code, which have vanishing r=0.0% r=2.5% r=5.0% r=7.5% r=10.0% Figure 12: Plots of of the hashing probability against the X-bias for code rates between R = 10% and R = 0%. The x-axis intersects the y-axis at ηX = 0.5 which corresponds to depolarising noise. The Hashing probabilities were obtained by numerically solving Eq. (42) for p for fixed values of the rate rH = r. rate in the asymptomatic limit. In addition to the zero-rate line, Fig. 12 also plots the Hashing probability for various finite values of the rate. For all rates, we see an improvement in the Hashing capacity as the bias is increased. As such, we also expect bias-tailoring to be useful for codes, such as quantum LDPC codes, that have finite rate in the asymptotic limit.

D Simulation algorithm
In this Appendix we describe implementation details of our Monte Carlo simulations of quantum LDPC decoding. We present all algorithms in pseudo-code. The actual simulation code can be found in the external repository for this project [33].

D.1 Two-stage decoding of Hadamard rotated codes
For CSS codes, it is possible to implement a two-stage decoding procedure where the X-and Z-stabilisers are treated as separate codes. The stabilisers of the bias-tailored codes explored this work differ from their standard CSS code counterparts by a Hadamard rotation on the sector-two qubits. The resultant codes are non-CSS which would ordinarily necessitate having to decode the entire quantum parity check matrix in a single stage. Fortunately, for the specific case of the Hadamard rotated codes, a standard CSS two-stage  r Z s.t. H X · r Z = s Z Check for logical errors 30: r X = r X + e X Residual X-error 31: r Z = r Z + e Z Residual Z-error 32: if L X · r Z = 0 then 33: return Failure 34: else if L Z · r X = 0 then 35: return Failure 36: else 37: return Success 38: end if

D.3 Accounting for correlated errors
Pauli-Y errors introduce correlations between the e X and e Z error vectors. Failing to account for these correlations can reduce the logical error rate of the decoding. Consider the scenario, as in Algorithm 1, where the X-errors are decoded before the Z-errors. Prior to the first round of decoding, we assign the probability that bit-i is set to one in the error vector e X to be p X [i] = p X + p Y : i.e. this is the combined probability that either an X-or a Y -error occurs. Now, imagine that the decoder tells us that the bit-i in e X is zero e X [i] = 0. In the second round of decoding, the probability that bit-i is e Z [i] = 1 is now given by In the above, probability of p Z [i] is adjusted to account for the fact that that Y -errors are no longer possible. Similarly, if the outcome of the fist round of decoding is e X [i] = 1 then the the corresponding probability p Z [i] is updated to These channel updates are implemented via the subroutine described in pseudocode below In this section, we have described channel updates from X->Z. However, updates in the reverse direction can easily be derived by swapping the roles of p X with p Z in Eqs. (45)(46). For the simulations in this work, we implemented channel updates for the codes decoded using BP+OSD. This was possible, as the channel information for BP+OSD can be updated on-the-fly without affecting the runtime. We did not implement channel updates with the MWPM decoder, as updating the channel information for this decoder necessitates re-running a pre-processing routine (Dijkstra's algorithm) that compiles a matching database. Fig. 13 shows the word error rate against the physical depolarising error rate for the [[416, 18, d ≤ 20]] quantum LDPC code decoded using BP+OSD. The red line shows the case when no channel update is performed, whilst for the blue line a channel update from X->Z performed. From this it is clear that the channel update subroutine improves the word error rate for all values of the physical error rate.