{'fraction_non_alphanumeric': 0.03767533356140951, 'fraction_numerical': 0.011311152925076976, 'mean_word_length': 4.55055779729409, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the logical error rate of sparse quantum codes

The quantum paradigm presents a phenomenon known as degeneracy that should improve the performance of quantum error correcting codes. However, the effects of this mechanism are sometimes ignored when evaluating the performance of sparse quantum codes and the logical error rate is not always correctly reported. In this paper, we discuss previously existing methods to compute the logical error rate and we present an efficient coset-based method inspired by classical coding strategies to estimate degenerate errors. Additionally, we show that the proposed method presents a computational advantage for the family of Calderbank-Shor-Steane codes. We use this method to prove that degenerate errors are frequent in a specific family of sparse quantum codes, which stresses the importance of accurately reporting their performance. Our results also reveal that the modified decoding strategies proposed in the literature are an important tool to improve the performance of sparse quantum codes.


I. INTRODUCTION
When quantum stabilizer codes built from sparse classical codes are employed in the quantum paradigm, they are impacted by a phenomenon known as degeneracy [1][2][3][4], which has no classical equivalent. This causes stabilizer codes to exhibit a particular coset structure in which multiple different error patterns act identically on the transmitted information [5][6][7]. The manifestation of degeneracy in the design of sparse quantum codes and its effects on the decoding process has been studied extensively [3,4,[8][9][10][11][12][13][14]. Unfortunately, although degeneracy may potentially improve performance, limited research exists on how to quantify the true impact that this phenomenon has on Quantum Low Density Parity Check (QLDPC) codes. This has resulted in the performance of QLDPC codes being assessed differently throughout the literature; while some research considers the effects of degeneracy by computing the metric known as the logical error rate [3,[15][16][17][18][19][20], other works employ the classical strategy of computing the physical error rate [21][22][23][24][25][26], a metric which provides an upper bound on the logical error rate of these codes since it ignores degeneracy. In the context of degenerate quantum codes, the discrepancy between results computed based on the physical error rate and the logical error rate can become significant. QLDPC codes (also commonly referred to as sparse quantum codes) are famous for their degenerate nature [3,4,12,14,27,28], which makes it important to accurately asses their performance using the logical error rate.
The logical error rate is a well-known metric and has been widely employed to assess the performance of other families of Quantum Error Correction (QEC) codes such as Quantum Turbo Codes (QTC) and quantum topolog-ical codes [10,[35][36][37][38]. For these particular error correction schemes, the decoders that are employed are sometimes capable of distinguishing between error equivalence classes (they can account for some aspects of degeneracy), which makes it easy to compute the logical error rate. In contrast, the classical decoding algorithms [39,40] that are used to decode sparse quantum codes are unable to account for the presence of degenerate error operators, and so their logical error rate must be computed differently.
Given the coset structure of sparse quantum codes, intuition would point towards approaching the issue of calculating the logical error rate by finding and comparing the stabilizer cosets of the estimated error sequences and the stabilizer cosets of the channel errors. Unfortunately, the task of computing stabilizer cosets has been shown to be computationally hard [4,12,24], which is the reason why the performance of some sparse quantum codes [21][22][23][24][25][26] has been assessed based on the physical error rate. This metric is computed by comparing the error sequence estimated by the decoder,Ê ∈ G , to the channel error, E ∈ G , where G denotes the -fold effective Pauli group. Essentially, if the estimation matches the channel error, the decoder has been successful, and if not, a decoding failure has occurred. Note, however, that because this metric ignores the degenerate nature of stabilizer codes, the physical error rate overestimates the number of decoding failures and actually represents an upper bound on the performance of stabilizer codes.
Despite the use of the physical error rate in some works, other literature has successfully computed the logical error rate of specific sparse quantum codes [3,[15][16][17][18][19][20]. These works succeed in computing the logical error rate because they do not approach the issue from the perspective of stabilizer cosets. Instead, in most of these works [3,[15][16][17][18], Gaussian elimination is used to obtain the parity check matrix of the code in what is known as standard form [8,41,42], and then this matrix is used to extract a basis for the encoded Pauli operators of the corresponding codes. Then, this basis can be employed to distinguish between degenerate errors and logical errors. Additionally, other research [20] employs a different, albeit much more computationally demanding, method to compute the logical error rate.
Against this backdrop, in this article we document the methods that have previously been used in the literature to compute the logical error rate of sparse quantum codes. In addition, we introduce our own group theoretic strategy to accurately assess the effects of degeneracy on sparse quantum codes and compute their logical error rate. We also show how for sparse CSS quantum codes the method we propose herein has a computational complexity advantage over those that have been employed previously. Following this, we use our strategy to analyze the frequency with which degenerate errors occur when using a specific family of sparse quantum codes and we provide insight on how the design and decoding of these codes can be improved.

II. DEGENERACY AND STABILIZER CODES
Throughout this paper we assume that the reader is familiar with basic Quantum Error Correction (QEC) concepts based on physical two-level systems (qubits) such as stabilizer codes, their coset structure, and the different types of possible errors. This section is meant as an introduction to the notation we will use (that of [14]) and to provide a brief summary of some of the ideas of [14]. For a complete overview on these preliminaries refer to [14,27,29].

A. Coset structure of the Pauli Group
The coherence loss suffered by quantum information over time can be approximated as the action of operators that belong to the Pauli Group on the qubits that store this information. In most cases, the action of these operators is modelled by means of an abstraction known as the Pauli channel. For single qubit quantum states, the Pauli channel will act on said states by combining them with an element of the single-qubit Pauli group G 1 = (Π, ×). The setΠ is given bỹ where Θ = {±1, ± }, { , , } are the Pauli matrices, is the 2 × 2 identity matrix, and = 1, 2, 3, 4. The group operation × represents the well-known product of Pauli matrices, which is written as where represents the Kronecker delta and In (1) we have denoted the Pauli matrix as 1 , the Pauli matrix as 2 , and the Pauli matrix as 3 .
We can generalize the single qubit Pauli group so that it can be applied to -qubit quantum states based on the tensor product. The -qubit Pauli group is by G = (Π ⊗ , ·). The setΠ ⊗ is given bỹ = {±1, ± }, and ⊗ denotes the tensor product. For all A, B ∈ G , the group operation · is defined as Because it makes good physical sense to neglect the global phase of Pauli operators [32], i.e, disregard the overall factors {±1, ± }, it is typical in the field of QEC to work with a reduced version of the Pauli Group known as the effective Pauli Group. The -qubit effective Pauli group is denoted by G = (Π ⊗ , ★), where and ★ behaves as in (2) but with the operation between single Pauli operator products defined not as in (1) but as where is the same as in (1). Thus, against this backdrop, efficient QEC strategies for general Pauli channels are defined as those methods that are capable of reverting the action of elements that belong to the effective Pauli group. It is important to note, however, that G is abelian whereas G is not, which means that the commutation relations that exist between Pauli operators (see equation (2)) are lost between effective Pauli operators (see equation (3)). Given the importance of these commutation relations for the purposes of error correction [14,29,30], it is important that they be recovered. For this purpose we define the symplectic map : Π ⊗ → F 2 2 , which is an isomorphism between the group G = (Π ⊗ , ★) and the group (F 2 2 , ⊕) of 2 binary-tuples under the mod 2 sum operation. For clarity, throughout the remainder of this paper, lower case boldface romans without a subscript will be used to denote 2 binary-tuples that belong to F 2 2 , and lower case boldface romans with a subscript will be used to denote binary-tuples that belong to F 2 . The symplectic mapping is defined ∀A ∈ G as where the values of the entries of a and a at position = 1, . . . , , are directly dependent on the single qubit Pauli operator, [A] , located at the -th position in the tensor product that makes up A ∈ G .
Note that the commutation properties of the Pauli operators with regard to the · product are not recovered by just defining the isomorphism (after all, (F 2 2 , ⊕) is also an abelian group). Thus, we define the symplectic product, where is the standard mod 2 inner product defined on (F 2 , ⊕) considered as a vector space over the field F 2 . The symplectic product tells us if any two operators A, B in G will either commute or anticommute with regard to the group operation · in G , if and only if the symplectic product between (A) = a and (B) = b, i.e., a b, takes the value 0 or 1, respectively [31,32].

B. Stabilizer Codes
Stabilizer codes are a widely extended family of QEC codes. They are constructed based on a set of generators that define the so-called stabilizer group S ⊂ G . The stabilizer generators are a set of operators {S } − =1 that belong to G and whose sympletic representatives commute with regard to the symplectic product. This means that the stabilizer is comprised of elements of the effective Pauli group that commute amongst themselves with regard to · in G . The stabilizer S has 2 − distinct elements and is completely represented by its − independent generators (the rest of the stabilizer elements are combinations of the elements of the minimal set). The codespace defined by the stabilizer, and hence a stabilizer code, can be described mathematically as is the evolution of state | under stabilizer generator S . Note that C(S) is the subspace of H ⊗ 2 formed by the simultaneous +1-eigenspaces of all the operators in the stabilizer group S. Here H ⊗ 2 denotes the complex Hilbert space of dimension 2 that comprises the state space of -qubit systems.
It is also possible for elements of G to commute with regard to the symplectic product with the elements of S but not to belong to S. These elements are important because they act non-trivially on encoded quantum states (they corrupt the encoded quantum information but map the codespace to itself). Together with the elements of S, these operators define the group Z(S) ⊂ G known as the effective centralizer. This group is the set of all operators in G whose symplectic representatives commute with regard to the symplectic product with all the symplectic representatives of the stabilizer generators (S ) ∈ F 2 2 . Based on the relationship between the stabilizer and the effective centralizer, the effective centralizer can actually be understood as a union of stabilizer cosets. More specifically, Z(S) can be partitioned into 2 2 cosets of S, each of these cosets being indexed by a coset representative {L } 2 2 =1 ∈ Z(S). Throughout this paper, we will refer to these representatives as logical operators. Whenever a representative L is multiplied in terms of the group operation over the effective Pauli group, the ★ product, by all the elements of S, the stabilizer coset, L ★ S, is obtained. This can be written as Based on our definition of the effective centralizer, it is easy to see that the group G also has a coset structure [14]. Knowing that |G | = 2 2 and that |Z(S)/S| = 2 + , then we can partition the effective Pauli group into cosets of the effective centralizer as Equation (7) shows how G can be partitioned into 2 − cosets of the effective centralizer, each of these centralizer cosets being indexed by a coset representative 1 {T } 2 − =1 , which when multiplied in terms of the ★ product by all the elements of Z(S) yields the specific coset in question, T ★ Z(S). Finally, we can combine the partitions of (6) and (7), respectively, to partition the entire effective Pauli space into cosets of the stabilizer, each one indexed by a unique ★ product of the {L } 2 2 =2 and {T } 2 − =1 representatives. This can be written as 1 These coset representatives are commonly referred to as pure error operators in the literature.

C. Quantum Syndromes
In order to operate properly, QEC strategies require information regarding the transmitted quantum state. Although the axioms of quantum mechanics establish that direct measurement of a quantum state will result in information loss, quantum error syndrome measurements (Hadamard Test) can be used to measure quantum states indirectly in order to obtain sufficient information for quantum codes to operate [29,31,33]. A quantum syndrome w ∈ F − 2 captures the commutation properties of any error sequence E ∈ G induced by the Pauli channel with regard to the stabilizer generators {S } − =1 of the code. This can be written as where e = (E) and {s } − =1 = { (S )} − =1 , respectively. From (9) we can discern that the syndrome is a length − binary vector whose components express the commutation relations with regard to the · product between E and each of the generators of the stabilizer code. In other words, the entries of w will be 0 if the specific error operator and stabilizer generator commute and 1 if they do not. Recall that the elements of Z(S) commute with the stabilizer generators, which means that all the elements of the same effective centralizer coset will be associated to the same syndrome. For instance, if a given error pattern E is associated to syndrome w 1 , all the effective Pauli sequences that belong to E ★ Z(S) will also be associated to syndrome w 1 . Thus, the information provided by the syndrome w can be used to locate the centralizer coset T ★ Z(S) of a given error operator E, where = 1, . . . , 2 − . Note, however, that we have no information regarding which stabilizer coset the error operator belongs to. The syndrome locates the centralizer coset that contains the error sequence that has taken place, but because all the elements of this coset are associated to the same syndrome, there is no way of knowing which specific stabilizer coset (T ★ L ) ★ S contains the error sequence, where = 1, . . . , 2 2 . As mentioned previously, knowing which particular stabilizer coset contains the error that has taken place is important, since operators that belong to different stabilizer cosets act non-trivially on the encoded quantum information.

D. Estimation and end-to-end errors
The effective Pauli operators induced by quantum channels and estimated by decoders can be classified into three different groups (summarized in Table I). Consider a channel error E ∈ T ★ L ★ S and an estimated error sequenceÊ ∈T ★L ★ S, then the following situations can be encountered: • End-to-end errors with different syndromes: These events occur when the error sequence estimated by the decoder and the real error sequence belong to different centralizer cosets, i.e., T ≠T . Equipped with an ideal decoder, such scenarios would not exist, as the syndrome of the estimated error patternÊ should always match the measured syndrome associated to the channel error E. However, because sparse quantum codes are generally decoded based on the sub-optimal classical SPA algorithm 2 , these errors can take place with varying probability [3,14,20,34].
• End-to-end identical syndrome errors: These events take place when the estimated error sequence and the channel error both belong to the same centralizer coset, T =T , but each of them belongs to a different stabilizer coset, i.e., L ≠L (the channel logical operator and estimated logical operator do not match). Thus, althoughÊ and E exhibit identical commutation properties with respect to the stabilizer generators, they will each act on the transmitted codeword in a distinct nontrivial manner and the decoder will fail. It should be noted that in the literature this type of end-toend error is generally referred to as a logical error.
• End-to-end degenerate errors: These events take place when the estimated error pattern and the channel error both belong to the same stabilizer coset, T =T and L =L , but they do not match, i.e.,Ê ≠ E. Since the estimated error belongs to the same stabilizer coset as the channel error, it will act identically on the quantum codeword, which means that it will not actually result in a decoding failure and should not be considered as such.

III. PERFORMANCE ASSESSMENT METRICS
The manifestation of the degeneracy phenomenon in the realm of quantum error correction makes it impossible to accurately predict the performance of QEC codes with methods that disregard its presence. Thus, in the paradigm of sparse quantum codes, which are famous for their degenerate nature, appropriate performance assessment is of paramount importance. This can be achieved using the logical error rate, which accurately predicts the performance of quantum codes and distinguishes between the different types of end-to-end errors (see table I). TABLE I: Characteristics of the different types of end-to-end errors that can arise when using stabilizer codes. The hat notation is used to represent estimations made by the decoder, i.e.,ŵ,Ê,T , andL represent the estimated syndrome, estimated error sequence, centralizer coset representative of the estimated error sequence and stabilizer coset representative of the estimated error sequence, respectively.
Prior to discussing how to compute the logical error rate, it should be mentioned that the concept of undetected errors is not exclusive to the quantum paradigm. In fact, even though degeneracy does not exist in the classical coding framework, undetected or logical errors in classical LDPC codes and classical turbo codes have previously been studied. This idea was introduced by the early work of MacKay et al. [43], where a classical undetected error is defined as a decoding estimate that is not equal to the original error sequence and that is produced when the decoder exits before the maximum number of decoding iterations (it produces a valid syndrome). In their analysis of classical LDPC codes, MacKay et al. showed that all of the decoding mistakes they encountered were detected errors (classical undetected errors were only observed in turbo codes). This was also shown in [17] for a slightly different decoding algorithm. Similar outcomes were observed in the quantum paradigm for the failed recoveries of the modified decoding strategies of [3,24]. These techniques serve to improve standard SPA decoding of quantum codes by post-processing the initial error estimates and producing new estimates of the channel error. If these new estimates do not revert the channel error, then they are referred to as failed recoveries or failed error corrections. In [3], all of the failed error corrections were shown to be end-to-end errors with different syndromes, whereas in [24] a small percentage of failed estimates were shown to be end-to-end identical syndrome errors and end-to-end degenerate errors 3 .
Aside from these failed recovery analyses, the literature is limited when it comes to assessing the percentage of decoding failures that is caused by each type of end-toend error. It is reasonable to believe that QLDPC codes, given their large number of degenerate operators [3,4,3 The authors of this work do not distinguish between end-to-end identical syndrome errors and end-to-end degenerate errors.
12, 14, 27, 28], will experience a large percentage of endto-end degenerate errors. We confirm this intuition in the final section of our work, where we show how up to 30% of the end-to-end errors that take place when using the QLDPC codes of [21,22,26] are degenerate.

A. Discriminating between different types of end-to-end errors
It is clear from the defining characteristics of each specific type of end-to-end error (see table I), that end-toend errors with different syndromes are the easiest type of error to identify. In fact, doing so is trivial, as all that is required is a comparison of the syndrome estimate,ŵ ∈ F − 2 , and the measured syndrome, w ∈ F − 2 , where and represent the number of logical qubits and physical qubits (blocklength) of the quantum code, respectively. Similarly, knowing that either an end-toend identical syndrome error or an end-to-end degenerate error has occurred is simple. This can be done by comparing the estimate of the error sequenceÊ to the channel error E wheneverŵ = w, i.e., ifÊ ≠ E either an end-toend degenerate error or an identical syndrome error has occurred, and ifÊ = E, no error has taken place. The issue arises when trying to distinguish between these two families of end-to-end errors. Notice that the comparison E ≠ E does not reveal if the error estimate belongs to the same stabilizer coset as the channel error. Hence, we have no way of discriminating between end-to-end degenerate errors and end-to-end identical syndrome errors.
Conceptually, the simplest and most straightforward strategy that comes to mind to resolve this problem is to compute the stabilizer of the code in question, compute the ★ product of the stabilizer with the channel error E to extract the specific stabilizer coset of the channel error, and then check ifÊ belongs to this coset. As mentioned in [14], this works because the coset representative choice for the coset (T ★L )★S is irrelevant (any operator belonging to the coset serves as a valid representative), where {T , L } ∈ G , and S ⊂ G , represent the effective centralizer coset representative, the stabilizer coset representative, and the stabilizer itself. Thus, computing E ★ S will yield the stabilizer coset of the channel error, i.e., E★S = (T ★L ) ★S. Therefore, wheneverŵ = w and E ≠ E, we will know that an end-to-end degenerate error has occurred if the estimated error sequenceÊ is in the coset E ★ S. If this does not occur, then an end-to-end identical syndrome error will have taken place.
Unfortunately, since extracting the stabilizer of a quantum code becomes increasingly complex as its blocklength increases, this strategy will only be applicable to short quantum codes. The number of elements in the stabilizer of a quantum code with blocklength and rate is given by 2 − = 2 (1− ) [14], which grows exponentially with and can rapidly become intractable on a classical machine as this parameter increases. In light of this, it is apparent that more practical methods to differentiate between end-to-end degenerate errors and endto-end identical syndrome errors are necessary. Both the strategy we propose herein and that employed in [3,[15][16][17][18], which are explained in the next two sections, resolve this issue.
B. An algebraic perspective on end-to-end degenerate errors The problem of differentiating between end-to-end identical syndrome errors and end-to-end degenerate errors can also be formulated as a set of linear equations. The Parity Check Matrix (PCM) of a stabilizer code that encodes logical qubits into physical qubits (a rate = code with blocklength ) can be written as where h = s denotes the symplectic representation of the generators {S } − =1 ∈ G that define the stabilizer group S. Each of the elements of S is a linear combination of the − generators, hence, if S is an element of the stabilizer and s is the symplectic representation of this stabilizer element, then where a = (a 1 , . . . , a − ) is a unique binary vector. Whenever a channel error E takes place, the decoder will compute an estimate of this error and produce an estimate of the syndrome associated to it. As discussed previously, this syndrome only determines which specific effective centralizer coset the channel error belongs to. In other words, the syndrome provides the effective centralizer coset representative T (known as the pure error component in the literature) of the channel error. Assuming that an end-to-end error with different syndrome does not occur, the estimated syndrome will match the measured syndrome, hence the centralizer coset representative of the estimated error sequence and the centralizer coset representative of the channel error will also be the same, i.e., T =T . Thus, if we compute the ★ operation of the channel error E and the estimated errorÊ, which can also be understood as the mod2 sum of their symplectic representations over F 2 2 : (E) ⊕ (Ê) = e ⊕ê, where denotes the symplectic map, the sequence E will be shifted to the effective centralizer Z(S). Note that we can also write this using the symplectic map as E ★Ê ∈ Z(S) → (E) ⊕ (Ê) ∈ (Z(S)) = e ⊕ê ∈ Γ , where Γ ⊂ F 2 2 denotes the equivalent group of the effective centralizer over F 2 2 . Based on this, the issue of determining whether an end-to-end error is degenerate can be understood as finding out if E ★Ê belongs to the stabilizer. This can be formulated based on the symplectic map into the following question: Essentially, if a set of coefficients a exists such that the above equation holds, i.e., if e ⊕ê ∈ F 2 2 is a linear combination of the symplectic representation of the stabilizer generators, then E ★Ê belongs to the stabilizer and an end-to-end degenerate error will have occurred. If such a set of coefficients does not exist, then and end-to-end identical syndrome error has taken place.
The expression shown in (12) defines a linear system of equations over the binary field. An answer to this question can be found by writing the augmented matrix [H S |(e ⊕ê) ] in its row-echelon form. This means that, based on this procedure, it is possible to determine the type of end-to-end errors that occur and subsequently compute the logical error rate. This is done in [20]. However, although the procedure is conceptually simple, rewriting the augmented matrix in such a manner becomes increasingly computationally complex as matrices grow in size. Unfortunately, for sparse quantum codes to be good, the blocklength must be large, which implies that the PCMs of these codes will also be large 4 . Furthermore, the row-echelon form of the matrix [H S |(e ⊕ê) ] must be computed during every simulation iteration (whenever the estimated syndrome and the measured syndrome match) to determine what type of end-to-end error has taken place, which may significantly increase simulation time. For these reasons, calculating the logical error rate based on this procedure can become a cumbersome and lengthy endeavour. Therefore, the task at hand is to find a more practical and less computationally demanding way to determine if the congruence equation system given in (12) has a solution, as this suffices to determine if the end-to-end error is degenerate (we do not actually need to solve the system itself).

Classical coding-inspired strategy
It is possible to find an answer to (12) by casting the problem in the framework of classical linear block codes. In classical coding theory, the encoding matrix or generator matrix G of a binary linear block code and its corresponding parity check matrix H fulfil (G H ) mod 2 = (H G ) mod 2 = 0. This means that the parity check matrix defines a basis for the nullspace of the generator matrix and viceversa. In the classical scenario, having a basis for the nullspace of a code enables us to determine whether the decoding outcome x belongs to the code by simply computing its product with the parity check matrix of the code, i.e., if (H x ) mod 2 = 0 then x is a codeword. Essentially, whenever (H x ) mod 2 = 0, the decoding outcome is a linear combination of the rows of the generator matrix G and it belongs to the code, and whenever (H x ) mod 2 ≠ 0, x does not belong to the code.
Notice that, based on this formulation, the quandary posed in (12) is reminiscent of the classical decoding scenario. The main difference is that instead of determining if the decoding outcome belongs to the code, we must discover if the sum of the symplectic representations of the channel error and the estimated error belong to the stabilizer. This parallelism between the classical and quantum problems allows us to apply the classical resolution strategy to the quantum paradigm with only a slight caveat: answering (12) requires an inverse approach to the classical method. Since the generators of the stabilizer code are given by the rows of the parity check matrix H S , the corresponding kernel generator matrix 5 G S (instead of the parity check matrix like in the classical paradigm) must be used to discover if e ⊕ê can be written as a linear combination of the stabilizer generators. The matrix G S defines a basis for the nullspace of the stabilizer code, hence it will suffice to compute [G S (e ⊕ê) ] mod 2 to find the answer to (12). If [G S (e ⊕ê) ] mod 2 = 0, E ★Ê ∈ S which means that an end-to-end degenerate error has occurred, and if [G S (e ⊕ê) ] mod 2 ≠ 0, E ★Ê ∉ S, and an end-to-end identical syndrome error will have taken place.
This strategy provides us with a simple and computationally efficient method to determine the type of end-toend error that has taken place. The only requirement is obtaining the matrix G S , which can be computed once (by finding a basis for the nullspace of its parity check matrix H S ) and can then be stored offline for any stabilizer code. In this manner, we have designed a simple method to solve (12) that does not require the computation of the stabilizer and so avoids the complexity issues that this entails.

C.
Detecting end-to-end degenerate errors using encoded Pauli operators There is another manner of distinguishing between end-to-end identical syndrome errors and end-to-end degenerate errors. It involves obtaining the encoded Pauli operators 6 of a code following a method derived by Gottesman in his seminal work [8], and then using these operators to determine whether the error estimate produced by the decoder is in the stabilizer coset of the channel error (end-to-end degenerate errors occur when this happens and end-to-end identical syndrome errors occur when it does not). This strategy was first applied to QLDPC codes in [3], and has since been used in [15][16][17][18].
The encoded Pauli operators of an -qubit stabilizer code are defined as those operators in G that commute with the elements of the stabilizer group and whose action on an encoded state can be understood as an , , or operation on each of the encoded logical qubits. Each stabilizer code has 2 encoded Pauli operators 7 which are generally represented using the notation and , where { , } ∈ {1, . . . , }. In this manner, represents an operator in G whose action is analogous to performing a operation (phase flip) on the -th logical qubit. Thus ∈ G maps to ∈ G , where denotes the action of a operator on the -th qubit and the action of operators on the remaining qubits (identity operators are omitted). Recall that, since the global phase can be ignored, it will be equivalent for the purpose of error correction to consider the equivalent encoded Pauli operators over the effective -fold Pauli group, ≡ Z and ≡ X , where Z , X ∈ G (we use capital boldface to preserve the notation of [14].) 6 In the literature, these operators are referred to as logical operators. However, we use the term encoded Pauli operators to distinguish them from the stabilizer coset representatives {L } 2 2

=1
which we originally defined as logical operators. 7 Given the difference in the number of stabilizer coset representatives (logical operators) {L } 2 2 =1 and encoded Pauli operators, it is useful to employ different terminology for these concepts (even though encoded Pauli operators are related to logical operators and vice-versa).
Based on this definition of the encoded Pauli operators, we know that an encoded Pauli operator Z commutes with all the elements of S as well as with all other encoded Pauli operators except for the operator X when = . This means that, if the encoded Pauli operators of a stabilizer code are known, we can determine if an operator A ∈ Z(S) ⊂ G belongs to S by checking the commutation relations of A with the encoded Pauli operators. If A commutes with all the encoded Pauli operators it is within the stabilizer and if it does not (it anti commutes with one encoded Pauli operator) it is not in the stabilizer. Against this backdrop, it is easy to see how this strategy can be applied to solve the issue of discriminating between end-to-end identical syndrome errors and end-to-end degenerate errors. After successful decoding (the decoder produces a matching estimate of the syndrome), we know that E ★Ê ∈ Z(S). Now, we determine if E ★Ê is in S by checking its commutation status with {Z } =1 and {X } =1 . If E ★Ê commutes with all the encoded Pauli operators, E ★Ê ∈ S and an end-to-end degenerate error has occurred. If not, an endto-end identical syndrome error has occurred. It is based on these comparisons that the logical error rate was successfully computed in [15][16][17][18].
Naturally, to be able to apply the method one must first have knowledge of the encoded Pauli operators of the code. This is similar to the classical coding-based strategy we propose in this paper, which requires the computation of the kernel generator matrix G S . The encoded Pauli operators of a stabilizer code can be found based on the concept of the standard form (see Chapter 4 of [8]). In this work, Gottesman showed how, by applying row operations (i.e. Gaussian elimination) together with the necessary qubit permutations (i.e. column permutations) on the parity check matrix of a stabilizer code, one can obtain a special row reduced echelon form of the parity check matrix: the standard form. Once the standard form is known, the encoded Pauli operators {Z } =1 and {X } =1 can be directly obtained from it using matrix algebra [8,41]. As with the kernel generator matrix G S , the encoded Pauli operators of a specific code need only be computed once and can then be stored offline.

D. Method Comparison
For general stabilizer codes, computing the logical error rate based on the classical coding inspired strategy does not yield benefits over doing so via the encoded Pauli operator method. This has to do with the fact that both of them have the same computational complexity: performing Gaussian elimination and column permutations is also what finding the basis for the nullspace of a matrix requires. As is shown in [45], these operations scale as ( 3 ). However, when it comes to the widelyemployed family of Calderbank-Shor-Steane codes, the classical coding inspired strategy we propose herein will benefit from a substantial complexity advantage.
CSS codes [7,44] are a particular type of stabilizer code that provide an efficient design strategy to build QEC codes from existing classical codes. The quantum parity check matrix of a CSS code is written as where H = H 0 and H = 0 H .
In this construction, H and H are the parity check matrices of two binary classical LDPC codes 1 and 2 , respectively, where each matrix is used to correct either bit-flips or phase-flips. As discussed previously, any classical binary LDPC code or any classical binary linear block code for that matter, will satisfy (G H )mod2 = 0, where G and H represent the generator and parity check matrices of a binary classical LDPC code, respectively. Because the generator matrix is necessary to encode a classical LDPC code, the issue of deriving the matrix G from H has been widely researched in the realm of classical error correction [45][46][47][48][49]. In general, finding the matrix G from H , i.e, bringing the PCM into the desired form, requires ( 3 ) operations of processing [45]. However, through the clever application of optimization algorithms, the complexity of this task has been reduced [45][46][47] and classical LDPC codes with a linear encoding complexity 8 have been found. Note that based on the structure of the QPCM of CSS codes (13) we can derive the kernel generator matrix of a CSS code as where G and G are the generator matrices of the binary classical LDPC codes 1 and 2 , respectively. We know that the matrix given in (14) will actually serve the purpose of a kernel generator matrix because its rows are all linearly independent. The difficulty in computing (14) lies in deriving the generator matrices G and G from the PCMs H and H . However, when constructing CSS QLDPC codes from classical LDPC codes, it is a prerequisite that the classical code be known. Thus, it is reasonable to assume that the generator matrices of the classical codes that make up a CSS QLDPC code 8 Richardson et al. [45] showed that the encoding complexity is upper-bounded by ( ) + ( 2 ), where is the gap to measure the "distance" between a given parity-check matrix and a lower triangular matrix. This means that in the extreme case where = 0, such as for Irregular Repeat-Accumulate (IRA) codes [50], G can be computed with complexity ( ). are available 9 . Against this backdrop, because this does not require finding the standard form of the QPCM and deriving its encoded Pauli operators, the method we propose herein will have a complexity advantage over the encoded Pauli operator method when computing the logical error rate of sparse CSS quantum codes. More specifically, when using classical LDPC codes to build QLDPC CSS codes, because the generator matrices associated to the corresponding parity check matrices of these codes are known, the complexity of our method is negligible, as no calculations will be necessary to obtain the kernel generator matrix (it can be derived by simply introducing the appropriate generator matrices in (14), i.e, the complexity is (1)). In the case that the generator matrix of a particular classical LDPC code is not known, it can be derived as shown in [45] with complexity ( ) + ( 2 ), where is the gap to measure the "distance" between the parity-check matrix and a lower triangular matrix. This means that the computational complexity of calculating the kernel generator matrix of a CSS code will be at most ( ) + ( 2 ), which implies that, in the context of CSS codes, our strategy is less computationally complex than the one based on using encoded Pauli operators, which has complexity ( 3 ).

IV. SIMULATION RESULTS
We close this section by using our method to show how end-to-end errors with identical syndromes and end-toend degenerate errors can account for a significant percentage of the end-to-end errors that occur when using QLDPC codes. For this purpose, we simulate the CSS QLDGM codes of [21,22,26] with different rates and blocklengths over the depolarizing channel. The characteristics of these codes are detailed in table II. The underlying classical LDGM matrices and the structure of the matrix, critical to the performance of the QLDGM codes, have been chosen according to the optimization guidelines detailed in [21,22,26,51,52]. The results of these simulations are shown in Figure 1, where each subfigure groups the results by blocklength, i.e, each of the subfigures portrays the results for all the codes with the same value of . The graphs plot the ratio of a specific type of end-to-end error against the depolarizing probability. The aforementioned ratio is computed as E E , where E denotes the total number of end-to-end errors of a specific type ( = 1, 2, 3.): • E 1 → end-to-end errors with different syndromes, • E 2 → end-to-end errors with identical syndromes, • E 3 → end-to-end degenerate errors, 9 If the LDPC codes have previously been used in the classical paradigm then these generator matrices are known (they must have been employed in the classical encoding procedure). and E represents the total number of end-to-end errors.
To ensure that the simulation results are precise, the ratios have been computed after a total of 1000 decoding mistakes have been made (following the Monte Carlo simulation rule of thumb provided in [53]), i.e., E = 1000. The outcomes portrayed in Figure 1 confirm our initial intuition that sparse quantum codes are degenerate. It is easy to see that for all of the simulated blocklengths and rates (except for = 0.5), the percentage of end-to-end errors that are not of the E 1 type is not negligible, i.e., Furthermore, these results speak towards the higher precision of the logical error rate compared to the physical error rate when assessing the performance of these codes. For instance, at a noise level of = 0.005, E 3 E = 0.198 for the = 500 = 0.1 code. This means that 19.8% of the end-to-end errors are degenerate and should not be counted as decoding failures. Thus, in this scenario, the physical error rate overestimates the number of decoding failures and does not provide an accurate representation of the performance of the code. In fact, regardless of the noise level of the channel, the rate of the code (except for = 0.5), and the blocklength of the code, end-to-end degenerate errors take place, and so the physical error rate will always provide an inaccurate representation of the performance of these sparse quantum codes. Therefore, as is stated in [18], it is clear that performance results assessed based on the physical error rate (Ê = E as the decoding success criterion) [21][22][23][24][25][26] are inaccurate (they report an upper bound).
Furthermore, the results shown in Figure 1 also reveal how the frequency with which each type of end-to-end error takes place varies as a function of different parameters: • End-to-end errors with different syndromes represent a large percentage of the total number of endto-end errors when the rate of the code is high. This percentage decreases as the rate of the codes goes  Figure  1). This trend becomes further exacerbated as the blocklength of the simulated codes increases, i.e., for low rate large blocklength codes the ratio E 1 E will be significantly smaller than for low rate short codes.
• End-to-end identical syndrome errors represent the smallest percentage of the total number of end-toend errors in most of the simulated cases. This is reflected by the fact that E 2 E < E 1 E , E 3 E in all of our simulation outcomes.
• As the noise level of the channel grows, the ratio E 1 E becomes larger and the ratio E 2 E diminishes. The ratio of end-to-end degenerate errors E 3 E stays relatively constant.
The relationships between these parameters and different types of end-to-end errors serve to draw conclusions, some of which should be explored in future work. For instance, the large values of E 1 E in many of the simulated instances can be understood as a sign that performance gains may be attained by improving the decoding algorithm. This means that applying modified decoding strategies, such as those of [15-17, 20, 24], will aid in reducing the presence of end-to-end errors with different syndromes (they estimate the syndrome correctly when the original decoder does not) and improve performance. A matter that should be considered is how often these strategies produce failed error corrections in the form of end-to-end identical syndrome errors. For the methodology of [24], such events were shown to be rare, hence we expect these strategies to be a good approach to improve the performance of QLDPC codes. On the other hand, the large values of E 3 E when compared to E 2 E , especially at higher blocklengths, show that end-to-end identical syndrome errors are the least frequent of all the end-toend error types. Despite the relatively small percentage that end-to-end identical syndrome errors represent, it is possible that their relevance will grow when the amount of end-to-end errors with different syndromes is reduced (using modified decoding strategies) or when the degenerate content of the code is increased (through design). At this point, it may be that further improvements in performance will only be possible by designing an optimal degenerate decoder with the capability to correct end-to-end identical syndrome errors. Finally, given that the method proposed in this work is valid to detect endto-end degenerate errors, it may be interesting in future work to employ this methodology to specifically design codes to be degenerate. This could result in code constructions in which the likelihood of end-to-end degenerate errors is maximized, which would allow the positive effects of degeneracy (improved error correction capabilities without a decoding complexity increase) to be completely exploited for quantum error correction purposes.

V. CONCLUSION
We have presented a method to detect degenerate errors in sparse quantum codes in a computationally efficient manner. We have also shown how this method is less complex than other existing strategies to compute the logical error rate of sparse CSS quantum codes. Making use of our scheme, we have shown how sparse quantum codes have a significant percentage of degenerate errors. This means that the discrepancy between the logical error rate and the physical error rate is exacerbated for sparse quantum codes. Our results show that, for specific families of QLDPC codes, performance may be up to 20% better than would be expected from previous results in the literature that are based on the physical error rate. In addition, these simulation outcomes serve to show how performance may be improved by constructing degenerate quantum codes, and they also speak toward the positive impact that modified decoding strategies can have on the performance of sparse quantum codes.

VI. ACKNOWLEDGEMENTS
This work was financially supported by the Spanish Ministry of Economy and Competitiveness through the ADELE project (Grant No. PID2019-104958RB-C44), by the Spanish Ministry of Science and Innovation through the proyect "Few-qubit quantum hardware, algorithms and codes, on photonic and solid-state systems" (