Manuscript Offprint
arXiv:2611.06818Linear-time erasure recovery for quantum expander codes
Abstract
Erasures are used to model faults at a subset of known locations in various platforms used to construct fault-tolerant quantum computers. Beyond the utility in erasure recovery, efficient decoders for erasures are useful to both understand error decoders and as a subroutine for error decoding. Classical expander codes, which belong to the family of low-density parity-check (LDPC) codes, can be equipped with the Peeling decoder which works in linear time. Our main result is the algorithm Small-Set-Peeling, a quantum generalization of the classical Peeling decoder for erasures, that applies to quantum expander codes (Tillich, Zémor, IEEE T-IT 2013; Leverrier, Tillich, Zémor, FOCS 2015). This decoder can correct up to erasures, where is the (design) distance of the code and, importantly, is the first decoder that is guaranteed to do so in linear time. Combining with the erasure-conversion algorithm Small-Set-Find (Krishna, Livni-Navon, Wootters, SODA 2024), our result also implies the existence of a novel graph-local linear-time decoder for Pauli errors.
1 Introduction
An erasure is a model for the loss of information during storage and transmission. On bits, an erasure is abstractly represented by a set which is interpreted to mean that the bits in are just as likely to be flipped as not, and therefore completely unreliable; bits outside are completely unaffected. As itself is known in this model, recovering from erasures is easier than recovering from errors whose location is unknown: In worst-case settings, a (binary linear) code that is robust to at most erasures is only robust to errors. For real-world implementation, we can equip a code with an efficient decoder, an algorithm to repair corrupted codewords. Expander codes are a class of constant-rate low-density parity-check (LDPC) codes that can be equipped with the Peeling decoder that can correct a constant-fraction of erasures and only requires time.
Erasures are also used to model the loss of quantum information. One way erasures manifest is as depolarizing noise on known locations [GBP97]. Similar to the classical erasure, this is interpreted to mean that qubits in some (known) locations are completely unreliable. In photonic architectures, erasures are used to model lost photons which manifest as a missing detection [BBB+23]. Erasures in the quantum setting are easier to correct than the more general case of Pauli errors on unknown locations: Erasures on an -qubit quantum code can be decoded in time. Motivated by this observation, several qubit platforms, including neutral atoms [WKPT22], superconducting circuits [KHV+23] and trapped ions [KCB23], can be engineered so that erasures are their dominant failure mode: The qubit leaves its computational subspace, and this event can be detected without disturbing the encoded state. At the same time, quantum LDPC codes, are being explored as avenues for efficient quantum error correction in practice [XBAP⁺²⁴, BCG⁺²⁴]. Constant-rate quantum expander codes, a family of quantum LDPC codes where and distance , serve as a useful theoretical testbed for more practically relevant code families where progress is naturally more numerical in nature [KP13, PK21, BCG⁺²⁴, LOM⁺²⁶]. To this end, the complexity of the decoder is crucial for enabling real-time decoding [Ter15], and we would like to do better than the generic cubic time time algorithm. With this motivation, and inspired by the classical setting, it is natural to ask whether we can equip quantum expander codes with linear-time decoders for erasures.
Our main result is a linear-time erasure decoder for constant-rate quantum expander codes. We propose and analyze a decoder called SSPeeling for quantum expander codes which generalizes the classical Peeling decoder. We highlight some implications of our result.
-
A novel decoder for erasures. Our result represents the first provable linear-time algorithm for correcting erasures on constant-rate quantum LDPC codes that can correct erasures of any size less than the design distance . This stands in contrast to the use of a linear-time error decoding algorithm such as SSFlip [LTZ15, FGL18, FGL20] as an erasure decoding algorithm: A decoding algorithm correcting t errors can correct t erasures, but such algorithms may only guarantee the ability to correct a number of errors less than half of the distance D. In contrast, we can correct all erasures of size up to D - 1.
-
A linear-time decoder for Pauli errors. The fact that recovery from erasures is easier than recovery from errors whose location is unknown also motivates a way to design decoders for errors: Given an unknown error , suppose we can efficiently find an envelope such that . Error correction then becomes a two-stage process: First, use an envelope-finding algorithm, and then implement an erasure-recovery algorithm. Most famous among these is the UnionFind decoder [DN21, DH21, DLB22] which works in (almost) linear time. The first work to design and study an envelope-finding algorithm for constant-rate quantum LDPC codes was [KLNW24] which proposed and analyzed an algorithm called SSFind for quantum expander codes. Given the syndrome of an error , this algorithm can find an envelope that is guaranteed to contain in time. However, an -time decoder for erasures was not known at the time. Combining with our result implies the existence of a graph-local linear-time decoder SSFind + SSPeeling for correcting errors.
-
Low-complexity and graph-locality. Our algorithm is an iterative, graph-local algorithm: In each iteration, it makes an elementary decision which only involves a small (constant) number of qubits. Graph-local processing is frequently a useful property for constructing and analyzing decoders in the stochastic-noise setting [FGL18]. In particular, our decoder retains its linear runtime under stochastic noise.
-
Parameters for guarantee. Our guarantee for correcting erasures with SSPeeling holds under a weaker expansion assumption than that needed for SSFlip. Note, however, that the expansion requirement for SSFind+SSPeeling that corrects Pauli errors is determined by SSFind whose expansion requirements are more demanding than SSFlip. Oftentimes, decoders for quantum expander codes are later shown to work well on practically relevant code families, and we expect this to be the case for our algorithm.
Our result is stated in terms of the design distance rather than the code distance, as the latter often cannot be directly computed (See Lemma 12). Analyses of SSFlip are also measured against the design distance, so this does not affect our comparisons.
See also the recent work [Ost26] discussed in related work.
Each connected component of the erasure may be corrected independently by invoking the algorithm on each connected component with the syndrome outside of the erasure set to zero. Since the number of iterations scales as the component size, the overall runtime is linear in the block length.
With the motivation for our work in hand, we now describe it in further detail.
The codes we consider can be specified by two sets and , where each element of or is a quantum generalization of a parity check and specifies a constraint on the qubits. Specifically, we consider quantum expander codes, a family of constant-rate quantum LDPC codes [TZ13, LTZ15]. Quantum expander codes are graph-based codes, i.e. they can be described by a graph whose vertices are the qubits and the sets and ; the constraints imposed by elements of and correspond to the edges of . A quantum code is a quantum LDPC code if the graph is sparse.
For Calderbank-Shor-Steane (CSS) quantum codes, it suffices to consider only two types of errors: -type errors and -type errors. The constraints are meant to correct -type errors, while the constraints are meant to correct -type errors. It suffices to deal with these two types individually. For the rest of this paper, we focus on -type errors and mention that -type errors can be corrected in an identical manner. With this understanding, we refer to as “parity-checks,” as they are used to detect the errors and simply as “generators”.
An erasure is specified by a subset . For sufficiently small , we would like a decoder with the following property. For all (-type) errors supported within , the decoder takes the syndrome and as input and identifies the error . The maximum size of that the decoder can tolerate is called the decoding radius.
A decoder for erasures. Our main result is the first provable linear-time decoder for erasures Small-Set-Peeling (SSPeeling) on constant-rate quantum LDPC codes whose decoding radius is the design distance.
Theorem 1. Let be a quantum expander code (See Section 3 for a formal definition) obtained from a bipartite, -biregular, bidirectional expander graph on vertex set , where , and expansion parameter . There exists a decoder SSPeeling such that, for all such that , we have the following guarantee: For any (-type) error , SSPeeling takes as input the syndrome and the envelope as input, and returns a correction (up to an equivalence class; See Section 3) in time.
The decoder takes time and thus linear in the size of the erasure. We highlight also that it is sufficient to have , which is weaker than the demand on decoders: [LTZ15] requires .
We remark that the critical new ingredient compared to prior work is the exploitation of de-generacy in a graph-local algorithm: We loosen the erasure decoding problem to permit the correction to be supported outside of the erasure as long as the returned correction is equivalent to the erasure (i.e. the residual error after correction is trivial).
A decoder for errors. Given a (reduced) error , an erasure-conversion algorithm takes the syndrome as input and returns an envelope such that . The work [KLNW24] presented an algorithm SSFind, a generalization of a classical algorithm designed by Viderman for classical expander codes [Vid13]. We point the interested reader to [KLNW24] for a formal description of SSFind. By combining SSFind with an erasure decoder, it can be used to correct errors. The algorithm SSFind is itself a linear-time algorithm, and therefore, by combining with a linear-time erasure decoder, this yields a new graph-local linear-time decoder for errors that is distinct from SSFlip.
Corollary 2. Let be an quantum expander code on qubits constructed from an expander graph with left-degree and right-degree , and expansion parameter .
Let be a (reduced) error pattern with weight at most
where , and let be the syndrome of . Then SSFind+SSPeeling, given the syndrome , identifies in time .
1.2 Related work
Erasure recovery. For surface codes, Delfosse and Zémor [DZ20] gave a linear-time maximum-likelihood erasure decoder. This then forms the second stage of the UnionFind decoder [DN21] which is known to work in (almost) linear time. While surface codes are LDPC codes, with each qubit only needing to connect to 4 other qubits in its immediate neighborhood, they are only capable of encoding a single logical qubit, irrespective of code size. Turning to constant-rate codes, Connolly, Londe, Leverrier and Delfosse [CLLD22] applied Peeling to hypergraph product codes and identified stabilizer generators as the obstacle to peeling. This observation is important for understanding SSPeeling as well and we will return to it in Section 2. Connolly et al. overcome this problem using a decoder they called pruned peeling, which removes a qubit from the erasure whenever the support of a generator lies entirely inside it, and the VH decoder, which splits the remaining erasure into vertical and horizontal clusters, i.e. subsets of a single row or column of the product, and corrects them using Gaussian elimination. Their decoder runs in time and performs close to maximum likelihood in simulations.
Prabhu, Vaishya, Bhatnagar, Kolhe, Lalitha & Kumar [PVB+25] also study hypergraph product codes with Peeling followed by a cluster-based decoder and SSFlip numerically, and state a worst-case guarantee for a version of SSFlip whose flips are restricted to the erasure.
Pech, Gökduman, Yao, Pfister [PGYP26] generalize pruned peeling with a dual peeling step. Combined with Peeling, this is shown to be maximum likelihood decoding for surface codes; for other codes, its performance is studied numerically. The time complexity is also considered empirically. Belief propagation with guided decimation has also been applied to erasures by Gökduman, Yao, Pfister [GYP24].
More recently, [Ost26] constructed a linear-time decoder using linear-algebraic techniques that achieves a decoding radius . This suffices to establish Corollary 2 against adversarial errors. This is in contrast to our decoder which can correct erasures of size up to . Furthermore, the non-graph-local nature of the algorithm may mean it is difficult to preserve the linear time complexity in a stochastic noise setting.
Linear-time decoders for Pauli errors with provable guarantees. The Small-Set-Flip or SSFlip decoder of Leverrier, Tillich & Zémor [LTZ15] was the first provable linear-time decoder for adversarial Pauli errors on constant-rate quantum expander codes. It has been generalized in subsequent works to cover other noise models such as stochastic errors and in scenarios where even the syndrome information is unreliable [FGL18, FGL20]. SSFlip also forms the basis for linear-time decoders for quantum LDPC codes with both constant rate and relative distance [LH22, LZ23, GPT22, DHLV22].
1.3 Acknowledgements
The decoder SSPeeling and its analysis was developed with the help of an LLM, which built on core ideas and direction from the authors. The tool materially affected Section 4. We have verified all results and take responsibility for all claims made in this paper. CAP is currently a Simons-CIQC postdoctoral fellow at the Simons Institute for the Theory of Computing, supported by NSF QLCI Grant 2016245.
2 Technical Overview
In this section, we present a more detailed overview of our result. We begin by discussing expander codes, a type of classical LDPC codes, and the Peeling decoder in Section 2.1. We introduce quantum expander codes and discuss why Peeling does not directly generalize in Section 2.2. This then motivates the algorithm Small-Set-Peeling or SSPeeling which we present informally in Algorithm 2.
2.1 Expander codes & Peeling
An (classical, binary, linear) error correcting code is a linear subspace of . A code of distance is robust to all erasures of size strictly less than . For any erasure such that , we can uniquely recover a codeword of given access only to the complement of the erasure .
A classical LDPC code is defined by a sparse bipartite graph over vertex set in the following way. We associate the (left) vertices (with ) with the symbols of a codeword, and the (right) vertices with parity-checks. We let denote the neighbors of in .
We say that is an error if there exists at least one parity-check such that . We focus on the case where the underlying graph is a bipartite expander (see Definition 4); such a code is sometimes called an expander code [SS96].
The decoding problem is described as follows: Consider an erasure . We say that we can correct the erasure if, for all errors , we can design a decoder that accepts as input the syndrome and the erasure , and finds . For classical expander codes, erasures can be corrected using a linear-time decoder called Peeling that we describe in this section. The decoder uses the following elementary observation: If a parity check is adjacent to exactly one erased bit, then the value of that bit is the parity of the remaining bits in the check. The decoder recovers this bit, removes it from the erasure and repeats. To illustrate, we use a small example in Figure 1.
Let be the set of erasure locations. For a check , and , we say is a -check if its weight, defined as the number of neighbors in the erasure , is .
The Peeling decoder is described in Algorithm 1. Linear time complexity can be achieved by maintaining a list of checks with a unique neighbor in the erasure and updating this list after each peeling step.
Note that the size of the erasure decreases in each iteration. Of course, Peeling can fail prematurely if the set of unique neighbors is empty but the error is not yet corrected. This is

