From Generalization of Bacon-Shor Codes to High Performance Quantum LDPC Codes

,


INTRODUCTION
Quantum systems are vulnerable to the environment noise induced by decoherence. It is one of the biggest obstacles in quantum information processing. Similar to classical systems, one feasible solution is to exploit quantum error correction codes (QECC) to encode the primitive quantum information into a larger quantum state. It is widely believed that QECCs are necessary in realizing long-term quantum communications and in building faulttolerant (FT) quantum computers [1,2]. The construction and design of QECCs with excellent performance is thus one significant task. Particularly, how to construct asymptotically good QECCs with positive rates and linear distance is one of the central questions in quantum coding theory [3,4].
It is known that QECCs can be constructed from classical linear codes, e.g., by using the stabilizer formalism [5] or the Calderbank-Shor-Steane (CSS) construction [3,6]. But it is not an easy task to do that straightforwardly since an additional dual-containing constraint is needed. Nevertheless, there exist two different categories of quantum codes that can be constructed from arbitrary classical linear codes without the dual-containing constraint; namely, the entanglement-assisted codes [7][8][9] and the quantum concatenation codes [10,11].
The former goes beyond standard QECC regimes because it requires presharing entangled states between the sender and the receiver. The latter contains important families of quantum codes, such as the Bacon-Shor (BS) codes [6,10] and the hypergraph product (HP) quantum codes [11]. The BS code provides a very simple way of constructing quantum codes, yet it can lead to fault-tolerant subsystem codes with high threshold [12]. The HP quantum code can be seen as a variant of the BS codes because their stabilizer structure is similar. However, the HP construction can lead to quantum low-density parity-check (qLDPC) codes with non-constant minimum distance, while the BS code cannot. Further, the HP qLDPC codes of length N can maintain a non-vanishing rate and Ω( √ N ) distance.
It should be noted that both BS codes and the HP quantum codes have a bad asymptotic behavior because their minimum distance scales as the square root of the block length.
It is well-known that asymptotically good classical codes with parameters [N, Ω(N ), Ω(N )] exist [13]; however, construction of QECCs with the same asymptotic scaling remains one of the biggest open questions in quantum coding theory. Prior to 2020, the best QECCs with non-vanishing code rates only have the minimum distance in the order of Ω( √ N ).
Recently, several studies are shown to break the Ω( √ N ) minimum distance barrier, see e.g., [14][15][16][17]. The main technical tools of these achievements could be broken into two types: one combines abstract topology objects with probabilistic arguments [16,17], while the other provides explicit construction based on high dimensional expanders [14,15]. Explicitly, Ref. [14] applies the Evra-Kaufman-Zémor (EKZ) distance balancing method to construct qLDPC codes from unbalanced ones with asymmetric distance. Then qLDPC codes of distance Ω( √ N log N ) and dimension Ω( √ N / log N ) were constructed by using the high dimensional expanders. In [16], a family of qLDPC codes of distance Ω(N 3/5 /polylog N ) and dimension N 3/5 was constructed based on fiber bundles. In [17], qLDPC codes with almost linear distance Θ(N/ log N ) and dimension Θ(log N ) were obtained by using a lift product construction.
In addition to the construction of QECCs with good parameters, practical QECCs need to equip with both efficient encoders and decoders. If the decoding is slower than the error accumulations, additional noise will be introduced during the syndrome decoding [18].
Moreover, a unique phenomenon in quantum coding theory, called error degeneracy, exists, which distinguishes quantum codes from classical ones both in theory and in physics. However, error degeneracy does not simplify the decoding of QECCs [19]. In contrast, it makes most decoding methods that are efficient for classical codes fail to fully decode QECCs, e.g., the belief-propagation (BP) algorithm [20]. How to utilize error degeneracy to correct more errors is an attractive and crucial issue, and its importance, in our opinion, is no less than the construction of good QECCs. Surface codes [21] can be decoded efficiently in polynomial time to correct degenerate errors by using the classical perfect matching algorithm [22]. Recently, the HP qLDPC codes can be decoded efficiently in linear time by using the syndrome reducing based bit-flip algorithm [23,24]. In [25], deep neural network based BP decoders are trained for qLDPC codes by considering error degeneracy in the loss function.
The EKZ distance balancing construction in [14] is also useful to the decoding issues and qLDPC codes of distance Ω( √ N log N ) can be decoded in polynomial time.
On the other hand, the encoding of QECCs is also significant but it has received much less attention compared to the decoding. Noise not only occurs in the transmission and decoding, but also in the encoding circuit [4]. Large-scale encoding circuit and deep encoding depth make the risk of qubits suffering from faulty gates increase rapidly. Consequently, the qubits might be polluted even before the transmission and the computation. The encoding circuit of stabilizer codes of length N with g stabilizer generators generally has O(gN ) gates and O(N ) depth [26]. But in many practical applications, the encoding circuits need to be with linear size and sublinear depth [27,28].
In this work, we generalize the concatenation scheme of Bacon-Shor codes and propose quantum serially concatenated parity-check (qSCPC) codes. We show that qSCPC codes can also be derived from any two classical linear codes without the dual-containing con- In addition to the asymptotic behavior, the X-stabilizer generators are strongly LDPC [29], while the Z-stabilizer generators have O(N ) weight, where N is the block length. Then by using the weight reduction procedure in [29] and the EKZ distance balancing construction, we can derive qLDPC codes with distance Ω(N 2/3 / log log N ) and dimension Ω(N 2/3 /ℓ), ℓ = (log N ) 2+ǫ , ǫ > 0. Thus we improve Hastings's result [29] by a polylogarithmic scaling.
Moreover, our codes are determinate to exist while the codes used in [29] are based on some probability arguments which only guarantee the existence with high probability.
We can also use the qSCPC concatenation scheme to derive qLDPC codes with positive rates and minimum distance which is the square root of the block length. Compared with the HP qLDPC codes in [11,30], the minimum distance upper bound of our codes can beat that of the HP qLDPC codes. Further, we show that qSCPC codes can be decoded in linear time and correct a much larger fraction of adversarial errors than quantum expander codes in [23,24]. Moreover, we can use arbitrary expander codes in the concatenation scheme and then our codes need a much smaller expansion than [23,24]. As a special case, we construct a family of asymmetric qSCPC codes with parameters by using expander codes as one of the component codes, where 1 ≤ n 0 ≤ N . We show that Q also belongs to the BS code family.
Let n 0 = √ N , we can derive a family of quantum codes with parameters which can correct all errors of weight smaller than half the minimum distance bound in We show that Q 1 can be encoded fastly by a circuit of size O(N ) and depth O( √ N ). Moreover, Q 1 can correct a random X-error with very high probability provided p X < 25%.
If let n 0 = log N , then we can derive a family of quantum codes with parameters which can correct any random X-error with high probability and correct an almost linear number of Z-errors in O(N/ log N ) time. While fault-tolerant quantum computation [31] and communication [4,32] prefer fast encodale and decodable codings, Q 1 and Q 2 are thus practical and beneficial for the future use.

