文献信息
Unknown, arXiv:2308.07915 (2023),“High-threshold and low-overhead fault-tolerant quantum memory”. arXiv:2308.07915 原文为 arXiv 预印本版本的机器可读转换,公式与图注以原文为准;本页仅作站内索引与全文查阅,引用请以正式出版物为准。
全文
High-threshold and low-overhead fault-tolerant quantum memory
Sergey Bravyi1, Andrew W. Cross1, Jay M. Gambetta1, Dmitri Maslov1, Patrick Rall2, and Theodore J. Yoder1
1IBM Quantum, IBM T.J. Watson Research Center, Yorktown Heights, NY 10598 (USA) 2IBM Quantum, MIT-IBM Watson AI Lab, Cambridge, MA 02142 (USA)
February 22, 2024
Abstract
Quantum error correction becomes a practical possibility only if the physical error rate is below a threshold value that depends on a particular quantum code, syndrome measurement circuit, and decoding algorithm. Here we present an end-to-end quantum error correction protocol that implements fault-tolerant memory based on a family of LDPC codes with a high encoding rate that achieves an error threshold of 0.8% for the standard circuitbased noise model. This is on par with the surface code which has remained an uncontested leader in terms of its high error threshold for nearly 20 years. The full syndrome measurement cycle for a length-n code in our family requires n ancillary qubits and a depth-7 circuit composed of nearest-neighbor CNOT gates. The required qubit connectivity is a degree-6 graph that consists of two edge-disjoint planar subgraphs. As a concrete example, we show that 12 logical qubits can be preserved for nearly one million syndrome cycles using 288 physical qubits in total, assuming the physical error rate of 0.1%. We argue that achieving the same level of error suppression on 12 logical qubits with the surface code would require nearly 3000 physical qubits. Our findings bring demonstrations of a low-overhead fault-tolerant quantum memory within the reach of near-term quantum processors.
1 Introduction
Quantum computing attracted attention due to its ability to ofer asymptotically faster solutions to a set of com putational problems compared to the best known classical algorithms [1]. It is believed that a scalable functioning quantum computer may help solve computational problems in such areas as scientific discovery, materials research, chemistry, and drug design, to name a few [2, 3, 4, 5].
The main obstacle to building a quantum computer is the fragility of quantum information, owing to various sources of noise afecting it. Since isolating a quantum computer from external efects and controlling it to induce a desired computation are in conflict with each other, noise appears to be inevitable. The sources of noise include imperfections in qubits, materials used, controlling apparatus, State Preparation and Measurement (SPAM) errors, and a variety of external factors ranging from local man-made, such as stray electromagnetic fields, to those inherent to the Universe, such as cosmic rays. See Ref. [6] for a summary. While some sources of noise can be eliminated with better control [7], materials [8], and shielding [9, 10, 11], a number of other sources appear to be dificult if at all possible to remove. The latter kind can include spontaneous and stimulated emission in trapped ions [12, 13], and the interaction with the bath (Purcell Efect) [14] in superconducting circuits—covering both leading quantum technologies. Thus, error correction becomes a key requirement for building a functioning scalable quantum computer.
The possibility of quantum fault tolerance was established earlier [15]. Encoding a logical qubit redundantly into many physical qubits enables one to diagnose and correct errors by repeatedly measuring syndromes of parity check operators. However, error correction is only beneficial if the hardware error rate is below a certain threshold value that depends on a particular error correction protocol. The first proposals for quantum error correction, such as concatenated codes [16, 17, 18], focused on demonstrating the theoretical possibility of error suppression. As understanding of quantum error correction and the capabilities of quantum technologies matured, the focus shifted to finding practical quantum error correction protocols. This resulted in the development of the surface code [19, 20 21, 22] that ofers a high error threshold close to 1%, fast decoding algorithms, and compatibility with the existing quantum processors relying on 2-dimensional (2D) square lattice qubit connectivity. Small examples of the surface code with a single logical qubit have been already demonstrated experimentally by several groups [23, 24, 25, 26, 27] However, scaling up the surface code to a hundred or more logical qubits would be prohibitively expensive due to its poor encoding eficiency. This spurred interest in more general quantum codes known as Low-Density Parity-Check (LDPC) codes [28]. Recent progress in the study of LDPC codes suggests that they can achieve quantum faulttolerance with a much higher encoding eficiency [29]. Here, we focus on the study of LDPC codes, as our goal is to find quantum error correction codes and protocols that are both eficient and possible to demonstrate in practice, given the limitations of quantum computing technologies.
A quantum error correcting code is of LDPC type if each check operator of the code acts only on a few qubits and each qubit participates only in a few checks. Multiple variants of the LDPC codes have been proposed recently including hyperbolic surface codes [30, 31, 32], hypergraph product [33], balanced product codes [34], two-block codes based on finite groups [35, 36, 37, 38], and quantum Tanner codes [39, 40]. The latter were shown [39, 40] to be asymptotically “good” in the sense of ofering a constant encoding rate and linear distance – a parameter quantifying the number of correctable errors. In contrast, the surface code has an asymptotically zero encoding rate and only square-root distance. Replacing the surface code with a high-rate, high-distance LDPC code could have major practica implications. First, fault-tolerance overhead (the ratio between the number of physical and logical qubits) could be reduced dramatically. Secondly, high-distance codes exhibit a very sharp decrease in the logical error rate: as the physical error probability crosses the threshold value, the amount of error suppression achieved by the code can increase by orders of magnitude even with a small reduction of the physical error rate. This feature makes high-distance LDPC codes attractive for near-term demonstrations which are likely to operate in the near-threshold regime. However, it was previously believed that outperforming the surface code for realistic noise models including memory, gate, and SPAM errors may require very large LDPC codes with more than 10,000 physical qubits [31].
Here we present several concrete examples of high-rate LDPC codes with a few hundred physical qubits equipped with a low-depth syndrome measurement circuit, an eficient decoding algorithm, and a fault-tolerant protocol for addressing individual logical qubits. These codes exhibit an error threshold close to 1%, show excellent performance in the near-threshold regime, and ofer more than 10X reduction of the encoding overhead compared with the surface code. Hardware requirements for realizing our error correction protocols are relatively mild, as each physical qubit is coupled by two-qubit gates with only six other qubits. Although the qubit connectivity graph is not locally embeddable into a 2D grid, it can be decomposed into two planar degree-3 subgraphs. As we argue below, such qubit connectivity is well-suited for architectures based on superconducting qubits. Before stating our results, let us describe several must-have features for a quantum error-correcting code to be suitable for near-term experimental demonstrations and formally pose the problem addressed in this work.
2 Code selection criteria
In this work, we study the problem of realizing a fault-tolerant quantum memory with a small qubit overhead and a large code distance. Our goal is to construct a combination of the LDPC code, syndrome measurement circuitry, and the decoding (error correction) algorithms, suitable for a near-term demonstration, but also ofering long-term utility, while taking into account the capabilities and limitations of the superconducting circuits quantum hardware. In other words, we seek to develop a practical error correction protocol. Our selection criteria reflect this goal.
We focus on encoding logical qubits into n data qubits and use c ancillary check qubits to measure the error syndrome. In total, the code relies on physical qubits. The net encoding rate is therefore
For example, the standard surface code architecture encodes logical qubit into data qubits for a distance-d code and uses check qubits for syndrome measurements. The net encoding rate is , which quickly becomes impractical as one is forced to choose a large code distance, due to, for instance, the physical errors being close to the threshold value. In contrast, we seek a high-rate LDPC code with
To prevent the accumulation of errors one must be able to measure the error syndrome frequently enough. This is accomplished by a syndrome measurement (SM) circuit that couples data qubits in the support of each check operator with the respective ancillary qubit by a sequence of CNOT gates. Check qubits are then measured revealing the value of the error syndrome. The time it takes to implement the SM circuit is proportional to its depth — the number of gate layers composed of non-overlapping CNOTs. Since new errors continue to occur while the SM circuit is executed its depth should be minimized. Thus we seek an LDPC code with a high rate r and low-depth SM circuit.
A noisy version of the SM circuit may include several types of faulty operations such as memory errors on data or check qubits, faulty CNOT gates, qubit initializations and measurements. We consider the circuit-based noise model [22] where each operation fails with the probability . Faults on diferent operations are independent. A logical error occurs when the final error-corrected state of k logical qubits difers from the initial encoded state. The probability of a logical error depends on the error rate details of the SM circuits, and a decoding algorithm. A pseudo-threshold of an error correction protocol is defined as a solution of the break-even equation Here is an estimate of the probability that at least one of k unencoded qubits sufers from an error. To achieve a significant error suppression in the regime , which is relevant for near-term demonstrations, it is desirable to have pseudo-threshold close to or higher. For example, the surface code architecture achieves pseudo-threshold for a large enough code distance [22]. We seek a high-rate LDPC code with a low-depth SM circuit and a high pseudo-threshold.
A logical error is undetectable if it can be generated without triggering any syndromes. Such errors span at least d data qubits for a distance-d code. Let us say that a SM circuit has distance if it takes at least faulty operations in the circuit to generate an undetectable logical error. By definition, for any distance-d code and typically since a few faulty operations in the SM circuit may create a high-weight error on the data qubits. We say that a SM circuit is distance-preserving if meaning the circuit is designed so as to avoid accumulating high-weigh errors, which is the best one can hope for. It is preferred (but not required) that the SM circuit is distance-preserving.
Another criterion is dictated by the limited qubit connectivity of near-term quantum devices. Each quantum code can be described by a Tanner graph G such that each vertex of G represents either a data qubit or a check operator A check vertex i and a data vertex j are connected by an edge if the i-th check operator acts non-trivially on the j-th data qubit (by applying Pauli X or . Figure 1 A) shows the Tanner graph describing a distance-3 surface code. To keep the SM circuit depth small, it is desirable that two-qubit gates such as CNOT can be applied along every edge of the Tanner graph. By construction, the Tanner graph of any LDPC code has a small degree. One drawback of high-rate LDPC codes is that their Tanner graphs may not be locally embeddable into the 2D grid [41, 42]. This poses a challenge for hardware implementation with superconducting qubits coupled by microwave resonators. A useful VLSI design concept is graph thickness, see [43, 29] for details. A graph is said to have thickness θ if one can partition its set of edges E into disjoint union of θ sets such that each subgraph is planar. Informally, a graph with thickness θ can be viewed as a vertical stack of planar graphs. Qubit connectivity described by a planar graph (thickness θ = 1) is the simplest one from hardware perspective since the couplers do not cross. Graphs with thickness might still be implementable since two planar layers of couplers and their control lines can be attached to the top and the bottom side of the chip hosting qubits, and the two sides mated (see Section 10 for a detailed discussion). Graphs with thickness are much harder to implement. Thus we seek a high-rate LDPC code with a low-depth SM circuit, high pseudo-threshold, and a low-degree Tanner graph with thickness
Finally, the code must perform a useful function within a larger architecture for quantum computation, the simplest of which is a quantum memory. In a quantum memory it must be possible to measure every logical qubit in at least one Pauli basis, permitting initialization and readout of individual qubits. Furthermore it should be possible to connect the code to another error correction code and facilitate Pauli product measurements between their logical qubits. This enables load-store operations that transfer quantum data out of and into the code via quantum teleportation. For the purpose of the shorter-term goal of demonstrating the code in practice, the code should also feature enough logical operations to facilitate experiments to verify correct operation.
Our code selection criteria are summarized below.
-
We desire a code with a large distance d and a high encoding rate
-
that is complemented by a short-depth syndrome measurement circuit,
-
ofers a pseudo-threshold close to 1% (or higher) for the circuit-based noise model,
-
is constructed over thickness-2 or less Tanner graph,
-
and possesses fault-tolerant load-store operations as well as readout and initialization of individual qubits.
3 Main results
Here we give concrete examples of LDPC codes equipped with syndrome measurement circuits and eficient decoding algorithms that meet all above conditions. Our examples fall into the family of tensor product generalized bicycle codes proposed by Kovalev and Pryadko [35]. We named our codes Bivariate Bicycle (BB) since they are based on bivariate polynomials, as detailed below. These are stabilizer codes of CSS-type [44, 45] that can be described by a collection of few-qubit check (stabilizer) operators composed of Pauli X and Z. At a high level, a BB code is similar to the two-dimensional toric code [19]. In particular, physical qubits of a BB code can be laid out on a two-dimensional grid with periodic boundary conditions such that all check operators are obtained from a single pair of X- and Z-checks by applying horizontal and vertical shifts of the grid. However, in contrast to the plaquette and vertex stabilizers describing the toric code, check operators of a BB code are not geometrically local. Furthermore, each check acts on six qubits rather than four qubits. See Figure 1 B) an example Tanner graph of a BB code. We give a formal definition of BB codes in Section 4. The Tanner graph of any BB code has vertex degree six. Although this graph may not be locally embeddable into a 2D grid, we show that it has thickness , as desired. This result may be surprising since it is known that a general degree-6 graph can have thickness see [43].
Tanner Graphs of Surface and Bivariate Bicycle Codes