Figure 1: Illustrating Peeling. (a) is the Tanner graph of the code, together with a valid codeword . indicates the erasure location. For this example, all bits in are replaced by 0. (b) shows , the checks and which are only incident to a single location in . The variable nodes in green will be corrected because they have unique neighbors in . (c) shows the code after and are peeled. Peeled portions of the Tanner graph are grayed out.
Algorithm 1 Peeling
Input: Syndrome of an error and an erasure such that .
1: .
2: Compute the weight of all checks and let checks with weight 1.
3: while there exists do
4: Let be the unique element of .
5: if then
6: and flip for all . 7: ; update the weights of the checks in and update . 8: return if , and FAIL otherwise.
where we must demand constraints on the structure of the graph that defines the code . In their seminal work, Sipser & Spielman [SS96] use an -expander graph to define a code . For the moment, this means that the graph has the following property: For erasures whose size is less than , then each element of has unique neighbors on average. Thus if , then every non-empty erasure of at most bits has a unique neighbor. Hence, we are guaranteed to be able to reduce the number of errors by at least 1 in every iteration of peeling.
2.2 Quantum Expander Codes & Small-Set-Peeling
We now move on to the quantum case. Consider a quantum code defined by a graph which specifies a set of parity checks and generators . The parity checks and generators serve to define two classical linear codes and respectively: gives the parity-checks for and gives the parity-checks for . For to be a valid quantum code, we require .
The set of errors in the quantum setting are partitioned into equivalence classes: Two errors are said to be equivalent if they differ by an element of . This changes the nature of the decoding problem for quantum codes relative to the classical setting: We only need to correct errors up to this equivalence, i.e. up to an element of .
The problem of erasure correction is then framed as follows: Consider an erasure . We wish to design a decoder such that, for all errors , the decoder accepts as input the syndrome and the envelope , and finds a correction such that and only differ by an element of .
Quantum Expander Codes. We define quantum expander codes formally in Section 3.4, but for now we give an informal definition.