RESULTS
Stabilizer codes -Let GF (q) be the Galois field of size q and denote by GF (q m ) a field extension of GF (q), where q is a prime power and m ≥ 1 is an integer. Denote the unitary operators X(u) and Z(v) on C q by X(u)|a = |a + u and Z(v)|a = ξ Tr(va) |a , where "Tr" is the trace operation, ξ = exp(2πi/p) is a primitive pth root of unity, and u, v ∈ GF (q).

Denote by the error group
Q is a q k -dimensional subspace of the Hilbert space H n = C q n , i.e., where S = S 1 , . . . , S n−k with stabilizer generators S i (1 ≤ i ≤ n − k) is an Abelian subgroup of G n called the stabilizer group. Then by measuring the eigenvalues of the stabilizer generators, the syndrome of errors can be revealed. An error E ∈ G n is detectable if it anticommutes with some stabilizer generator S i (1 ≤ i ≤ n − k) which results in a nonzero syndrome, otherwise it is undetectable and the syndrome is zero. The minimum distance d of code Q is the minimum weight of an undetectable error E ∈ G n , which does not belong to the stabilizer group. We denote by Q = [[n, k, d]] q . Q is called nondegenerate if the stabilizer group S does not contain a nontrivial element whose weight is less than d, otherwise it is degenerate. CSS codes present a direct way to construct stabilizer codes from two classical linear codes C X and C Z that satisfy the orthogonal relationship so that the stabilizer generators commute with each other, i.e., C ⊥ X ⊆ C Z . qSCPC codes -Denote by C 1 = [n 1 , k 1 , d 1 ] q and C 2 = [k 1 , k 2 , d 2 ] q two classical linear codes over GF (q). We use them to construct the serially concatenated parity-check (SCPC) code C X , where C 1 and C 2 are used as the inner and outer codes, respectively. Let the parity check matrix and generator matrix of C i be H i and G i (i = 1, 2), respectively. We serially concatenate the parity check matrix of C 2 with the generator matrix of C 1 to derive which is used as the parity check matrix of the SCPC code C It is easy to see that H X H T Z = 0 and C ⊥ X ⊆ C Z . Thus we can derive qSCPC codes with parameters Q = [[n 1 , k 2 ]] q by using the CSS construction.
We show that qSCPC codes include the family of BS codes. Take H 1 = I n 2 ⊗ H 1 , where H 1 and G 1 are the parity check and generator matrix of C 1 = [ n 1 , k 1 , d 1 ], respectively, and H 2 is the parity check matrix of We have Then H X and H Z can lead to the BS code construction [10]. Therefore the BS code can be seen as a specific case of qSCPC codes. It is known that BS codes are asymptotically bad and have a minimum distance scaling at most as the square root of the block length. We show that qSCPC codes are asymptotically good and can meet the quantum GV bound.
Theorem 1 There exist qSCPC codes with parameters Q = [[n Q , k Q , d Q ]] q meeting the quantum GV bound asymptotically, i.e., Q can achieve a quantum rate for any block length n Q → ∞, where δ Q = d Q /n Q is the relative minimum distance, and is the q-ary entropy function. There also exist asymptotically good asymmetric qSCPC codes for any block length n A → ∞, where δ X = d X /n A and δ Z = d Z /n A are the relative distances, Before the proof, we need to review some known results about classical alternant codes which are used as the outer codes in the concatenation construction. Let α 1 , α 2 , . . . , α n be n distinct elements of GF (q m ) and let v 1 , v 2 , . . . , v n be n nonzero elements of GF (q m ), GRS codes are a famous family of maximum-distance-separable (MDS) codes with parameters GRS k (a, v) = [n, k, n − k + 1] q m whose dual codes are still GRS codes GRS k (a, v) ⊥ = GRS r (a, y). Let u be any vector of length n with elements over GF (q). According to [33, Chap. 12], we know that the number of GRS codes GRS k (a, v) that contain u is at most (q m − 1) k , where k and a are fixed while v is varying.
Alternant codes are obtained as subfield subcodes of GRS codes, i.e., A r (a, y) ≡ GRS k (a, v)|GF (q), where r = n − k is the degree of alternant codes. It is known that the dimension and and the distance of alternant codes A r (a, y) satisfy k A ≥ n − mr and d A ≥ r + 1, respectively, see [33,Chap. 12]. For fixed k and a, but varying y, it is easy to see that the number of alternant codes A r (a, y) ≡ GRS k (a, v)|GF (q) that contain u ∈ GF (q) n is also at most (q m − 1) k . Alternant codes form a large family of linear codes which include many important subclasses, e.g., Bose-Chaudhuri-Hocquenghem (BCH) codes and Goppa codes. They play a significant role in the McEliece cryptosystem, and furthermore alternant codes can meet the GV bound asymptotically [33]. We use alternant codes as the outer codes in qSCPC codes.
Proof: Let C 1 = [n 1 , k 1 , d 1 ] q be an arbitrary linear code. Let C 2 = [k 1 , k 2 , d 2 ] q be an alternant code. We construct a pair of dual-containing codes C ⊥ X ⊆ C Z according to (5) and (6). By using the CSS construction, we can derive the qSCPC codes Q = [[n 1 , k 2 ]] q whose minimum distance is given by where Since C Z = C 1 can be chosen arbitrarily, we let C 1 be an asymptotically good linear code which can meet the classical GV bound, i.e., where δ 1 = d 1 /n 1 is the relative minimum distance. Next we need to determine ω 2 . Since we know nothing about the distance of the dual code C ⊥ 1 , there maybe some (very) low weight vectors coming from C ⊥ 1 . If we do not consider error degeneracy, the minimum distance of C X is unknown and maybe very small. Fortunately, vectors come from C ⊥ 1 do not affect the computation of ω 2 because they are degenerate. For any nonzero vector ν with Hamming weight less than λ X , we denote the syndrome from the inner code by If S ν = 0, then ν must belong to C ⊥ 1 and is degenerate when we compute ω 2 . Therefore we only need to consider the case which makes S ν = 0. Let 1 ≤ f X ≤ k 1 and denote by be an alternant code. Then the dimension of C 2 satisfies We know that the number of alternant codes C 2 that contain S ν does not relate to the Hamming weight of S ν and is at most On the other hand, the total number of alternant codes C 2 is equal to the number of the choice of v, and it is equal to (q m − 1) k 1 . Therefore if then there exists an alternant code such that there do not exist vectors c ∈ C X \C ⊥ Z with weight less than λ X . Taking the limit as n 1 → ∞ in (17), we can derive Combining (11), (12), and (18) above together, we have If we let λ X = d 1 + c, where c is any constant, then we have If we admit the asymmetry between the minimum distance ω 1 and ω 2 , and use the CSS construction for asymmetric quantum codes, then we have It is known that there exist families of asymptotically good LDPC codes which can achieve the classical GV bound. But the dual of LDPC codes has a low-density generator matrix (LDGM) and thus the minimum distance is constant. If we use LDPC codes as the inner code C 1 in SCPC codes, then the pure minimum distance of qSCPC codes without considering error degeneracy is constant to the block length. After introducing error degeneracy, the low weight codewords in the dual of LDPC codes do not affect the counting arguments in the proof of Theorem 1. Therefore, qSCPC codes are highly degenerate and the minimum distance is greatly improved from a constant to be linear with the block length.
Construction of qLDPC codes from qSCPC codes by using the EKZ distance balancing- In our construction, we can use any asymptotically good LDPC codes as the inner codes to derive qSCPC codes with linear distance and dimension. Further, the Z-stabilizer generators satisfy the LDPC constraint. Then we can derive families of qLDPC codes by using the weight reduction procedure and the EKZ distance balancing construction. We use some notations and definitions of quantum codes in [29,34]. For any CSS code of length N , denote w X and w Z by the maximum weight of X-and Z-stabilizer generators, respectively.
For 1 ≤ i ≤ N , denote the number of X-and Z-stabilizer generators acting on the i-th qubit by q X i and q Z i , respectively. Let Proof: From Theorem 1, we know that there exist qSCPC codes We use the thickening in [29] to reduce the q ′ Z of Q ′ and we take ℓ ′ = Θ(N ), w = Θ(log log N ). According to [29,Lemma 3], we can reduce q ′ Z to O(log log N ) while the length and X-distance of Q ′ are increased to Ω(N 2 ). By using the coning in [29,Lemma 8], w ′ Z is reduced to O(log log N ), the length is increased to N 2 ℓ, and the Z-distance of Q ′ is increased to Ω(N ℓ). Therefore, we can derive a weight reduced qSCPC code Q = [[N 2 ℓ, K, d Z /d X ]], where K = Ω(N ), and d X = Ω(N 2 ), d Z = Ω(N ℓ).
Proof: By using the soundness parameters of quantum codes in [29,34], we can reduce the qSCPC codes into qLDPC codes. Notice that Ref. [29] used quantum codes of w X , q X , w Z , q Z = O(log N ) to derive qLDPC codes of distance Ω(N 2/3 /polylogN ). Here, our weight reduced qSCPC codes in Lemma 1 have w X , q X , w Z , q Z = O(log log N ). By using the soundness properties in [29,34] and the EKZ distance balancing construction, we can derive qLDPC codes of distance Ω(N 2/3 / log log N ) and dimension Ω(N 2/3 /ℓ).
It is shown that Proposition 1 improves the result of [29, Theorem 2] by a polylogarithmic scaling. Also, the distance of Proposition 1 is slightly better than that of qLDPC codes in [17] of distance Ω(N 2/3 / log N ).
On the other hand, if we use LDGM codes as the inner codes and asymptotically good LDPC codes as the outer codes to construct qSCPC codes, we can obtain asymmetric qLDPC codes with d X = Θ(N ) and d Z = O(1). By using the EKZ distance balancing construction, we can obtain qLDPC codes with positive rates and minimum distance proportional to the square root of the block length. They have the same minimum distance scaling with the HP qLDPC codes while maintaining a positive rate. However we show that the exact minimum distance upper bound of our construction is better than that of the HP qLPDC codes.
Suppose that we have an LDPC code C 0 = [n 0 , k 0 ] whose parity check matrix P 0 has row weight w r and column weight w g , where w r and w g are both constant and 0 < w g < w r .
Denote the SCPC code of C 1 and C 2 by C Z with a parity check matrix H Z = H 2 G 1 .
We use C Z to correct Z-errors and use C 1 to correct X-errors. Then we can derive an asymmetric qLDPC code with parameters where d Z ≥ d 2 /w g and d X > w r . Therefore, we derive a family of qLDPC codes with a large asymmetry, where the Z distance d Z = Ω(n 1 ) and the X distance d X is a constant.
Next, we use the distance balancing method in [14,34] to improve the X distance. Let where 0 < κ A , δ A < 1, and let d A = d 2 /(w r w g ) (we assume that d 2 /(w r w g ) is an integer).
After the distance balancing, we can get a family of qLDPC codes with parameters where N = (1 + α 0 + ρ 2 ρ A α 0 ) n 2 0 , ρ 2 = 1 − κ 2 , ρ A = 1 − κ A , and n 0 = δ 2 /(δ A w 2 r )n 0 . Therefore the balanced qSCPC codes have a minimum distance scaling as Ω( √ n Q B ) while maintaining a positive code rate. We compare (23) with the parameters of the HP qLDPC codes in [11] with parameters where 0 < κ P , δ P < 1, n P is the length of the corresponding classical component code. To facilitate comparisons, we take δ 2 = δ A = δ P , and for asymptotically good LDPC codes, e.g., meeting the classical GV bound [13], we can also assume that κ 2 = κ A = κ P and ρ 2 = ρ A = ρ P . We let (1 + α 0 + ρ 2 ρ A α 0 ) n 2 0 = (1 + ρ 2 P )n 2 P so that the balanced qSCPC codes have the same code length with HP qLDPC codes, then If α 0 < ρ 2 2 /(1 + ρ 2 2 ), then the minimum distance of the balanced qSCPC codes is larger than that of the HP qLDPC codes. One disadvantage is that the dimension of the balanced qSCPC codes maybe smaller than that of the HP qLDPC codes. However, the minimum distance upper bound of qLDPC codes with positive rate is improved by the balanced qSCPC codes.
We take an example to illustrate the improvement. According to the classical GV bound, the relative minimum distance δ P is less than 1/2 if maintaining a positive code rate. Then the minimum distance of any HP qLDPC code of length N with a positive code rate is less than 0.36 √ N . We take δ 2 = δ A = 0.49 and then ρ 2 = ρ A ≈ 0.997. We can take an arbitrary α 0 < ρ 2 2 /(1 + ρ 2 2 ) ≈ 0.498, e.g., α 0 = 0.1. Then the minimum distance of the balanced qSCPC codes of length N is ≈ 0.447 √ N which is larger than 0.36 √ N . In more general, we have the following result.
Proposition 2 There exists a family of qLDPC codes of length N and minimum distance where ǫ > 0 is constant, while maintaining a positive code rate.
Then C 2 is asymptotically good and can be decoded efficiently according to Lemma 2. We can obtain an asymmetric qLDPC code A with parameters as in (22). Suppose that there is an adversarial Z-error e Z of weight less than δ 2 (1 + 4ǫ 2 )k 1 /(2w g ) happening in the received codeword. By measuring the ancilla, we can obtain the syndrome information as follows If G 1 e T Z = 0, which results in a zero syndrome, then e Z is degenerate and we do not need to correct it. Thus we only need to consider G 1 e T Z = 0. Here, we regard S Z ≡ G 1 e T Z as a logical error sequence happening to the outer code C 2 and we do the decoding by using the expander code C 2 . Since the weight of S Z must be less than δ 2 (1 + 4ǫ 2 )k 1 /2, we can always correct it efficiently in linear time according to Lemma 2. After the decoding, the decoded S Z can be seen as the syndrome of G 1 e T Z , i.e., G 1 e T Z = S Z . We just let e Z = ( S T Z , 0, . . . , 0) and notice that G 1 e Z also = S Z . Thus e Z and e Z are degenerate and we utilize the error degeneracy phenomenon to facilitate the decoding. By Lemma 2, we can also decode Zerrors in logarithmic time with a parallel decoder that uses an almost linear number of classical processors.
Next, we decode X-errors by using the LDGM code C 1 . If we use the one-step majoritylogic (OSMLG) decoding algorithm to decode the LDGM code, then we can correct any adversarial X-error of weight less than ⌊(d 1 − 1)/2⌋ in O(n 0 ) time. Further, the OSMLG algorithm can be easily carried out in parallel, and then we can decode X-errors in constant time and require a classical hardware overhead linear to n 0 .
The qLDPC codes in Lemma 3 have a large asymmetry for correcting Z-errors and Xerrors, respectively. We apply the distance balancing methods in [14,34] to improve the X-error correction ability of A by using an additional classical LDPC code.
Proof: We can derive the conclusion by combining Lemma 3 and the distance balancing construction in [14].
We compare Theorem 2 with the quantum expander codes in [23]. Let G P = (L P ∪R P , E) be a (c P , d P )-regular (δ L P , 5/6 + ǫ L P )-left and (δ R P , 5/6 + ǫ R P )-right expander graph for any ǫ L P , ǫ R P > 0. Denote by ρ P = c P /d P . Let H be the adjacency matrix of graph G P of size r P × n P with r P = ρ P n P . Denote by H X = (I n P ⊗ H, H T ⊗ I r P ), the parity check matrices of two classical linear codes C X and C Z , respectively.