Figure 1: A) Tanner graph of a surface code, for comparison. C) Tanner graph of a Bivariate Bicycle code with parameters [[144, 12, 12]] embedded into a torus. Any edge of the Tanner graph connects a data and a check vertex Data qubits associated with the registers and are shown by bLue and oRange circles. Each vertex has six incident edges including four short-range edges (pointing north, south, east, and west) and two long-range edges. There are also several long-range edges, of which we only show a few to to avoid clutter. Dashed and solid edge indicate two planar subgraphs spanning the Tanner graph, see Section 4. B) Sketch of a Tanner graph extension fo measuring and following [46]. The ancilla corresponding to the measurement can be connected to a surface code, enabling load-store operations for all logical qubits via quantum teleportation and some logical unitaries. This extended Tanner graph has a thickness-2 implementation, see Section 9.
Below we use the standard notation for code parameters. Here n is the code length (the number of data qubits), k is the number of logical qubits, and d is the code distance. Table 1 shows small examples of BB codes along with several metrics of the error suppression achieved by each codes. The distance-12 code [[144, 12, 12]] may be the most promising for near-term demonstrations, as it combines large distance and high net encoding rate . For comparison, the distance-13 surface code has net encoding rate . Below we show that the distance-12 BB code outperforms the distance-13 surface code for the experimentally relevant range of error rates, see Figure 2 B) To the best of our knowledge, all codes shown in Table 1 are new.
| [[n,k,d]] | Net Encoding Rate r | Circuit-level distance | Pseudo-threshold | ||
| [[72,12,6]] | 1/12 | ≤ 6 | 0.0048 | ||
| [[90,8,10]] | 1/23 | ≤ 8 | 0.0053 | ||
| [[108,8,10]] | 1/27 | ≤ 8 | 0.0058 | ||
| [[144,12,12]] | 1/24 | ≤ 10 | 0.0065 | ||
| [[288,12,18]] | 1/48 | ≤ 18 | 0.0069 |
Table 1: Small examples of Bivariate Bicycle LDPC codes and their performance for the circuit-based noise model All codes have weight-6 checks, thickness-2 Tanner graph, and a depth-7 syndrome measurement circuit. A code with parameters requires 2n physical qubits in total and achieves the net encoding rate (we round r down to the nearest inverse integer). Circuit-level distance is the minimum number of faulty operations in the syndrome measurement circuit required to generate an undetectable logical error. The pseudo-threshold is a solution of the break-even equation , where p and are the physical and logical error rates respectively. The logical error rate was computed numerically for and extrapolated to lower error rates.
To quantify the level of error suppression achieved by a code we introduce SM circuits that repeatedly measure the syndrome of each check operator. The full cycle of syndrome measurement for a length-n BB code requires n ancillary check qubits to store the measured syndromes. According, the net encoding rate is . Check qubits are coupled with the data qubits by applying a sequence of CNOT gates. The full cycle of syndrome measurement requires only 7 layers of CNOTs regardless of the code length. The check qubits are initialized and measured at the beginning and at the end of the syndrome cycle respectively, see Section 5 for details. We emphasize that our SM circuit applies to any BB code beyond those listed in Table 1. The circuit respects the cyclic shift symmetry of the underlying code. Assuming that the physical qubits (data or check) are located at vertices of the Tanner graph, all CNOT gates in the SM circuit act on nearest-neighbor qubits. Thus the required qubit connectivity is described by a degree-6 thickness-2 graph, as desired. We conjecture, based on the numerical simulations, that our SM circuit is distance-preserving for the code [[72, 12, 6]], see Table 1 for the upper bounds on (the upper bound for the 288-qubit code is unlikely to be tight and this afects the fit and extrapolations).
The full error correction protocol performs syndrome measurement cycles and calls a decoder — a classical algorithm that takes as input the measured syndromes and outputs a guess of the final error on the data qubits. Error correction succeeds if the guessed and the actual error coincide modulo a product of check operators. In this case the two errors have the same action on any encoded (logical) state. Thus applying the inverse of the guessed error would return data qubits to the initial logical sate. Otherwise, if the guessed and the actual error difer by a non-trivial logical operator, error correction fails resulting in a logical error. Our numerical experiments are based on the Belief Propagation with an Ordered Statistics Decoder (BP-OSD) proposed by Panteleev and Kalachev [36]. The original work [36] described BP-OSD in the context of a toy noise model with memory errors only. Here we show how to extend BP-OSD to the circuit-based noise model. Our approach closely follows Refs. [47, 48, 49, 50]. We also show that BP-OSD can be applied to other problems in quantum fault-tolerance such as estimating the distance of a quantum LDPC code, see Section 6 for details. These tasks can be accomplished with a relatively minor extension of the publicly available BP-OSD software developed by Rofe et al. [51]
Let be the logical error probability after performing syndrome cycles. Define the logical error rate as . Informally, can be viewed as the logical error probability per syndrome cycle. Following common practice, we choose for a distance-d code. Figure 2 A) shows the logical error rate achieved by codes from Table 1. The logical error rate was computed numerically for and extrapolated to lower error rates using a fitting formula , where are fitting parameters and is an upper bound on from Table 1. The observed pseudo-threshold for the 144-qubit and 288-qubit codes is close to 0.007, which is nearly the same as the error threshold of the surface code [52]. To the best of our knowledge, this provides the first example of high-rate, large-distance LDPC codes achieving the pseudo-threshold close to 1% under the circuit-based noise model.

(a) A subfigure

(b) A subfigure
Figure 2: A) Logical vs physical error rate for small examples of Bivariate Bicycle LDPC codes. A numerical estimate of (diamonds) was obtained by simulating d syndrome cycles for a distance-d code. Most of the data points have error bars due to sampling errors. B) Comparison between the Bivariate Bicycle LDPC code [[144, 12, 12]] and surface codes with 12 logical qubits and distance . The distance-d surface code with 12 logical qubits has length since each logical qubit is encoded into a separate d×d patch of the surface code lattice.
For example, suppose that the physical error rate is , which is a realistic goal for near-term demonstrations. Encoding 12 logical qubits using the distance-12 code from Table 1 would ofer the logical error rate which is enough to preserve 12 logical qubits for nearly one million syndrome cycles. The total number of physical qubits required for this encoding is 288. The distance-18 code from Table 1 would require 576 physical qubits while suppressing the error rate from to enabling roughly hundred billion syndrome cycles. For comparison, encoding 12 logical qubits into separate patches of the surface code would require nearly 3000 physical qubits to suppress the error rate from to , see Figure 2 B). In this example the distance-12 BB code ofers more than 10X saving in the number of physical qubits compared with the surface code.
We also find that BB LDPC codes admit extensions that allow them to function as a logical memory with loadstore operations. In Section 9 we show how to use methods from [46] to attach two ancilla systems to the code tha permit logical measurement of all logical qubits in the X and Z bases. Which logical qubit is being measured can be controlled via a set of fault tolerant unitary operations. The extended Tanner graph is not only thickness-2, but the extension from the X ancilla system is “efectively planar” (in a sense we define later) facilitating interconnection with other codes on the same chip.
Our findings bring experimental demonstration of high-rate LDPC codes within the reach of near-term quantum processors which are expected to ofer a few hundred physical qubits, gate error rates close to , and long range qubit connectivity [53].
The rest of this paper is organized as follows. Section 4 formally defines BB LDPC codes and proves their basic properties. The construction of the syndrome measurement circuit is detailed in Section 5. The circuit-based noise model and BP-OSD decoder for this noise model are discussed in Section 6 with some implementation details deferred to Section 8. We describe fault tolerant memory capabilities in Section 9. A summary of our findings and some open questions can be found in Section 10.
| Notation | Name | Definition |
| rs(H) | row space | Linear span of rows of H |
| cs(H) | column space | Linear span of columns of H |
| ker(H) | nullspace | Vectors orthogonal to each row of H |
| rk(H) | rank | rk(H) = dim(rs(H)) = dim(cs(H)) |
Table 2: Notations for linear spaces associated with a binary matrix H. Here the linear span, orthogonality, and dimension are computed over the binary field . If H has size then , and ker
4 Bivariate Bicycle quantum LDPC codes
Let and be the identity matrix and the cyclic shift matrix of size respectively. The i-th row of has a single nonzero entry equal to one at the column (mod ℓ). For example,
Consider matrices
Note that and . A BB code is defined by a pair of matrices
where each matrix and is a power of x or y. Here and below the addition and multiplication of binary matrices is performed modulo two, unless stated otherwise. Thus, we also assume the Ai are distinct and the are distinct to avoid cancellation of terms. For example, one could choose and . Note that A and B have exactly three non-zero entries in each row and each column. Furthermore, since . The above data defines a BB LDPC code denoted with length and check matrices
Here the vertical bar indicates stacking matrices horizontally and T stands for the matrix transposition. Both matrices and have size . Each row of defines an X-type check operator . Each row of defines a check operator . Any X-check and Z-check commute since they overlap on even number of qubits (note that (mod 2)). To describe the code parameters we use certain linear subspaces associated with the check matrices, see Table 1 for our notations. Then the code has parameters with
see Lemma 1. Here is the Hamming weight of a vector . We note that the code can be viewed as a special case of the Lifted Product construction [54] based on the abelian group . Here denotes the cyclic group of order j.
Table 3 describes the polynomials A and B that give rise to examples of high-rate, high-distance BB codes found by a numerical search. This includes all codes from Table 1 and two examples of higher distance codes. To the best of our knowledge, all these examples are new. The code improves upon a code with weight-6 checks found by Panteleev and Kalachev in [36] (assuming that our distance upper bound is tight). Indeed, taking two independent copies of the 360-qubit code gives parameters
By construction, the code has weight-6 check operators and each qubit participates in six checks (three X-type plus three Z-type checks). Accordingly, the code has a degree-6 Tanner graph. Below we show that the Tanner graph has thickness as desired, see Lemma 2.
| [[n,k,d]] | Net Encoding Rate r | A | B | ||
| [[72,12,6]] | 1/12 | 6,6 | |||
| [[90,8,10]] | 1/23 | 15,3 | |||
| [[108,8,10]] | 1/27 | 9,6 | |||
| [[144,12,12]] | 1/24 | 12,6 | |||
| [[288,12,18]] | 1/48 | 12,12 | |||
| [[360,12, 24]] | 1/60 | 30,6 | |||
| [[756,16, 34]] | 1/95 | 21,18 |
Table 3: Small examples of Bivariate Bicycle LDPC codes and their parameters. All codes have weight-6 checks, thickness-2 Tanner graph, and a depth-7 syndrome measurement circuit. Code distance was computed by the mixed integer programming approach of Ref. [55]. Notation indicates that only an upper bound on the code distance is known at the time of this writing. We round r down to the nearest inverse integer. The codes have check matrices and with A and B defined in the last two columns. The matrices x, y obey and
We note that the recent work by Wang, Lin, and Pryadko [38, 37] described examples of group-based codes closely related to the codes considered here. Some of the group-based codes with weight-8 checks found in [37] outperform our BB codes with weight-6 checks in terms of the parameters It remains to be seen whether group-based codes can achieve a similar or better level of error suppression for the circuit-based noise model.
In the rest of this section we establish some properties of BB LDPC codes.
Lemma 1. The code has parameters , where
The code ofers equal distance for X-type and Z-type errors.
Proof. It is known [44, 45] that
We claim that . Indeed, define a self-inverse permutation matrix of size such that the th column of has a single nonzero entry equal to one at the row (mod ℓ). Define similarly and let . Since and , one gets
Therefore one can write
Thus is obtained from by multiplying on the left and on the right by invertible matrices. This implies . Therefore
Here we noted that has size and ker since It is known [44, 45] that a CSS code with check matrices and has distance d = min , where and are the code distances for X-type and Z-type errors defined as
We claim that . Indeed, let be a minimum weight logical X-type Pauli operator such that . Then and . Thus there exists a logical Z-type operator anti-commuting with . In other words, and . Here, and g are length-n binary vectors. Write and , where are length-(n/2) vectors. Conditions and are equivalent to
Here and below all arithmetics is modulo two. Define length-n vectors
From Eqs. (13,14) one gets
Likewise,
Furthermore,
Thus and are non-identity logical operators. It follows that . We get
Thus . Similar argument shows that , that is,
We note that the equality can also be established using the machinery of Ref. [54] by viewing as a Lifted Product code.
In the following, we partition the set of data qubits as , where L and R are the left and right blocks of data qubits. Then, data qubits L and R and checks X and may each be labeled by integers which are indices into the matrices . Alternatively, qubits and checks can be labeled by monomials from in this order, so that labels the same qubit or check as for . Using the monomial labeling, L data qubit is part of X checks and checks for . Similarly, R data qubit is part of X checks and checks A β. A unified notation assigns each qubit or check a label where denotes its type and its monomial label1.
Lemma 2. The Tanner graph G of the code QC(A, B) has thickness . A decomposition of G into two planar layers can be computed in time . Each planar layer of G is a degree-3 graph.
Proof. Let be the Tanner graph. Partition G into subgraphs and that describe CSS codes with check matrices
Since and , every edge of G appears either in or , where the two subgraphs are named by whether they contain more edges or more edges. Then and are regular degree-3 graphs (since and are permutation matrices).
Consider the graph . Each X-check vertex is connected to a pair of data vertices via the matrices and a data vertex via the matrix . Each Z-check vertex is connected to a pair of data vertices via the matrices and a data vertex via the matrix
B) Extraction of ‘B’ wheels in