Figure 2: Quadrant view of the hypergraph product code [TZ13]. Qubits are identified with and , parity checks with , and generators with . Each row is a copy of and each column is a copy of . The support of the generator (purple, dashed) consists of in its column and in its row. The support of the check (blue, dashed) consists of in its row and in its column. When and , the two supports overlap on exactly two qubits, and (pink).
Let be a biregular, bipartite graph over . The quantum expander code will be built out of the Cartesian product of two copies , of . The copies and are defined over and respectively. The set of qubits is labeled and can be partitioned as , where
The -type parity checks and -type generators are associated with and respectively.
This graph product is informally illustrated in Figure 2. The connectivity of is inherited from the connectivity of and . For example, if we consider the subgraph induced by fixing the first component , then the graph induced by vertices is a copy of . In a similar way, fixing the second component yields a copy of .
This graph product defines the sets and , and hence the quantum hypergraph product code .
Expansion (or its lack thereof). Even if is itself a good expander, the graph product is not a very good expander. In particular, there are very small sets with no unique neighbors. To see such an example, recall that the set of generators is identified with . Consider a generator and its support
This set has no unique neighbors. We refer the reader to Figure 3, where we present the local view of , which includes the qubits as well as the parity checks that share support with . Every such parity check satisfies and and overlaps
In principle, and can be different, but we keep our presentation simple.
the support of at exactly 2 points. This ensures that and therefore represents a fundamental feature of quantum expander codes. The failure of the unique-neighborhood property therefore explains the failure of the Peeling decoder: It resolves one qubit at a time, and stalls on the supports of generators.