Proposition 3 [23, Theorem 2]
There exists a decoding algorithm for the associated quantum code Q P = (C X , C Z ) that runs in time linear in the code length of (1 + ρ 2 P )n 2 P , and that decodes any quantum error pattern of weight less than Let (1 + α 0 + ρ 2 ρ A α 0 ) n 2 0 = (1 + ρ 2 P )n 2 P and let (c 2 , d 2 ) = (c A , d A ), ǫ 2 = ǫ A , and δ 2 = δ A . Then the balanced qSCPC codes in Theorem 2 can correct much more adversarial errors than the quantum expander codes in Proposition 3 of the same length. Further, the quantum expander codes in Proposition 3 need the corresponding expander graph to be left and right expanding at the same time, which is quite strict for expander graphs. The balanced qSCPC codes in Theorem 2 only need left expander graphs. More importantly, the required expansion in Theorem 2 is smaller than that in Proposition 3. Therefore the restriction to the expander graph of our codes is much more relaxed than that of the quantum expander codes.
A family of fast encodable and decodable qSCPC codes-In practice, we need quantum codes to be efficiently encoded and decoded. In the following, we consider a special case of qSCPC codes which can be fast encoded and decoded. First, we have the following result about asymmetric qSCPC codes. Proof: Let C 0 = [n 0 , 1, n 0 ] be a binary repetition code whose parity check matrix and generator matrix are given by: respectively. Let Let C 2 = [N/n 0 , k 2 , d 2 ] be an asymptotically good expander code which can be decoded in linear time [35], i.e., k 2 = γ 2 N/n 0 , and d 2 = δ 2 N/n 0 , where 0 < γ 2 , δ 2 < 1. Let the parity check and generator matrices of C 2 be H 2 and G 2 , respectively. Then we can construct an It is not difficult to verify that d Z ≥ d 2 and d X ≥ n 0 .
Next, we consider the decoding of A . For the Z-error e Z , the syndrome is given by where S Then we use C 1 to correct the X-error e X and suppose that wt H (e X ) ≤ ⌊(n 0 − 1)/2⌋. We divide the parity check matrix H 1 into n 0 sub-blocks by columns, and each sub-block corresponds to a diagonal block H 0 in H 1 . We know that there are at most ⌊(n 0 − 1)/2⌋ erroneous sub-blocks in e X and each erroneous sub-block has at most ⌊(n 0 − 1)/2⌋ errors.
For each erroneous sub-block, we use the OSMLG decoding principle to check the error bit that corresponds to the last column in H 0 . The running time is O(1). Thus the running time for checking all the erroneous sub-blocks is O(n 0 ). We know that H 0 is in a systematic form and every error bit that corresponds to the last column of each sub-block is already known. Then we can get other error bits directly without any additional decoding. Thus the total decoding of X-errors of weight up to ⌊(n 0 − 1)/2⌋ can be done in O(n 0 ) time. Overall, A can be decoded in O(N/n 0 + n 0 ) time.
Next, we consider the encoding of A and we use the standard encoding method of CSS codes in [26] to do that. We can encode the primitive pure state as follows where u ∈ C Z \C ⊥ X . It is not difficult to verify that the generator matrix of C Z is given by where O is a zero matrix of size k 2 × (N − N/n 0 ), and G 2 = [I P 2 ] is in the standard form. Denote by P 2 = [P 1 , . . . , P r 2 ], where each P i (1 ≤ i ≤ r 2 ) is a column of P 2 and r 2 = N/n 0 − k 2 . Then the encoding circuit of the qSCPC code A is given in Fig. 1. In Stage I of the encoding circuit, the number of gates is determined by the density of P 2 and it is at most O((N/n 0 ) 2 ). It is easy to see that the depth of Stage I is k 2 . While in Stage II, the number of C-NOT gates is exactly N − N/n 0 and the depth is n 0 . Therefore the size of the encoding circuit is O((N/n 0 ) 2 + N ) and the depth is k 2 + n 0 = O(N/n 0 + n 0 ).
Notice that the last column in H 0 is quite dense and then H 1 is also dense, but we can transform H 0 into a sparse matrix by multiplying a series of elementary matrices in the left.
Therefore the Z-stabilizer generators of A satisfy the LDPC constraint. In the fault tolerant settings, we require quantum codes to correct a linear number of random errors. Then we consider the correction of random errors by using qSCPC codes. We assume that the noise model used is the independent error model in [24,31,36]. Denote by p x the probability of each X-error. It is shown that A can correct any adversarial X-error e X of weight less than half the X distance bound in Theorem 3. We count all the uncorrectable errors of weight larger than half the minimum distance bound. It is easy to see that if there is at least one sub-block that has X-errors of weight larger than d 0 = ⌊(n 0 − 1)/2⌋, then e X is undetectable.All the uncorrectable X-errors are counted as follows: where P X is probability of uncorrectable X-errors and N = N/n 0 . Denote c > 0 by any constant. If we let n 0 = Ω(log N ) and p x < 1/4 c+1 , then N c P X vanish as N → ∞. If we let n 0 = N c 0 and p x < 25%, where 0 < c 0 < 1 is constant, then N c P X vanish as N → ∞.
Therefore the qSCPC code A in Theorem 3 can correct a linear number of random X-errors with high probability in O(n 0 ) time as long as n 0 = Ω(log N ). However, for the correction of random Z-errors, we cannot get a non vanishing threshold.
If we let n 0 = √ N or n 0 = log N , we have the following two special results: Corollary 1 There exists a family of quantum codes with parameters which can correct all errors of weight smaller than half the minimum distance bound in Asymmetric qSCPC codes can approach the Hashing bound-It is shown that asymmetric qSCPC codes in Theorem 1 can meet the asymmetric quantum GV bound for asymmetric quantum codes [37]. Further, if we let C 1 be LDPC codes which can approach the Shannon capacity [38], then asymmetric qSCPC codes can approach the capacity of asymmetric Pauli channels as the channel asymmetry goes to large. Suppose that we transmit quantum information over the Pauli channel • . . . means that the qubits pass it are controlled by a qubit in quantum state |ψ and if there is a "1" in the jth position of the ith column of the check part P 2 in G 2 , then there is a C-NOT target "⊗" in the jth qubit of the box P i .
for an input state ̺, where X, Y, Z are the Pauli operators. Denote by the total error probability p = p x + p y + p z , and denote by ζ = (p z + p y )/(p x + p y ) the asymmetry for the probabilities of Z-errors and X-errors. Usually, we let p x = p y , then we have p x = p/(2ζ +1) and p z = p(2ζ−1)/(2ζ+1). Since C X can be decoded up to the GV bound under the bounded minimum distance decoder (BMDD) and LDPC codes can approach the Shannon capacity under the BP decoding [38,39], then the rate of qSCPC codes Q can approach In Fig. 2, we compare the the limit of qSCPC codes in (38) with the Hashing bound given by R Q = 1 − H 2 (p) over Pauli channels with an asymmetry ζ = (p z + p y )/(p x + p y ).
If ζ = 1, then the channel is symmetric with p x = p y = p z = p/3. It is shown that as the asymmetry ζ grows, the gap between qSCPC codes and the Hashing bound becomes increasingly smaller, e.g., when the asymmetry ζ = 10 2 and ζ = 10 3 , the code rate gaps are less than 3 × 10 −2 and 4 × 10 −3 , respectively.