Figure 3: A). B) Two diferent grids over a torus defined using diferent subsets of . Edge labels indicate adjacency matrices that generate the respective edges. By extracting either horizontal or vertical strips from these grids, we obtain planar ‘wheel graphs’ whose union contains all edges in the Tanner graph. The wheels (dashed lines) cover and the wheels (solid lines) cover . To avoid clutter, each grid shows only a subset of edges present in the Tanner graph.

Figure 4: A) “Compass” diagram that shows the direction in which matrices A, B are applied to travel between diferent nodes. B) The unit cell of the construction of a toric layout in the proof of Lemma 4.
We claim that each connected component of can be represented by a “wheel illustrated in Figure 3. A wheel graph consists of two disjoint cycles of the same length p interconnected by p radial edges. The outer cycle alternates between X-check and L-data vertices.
Edges of the outer cycle alternate between those generated by (as one moves from a check to a data vertex) and (as one moves from a data to a check vertex). The length of the outer cycle is equal to the order of the matrix , that is, the smallest integer p such that . For example, consider the code [[144, 12, 12]] from Table 3. Then , and . Thus which has order . The inner cycle of a wheel graph alternates between Z-check and R-data vertices.
Edges of the inner cycle alternate between those generated by (as one moves from a check to a data vertex) and (as one moves from a data to a check vertex). The length of the inner cycle is equal to the order of the matrix which is just the transpose of considered earlier. Thus both inner and outer cycles have the same length m. The two cycles are interconnected by m radial edges as shown in Figure 3 A). Radial edges are generated by the matrix , as one moves towards the center of the wheel. The wheel graph contains 4-cycles generated by tuples of edges and . Commutativity between and ensures that traversing any of these 4-cycles implements the identity matrix, that is, the graph is well defined. Clearly, the wheel graph is planar. Since
is a disjoint union of wheel graphs, is planar. The same argument shows that is planar: see Figure 3 B). □
We empirically observed that BB codes reported in Table 3 have no weight-4 stabilizers. The presence of such stabilizers is known to have a negative impact on the performance of belief propagation decoders [36], which we use here.
The definition of code does not guarantee that its Tanner graph is connected. Some choices of A and B lead to a code that is actually several separable code blocks. This manifests as a Tanner graph with several connected components. For instance, although all codes in Table 3 are connected, taking any of them with even ℓ and replacing every instance of x with creates a code with two connected components.
Lemma 3. The Tanner graph of the code is connected if and only : generates the group M. The number of connected components in the Tanner graph is , and all components are graph isomorphic to one another.
Proof. Figure 4 is helpful for following the arguments in this proof. We start by proving the reverse implication of the first statement. Note that there is a length 2 path in the Tanner graph from L qubit to L qubit α and another length 2 path to L qubit . These travel through X and Z checks, respectively. Thus, because the and generate , there is some path from α to any other L qubit A similar argument shows the existence of a path connecting any pair of R qubits. Since each X check and each check are connected to at least one L qubit and at least one R qubit, this implies that the entire Tanner graph is connected. The forward implication of the first statement follows after noticing that, for all , the path from a type node to any other T node is necessarily described as a product of elements from S. Connectivity of the Tanner graph implies the existence of all such paths, and so S must generate
If S does not generate it necessarily generates a subgroup ⟨S⟩ and nodes in connected components of the Tanner graph are labeled by elements of the cosets of this subgroup. This implies the theorem’s second statement.
For the next part, we establish some terminology. A spanning sub-graph of a graph G is a sub-graph containing all the vertices of G. Also, the undirected Cayley graph of a finite Abelian group (with identity element 0) generated by set is the graph with vertex set and undirected edges for all and all . We say the Cayley graph of when we mean the Cayley graph of generated by . The order ord(g) of an element g in a multiplicative group is the smallest positive integer such that
Definition 1. Code is said to have a toric layout if its Tanner graph has a spanning sub-graph isomorphic to the Cayley graph of for some integers µ and λ.
Note that only codes with connected Tanner graphs can have a toric layout according to this definition. An example toric layout is depicted in Figure 1 B).
Lemma 4. A code has a toric layout if there exist such that
(i) and
(ii)
Proof. We let and . We associate qubits and checks in the Tanner graph of with elements of . For L qubit with label , because of (i), there is such that . Because of (ii) and the pigeonhole principle, this choice of is unique. We associate L qubit α with . Similarly, an R qubit with label is associated with , X-check with , and Z-check with . Edges in the Tanner graph and can now be drawn as in Figure 4 (B) and correspond to edges in the Cayley graph of G. For instance, to get from an R qubit, to , a check, we apply , taking R qubit labeled to the check labeled □
| Notation | Operation |
| CNOT c t | CNOT with control qubit c and target qubit t |
| InitX q | Initialize qubit q in the state |+⟩ = (|0⟩ + |1⟩)/ |
| InitZ q | Initialize qubit q in the state |0⟩ |
| MeasX q | Measure qubit q in the X-basis |+⟩, |−⟩ |
| MeasZ q | Measure qubit q in the Z-basis |0⟩, |1⟩ |
| Idle q | Identity gate on qubit q |
Table 4: Elementary operations used for syndrome measurements.
All codes in Table 3 have a toric layout with and . Most of these codes satisfy Lemma 4 with and The exception is the 90, 8, 10 code, for which we can take and
However, we also note two interesting cases. First, there are codes with connected Tanner graphs that do not satisfy the conditions for a toric layout given in Lemma 4. One example of such a code is with , 14, , and which has parameters . Second, for a code satisfying the conditions of Lemma 4, it need not be the case that the set and the set are equal. For example, the code with and only satisfies Lemma 4 with (take and for instance).
5 Syndrome measurement circuit
The next step is to furnish the code with a syndrome measurement (SM) circuit that repeatedly measures the syndrome of each check operator. Here we describe a SM circuit that requires 2n physical qubits in total: n data qubits and n ancillary check qubits used to record the measured syndromes. The circuit only applies CNOTs to pairs of qubits that are connected in the Tanner graph.
The SM circuit is defined as a periodically repeated sequence of syndrome cycles (SC). A single SC is responsible for measuring syndromes of all n check operators of the code. Let be the number of syndrome cycles. We envision that . The circuit begins and ends with a special initialization and measurement cycle responsible for initializing logical qubits in a suitable initial state and measuring logical qubits in a suitable basis. Here we focus on the optimization of the SC circuit. Logical initialization and measurements are discussed in Section 9.
The SC circuit is divided into rounds such that each round is a depth-1 circuit composed of CNOTs and singlequbit operations. The latter include initializing a qubit in the X or basis and measuring a qubit in the X or Z basis. CNOTs can be applied only to pairs of qubits which are nearest neighbors in the Tanner graph. Some qubits remain idle during some rounds, although we try to minimize such occurrences by squeezing more useful computations in as little time as possible. Our notations are summarized in Table 4.
Below we describe a SC circuit with efectively . Ignoring single-qubit initialization and measurement operations, the SC circuit is a depth-7 CNOT circuit. By designing the circuit for an explicit family of LDPC codes we are able to leverage the symmetries and reduce computational depth to 7 from what otherwise would be as shown by previous authors [29, Theorem 1]. Our notations are as follows. We divide n data qubits into the left and the right registers and of size each. Each check operator acts on three data qubits from and three data qubits from . The SM circuit uses 2n physical qubits in total: n data qubits and n ancillary check qubits that record the syndrome of each check operator. Let and be the ancillary registers of size that span X-check and Z-check qubits respectively. Thus the physical qubits are partitioned into four registers, , and , of size each. Label qubits in each register by integers . We write for the i-th qubit of the register with similar notations for , and . Each permutation matrix and from Eq. (1) defines a one-to-one map from the set onto itself.
| Round | Circuit | Round | Circuit |
| 1 | for i = 1 to n/2 doInitX q(X,i)CNOT q(R, ) q(Z,i)Idle q(L,i)end for | 5 | for i = 1 to n/2 doCNOT q(X,i) q(R, )CNOT q(L, ) q(Z,i)end for |
| 2 | for i = 1 to n/2 doCNOT q(X,i) q(L, )CNOT q(R, ) q(Z,i)end for | 6 | for i = 1 to n/2 doCNOT q(X,i) q(L, )CNOT q(R, ) q(Z,i)end for |
| 3 | for i = 1 to n/2 doCNOT q(X,i) q(R, )CNOT q(L, ) q(Z,i)end for | 7 | for i = 1 to n/2 doCNOT q(X,i) q(L, )MeasZ q(Z,i)Idle q(R,i)end for |
| 4 | for i = 1 to n/2 doCNOT q(X,i) q(R, )CNOT q(L, ) q(Z,i)end for | 8 | for i = 1 to n/2 doMeasX q(X,i)InitZ q(Z,i)Idle q(L,i)Idle q(R,i)end for |
Table 5: Depth-8 syndrome measurement cycle circuit.
We identify a permutation matrix and the corresponding one-to-one map. For example, we write if the matrix has a one at row i and column (this is well defined since is a permutation matrix). Likewise, we write if the transposed matrix has a one at the row i and column In this notation, the i-th X-check operator acts on data qubits and with . The i-th Z-check operator acts on data qubits and with
Our depth-8 SC circuit is described in Table 5 and illustrated in Figure 5. Note that within each round all operations act over non-overlapping sets of qubits. In particular, each round applies at most one layer of CNOT gates between and registers (Rounds 2, 6, and 7), at most one layer of CNOTs between and registers (Rounds 3, 4, and 5), at most one layer of CNOTs between and registers (Rounds 3, 4, and 5), and at most one layer of CNOTs between and registers (Rounds 1, 2, and 6). Qubits from are always targets for CNOTs. Accordingly, X-type errors propagate from data qubits to check qubits in . The latter are measured in the Z-basis in Round 7 revealing the syndrome of X-type errors. Qubits from are always controls for CNOTs. Accordingly, Z-type errors propagate from data qubits to check qubits in . The latter are measured in the X-basis in Round 8 revealing the syndrome of Z-type errors. We envision that the syndrome cycles are repeated periodically. This justifies applying CNOTs to at Round 1 even though is initialized only at Round 8. Indeed, Round 8 of the previous syndrome cycle goes immediately before Round 1 of the current cycle. Thus has been already initialized at the beginning of Round 1. We were not able to find a depth-8 (or smaller depth) syndrome cycle in which X-check and Z-check qubits are initialized and measured synchronously.
Let us now prove that the above SC circuit has the desired functionality. Since the circuit involves only Cliford operations, its action can be compactly described using stabilizer tableau [56]. We track how the tableau changes as each layer of CNOTs in the circuit is applied. Since the CNOT gates do not mix Pauli X and Z operators, one may consider tableau describing the action of the circuit on X-type and Z-type Pauli operators separately.
Let us begin with X-type Pauli. The corresponding tableau T is a binary matrix of size 2n such that each row of T defines an X-type stabilizer of the underlying quantum state. We partition columns of into four blocks that represent qubit registers , and . We partition rows of into two blocks such that initially the top rows represent weight-1 check operators on qubits of the register initialized in the state while the bottom rows represent weight-6 check operators on data qubits associated with the chosen code . Thus, at the beginning of Round 1, when all check qubits in the register have been initialized in the state |+⟩, while data qubits are in some logical state of the code , the binary matrix is