Figure 3: The local view of a generator when the erasure is exactly (pink). Every parity check in the local view is adjacent to exactly two erased qubits, one in its row and one in its column; this is shown for two checks. Hence has no unique neighbors, and Peeling cannot make progress.
We build up to SSPeeling using two vignettes to intuit how we overcome the failure of the unique-neighborhood property.
Vignette #1. First, we consider a very simple scenario, that of an isolated erasure. It builds on the example of the small set above in Figure 3 which shows that the unique-neighbor property fails for quantum expander codes. As above, let specify a generator and consider an erasure that is only supported on and nowhere else. Let be some error that is supported within . The pair is isolated in that, to correct , we do not need to worry about the interaction of parity checks with errors outside .
We define pair checks to be the checks incident to the erasure on exactly two locations. A pair check in the local view of the generator meets at the qubit and the qubit By themselves, pair checks cannot identify the error: For any value of the syndrome for a pair check , there are two possible errors in their support that are compatible:
where represents addition modulo 2. Once we choose the values for any pair adjacent to a pair check, then the remaining qubits are then fixed. For example, consider the pair check adjacent to . If is assigned a value (either it is decided to be the correction or not), then the which is the qubit in adjacent to the pair check must have the correct assignment to satisfy the syndrome . This determines up to complementing all of : The correction is either or .
To see why having two solutions is not a fundamental obstacle, we refer to how the quantum decoding problem differs from its classical version: As discussed above, a correction need not be identical to the error ; it is valid as long as and are equivalent up to an element of . In this case, belongs to the basis of and both options for are valid corrections.
This motivates why SSPeeling resolves subsets of the support of a single generator at once.
Vignette #2. Consider a general erasure and suppose we apply Peeling until we have removed all the unique neighbors to the erasure . In what remains, if the only types of pair checks that appeared did so inside a generator whose entire support belonged to the erasure, the decoding problem is easy: We would just repeat the argument in Vignette #1. Unfortunately, a general erasure may only partially overlap , so the complement may contain qubits outside . Nevertheless, considering the entire support is an equally valid target for the decoder, as it is equivalent to up to an element of . Motivated by this observation, we add to the erasure, and the support of the generator lies entirely inside the erasure. We refer to Figure 4 to illustrate Vignette #2.


Figure 4: Vignette #2 in the local view of . (a) The erasure only partially overlaps . The checks between and (orange) have weight . The gray checks are incident to at least two erasures. (b) By adding all of to and resolving using its pair checks, we obtain a new, smaller erasure. The white checks now correspond to satisfied checks.
At first glance, this appears like we are going in the wrong direction: We have increased the size of the erasure. However, we can now use the observation from Vignette #1 to address this problem. Let denote the subset of qubits adjacent to pair checks. We fix the value of one of the qubits in arbitrarily. Each pair check in the local view of now determines its second qubit. This one choice then cascades and we resolve all qubits adjacent to pair checks at the cost of potentially introducing new errors into the code in the locations . We therefore must include in the erasure. However, we can subtract qubits in as they are now resolved. In other words, we have exchanged for .
Why is this exchange valid? When we pick a value for a qubit in , we are changing the erasure and the error itself. Let and be the error and the envelope after this process. The new error may differ from the old one up to the support of a stabilizer generator. Therefore, any solution that we obtain for the new problem is equally valid.
When is this exchange worth it? In this step, the erasure gains qubits and loses qubits, so it shrinks as long as . Our main technical lemma (Lemma 15) shows that expansion guarantees the existence of such a generator whenever Peeling stalls.
2.3 Comparison with other erasure decoders
For surface codes, Delfosse and Zémor [DZ20] gave a linear-time maximum-likelihood erasure decoder, which forms the second stage of the UnionFind decoder [DN21]. It relies on the fact that every qubit of the surface code is adjacent to at most two checks of each type, so that qubits can be viewed as the edges of a graph whose vertices are the checks. The decoder computes a
Algorithm 2 SSPeeling-informal
Input: Syndrome s(�cal) and erasure L ⊆ Q.
1: while L is not empty do
2: Run classical Peeling until it is no longer possible to do so. In each iteration of Peeling, grows by one qubit, the qubit q that is peeled.
3: If no unique neighbors of the erasure exist, then find a pair such that and is more than half the support of g.
4: Update L to include : .
5: Find a subset such that the pair checks adjacent to M are satisfied. Add to .
6: return .
spanning forest of the erased edges and peels it from its leaves: The check at a leaf is adjacent to only one erased edge of the forest, so its syndrome bit determines the value of that edge. Each erased edge outside the forest completes a cycle of erased edges, and such a cycle is either a product of generators supported inside the erasure, or a logical operator, in which case no decoder can do better; either way, these edges can be set to 0. In other words, the only obstruction to peeling a surface code is a stabilizer that already lies inside the erasure. This is no longer the case for quantum expander codes, whose qubits are adjacent to or checks of each type.
Several erasure decoders for quantum LDPC codes also use the fact that a generator supported on the erasure allows one qubit to be fixed arbitrarily. Connolly, Londe, Leverrier, Delfosse consider the Pruned Peeling [CLLD22] decoder that fixes a qubit whenever the support of a single generator lies entirely inside the erasure. Pech, Gökduman, Yao, Pfister consider Dual Peeling [PGYP26] which performs row operations on the generator matrix to find products of generators that lie entirely inside the erasure. These generators then complement the constraints coming from the parity checks. In both cases, the stabilizer used must be supported on the erasure, and the erasure itself never grows from one iteration to the next. On the other hand, SSPeeling uses a single generator g whose support may stick out of the erasure.
3 Background & Definitions
Let be a -biregular, bipartite graph over . The quantum code is constructed using the graph , the Cartesian product of and , copies of . The set of qubits, denoted , is a disjoint union where and . With this association, we can write . The X-type parity checks and Z-type generators are associated with and respectively.
The graph inherits connectivity from the input graphs: An element is connected to .
3.1 Expander graphs
Let and , and be a bipartite graph over vertex set that is biregular with left node degree and right node degree .
Definition 3 (Graph neighborhood). For and , let denote the set of edges between and .
For , we denote by the neighborhood of
For , denotes the unique neighborhood of
The definition of neighborhood of is analogous.
Definition 4 (Vertex expander). We say is an left vertex-expander if for all ,
The graph is an right vertex-expander if
The graph is an bidirectional vertex expander if it is an left vertex-expander and right vertex-expander.
The parameter is related to the number of collisions between outgoing edges of , i.e. vertices in where multiple edges from are incident.
We state the following well-known fact; see [SS96].
Fact 5. For non-empty , if then also . Consequently, there exists a variable node such that
A similar claim can be made about if .
3.2 Classical expander codes
Expander codes were introduced by Sipser and Spielman [SS96]. They are built from a good vertex expander, and defined as follows.
Definition 6 (Expander code). Let be a bi-regular bipartite graph over , which is an left-vertex expander. Denote .
The expander code induced by the graph is the subspace such that for every and ,
where is the XOR function.
3.3 Quantum codes
Given a classical code , we let denote its dual. An CSS quantum code on a set of qubits is specified by two classical codes that obey the relation . The codes and form the parity checks for the quantum code. We let and be a fixed basis for and respectively.
The number of encoded qubits K is defined as
The distances and are defined as
The distance of the code is defined as . Throughout the rest of this paper, unless otherwise stated, we use to refer to the design distance, a lower bound on the actual distance as the actual distance is not directly computable.
We identify the set of qubits with the set and vectors with their support . Addition of vectors mod 2 corresponds to the symmetric difference of sets, denoted : For , we have .
For and , and denote the supports of the corresponding basis element.
It turns out that and errors can be corrected separately. As the two cases mirror each other, we will only consider -type errors. The -type parity checks are used to correct them and we shall refer to these as parity checks. In this case, we are interested in the syndromes for the -type parity checks. For an error , we let denote the -type syndrome (unsatisfied -type parity checks):
The Z-type parity checks are not treated as constraints in this view; rather they define , the set of words equivalent to the trivial codeword. We refer to the set of Z-type parity checks as generators.
An erasure is specified by a set . With respect to an erasure , for parity check , and non-negative weights and , we say is a -check if its weight is where the weight is defined as the tuple .
3.4 Quantum Expander Codes
Let be a -biregular bipartite graph over vertex set . Suppose it is an bidirectional vertex-expander, with and such that .
The code is the code defined in Definition 6, where and are associated with bits and parity checks respectively. The code is the code associated with the graph , in which and swap roles: is associated with parity checks and with the bits. Suppose and have distance and respectively. For convenience, we say that () if ().
The hypergraph product code an code where , and distance . For the proof of these facts, we point the reader to the original paper by Tillich and Zémor [TZ13]. We proceed to describe the code construction. Throughout this paper, we will assume .
Definition 7. Let and denote two copies of a -biregular, bipartite graph over the vertex set . The hypergraph product code is constructed from the graph product , where,
-
The set of qubits, denoted , is associated with , where and .
-
The set of stabilizer generators, denoted , is associated with . We shall let denote a generator and write to say is identified with the tuple . The support of the generator is
- The set of stabilizer generators, denoted , is associated with . For and , the support of a parity check is
We refer to Fig. 2 for an illustration.
Throughout, we use Roman letters for and , and Greek letters for and . Thus, generators are Roman tuples like , while parity checks are Greek tuples like .
We note that in this case, the codes and are given by
If we ignore the generators , we get a bipartite graph between the qubits and then -type parity checks (that is, the induced graph of on the vertices ). We denote this graph by .
For a set of qubits , let and .
For clarity, we use different symbols the neighborhood in the classical graph and in the quantum graph . In the classical setting, we use , while in the quantum setting, we use . Formally, we have the following definitions.
Definition 8 (Quantum neighborhood). Let be a graph and be the graph induced by qubits and parity checks . For a qubit , we denote its neighborhood by , defined as follows:
where is the neighborhood in the graph . This naturally extends to a set of qubits: For ,
We shall be interested in two subsets of the neighborhood of a set , the unique neighborhood and pair neighborhood respectively.
Definition 9 (Unique and pair neighbors). Let , and write and . The weight of a check with respect to is the pair . The unique neighbors and pair neighbors of are, respectively,
3.5 Projections of sets
In this section, we introduce some notation for referring to projections of sets on to the component graphs and . This notation will be used for all projections throughout this paper. We refer to Figure 5 for a schematic.