DISCUSSIONS AND CONCLUSIONS
The qSCPC codes in Theorem 1 can also be used to prove the security of the famous BB84 quantum key distribution (QKD) protocol directly [40]. By a simple calculation, we can obtain a total qubit error rate (QBER) for the security of BB84 over Pauli channels is less than 7.56%. Although it is lower than the bound of 11% in [40], our codes are not randomly generated and the LDPC component codes can be efficiently decoded. Since classical LDPC codes can approach the Shannon bound by using efficient BP decoder, qSCPC codes are particularly applicable to efficient and practical QKD. Furthermore, if we consider asymmetric errors in Pauli channels, we can further improve the total QBER for the security of BB84. For example, if we admit an asymmetry ζ = 100 between Z-errors and X-errors, then the total QBER is less than 35.56%. Our codes are competitive with quantum Polar codes in [41,42] that can achieve the coherent information. But Ref. [41] needs some preshared entanglement assistance.
We show that the qSCPC structure can lead to qLDPC codes of length N with distance Ω(N 2/3 / log log N ) and dimension Ω(N 2/3 /ℓ), where ℓ = (log N ) 2+ǫ , ǫ > 0. The qSCPC scheme can also be used to derive qLDPC codes with positive rate and minimum distance upper bound better than the HP qLDPC codes. By using expander codes as the outer component codes, we show that our codes can be decoded in linear time and are more powerful than the quantum expander codes in correcting adversarial quantum errors. One interesting future work is that whether our scheme can be applied in FT quantum computation for correcting a linear number of random quantum errors, see [31,36,43].