Figure 5: Depth-8 syndrome measurement cycle circuit.
Here is the identity matrix. The SC circuit (ignoring qubit initialization and measurements) enacts the transformation
Indeed, the circuit must map a single-qubit X stabilizer on a check qubit to a product of and the j-th X-type check operator on the data qubits determined by the j-th row of . The eigenvalue measurement of at the final round then reveals the syndrome of the j-th check operator. The bottom rows must be unchanged since the check operators of the code must be the same before and after the syndrome measurement.
Let us verify that the circuit defined in Table 5 enacts the desired transformation. To accomplish this, we rewrite the SC circuit by removing notations irrelevant to showing the correctness of X-checks. Specifically, we write each CNOT in Table 5 as , where , and . Note that the CNOT instructions where the matrix is used instead of M can be written using matrix M by performing the variable renaming in the corresponding for loop in Table 5.
Using the above compact notation, the unitary part of the SC circuit becomes:
In the following we apply all seven unitary rounds to verify the correctness of the performed transformation:
Here, we use the identity , which holds since the sum of first summands and second summands on both sides of the equation gives AB, and
This is the desired transformation.
So far, we have not considered the action of the SC circuit on the logical qubits of the code. Let us show that this action is trivial. Indeed, consider some X-type logical operator , where . Write where u and w are restrictions of v onto the registers 2 and 3 respectively. Commutativity between and any Z-type check operator implies
Here we consider u and w as row vectors. Extending v by zeroes on registers 1 and 4 gives the row vector where 0 stands for the all-zero row vector of length . Let us follow the same chain of transformations as above starting from the initial vector (0 u w 0). All CNOTs controlled by the register 1, such as in Eq. (9), have trivial action on the vector (0 u w 0) since all qubits of the control register are zeroes. Such CNOTs can be omitted. The remaining CNOTs in Eq. (9) such as or map the initial vector to for some vector t since the registers 2 and 3 always serve as the controls and the register 4 always serves as the target. Rounds 1, 2, and 6 in Eq. (9) are equivalent to XORing vectors , and respectively to the register 4. Rounds 3, 4, and 5 in Eq. (9) are equivalent to XORing vectors , and respectively to the register 4. Thus
We have shown that the SC circuit maps the vector to itself. Hence the circuit acts trivially on logical X-type operators.
To prove the correctness of Z-checks, observe that Z-checks can be mapped into X-checks by conjugation with Hadamards. When the unitary circuit in Figure 5 is conjugated with Hadamards, this flips controls and targets of all CNOT gates. Thus, to verify Z-checks, it sufices to perform a very similar calculation to the one already shown for X-checks. We omit this calculation here.
The SC circuit shown in Table 5 is not unique in the following sense: we found 935 depth-7 alternatives to the unitary part of the SC circuit via a computer search. These alternatives are obtained from the circuit defined in Eq. (9) by applying the gate layers and in a diferent order. In the special case of the [[144, 12, 12]] code, numerical simulations show that all 936 variants of the syndrome cycle give rise to syndrome measuremen circuits with distance explaining our focus on a specific circuit Eq. (9) which we conjecture to have distance . The short depth of the single cycle, relying on only seven computational stages, helps to keep the spread of errors under control. Details of calculating upper bounds on the circuit-level distance are provided in Section 6.
6 Decoder for the circuit-based noise model
So far we assumed that the SM circuit is noiseless. As shown in Section 5, in this case all measured syndromes are zero and the circuit implements the logical identity gate. Consider now what happens when each operation in the circuit including CNOT gates, qubit initializations, measurements, and idle qubits is subject to noise. To enable eficient decoding and numerical simulations, we use the standard circuit-based depolarizing noise model [22]. It assumes that each operation in the circuit is ideal or faulty with the probability 1 − p or p respectively. Here p is a model parameter called the error rate. Faults on diferent operations occur independently. We define faulty operations as follows. A faulty CNOT is an ideal CNOT followed by one of 15 non-identity Pauli errors on the control and the target qubits picked uniformly at random. A faulty initialization prepares a single-qubit state orthogonal to the correct one. A faulty measurement is an ideal measurement followed by a classical bit-flip error applied to the measurement outcome. A faulty idle qubit sufers from a Pauli error X or Y or Z picked uniformly at random.
To perform error correction one needs a decoder — a classical algorithm that takes as input the measured error syndrome and outputs a guess of the final Pauli error on the data qubits resulting from all faults in the SM circuit The error syndrome may itself be faulty due to measurement errors. The decoder succeeds if the guessed Pauli error coincides with the actual error up to a product of check operators. In this case the guessed and the actual error have the same action on any logical state.
Let us show how to adapt Belief Propagation with an Ordered Statistics postprocessing step Decoder (BP-OSD) proposed in [36, 51] to the circuit-based noise model. The decoder consists of two stages. The first stage takes as input a BB code equipped with a SM circuit U and an error rate p. It outputs a certain linearized noise model that ignores possible cancellations between errors generated by two or more faulty operations in U. This stage is analogous to computing the decoding graph in error correction algorithms based on the surface code [57, 58]. The second (online) stage of the decoder takes as input an error syndrome measured in the experiment and outputs a guess of the final error on the data qubits. This stage decodes the linearized noise model using BP-OSD method [36, 51]. Our linearized noise model is conceptually similar to spacetime codes studied by Delfosse and Paetznick [47] and detector-based noise model proposed by McEwen, Bacon, and Gidney [48]. The online stage of our decoder closely follows Refs. [49, 50]. In particular, Geh´er, Crawford, and Campbell [50] applied BP-OSD to study tangled syndrome measurement circuits capable of measuring certain non-local check operators on a hardware with short-range qubit connectivity. Higgott et al [49] showed that the performance of the standard minimum-weight matching decoder ca be enhanced by computing prior error probabilities using BP-decoder as a preprocessing step.
We begin by describing the ofline stage. Consider a BB code with parameters and let U be the SM circuit constructed in Section 5 with syndrome cycles. The circuit U contains 6n initializations and measurements, and 2n idle qubit locations. Let be the list of all possible faulty realizations of U with exactly one faulty operation. If the faulty operation happens to be CNOT or an idle qubit, one of the admissible Pauli errors for this operation is specified. A simple counting shows that , where accounts for 15 noisy realizations of each CNOT, 3 realizations of memory errors on idle qubits, noisy initializations and measurements. By definition, the list includes all realizations of U that can occur with the probability in the limit . We simulate each circuit by propagating the chosen Pauli error towards the final time step taking into account qubit initialization and measurement errors (if any). This simulation can be performed eficiently using the stabilizer formalism. Let be the full measured syndrome of and be the final n-qubit Pauli error on the data qubits generated by . Let be the syndrome of the final error . In other words, if we write for some vector , then
Here and are the check matrices of the chosen code. Finally, let be a logical syndrome of the final error defined as follows. Fix some basis set of logical Pauli operators for the chosen code. For example, could be logical X-type operators and could be logical Z-type operators. The i-th bit of is defined as
for . Note that the pair of syndromes uniquely determines the final error modulo check operators. Define a pair of decoding matrices and of size and respectively such that the j-th column of D is
and the j-th column of is . Let be the probability of a Pauli error that occurred in the circuit . We have if contains a faulty CNOT, if contains a faulty idle qubit, and if contains a faulty qubit initialization or measurement. Suppose is a subset of columns of such that triples of syndromes ) are the same for all . We merge all columns in I to a single column and assign the value to the bit-flip error probability associated with the merged column. Let M be the number of columns of D after the merging step and be the respective error probabilities.
Next, the decoding matrix D is converted to a sparse form. To this end consider a faulty circuit and a sequence of syndromes measured by on some check operator. Let this sequence be Since contains a single fault, the sequence m has only a few locations where the measured syndromes difer at two consecutive cycles. For example, if contains a Pauli error on some idle data qubit between two syndrome cycles, the m-sequence may look as . Such sequence can be made sparse if we represent it by a binary vector
In other words, stores changes in the measured syndrome at a given check operators at each cycle. We convert the matrix D to a sparse form by applying the map to the syndromes measured by each check operator for each faulty circuit
Let be independent random variables such that takes values 0 and 1 with the probability and respectively. Define a linearized noise model that outputs a random triple , where
is an n-qubit Pauli error and
is a binary vector that represents the error syndrome. The linearized model is a simplified version of the circuit-based noise that ignores possible cancellations among errors generated by two or more faulty operations in U. Note that such errors occur with the probability only . The decoder attempts to guess the final error E acting on the data qubits based on the syndrome measured in the experiment making a simplifying assumption that that the pair was generated using the linearized noise model. We additionally assume that the decoder knows the syndrome of the final error E. This syndrome can be acquired by adding one noiseless cycle at the end of the syndrome measurement circuit, which is a common practice in numerical simulations of error correction. By definition, we have
Here is a column vector and matrix-vector multiplication is modulo two. Define a minimum weight error as a solution of an optimization problem
This problem is equivalent to the minimum weight decoding for a length-M linear code with the check matrix bit-flip error probabilities , and noiseless syndromes. Our guess of the unknown logical syndrome is
Let be any n-qubit Pauli operator with the syndrome and the logical syndrome . Note that is defined uniquely modulo multiplication by check operators. The Pauli is our guess of the final error on the data qubits. Let be the actual final error on the data qubits generated by a noisy realization of U without making any simplifications of the noise model. By definition, Pauli operators and have the same syndrome but they may difer by a logical Pauli operator. We declare a logical error if E and difer by any non-identity logical operator (there are choices of this logical operator). Otherwise the decoding is deemed successful.
It remains to explain how to solve the optimization problem Eq. (10). Since the minimum weight decoding for a linear code is known to be NP-hard problem [59], finding the exact solution of Eq. (10) might be practically impossible for problem instances with several thousand variables that we have to deal with. Furthermore, estimation of the logical error probability by the Monte Carlo method requires solving instances of the problem Eq. (10) This number can be quite large since is a small parameter. To address these challenges, we employ the BP-OSD algorithm [36, 51]. Recall that belief propagation (BP) is a heuristic message passing algorithm aimed at computing single-bit marginals of a probability distribution
Here and is a normalization factor chosen such that . In our case represents an unknown error in the linearized noise model, D is the decoding matrix constructed above, and is the measured error syndrome. Let be an estimate of the marginal probability obtained by the belief propagation method with some fixed number of message passing iterations. The ordered statistics post-processing step examines information sets which are subsets of bits such that the linear system has a unique solution ξ supported on I, that is, for all Information sets are ranked according to their reliability which is defined as
BP-OSD finds an information set I with the largest reliability using a greedy algorithm [36]. The final output of BP-OSD is a solution of the system supported on the most reliable information set I. We replace the minimum weight error in Eq. (10) by the solution proposed by BP-OSD.
Since BB LDPC codes are of CSS-type, it is natural to decode X-type and Z-type errors independently. Accordingly, we solve the minimum weight decoding problem Eq. (10) twice with a pair of decoding matrices and constructed as above but including only the syndromes of and check operators respectively. This results in guessed and errors and . The guessed final error is . We empirically observed that the resulting decoding matrices and are (6, 35)-sparse for any BB code, meaning that there are at most 6 nonzeros in each column and at most 35 nonzeros in each row of and . The number of columns scales as where the constant coeficient depends on a particular code. For example, decoding matrices and describing the code [[144, 12, 12]] with syndrome cycles have 8857 and 8785 columns respectively.
We also employed BP-OSD to compute an upper bound on the code distance Consider a CSS-type LDPC code with check matrices and . Assume for simplicity that this code has the same distance for Xand Z-type errors (this assumption is satisfied for BB LDPC codes due to Lemma 1). Suppose is a minimum weight logical Z-type operator. Then and . Let be any logical X-type operator. Here . Consider the following optimization problem:
Then for any logical operator and anti-commutes with some minimum-weight logical operator . The latter event occurs with the probability if one picks uniformly at random. In this case with the probability at least and with certainty. Let be an upper bound on obtained by solving the optimization problem Eq. (11) using BP-OSD method with a parity check matrix and a syndrome . We have with certainty and with the probability whenever BP-OSD finds the optimal solution. Choose the number trials and pick vectors uniformly at random. Then
is an upper bound on the distance d that can be systematically improved by increasing the number of trials
Using the quantity as an eficiently computable proxy for the code distance enabled us to search over a large number of candidate BB codes with qubits. The vast majority of these candidates was discarded due to an insuficiently large upper bound . This left only a few viable candidates with a suficiently large value of The actual distance of each candidate code was computed using the integer linear programming method [55].
We similarly computed an upper bound on the circuit-level distance . Since the SM circuit can break the symmetry between X- and Z-type errors, the circuit-level distance has to be computed for both types of errors. For concreteness, let us discuss the circuit-level distance for Z-type errors. The latter is defined as the minimum number of faulty operations in the SM circuit that can generate an undetectable Z-type logical error. The optimization problem Eq. (11) is replaced by
where is the decoding matrix constructed above and is a random linear combination of rows of and rows of that represent logical X-type operators. Then with certainty and with the probability at least . Solving the optimization problem Eq. (12) using BP-OSD method for many random choices of the vector η and taking the minimum value of provides an upper bound on . One can similarly compute an upper bound on the circuit-level distance for X-type errors. This provides an upper bound on
7 Proof of Lemma 1
For convenience of the reader we restate the lemma below.
Lemma 1. The code has parameters , where
The code ofers equal distance for X-type and Z-type errors.
Proof. It is known [44, 45] that
We claim that rk . Indeed, define a self-inverse permutation matrix of size such that the ith column of has a single nonzero entry equal to one at the row (mod ℓ). Define similarly and let . Since and , one gets
Therefore one can write
Thus is obtained from by multiplying on the left and on the right by invertible matrices. This implies . Therefore
Here we noted that has size and ke since
It is known [44, 45] that a CSS code with check matrices and has distance min , where and are the code distances for X-type and Z-type errors defined as
We claim that . Indeed, let be a minimum weight logical X-type Pauli operator such that . Then and . Thus there exists a logical Z-type operator anti-commuting with . In other words, and . Here, f and g are length-n binary vectors. Write and , where are length-(n/2) vectors. Conditions and are equivalent to
Here and below all arithmetics is modulo two. Define length-n vectors
From Eqs. (13,14) one gets
Likewise,
Furthermore,
Thus and are non-identity logical operators. It follows that . We get
Thus . Similar argument shows that , that is,
We note that the equality can also be established using the machinery of Ref. [54] by viewing as a Lifted Product code.
8 Numerical simulation details
Data reported in Figure 2 A) was generated using BP-OSD software developed by Rofe et al. [51, 60]. The decoder wa extended to the circuit-based noise model as described in Section 6. The simulations were performed using MIN-SUM belief propagation with the limit of 10, 000 iterations and combination sweep version of OSD, as described in [51]. All data points except for those with the smallest error rate accumulated at least 100 logical errors to estimate the logica error rate with the error bars . The fitting formula with fitting parameters was proposed in [61] in the context of surface code simulations. We observed that the same fitting formula works well for BB LDPC codes. The fitting parameters of the considered codes are provided in Table 6. We note that the logical error rate achieved by the combination of a distance-preserving SM circuit and an optimal decoder is expected to follow an exponential decay ], where is an unknown function such that in the sub-threshold regime. The function must have a logarithmic singularity log p for small p since one expects degree- error suppression for a distance-d code. The fitting formula for approximates the remaining non-singular terms in by a low-degree polynomial in p. Coeficients of the polynomial are considered as fitting parameters. Since our SM circuit is not distance-preserving, the code distance d in the fitting formula of Ref. [61] is replaced by the circuit-level distance
| [[n,k,d]] | |||
| [[72,12,6]] | 11.09 | 365.6 | -16088 |
| [[90,8,10]] | 15.08 | 524.8 | -12670 |
| [[108,8,10]] | 13.91 | 895 | -46137 |
| [[144,12,12]] | 18.04 | 1337 | -96007 |
| [[288,12,18]] | 32.04 | 3522 | -294482 |
Table 6: Parameters in the fitting formula for BB LDPC codes shown in Table 1.
Surface code data reported in Figure 2 B) was generated using software developed by one of the authors and Alexander Vargo in [61]. The simulation was performed for the rotated surface code with parameters , where , and the standard SM circuit [22]. Let 1 be the logical error probability for the surface code encoding one logical qubit and SM circuit with syndrome cycles. Encoding logical qubits into 12 separate patches of the surface code results in a logical error probability
Figure 2 B) shows the logical error rate defined as the logical error probability per syndrome cycle,
9 Logical memory capabilities
In this section we give evidence that BB LDPC codes have the required features for an efective quantum memory or storage unit. Although there are few ways of performing computations on stored qubits, there are fault tolerant operations for initialization and measurement of individual qubits, and most importantly transfer of data into and out of the code via quantum teleportation. These capabilities are based on a combination of two diferent techniques First, we follow [62] to derive fault tolerant unitary operations that require only the connectivity already necessary to perform syndrome measurements. Second, we give low-overhead extensions of the Tanner graph based on work by [46] which enable measurement of a single logical operator while preserving the thickness-2 implementability criterion. Together, these capabilities allow us to address any logical qubit.
A conceptual representation of the logical operators is shown in Figure 6. We first derive logical Pauli operators for BB LDPC codes, and find that the logical qubits divide into an “unprimed” and a “primed” block with equal size and symmetrical structure. We visualize the primed and unprimed block as two sheets featuring a 2D grid of logical operators. Some of these grid cells contain one of the logical qubits per sheet.
Next, we show that there exists a set of fault tolerant depth-four circuits that implement a small family of commut ing logical CNOT circuits. These gates are based on automorphisms of the code: permutations of the data qubits that commute with the stabilizer. Based on their group structure we can think of the automorphism gates as translations of a 2D grid of operators within each of the primed and unprimed blocks. Furthermore, we follow [62] to derive a fault tolerant operation based on a ZX-duality that also allows us to swap the two blocks while also applying Hadamard gates to all qubits.
Finally, we show how to leverage techniques from [46] to extend the Tanner graph to a larger Tanner graph allowing fault-tolerant measurement of one logical X and one logical Z operator. Various subgraphs of this extended Tanner graph contain either this logical X or Z operator as a stabilizer. This construction acts as a “probe” that gives us access to one of the logical qubits.
Measurements of both logical X and Z operators on any qubit can be realized by conjugating this measurement by gates based on automorphisms and the ZX-duality. We can think of this as shifting any desired qubit to be the target of the probe using translation and exchange of the two blocks.
Logical X and Z measurement of any logical qubit also enables transfer of data into and out of the code using a teleportation circuit. This teleportation can be realized through a product measurement of the logical Pauli in the BB code, and a logical Pauli in another quantum error correction code. While the Tanner graph of the BB code demands thickness-2, we show how the ancilla system corresponding to the logical X measurement can be implemented in an “efectively planar” Tanner graph. This makes it possible two connect this ancilla system to another quantum error correction code, like a surface code, within a thickness-2 implementation. This capability indicates the suitability of BB LDPC codes as a fault tolerant quantum memory.
On the other hand, this construction incurs rather significant resource overhead that undercuts the compactness of the error correction codes introduced in this paper. For example, to equip the [[144, 12, 12]] code with ancilla systems capable of measuring X and we require additional qubits on top of the original 288. However, the argument for fault-tolerance from [46] is designed to be very broadly applicable, and hence may demand excessively many resources for any particular error correction code. We consider it very likely that the size of these systems can be significantly reduced. We leave resource optimization of this scheme for future work.
9.1 Logical Pauli Operators
In this section we derive that the logical Pauli matrices of BB LDPC codes split into a “primed” and an “unprimed” block with ℓm many X operators and Z operators each. Operators in the primed block commute with operators in the unprimed block, and the two blocks have identical commutation structure.
We begin by introducing some new notation for Pauli matrices acting on the data qubits. We denote with the set of polynomials over with monomials from M. This is equivalent to the quotient ring obtained from by identifying . With and , the elements of have natural matrix representations, and can also be interpreted as sets since the coeficient on any particular is either 0 or 1.