Figure 5: Projections of a set of qubits (pink) in the quadrant view of Fig. 2. The set further projects onto (its rows) and (its columns); the set further projects onto and . A qubit is adjacent to the checks in its row, so lies in the rows and the columns . A qubit is adjacent to the checks in its column, so lies in the columns and the rows . Darker checks are adjacent to two qubits of .
Definition 10 (Projection). Let be the Cartesian product of and , and consider a set of qubits .
For all and all , let , be the projections on to and respectively.
We obtain and as the union of sets
Similarly, for all and , let and denote the projections on to and respectively:
We obtain and as the union of sets
3.6 Local View
In addition to the global view shown in Fig. 5, we will also consider a local view which describes the connectivity of the graph from the point-of-view of a single generator . This is shown in Fig. 6.

Figure 6: The local view of a generator . Rows are indexed by the qubits and columns by the qubits . Qubits in the set are pink. The cells in blue are the pair checks with respect to the set . Orange cells correspond to checks incident to an odd number of qubits of and are the unique neighbors of . Gray cells correspond to checks not incident to .
Observation 11. Let be a generator.
-
Every check adjacent to a qubit of is of the form with and , and it meets in exactly the two qubits and .
-
Consequently, for , the pair neighborhood consists of exactly one check for each pair , and .
Proof. We prove each claim in turn.
-
A qubit is adjacent to the checks with , and a qubit is adjacent to the checks with . In both cases, the check is with and . The support of such a check is , which meets only in , and only in .
-
By Claim 1, a check has weight with respect to if and only if it is the check with and . Distinct pairs give distinct checks, as the check determines and .
This completes the proof.
3.7 Distance
For completeness, we include a statement about the distance . As stated in Section 3.3, we use to refer to a lower bound on the actual distance of the quantum expander code. This distance is guaranteed by the expansion properties of the underlying graphs and .
Lemma 12. Let be a -biregular, bidirectional expander with . Then and . Consequently, the hypergraph product code has distance at least
Proof. Let be the support of a non-zero codeword of , and suppose that . By Fact 5, . A check in is adjacent to exactly one bit of , so it is violated, a contradiction. Hence, as is integer, . The same argument applied to , using right expansion, gives . Finally, the distance of is at least [TZ13].
4 SSPeeling & its analysis
In this section, we present the decoder SSPeeling and prove Theorem 13. Throughout, is the hypergraph product of two copies and of a -biregular, bipartite graph over such that it is a -bidirectional expander , as described in Section 3.4. The decoder is given an erasure and the syndrome of an unknown error . For an erasure , we write for its unique neighbors, the checks of weight or , and for its pair neighbors, the checks of weight .
SSPeeling repeatedly shrinks the erasure while keeping track of an error that is equivalent to and supported inside it. Each iteration makes one of two moves. If the erasure has a unique neighbor , then, as in classical Peeling, the syndrome bit of reveals the value of its only erased qubit, and we remove this qubit from the erasure. Otherwise, we look for a valid pair (Definition 14): A generator , together with a set of erased qubits in its support whose pair neighbors all have weight , and which is larger than the part of outside the erasure. These checks determine the error on up to complementing all of , i.e. up to adding . We resolve this ambiguity arbitrarily, remove from the erasure, and add to it.
The rest of this section is organized as follows. Section 4.2 defines valid pairs and presents the decoder. Section 4.3 proves our main technical lemma: Expansion guarantees that one of the two moves is always available (Lemma 15). Section 4.4 shows that each move shrinks the erasure (Lemma 20) while keeping the error correctable (Lemma 21). Section 4.5 combines these to prove Theorem 13, including the running time. We begin with a formal version of Theorem 1 below.
Theorem 13. Consider a bipartite, -biregular graph on vertex set , where , such that is a -bidirectional expander with .
Furthermore, we assume is unbalanced, or equivalently that . Let be a quantum expander code obtained via the hypergraph product of two copies of . There exists a decoder such that, for all such that , we have the following guarantee. For any -type) error , takes as input the syndrome and the envelope as input, and returns a correction in time such that .
4.1 Valid Pairs
We begin by defining the main ingredient that allows us to overcome the obstacles faced by the classical Peeling decoder. We define a generator and a large subset such that is adjacent to many pair checks within the local view of . Informally, such generators straddle the envelope, i.e. their support sits partially within the envelope. Such a generator and subset will then allow us to find a correction when Peeling exhausts the set of unique neighbors of . When we find such a pair , we replace with , i.e. we swap within for .
Definition 14. With respect to the erasure , a valid pair consists of a generator and a subset such that all of the following conditions hold:
-
has non-trivial support on both sets of qubits, , .
-
The pair neighborhood of is contained in the pair neighborhood of the erasure .
-
is large, .