Figure 6: Conceptual diagram depicting the manner by which logical operators can be loaded into and out of a BB LDPC code. In Subsection 9.1 we derive that there are two blocks of logical Pauli operators corresponding to a 2d grid. Some subset of these grid elements can be chosen as logical qubits (large dots) and the other elements correspond to various Pauli products (small dots). In Subsection 9.2 we show that there are fault tolerant logical gates based on automorphisms that translate the grid of operators within each block, and in Subsection 9.3 we give a fault tolerant gate based on a ZX-duality [62] that swaps the two blocks. Finally, in Subsection 9.4 we show that there exists an ancilla system based on [46] that can measure one logical X operator. We can think of this system as a probe that can access one logical qubit. Together, these operations allow external access of every logical qubit and many of thei products.
For , we can consider the set of qubits for and for . We write to denote a Pauli matrix acting as X on this collection of qubits, and identity elsewhere. Similarly, denotes Z acting on for and for . For example, we can recall that is connected to whenever , and see that the stabilizer corresponding to becomes . Similarly, the stabilizer corresponding to can be written as . There is also the following useful fact:
Lemma 2. anticommutes with if and only if
Proof. Write
where are coeficients. Pauli operators and overlap on a qubit if and overlap on a qubit if . Thus and anti-commute if is odd. We have
where dots represent all monomials diferent from 1. By linearity,
Thus and anti-commute if contains the monomial 1.
Without loss of generality, we can express logical Pauli matrices as either or via a choice of . The operator commutes with the stabilizer whenever . This is equivalent to α . Since we must have α for all α, we see that commutes with the stabilizer whenever vanishes. Similarly we can derive that commutes with the stabilizer when
We aim to construct a family of solutions to which give rise to a basis of logical qubits defined by a set of operators with the correct commutation relations. To do so, let us make some observations about Pauli operators defined via solutions to . First, if are a solution, then so are for any , so each immediately gives rise to a family of logical operators for both X and Z. Second, consider using the same to define both and . Then these operators always commute because never holds. So we require at least two solutions to to define a set of operators with nontrivial commutation relations.
For reasons described later in Subsection 9.4, we would like a logical X operator with no support on . To this end, we select that satisfy and , yielding two solutions to the equation with and . These yield the following family of logical operators for all :
For all , we see that always commute because , and always commute because . Furthermore, and form anticommuting pairs when . We see that we have constructed two independent blocks of logical operators with symmetrical structure. It follows that each of these blocks must contain a set of operators that define qubits. We name these the “unprimed” and “primed” logical blocks with and respectively.
Not all choices of span all k logical qubits, but valid choices are readily enumerated in software. Solutions to and correspond to null spaces of B and respectively, which can be constructed by Gaussian elimination. Gaussian elimination can also be used to check if the operators together span k qubits up to the stabilizer. We find all codes in Table 3 admit several such choices of . In Table 7 we show a particularly favorable choice of for the [[144, 12, 12]] code where the resulting logical operators have minimum weight.
Polynomials for Logical Pauli Matrices in the [[144, 12, 12]] Code
Table 7: Choices of polynomials such that and as defined in equation 16 are minimum-weight logical Pauli operators. The dots represent the monomials of the form with coeficient 1. If we let and , then anticommute exactly when . When used to construct an ancilla system as in Section these polynomials give a system with 60 qubits per layer.
To identify logical qubits we can enumerate choices of monomials and such that exactly when . That way, as well as for form a set of k logical qubits: anticommutes with exactly when . A brute force search readily finds choices of
9.2 Logical Gates based on Automorphisms
An automorphism of an error correction code is a permutation of the physical qubits that is equivalent to a permutation of the checks (more generally, an automorphism can map a check operator to a product of check operators). We focus on permutations that are implementable using fault tolerant circuits within the connectivity already required for syndrome measurements.
The existing connectivity admits some natural fault tolerant circuits implementing a particular family of permuta tions on the data qubits. BB LDPC codes feature two data registers and two check registers . We consider circuits that transfer the qubits from the data registers to the ancilla registers, and back again on a diferent path. The adjacency matrices describing the connectivity between the data and the ancilla registers are given by A and B, which are the sum of three monomials and in . Each monomial is a permutation and thus describes a vertex-disjoint set of edges between the data and ancilla block. Hence, all swaps along these edges can be parallelized. In a single circuit we can either swap along the edges defined by A which are and , or along edges defined by B which are and . See also Figure 4 A).
The monomial defining the particular set of edges in each of these sets of swaps can be chosen independently for each stage of the permutation (data → ancilla or ancilla → data), and on each side of the Tanner graph. For example, we can select any and move and simultaneously move However, we will see later that it is necessary to select and . Furthermore, these swaps admit a standard optimization: if we initialize the check registers to the |0⟩ state, then circuits implementing these permutations have CNOT depth four. If we also reset qubits to the |0⟩ state in between the swaps wherever possible, we obtain circuits whose errors cannot propagate between physical qubits, and are hence fault tolerant. See Table 8.
We now verify that the permutations implemented by the circuits described above are indeed automorphisms. After having applied an ‘A’ type permutation based on , the qubits are permuted by and . We see that this transforms a Pauli matrix by . Consequently, the stabilizers are transformed as , which is the same as permuting the X checks by . The Z stabilizers are also permuted by , so the described circuit indeed implements an automorphism. Notice also that this only works because the and blocks were transformed by the same
| ‘A’ type automorphism based on any Aj, Ak | |
| for α ∈ M do | for α ∈ M do |
| InitZ q(X,α) | InitZ q(Z,α) |
| CNOT q(L,Ajα) q(X,α) | CNOT q(R,α) q(Z,Ajα) |
| CNOT q(X,α) q(L,Ajα) | CNOT q(Z,Ajα) q(R,α) |
| InitZ q(L,ATkα) | InitZ q(R,Akα) |
| CNOT q(X,α) q(L,Akα) | CNOT q(Z,Akα) q(R,α) |
| CNOT q(L,Akα) q(X,α) | CNOT q(R,α) q(Z,Akα) |
| end for | end for |
| ‘B’ type automorphism based on any Bj, Bk | |
| for α ∈ M do | for α ∈ M do |
| InitZ q(X,α) | InitZ q(Z,α) |
| CNOT q(R,Bjα) q(X,α) | CNOT q(L,α) q(Z,Bjα) |
| CNOT q(X,α) q(R,Bjα) | CNOT q(Z,Bjα) q(L,α) |
| InitZ q(R,BkTα) | InitZ q(L,Bkα) |
| CNOT q(X,α) q(R,Bkα) | CNOT q(Z,Bkα) q(L,α) |
| CNOT q(R,Bkα) q(X,α) | CNOT q(L,α) q(Z,Bkα) |
| end for | end for |
Table 8: Circuits implementing automorphisms of a BB LDPC code within the connectivity already present for syndrome checks. These circuits are fault tolerant and have CNOT depth four. If , then the logical gate implemented by these automorphisms performs the transformation
. The type permutations can be verified to be automorphisms in the same manner, permuting the checks by some
These automorphisms allow us to fault tolerantly implement a subgroup of the Cliford gates. As we saw in Lemma 3, shifts of the form or generate the entire group M whenever the Tanner graph is connected. Therefore, by leveraging these permutations as generators, we can perform all translations of the tori containing using fault tolerant circuits of varying depth. An automorphism defined by an element transforms and similarly for the primed logical Pauli matrices. This capability is critical for addressing all logical qubits.
We can also comment on the nature of these operations as logical gates, although they are less useful in this sense. There is one such operation per element in M, and since M is Abelian the subgroup of Cliford gates implemented by these automorphisms must be Abelian as well. A transformation of this form cannot act like the logical identity so all of these gates (except are nontrivial. Since automorphism operations take X¯ to X¯ and Z¯ to Z¯, and they must hence be logical CNOT circuits up to a logical Pauli correction. While it is not clear how to use these CNOT circuits to facilitate useful computations, they may make for interesting test cases in an implementation.
9.3 Accessing the Primed Block via a ZX-duality
A ZX-duality is a permutation of the logical qubits that commutes with the stabilizer, except that it turns X checks into Z checks and Z checks into X checks. A physical circuit implementing this permutation and then applying Hadamard to all data qubits always acts as a logical gate [62]. In this section we focus on the implementation of a particular ZX-duality with applications for readout. We leave discovery and implementation of other ZX-dualities for future work. In particular, we derive a general method for constructing fault tolerant circuits for implementing a particular ZX-duality that is present in all BB LDPC codes. While the circuits from this construction are generally quite expensive, they may be amenable to further optimization and can be used sparingly in practice.
Consider a permutation of data qubits that swaps with for all . A check qubit which previously implemented the stabilizer now is connected to the qubits and instead, corresponding to the check . We see that this permutation switches the stabilizer implemented by with the stabilizer implemented by , so this permutation is indeed a ZX-duality.

Figure 7: Diagrams for the description of the implementation of the ZX-duality permutation. A) A subgraph of the Tanner graph providing enough connectivity to fault tolerantly swap and . B) A sequence of shifts of the data on the qubits in the block that performs the desired exchange without interacting qubits directly. A naive implementation of this sequence has CNOT depth 12. C) D) Decomposition of the generators of via the classification of finite Abelian groups for two diferent codes. Drawing the Cayley graph of the subgroup for each generator reveals the ratios defining pairs of qubits that must be exchanged to implement the permutation
We can also see that implementing this permutation and applying Hadamard to all qubits takes logical Pauli matrices to logical Pauli matrices. In particular, the operation swaps with , as well as with . This operation swaps the primed and unprimed logical blocks, transposes the grid of operators, and applies logical Hadamard to all qubits. Since we can measure logical X for all qubits in the unprimed block using the ancilla system described in Subsection 9.4, we can use this operation to measure logical Z for qubits in the primed block.
For the rest of this section we describe a fault tolerant method for implementing this operation. We begin with exchanging and : since these blocks are connected by pairs of edges in and , for any and there exists a loop connecting the qubits . A circuit identical in shape to those in Table 8 hence performs a fault tolerant exchange of and for all α. The additional shift of can be removed via an additional automorphism gate. It remains to exchange , as well as for all , which is significantly more complicated. We focus on in our discussion but it will be clear the exact same transformations are implementable on in parallel with those on ).
Fault tolerant implementation of the permutation can be achieved using a more sophisticated version of the fault tolerant circuits in Table 8 used for implementing automorphisms. These circuits relied on the existence of a connected loop of alternating check and data qubits, enabling a short depth fault tolerant circuit implementing a cyclic permutation of the data qubits therein. The same connectivity can be leveraged to implement a fault tolerant nearest neighbor swap of two data qubits connected by a check qubit. The fault tolerance of these circuits relies on the same principle: while a swap gate acting on two qubits containing data is not fault tolerant, moving a data qubit onto a blank qubit is. Figure shows a subgraph of the Tanner graph consisting of several connected qubits in the and block, and Figure 7 B) shows a sequence of operations where two data qubits can be exchanged without ever interacting directly. This gives us the following capability: whenever the circuits in Table 8 can implement the cyclic permutation for all , there also exists a circuit that can swap and for a particular α. Matching circuits exist for , and can be implemented simultaneously.
To decompose into a sequence of swaps, it will be helpful to consider the group structure of . Consider for example the [[90, 8, 10]] code with . Following the classification of finite Abelian groups we see that . We can re-express elements of using generators with where and . Transforming α to amounts to decomposing α as and exchanging the qubit with
This exchange can be split into a sequence of swaps that are implementable with the method described above using Figure and B). It sufices to be able to exchange for any the qubits , as well as for any the qubits , and finally for any the qubits . This, for any , creates a sequence of qubits where swaps are possible along each nearest neighbor. This is suficient for swapping the first and last qubit in the chain. The implementation of the individual generators like swaps may also involve additional intermediate qubits, but this only lengthens the chain and does not prohibit implementation.
The resources required for swapping where and similarly for other generators depends on the order of the generator p as well as the ratios that can be formed using terms or similar ratios from B. See Figure . Plotting the Cayley graph of the cyclic subgroup spanned by p immediately reveals that since is order three, only a single ratio is needed in order to swap any qubits marked and , while leaving qubits in place. Indeed since we can implement in a single layer of transforms in Figure 7 B).
The exchange with requires two such ratios and , the minimal depth expression of which demands the chaining together of two such transforms each. In other codes, like the [[144, 12, 12]] code, we encounter generators of order . Elements of order two like require no swaps at all, and elements of order four like can be implemented either using the ratio or just as shown in Figure 7 D). Numerical searches can quickly compute the most eficient decompositions of the required swaps. We give the orders of the generators, the ratios defining the required swaps, and the number of transforms required to implement them in Table 9.
We emphasize that the swap can be performed for all simultaneously in parallel. This stems from the structure of the exchange circuit in Figure 7 B). This circuit performs the swap ) while using the qubit as scratch space. However, we can simultaneously want to swap ↔ q(L, AjAT · AkAT · α) since the first step of the exchange circuit in Figure 7 B) is to move the data marked away from the qubit holding it, just as if it were a piece of data marked for a diferent exchange.
For clarity, we compute the total depth of the circuit for the [[144, 12, 12]] code without any further optimization. The ratios s can be implemented using two ratios each via and This results in a chain of length six (counting the number of ↔s). We can swap the qubits at the ends of a chain of length n using many nearest neighbor swaps. Each swap circuit of the form Figure can be implemented in CNOT depth twelve, resulting in CNOT depth to implement
Despite its fault tolerance, the implementation of this logical operation is clearly significantly more expensive than that of the automorphisms. Since the intermediate permutations corresponding to each of the generators are not ZX dualities in general, it will not be possible in general to perform error correction during this long operation. However, the significant overhead of this operation may be worth such a large cost, since it grants us the capability of accessing the primed block of qubits, efectively doubling the storage capacity of the code. This operation can also be used significantly more sparingly than the automorphism gates, and may be amenable to additional optimization Alternatively, additional connections and qubits beyond those necessary for the Tanner graph could be introduced to more directly implement the ZX-duality, though it is likely this will sacrifice the thickness-2 property.
| Code | Base Order | Reduced Order | Required Ratios | Swap Chain Length |
| [[72,12,6]] | 4 | |||
| [[90,8,10]] | 6 | |||
| [[108,8,10]] | 9 | |||
| [[144,12,12]] | 6 | |||
| [[288,12,18]] | 10 | |||
| [[360,12, 24]] | 11 |
Table 9: Table deriving the steps in the circuit implementing the , permutation for the ZXduality for several codes. The generators of M are decomposed into generators following the decomposition of finite Abelian groups. Following Figure 7 B) and C) these generators demand a set of ratios of terms in A or B which define fault tolerantly implementable exchanges of qubits with corresponding labels. The result is a decomposition of into a chain with length as shown (counting the number of arrows, ↔). Note the special implementation of the ratios in the code: the ratios are not implementable, but are. This is fine if we can also perform the ps ratio on its own to remove the additional transformation on some of the qubits.
9.4 Logical Measurements
In this section we describe how to leverage methods from [46] to implement fault-tolerant measurements of the operators and . As described above, this capability sufices to measure and for all logical qubits. We can also use this technique to measure various Pauli product operators by measuring for α not corresponding to logical qubits.
The measurement is facilitated by an ancilla system that extends the Tanner graph of the original code. The code defined by this extended Tanner graph contains the logical operator of interest as a stabilizer, enabling its fault tolerant measurement. A sketch of the structure of this ancilla system is given in Figure 1 C). For the logical operator , we consider a subgraph of the Tanner graph consisting of as well as operators corresponding to checks with support on . Similarly for the logical operator we consider a subgraph consisting of as well as for the relevant These subgraphs are copied several times and are connected together as shown in the figure: we call the resulting construction an ancilla system. With enough copies, the code defined by the extended Tanner graph has the same distance as the original code.
Furthermore, the ancilla system for measuring can be connected to another quantum error correction code, such as a surface code. This enables a joint X¯ X¯ measurement between a surface code qubit and any qubit within the BB code. A subsequent measurement of and some additional Pauli corrections then achieves a quantum teleportation circuit.
The main challenge of implementing these ancilla systems, in addition to minimizing their size, is to show that the extended Tanner graph satisfies the thickness-2 constraint. If our goal is to leverage the ancilla system to measure a Pauli product measurement with a surface code qubit, then arguably a thickness-2 extension of the Tanner graph does not sufice since there is no obvious way of connecting it to the surface code qubit as in Figure 1 C). To this end, we show how to make the subgraph corresponding to the ancilla system “efectively planar”: while the graph has thickness-2, the planar graph in one plane consists entirely of connected components with two vertices. Given this property of the embedding of the ancilla system, a connection between this system and a surface code may be facilitated by a construction that is thickness-2 overall.
An efectively planar embedding of the ancilla system relies on the fact that the logical operator has no support on the block. An implementation of more general logical operators is possible, but would require a graph that renders many ancilla qubits inaccessible from the outside.
We briefly give a self-contained description for the construction of the ancilla system from [46], following their notation. Suppose we are interested in measuring a logical operator that is supported on some set of qubits Then, let be the collection of Pauli- checks that have support on any of the . If we view these as sets of vertices in a Tanner graph, and let contain the edges between and , then forms a subgraph of the Tanner graph of the BB code.
The ancilla system is constructed out of copies of ‘primal layers’ isomorphic to , and ‘dual layers’ isomorphic to defined as follows: each has a corresponding , each has a corresponding , and each edge has a corresponding . For some parameter r, the final Tanner graph is that of the BB code, plus r additional copies of the dual graph labeled for and additional copies of the primal graph labeled for . We regard the within the original code as . We also add additional connections between and for , as well as and for specifically, we connect the associated pairs of and
It is shown by [46] that the resulting Tanner graph defines an error correction code of distance d when We construct two such ancilla systems: one for and one for . Table 7 shows a choice of for the [[144, 12, 12]] code, defining and such that these operators are all minimum weight, and define and with 30 qubits each. To achieve we hence require additional qubits. We suspect that significantly more eficient variations of this constructions are possible, but leave their development for future work.
The construction presented above is complicated by the fact that vertices in the Tanner graph take on alternating roles in each layer: in the primal layers the vertices v are physical qubits, whereas in the dual layers the are checks. However, for the purposes of giving a thickness-2 decomposition we need not concern ourselves with this. If we do not distinguish between checks and physical qubits, then the primal layers and dual layers have isomorphic Tanner graphs. Hence, for the purposes of the following, we view all layers as identical.
We now show why a thickness-2 embedding of the ancilla system, and an efectively planar embedding of the ancilla system is possible. This argument is best understood in reference to Figure 8. We begin by understanding the thickness-2 decomposition of each layer of the ancilla systems, leveraging Figure 3. In Figure we can see that for the system decomposes into ‘hairy rings’ in both the plane and the plane since it has no support on for the system is a collection of connected pairs in the plane and collection of rings in the plane, since it has no support on
Since are subgraphs of the BB code’s Tanner graph, and its Tanner graph has thickness-2, and since and are isomorphic if we do not distinguish between qubits and checks, we see that each layer of the ancilla construction must be thickness-2 individually. The main challenge is to show that the connections between the layers can be facilitated without introducing any crossings.
Figure 8 B) shows how to connect several layers of the two ancilla systems to both the wheel graphs of the BB code, and also an ancillary surface code. We arrange the wheels of the BB code such that are on the inside of the wheels, and that are on the inside of the wheels. and for of the system can be repeatedly nested inside of the wheels of the BB code. The qubits can be connected together on the plane, and the and qubits can be connected on the plane. As for and for the system, the rings in the plane can be wrapped around the wheels of the BB code which already allows connection of the required and qubits. This leaves the pairs of connected qubits in the plane completely free of any connections between the layers, making them available to be connected to a surface code system.
We have considered just two ancilla systems here for measuring and . However, using additional ancilla systems, especially if their size can be reduced, or equipping these two ancilla systems with additional connections to the and logical operators are potential ways to eliminate the need for the error-prone ZX-duality from Subsection 9.3 and access all logical qubits. the other hand, it is not clear that either approach would preserve the thickness-2 property.
10 Conclusion
In summary, we ofered a new perspective on how a fault-tolerant quantum memory could be realized using near term quantum processors with a small qubit overhead. Our approach complements a concatenation-based scheme by Pattison, Krishna, and Preskill [63] where each data qubit of a high-rate LDPC code is additionally encoded b the surface code. Although the concatenation approach makes use of the high error threshold of the surface code and its geometric locality to address quantum hardware limitations such as a relatively high noise rate and limited qubit connectivity, the additional surface code encoding incurs a significant qubit overhead, partially negating the advantages ofered by LDPC codes. Here we have shown that the concatenation step can be avoided by introducing examples of high-rate LDPC codes which have nearly the same error threshold as the surface code itself. Although these LDPC codes are not geometrically local, qubit connectivity required for syndrome measurements is described by a thickness-two graph which can be implemented using two planar degree-3 layers of qubit couplers. This is a valid architectural solution for platforms based on superconducting qubits. Numerical simulations performed for the circuit-based noise model indicate that the proposed LDPC codes compare favorably with the surface code in the practically relevant range of error rates p ≥ 0.1% ofering the same level of error suppression with nearly 15x reduction in the qubit overhead.
The key hardware challenges to enable the new codes with superconducting qubits are:
-
the development of a low-loss second layer,
-
the development of qubits that can be coupled to 7 connections (6 buses and 1 control line), and
-
the development of long-range couplers.
These are all dificult to solve but not impossible. For the first challenge, we can imagine a small change to the packaging [53] which was developed for the IBM Quantum Eagle processor [64]. The simplest would be to place the extra buses on the opposite side of the qubit chip. This would require the development of high Q through substrate vias (TSV) which would be part of the coupling buses and as such would require intensive microwave simulation to make sure these TSVs could support microwave propagation while not introducing large unwanted crosstalk.
The second challenge is an extension of the number of couplers from the heavy hex lattice arrangement [65] which is 4 (3 couplers and 1 control) to 7. The implication of this is that the cross-resonance gate, which has been the core gate used in large quantum systems for the past few years, would not be the path forward. This is due to the fact that the qubits in the cross-resonance gate are not tunable and as such for a large device with a large number of connections the probability of energy collisions (not just the qubit levels but also higher levels of the transmon) trends to one very fast [66]. This is because of frequency requirements for the gate to work properly and intrinsic device variability, which is fundamental to Josephson junction fabrication. However, with the tunable coupler [67, 68], which was used in the IBM Quantum Egret and is now being developed for the IBM Quantum Heron, this problem no longer exists as the qubits can be designed to be further apart. This new gate is also similar to the gates used by Google Quantum AI [69], which have shown that a square lattice arrangement is possible. Extending the coupling map to 7 connections will require significant microwave modeling; however, typical transmons have about 60fF of capacitance and each gate is around 5fF to get the appropriate coupling strengths to the buses, so it is fundamentally possible to develop this coupling map without changing the properties of the transmon qubits which have been shown to have larger coherence and are stable.
The final challenge is the most dificult. For the buses that are short enough so that the fundamental mode can be used the standard circuit QED model holds. However, to demonstrate the 144-qubit code some of the buses will be long enough that we will require frequency engineering. One way to achieve this is with filtering resonators, and a proof of principle experiment was demonstrated in Ref. [70].
Our work leaves several open questions concerning BB LDPC codes and their applications.
-
What are the tradeofs between the code parameters n, k, d and can one achieve a constant non-zero encoding rate and a growing distance?
-
Are there more general LDPC codes compatible with our syndrome measurement circuit(s)? We expect that the same circuit applies to any two-block LDPC code based on an Abelian group [37, 38]. However, our circuit analysis breaks down for non-Abelian groups.
-
Our work gives a depth-7 syndrome measurement circuit, as measured by the number of CNOT layers. Is it possible to reduce the circuit depth? Numerical experiments performed for the code [[72, 12, 6]] indicate that this code may have no depth-6 syndrome measurement (SM) circuit [71].
-
We observed that a depth-7 SM circuit is not unique. A natural next step is identifying a SM circuit that works best for a particular code. In addition, it may be possible to improve the circuit-level distance by using diferent SM circuits in diferent syndrome cycles. Even though some low-weight fault paths are not detectable by any single circuit, such fault paths may be detected if two circuits are used in tandem.
-
How much would the error threshold change for a noise biased towards measurement errors? Note that measurements are the dominant source of noise for superconducting qubits. Since the considered BB codes have a highly redundant set of check operators, one may expect that they ofer extra protection against measurement errors.
-
The general-purpose BP-OSD decoder used here may not be fast enough to perform error correction in real time Is there a faster decoder making use of the special structure of BB codes?
-
How to apply logical gates? While our work gives a fault-tolerant implementation of certain logical gates, these gates ofer very limited computational power and are primarily useful for implementing memory capabilities.
Acknowledgements
The authors thank Ben Brown, Oliver Dial, Alexander Ivrii, Tomas Jochym-O’Connor, Yunseong Nam, Matthias Steffen, Kevin Tien, and John Blue for stimulating discussions at various stages of this project. The authors acknowledge the IBM Research Cognitive Computing Cluster service for providing resources that have contributed to the research results reported within this paper.
References
[1] Michael A. Nielsen and Isaac Chuang. Quantum computation and quantum information, 2002.
[2] Seth Lloyd. Universal quantum simulators. Science, 273(5278):1073–1078, 1996.
[3] Hefeng Wang, Sabre Kais, Al´an Aspuru-Guzik, and Mark R. Hofmann. Quantum algorithm for obtaining the energy spectrum of molecular systems. Physical Chemistry Chemical Physics, 10(35):5388–5393, 2008.
[4] Markus Reiher, Nathan Wiebe, Krysta M. Svore, Dave Wecker, and Matthias Troyer. Elucidating reaction mechanisms on quantum computers. Proceedings of the National Academy of Sciences, 114(29):7555–7560, 2017.
[5] Yuri Alexeev, Dave Bacon, Kenneth R. Brown, Robert Calderbank, Lincoln D. Carr, Frederic T. Chong, Brian DeMarco, Dirk Englund, Edward Farhi, Bill Feferman, et al. Quantum computer systems for scientific discovery. PRX Quantum, 2(1):017001, 2021.
[6] Jay M. Gambetta, Jerry M. Chow, and Matthias Stefen. Building logical qubits in a superconducting quantum computing system. npj Quantum Information, 3(1):2, 2017.
[7] Pranav S. Mundada, Aaron Barbosa, Smarak Maity, Yulun Wang, T. M. Stace, Thomas Merkh, Felicity Nielson, Andre R. R. Carvalho, Michael Hush, Michael J. Biercuk, and Yuval Baum. Experimental benchmarking of an automated deterministic error suppression workflow for quantum algorithms, 2023.
[8] Nathalie P. De Leon, Kohei M. Itoh, Dohun Kim, Karan K. Mehta, Tracy E. Northup, Hanhee Paik, B.S. Palmer, Nitin Samarth, Sorawis Sangtawesin, and David W. Steuerman. Materials challenges and opportunities for quantum computing hardware. Science, 372(6539):eabb2823, 2021.
[9] Antonio D. C´orcoles, Jerry M. Chow, Jay M. Gambetta, Chad Rigetti, J. R. Rozen, George A. Keefe, Mary Beth Rothwell, Mark B. Ketchen, and M. Stefen. Protecting superconducting qubits from radiation. Applied Physics Letters, 99(18):181906, 11 2011.
[10] Antti P. Veps¨al¨ainen, Amir H. Karamlou, John L. Orrell, Akshunna S. Dogra, Ben Loer, Francisca Vasconcelos, David K. Kim, Alexander J. Melville, Bethany M. Niedzielski, Jonilyn L. Yoder, et al. Impact of ionizing radiation on superconducting qubit coherence. Nature, 584(7822):551–556, 2020.
[11] Ted Thorbeck, Andrew Eddins, Isaac Lauer, Douglas T. McClure, and Malcolm Carroll. Two-level-system dy namics in a superconducting qubit due to background ionizing radiation. PRX Quantum, 4:020356, Jun 2023.
[12] Yukai Wu, Sheng-Tao Wang, and L.-M. Duan. Noise analysis for high-fidelity quantum entangling gates in an anharmonic linear Paul trap. Physical Review A, 97(6):062325, 2018.
[13] Matthew J. Boguslawski, Zachary J. Wall, Samuel R. Vizvary, Isam Daniel Moore, Michael Bareian, David T.C. Allcock, David J. Wineland, Eric R. Hudson, and Wesley C. Campbell. Raman scattering errors in stimulated raman-induced logic gates in ba+ 133. Physical Review Letters, 131(6):063001, 2023.
[14] A. A. Houck, J. A. Schreier, B. R. Johnson, J. M. Chow, Jens Koch, J. M. Gambetta, D. I. Schuster, L. Frunzio, M. H. Devoret, S. M. Girvin, and R. J. Schoelkopf. Controlling the spontaneous emission of a superconducting transmon qubit. Physical Review Letters, 101:080502, 2008.
[15] Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical Review A, 52(4):R2493, 1995.
[16] Dorit Aharonov and Michael Ben-Or. Fault-tolerant quantum computation with constant error. In Proceedings of the twenty-ninth Annual ACM Symposium on Theory of Computing, pages 176–188, 1997.
[17] Alexei Yu. Kitaev. Quantum computations: algorithms and error correction. Russian Mathematical Surveys, 52(6):1191, 1997.
[18] Panos Aliferis, Daniel Gottesman, and John Preskill. Quantum accuracy threshold for concatenated distance-3 codes. arXiv preprint quant-ph/0504218, 2005.
[19] Alexei Kitaev. Fault-tolerant quantum computation by anyons. arXiv preprint quant-ph/9707021, 1997.
[20] Sergey B. Bravyi and Alexei Yu. Kitaev. Quantum codes on a lattice with boundary. arXiv preprint quantph/9811052, 1998.
[21] Eric Dennis, Alexei Kitaev, Andrew Landahl, and John Preskill. Topological quantum memory. Journal of Mathematical Physics, 43(9):4452–4505, 2002.
[22] Austin G. Fowler, Ashley M. Stephens, and Peter Groszkowski. High-threshold universal quantum computation on the surface code. Physical Review A, 80(5):052312, 2009.
[23] Maika Takita, Antonio D. C´orcoles, Easwar Magesan, Baleegh Abdo, Markus Brink, Andrew Cross, Jerry M. Chow, and Jay M. Gambetta. Demonstration of weight-four parity measurements in the surface code architecture. Physical Review Letters, 117(21):210505, 2016.
[24] J. F. Marques, B. M. Varbanov, M. S. Moreira, Hany Ali, Nandini Muthusubramanian, Christos Zachariadis, Francesco Battistel, Marc Beekman, Nadia Haider, Wouter Vlothuizen, et al. Logical-qubit operations in an error-detecting surface code. Nature Physics, 18(1):80–86, 2022.
[25] Sebastian Krinner, Nathan Lacroix, Ants Remm, Agustin Di Paolo, Elie Genois, Catherine Leroux, Christoph Hellings, Stefania Lazar, Francois Swiadek, Johannes Herrmann, et al. Realizing repeated quantum error correction in a distance-three surface code. Nature, 605(7911):669–674, 2022.
[26] Youwei Zhao, Yangsen Ye, He-Liang Huang, Yiming Zhang, Dachao Wu, Huijie Guan, Qingling Zhu, Zuolin Wei, Tan He, Sirui Cao, et al. Realization of an error-correcting surface code with superconducting qubits. Physica Review Letters, 129(3):030501, 2022.
[27] Google Quantum AI. Suppressing quantum errors by scaling a surface code logical qubit. Nature, 614(7949):676– 681, 2023.
[28] Daniel Gottesman. Fault-tolerant quantum computation with constant overhead. arXiv preprint arXiv:1310.2984, 2013.
[29] Maxime A. Tremblay, Nicolas Delfosse, and Michael E. Beverland. Constant-overhead quantum error correction with thin planar connectivity. Physical Review Letters, 129(5):050504, 2022.
[30] Nikolas P. Breuckmann and Barbara M. Terhal. Constructions and noise threshold of hyperbolic surface codes. IEEE Transactions on Information Theory, 62(6):3731–3744, 2016.
[31] Oscar Higgott and Nikolas P. Breuckmann. Subsystem codes with high thresholds by gauge fixing and reduced qubit overhead. Physical Review X, 11(3):031039, 2021.
[32] Oscar Higgott and Nikolas P. Breuckmann. Constructions and performance of hyperbolic and semi-hyperbolic floquet codes. arXiv preprint arXiv:2308.03750, 2023.
[33] Jean-Pierre Tillich and Gilles Z´emor. Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength. IEEE Transactions on Information Theory, 60(2):1193–1202, 2013.
[34] Nikolas P. Breuckmann and Jens N. Eberhardt. Balanced product quantum codes. IEEE Transactions on Information Theory, 67(10):6653–6674, 2021.
[35] Alexey A. Kovalev and Leonid P. Pryadko. Quantum kronecker sum-product low-density parity-check codes with finite rate. Physical Review A, 88(1):012311, 2013.
[36] Pavel Panteleev and Gleb Kalachev. Degenerate quantum LDPC codes with good finite length performance. Quantum, 5:585, 2021.
[37] Hsiang-Ku Lin and Leonid P. Pryadko. Quantum two-block group algebra codes. arXiv preprint arXiv:2306.16400, 2023.
[38] Renyu Wang, Hsiang-Ku Lin, and Leonid P. Pryadko. Abelian and non-Abelian quantum two-block codes. arXiv preprint arXiv:2305.06890, 2023.
[39] Pavel Panteleev and Gleb Kalachev. Asymptotically good quantum and locally testable classical LDPC codes. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 375–388, 2022.
[40] Anthony Leverrier and Gilles Z´emor. Quantum Tanner codes. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS), pages 872–883. IEEE, 2022.
[41] Nou´edyn Baspin and Anirudh Krishna. Quantifying nonlocality: How outperforming local quantum codes is expensive. Physical Review Letters, 129(5):050505, 2022.
[42] Sergey Bravyi, David Poulin, and Barbara Terhal. Tradeofs for reliable quantum information storage in 2D systems. Physical Review Letters, 104(5):050503, 2010.
[43] Petra Mutzel, Thomas Odenthal, and Mark Scharbrodt. The thickness of graphs: a survey. Graphs and combinatorics, 14:59–73, 1998.
[44] Andrew Steane. Multiple-particle interference and quantum error correction. Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 452(1954):2551–2577, 1996.
[45] A. Robert Calderbank and Peter W. Shor. Good quantum error-correcting codes exist. Physical Review A, 54(2):1098, 1996.
[46] Lawrence Z. Cohen, Isaac H. Kim, Stephen D. Bartlett, and Benjamin J. Brown. Low-overhead fault-tolerant quantum computing using long-range connectivity. Science Advances, 8(20), 2022.
[47] Nicolas Delfosse and Adam Paetznick. Spacetime codes of cliford circuits. arXiv preprint arXiv:2304.05943, 2023.
[48] Matt McEwen, Dave Bacon, and Craig Gidney. Relaxing hardware requirements for surface code circuits using time-dynamics. Quantum, 7:1172, 2023.
[49] Oscar Higgott, Thomas C. Bohdanowicz, Aleksander Kubica, Steven T. Flammia, and Earl T. Campbell. Improved decoding of circuit noise and fragile boundaries of tailored surface codes. Physical Review X, 13(3):031007, 2023.
[50] Gyorgy P. Geher, Ophelia Crawford, and Earl T. Campbell. Tangling schedules eases hardware connectivity requirements for quantum error correction. arXiv preprint arXiv:2307.10147, 2023.
[51] Joschka Rofe, David R. White, Simon Burton, and Earl Campbell. Decoding across the quantum low-density parity-check code landscape. Physical Review Research, 2(4):043423, 2020.
[52] Peter Groszkowski, Austin Fowler, and Ashley M. Stephens. High-threshold surface code quantum computing: threshold calculation. In APS March Meeting Abstracts, pages W17–002, 2009.
[53] Sergey Bravyi, Oliver Dial, Jay M. Gambetta, Dar´ıo Gil, and Zaira Nazario. The future of quantum computing with superconducting qubits. Journal of Applied Physics, 132(16), 2022.
[54] Pavel Panteleev and Gleb Kalachev. Quantum LDPC codes with almost linear minimum distance. IEEE Transactions on Information Theory, 68(1):213–229, 2021.
[55] Andrew J. Landahl, Jonas T. Anderson, and Patrick R. Rice. Fault-tolerant quantum computing with color codes. arXiv preprint arXiv:1108.5738, 2011.
[56] Scott Aaronson and Daniel Gottesman. Improved simulation of stabilizer circuits. Physical Review A, 70(5):052328, 2004.
[57] Austin G. Fowler, Adam C. Whiteside, Angus L. McInnes, and Alimohammad Rabbani. Topological code autotune. Physical Review X, 2(4):041003, 2012.
[58] Oscar Higgott and Craig Gidney. Sparse blossom: correcting a million errors per core second with minimum-weight matching. arXiv preprint arXiv:2303.15933, 2023.
[59] Elwyn Berlekamp, Robert McEliece, and Henk Van Tilborg. On the inherent intractability of certain coding problems (corresp.). IEEE Transactions on Information Theory, 24(3):384–386, 1978.
[60] Joschka Rofe. LDPC: Python tools for low density parity check codes, 2022.
[61] Sergey Bravyi and Alexander Vargo. Simulation of rare events in quantum error correction. Physical Review A, 88(6):062308, 2013.
[62] Nikolas P. Breuckmann and Simon Burton. Fold-transversal Cliford gates for quantum codes. arXiv preprint arXiv:2202.06647, 2022.
[63] Christopher A. Pattison, Anirudh Krishna, and John Preskill. Hierarchical memories: Simulating quantum LDPC codes with local gates. arXiv preprint arXiv:2303.04798, 2023.
[64] Jerry Chow, Oliver Dial, and Jay Gambetta. IBM Quantum breaks the 100-qubit processor barrier, 2021.
[65] Paul Nation, Hanhee Paik, Andrew Cross, and Zaira Nazario. The IBM Quantum heavy hex lattice, 2021.
[66] Jared B. Hertzberg, Eric J. Zhang, Sami Rosenblatt, Easwar Magesan, John A. Smolin, Jeng-Bang Yau, Vivekananda P. Adiga, Martin Sandberg, Markus Brink, Jerry M. Chow, and Jason S. Orcutt. Laser-annealing josephson junctions for yielding scaled-up superconducting quantum processors. npj Quantum Information, 7:129, 2021.
[67] David C. McKay, Stefan Filipp, Antonio Mezzacapo, Easwar Magesan, Jerry M. Chow, and Jay M. Gambetta. Universal gate for fixed-frequency qubits via a tunable bus. Physical Review Applied, 6:064007, Dec 2016.
[68] J. Stehlik, D. M. Zajac, D. L. Underwood, T. Phung, J. Blair, S. Carnevale, D. Klaus, G. A. Keefe, A. Carniol M. Kumph, Matthias Stefen, and O. E. Dial. Tunable coupling architecture for fixed-frequency transmon superconducting qubits. Physical Review Letters, 127:080505, Aug 2021.
[69] F. Arute, K. Arya, R. Babbush, and et al. Quantum supremacy using a programmable superconducting processor. Nature, 574:505–510, 2019.
[70] David C. McKay, Ravi Naik, Philip Reinhold, Lev S. Bishop, and David I. Schuster. High-contrast qubit inter actions using multimode cavity qed. Physical Review Letters, 114:080501, 2015.
[71] Alexander Ivrii. Private communication, 2023.
A) Topology for each Ancilla System Layer

B) Implementation of Ancilla Systems in Thickness-2

Figure 8: Illustration of the thickness-2 property of the Tanner graph of BB LDPC codes. A) Planar embedding of each layer of the ancilla system from Figure 1 C) via truncating the and wheels. B) Implementation of the graph from Figure 1 C) within thickness-2 by nesting wheels. Wheels corresponding to are placed on the outside and wheels corresponding to are placed on the inside. The system can be connected to a surface code in the plane. Here we only show one layer per system, but this construction can be repeated for arbitrarily many layers.