Figure 7: A valid pair , drawn in the local view of . The set consists of erased qubits (pink). Qubits of that are erased but not in are pale pink, and qubits outside the erasure are white. The checks in the pair neighborhood (orange) all have weight : Each is adjacent to exactly one erased qubit in and one in , and to no other erased qubit. The remaining checks (gray) are not used. Here .
By Observation 11, condition 2 of Definition 14 says that for all pairs and , the qubits and are the only erased qubits in the support of .
Condition 3 is what makes the erasure shrink (Lemma 20). As , we have , and , so condition 3 holds whenever . The valid pairs we construct in Lemma 15 satisfy this stronger condition.
4.2 Decoder
Let be an erasure and be an error in its support. The decoder SSPeeling is given the syndrome and the erasure and tasked with finding a correction such that . The decoder is an iterative decoding algorithm. At its heart is the subroutine Iter, presented in Algorithm 4, which is called every iteration.
Consider the iteration of SSPeeling. The subroutine Iter takes as input an erasure and syndrome and returns three objects, , and .
For the iteration, it then uses as input
Algorithm 3 SSPeeling
Input:
1: .
2: Compute weight of all checks and push them into , an unordered set of checks with weight .
3: for do
4:
5: Update by recomputing the weights of parity checks adjacent to .
6:
7: if then
8:
9: else
10: return FAIL
Algorithm 4 Iter
Input: Syndrome and erasure .
1: .
2: .
3: if there exists a then
4:
5: else if there exists valid pair with respect to then
6:
7: return
Algorithm 4 is stated without data structures, and its test "there exists a valid pair" should not be read as a search over all generators. We return to this in Lemma 23 where we account for the runtime.
The subroutine Fill (Algorithm 5) determines the error on up to complementing all of . By Observation 11, the checks in are in bijection with the pairs in . As each of these checks has weight , its syndrome bit is the parity of the error on the two endpoints of its edge. Once the value at one qubit is chosen, the remaining qubits in automatically fall

Figure 8: Illustrating Fill on the valid pair of Fig. 7. The value of , the first qubit of , is fixed to 0. (1) Each check in the row of has exactly two erased qubits, and some , so its syndrome determines . (2) Each check in the column of , the first qubit of , then determines the corresponding , using the value of found in step (1) via .
into or its complement. Fill uses a fixed pair of qubits and (Fig. 8) to come up with an assignment. The value at is set to 0; this is the arbitrary choice that is paid for by the generator in Lemma 21.
Algorithm 5 Fill
Input: s, and a valid pair
1: Order qubits lexicographically; let be the first qubit of and be the first qubit of .
2: Let be the unique parity check corresponding to and .
3: .
4: for do
5: Let be the unique parity check corresponding to and .
6: if then
7: .
8: for do
9: Let be the unique parity check corresponding to and .
10: if then
11: .
12: return
4.3 Existence & structure of valid pairs
Lemma 15. Suppose and . If and , then either there exists a unique neighbor or there exists a valid pair .
Proof. Let and . Consider the projection of :
Claim 16. If , then there exists a check .
Proof. If , then . Consider the projection of :
Per the assumption, . Thus, by Fact 5, there will exist at least one such that
Let such that . For all , the check belongs to and is incident to only at .
Going forward, suppose is non-empty and, per the assumption, satisfies . Therefore, there exists such that
Let be the subset of induced by :
Let be the projection of on to its first component.
Claim 17. If , then there exists a parity check .
Proof. Suppose . As , there must exist at least one such that . Any element defines a check in . This is because it is incident to the erasure only at .
Going forward, we suppose that is non-empty. It satisfies . Therefore, by Fact 5, there exists such that
Consider the generator and the subset of its support
with and . By Observation 11, consists of the checks with and .
Claim 18. Let , and . Then .
Proof. The qubits of in are with . If such a qubit is erased, then . As is adjacent to , this forces . The qubits of in are with . If such a qubit is erased, then it belongs to as , so . As is adjacent to , this forces .
In words, the checks in interact with the erasure only inside . Next, we consider the -conditions:
(a)
(b)

Figure 9: The -conditions in the proof of Lemma 15, in the local view of , where indexes rows and indexes columns. Checks in the gray rows and columns are ignored. By Claim 18, every check in can only be adjacent to erased qubits in its own row and column. (a) Suppose . (1) The qubit is erased, so each check in its column would have weight unless its row qubit is erased; hence every row in is erased. (2) Each check in the row of some then forces its column qubit to be erased; hence every column in is erased. (b) The resulting set , all of whose pair neighbors have weight .
-
.
-
.
It is illustrated in Fig. 9.
Claim 19. Suppose . Then both -conditions hold.
Proof. By Claim 18, every check with and has weight with and . As , no such check has weight or , so
As , there exists with , and by the definition of . Applying Eq. (29) with gives for all , which is the second -condition. As , we may fix some . Applying Eq. (29) with gives for all , which is the first -condition.
Note that the erased qubit witnessing need not lie in ; the erasures in are instead forced by the assumption .
We conclude the proof. Suppose . By the claim above, . Both and are non-empty, and by Claim 18, every check in has weight . Finally, as ,
which implies condition 3 of Definition 14. Hence is a valid pair.
4.4 Analyzing a single iteration
First, we consider how the erasure itself changes from one iteration to the next.
Lemma 20 (Erasure shrinks). Consider an error and an erasure such that . Let and suppose . Then obeys .
Proof. We consider the size of the erasure in both cases.
Case 1. There exists a unique neighbor of the erasure.
In this case, . By definition, all checks in overlap the erasure in one and only one location, i.e. is a singleton set. Therefore,
Case 2. There are no unique neighbors of the erasure and there exists a valid pair .
By Definition 14, the subset obeys . Therefore,
This completes the proof.
Next, we analyze how the error associated with this erasure evolves. While the following lemma may look dense at first glance, it merely says that our choice for in the iteration is either the error within or the equivalent within .
Lemma 21. Consider an error and an erasure . Let be the syndrome input to Iter. Suppose and suppose . If and , then there exists such that for new error
the error satisfies:
-
The updated envelope contains the new error .
-
The updated syndrome corresponds to the new error .
-
The new error is equivalent to the previous error after correction .
Proof. The heart of the proof is the following claim, which says that the correction agrees with the error on , up to complementing all of .
Claim 22. There exists such that . Furthermore, if .
Proof. Case 1. There exists a unique neighbor .
Then , where is the only erased qubit in . As , we have . By construction, if and only if , so .
Case 2. No unique neighbor exists and there exists a valid pair .
Consider a pair and and let be the unique parity check adjacent to both qubits. By condition 2 of Definition 14 and Observation 11, the qubits and are the only erased qubits in . As , the syndrome of is
Now let and be the qubits chosen in Algorithm 5, let be the parity check incident to both of them, and let . Using Eq. (37) we now analyze qubit-by-qubit as constructed by Algorithm 5 and show its relation to :
-
For , as .
-
Consider and some with unique incident parity check .
- Consider some and with unique incident parity check .
As the correction satisfies , this shows the error must satisfy .
Note that the decoder does not know ; it is only used in the analysis. We now verify the three items using from the claim.
- First consider : In case 2, , and in case 1, . In both cases, using the claim, cannot intersect
Since must be contained in the old erasure and generator , and having established that , the item follows from .
-
By linearity of the syndrome, .
-
, which is either or the support of a generator, and in both cases belongs to .
This completes the proof.
4.5 Proof of Thm. 13
4.5.1 Correctness
First, we show that the algorithm corrects the error in iterations.
Consider such that and an error . Let , and consider the iterations of Algorithm 3. We show by induction on that, as long as , the following hold: (i) , (ii) and , and (iii) . These hold for as .
Suppose they hold for some with . By (i), and . By Lemma 15, either or there exists a valid pair, so returns and the decoder does not output FAIL. Lemma 20 then gives (i) for , and Lemma 21 gives (ii) for together with . Adding this to (iii) for , and using , gives (iii) for .
By (i), the loop terminates after some iterations with . By (ii), , and by (iii), the output satisfies .
4.5.2 Time complexity
We assume that the erasure is given as a list and the syndrome as the list of its unsatisfied checks. As , every unsatisfied check is adjacent to , so this list has size at most .
Lemma 23. SSPeeling can be implemented in time.
Proof. The implementation maintains the following data, where refers to the current erasure:
-
For every check adjacent to , its weight and its current syndrome bit.
-
A queue containing the checks of weight or .
-
A queue of generators to be examined, containing every generator whose local view has changed since it was last examined.
Initialization. Every check adjacent to is one of the at most checks adjacent to some qubit of , and its weight and syndrome bit are computed in time. is initialized with the generators whose support meets , of which there are at most .
Finding a move. If is non-empty, we pop a check and, if it still has weight or , perform a peeling step. Otherwise, we pop generators from until one of them is part of a valid pair. For a popped generator , deciding whether there exists such that is a valid pair takes time by examining every subset of . A generator that fails this test is discarded.
Total. Initialization pushes at most generators. An iteration changes the erasure on at most qubits, hence the weights of at most checks, and pushes at most generators. By Lemma 20, there are at most iterations, so the total number of pushes is . Each pop removes an element that was pushed earlier, so the total number of pops, summed over all iterations, is also , even though a single search may take longer. The same argument applies to . Finally, if and has no check of weight or , then by Lemma 15 some generator is part of a valid pair, and by the invariant it is in . Hence a search never empties the queue without finding a move, and the total running time is .
4.6 Proof of Corollary 2
The work of [KLNW24] proved the following result:
Theorem 24. Let be an hypergraph product code constructed from -biregular bipartite graph that is a bidirectional expander such that .
Let be a (reduced) error pattern with weight at most
where , and let be the syndrome arising from . There exists an algorithm SSFind such that, given , runs in time , and returns an envelope , so that , and
Given , SSFind returns an envelope in time , and
As , Theorem 13 applies to the pair : SSPeeling returns with in time . As depends only on and , the total running time is .
References
[BBB 23] Sara Bartolucci, Patrick Birchall, Hector Bombin, Hugo Cable, Chris Dawson, Mercedes Gimeno-Segovia, Eric Johnston, Konrad Kieling, Naomi Nickerson, Mihir Pant, et al. Fusion-based quantum computation. Nature Communications, 14(1):912, 2023.
[BCG 24] Sergey Bravyi, Andrew W Cross, Jay M Gambetta, Dmitri Maslov, Patrick Rall, and Theodore J Yoder. High-threshold and low-overhead fault-tolerant quantum memory. Nature, 627(8005):778–782, 2024.
[CLLD22] Nicholas Connolly, Vivien Londe, Anthony Leverrier, and Nicolas Delfosse. Fast erasure decoder for a class of quantum LDPC codes. arXiv preprint arXiv:2208.01002, 2022.
[DH21] Nicolas Delfosse and Matthew B Hastings. Union-find decoders for homological product codes. Quantum, 5:406, 2021.
[DHLV22] Irit Dinur, Min-Hsiu Hsieh, Ting-Chun Lin, and Thomas Vidick. Good quantum LDPC codes with linear time decoders. arXiv preprint arXiv:2206.07750, 2022.
[DLB22] Nicolas Delfosse, Vivien Londe, and Michael E Beverland. Toward a union-find decoder for quantum LDPC codes. IEEE Transactions on Information Theory, 68(5):3187–3199, 2022.
[DN21] Nicolas Delfosse and Naomi H Nickerson. Almost-linear time decoding algorithm for topological codes. Quantum, 5:595, 2021.
[DZ20] Nicolas Delfosse and Gilles Zémor. Linear-time maximum likelihood decoding of surface codes over the quantum erasure channel. Physical Review Research, 2(3):033042, 2020.
[FGL18] Omar Fawzi, Antoine Grospellier, and Anthony Leverrier. Efficient decoding of random errors for quantum expander codes. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, pages 521–534, 2018.
[FGL20] Omar Fawzi, Antoine Grospellier, and Anthony Leverrier. Constant overhead quantum fault tolerance with quantum expander codes. Communications of the ACM, 64(1):106–114, 2020.
[GBP97] Markus Grassl, Thomas Beth, and Thomas Pellizzari. Codes for the quantum erasure channel. Physical Review A, 56(1):33, 1997.
[GPT22] Shouzhen Gu, Christopher A Pattison, and Eugene Tang. An efficient decoder for a linear distance quantum LDPC code. arXiv preprint arXiv:2206.06557, 2022.
[GYP24] Mert Gökduman, Hanwen Yao, and Henry D Pfister. Erasure decoding for quantum LDPC codes via belief propagation with guided decimation. arXiv preprint arXiv:2411.08177, 2024.
[KCB23] Mingyu Kang, Wesley C Campbell, and Kenneth R Brown. Quantum error correction with metastable states of trapped ions using erasure conversion. PRX Quantum, 4(2):020358, 2023.
[KHV 23] Aleksander Kubica, Arbel Haim, Yotam Vaknin, Harry Levine, Fernando Brandão, and Alex Retzker. Erasure qubits: Overcoming the limit in superconducting circuits. Physical Review X, 13(4):041022, 2023.
[KLNW24] Anirudh Krishna, Inbal Livni Navon, and Mary Wootters. Viderman's algorithm for quantum LDPC codes. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2481–2507. SIAM, 2024.
[KP13] Alexey A Kovalev and Leonid P Pryadko. Quantum kronecker sum-product low-density parity-check codes with finite rate. Physical Review A—Atomic, Molecular, and Optical Physics, 88(1):012311, 2013.
[LH22] Ting-Chun Lin and Min-Hsiu Hsieh. Good quantum LDPC codes with linear time decoder from lossless expanders. arXiv preprint arXiv:2203.03581, 2022.
[LOM+26] Jong Yeon Lee, Koki Okada, Nishad Maskara, Kenta Kasai, and Hengyun Zhou. Design principles for ultra-high-rate quantum codes. arXiv preprint arXiv:2609.30069, 2026.
[LTZ15] Anthony Leverrier, Jean-Pierre Tillich, and Gilles Zémor. Quantum expander codes. In 2015 IEEE 56th Annual Symposium on Foundations of Computer Science, pages 810–824. IEEE, 2015.
[LZ23] Anthony Leverrier and Gilles Zémor. Decoding quantum Tanner codes. IEEE Transactions on Information Theory, 2023.
[Ost26] Dimiter Ostrev. The find rows and columns and decode algorithm for quantum expander codes. arXiv preprint arXiv:2608.27211, 2026.
[PGYP26] Giulio Pech, Mert Gökduman, Hanwen Yao, and Henry D Pfister. Stabilizer-assisted inactivation decoding of quantum error-correcting codes with erasures. arXiv preprint arXiv:2601.14236, 2026.
[PK21] Pavel Panteleev and Gleb Kalachev. Degenerate Quantum LDPC Codes With Good Finite Length Performance. Quantum, 5:585, November 2021. arXiv: 1904.02703.
[PVB+25] Jefrin Sharmitha Prabhu, Abhinav Vaishya, Shobhit Bhatnagar, Aryaman Manish Kolhe, V Lalitha, and P Vijay Kumar. On the efficacy of the peeling decoder for the quantum expander code. In 2025 IEEE International Symposium on Information Theory (ISIT), pages 1–6. IEEE, 2025.
[SS96] Michael Sipser and Daniel A Spielman. Expander codes. IEEE transactions on Information Theory, 42(6):1710–1722, 1996.
[Ter15] Barbara M Terhal. Quantum error correction for quantum memories. Reviews of Modern Physics, 87(2):307, 2015.
[TZ13] Jean-Pierre Tillich and Gilles Zémor. 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.
[Vid13] Michael Viderman. Linear-time decoding of regular expander codes. ACM Transactions on Computation Theory (TOCT), 5(3):1–25, 2013.
[WKPT22] Yue Wu, Shimon Kolkowitz, Shruti Puri, and Jeff D Thompson. Erasure conversion for fault-tolerant quantum computing in alkaline earth rydberg atom arrays. Nature communications, 13(1):4657, 2022.
[XBAP+24] Qian Xu, J Pablo Bonilla Ataides, Christopher A Pattison, Nithin Raveendran, Dolev Bluvstein, Jonathan Wurtz, Bane Vasić, Mikhail D Lukin, Liang Jiang, and Hengyun Zhou. Constant-overhead fault-tolerant quantum computation with reconfigurable atom arrays. Nature Physics, 20(7):1084–1090, 2024.