## 1 Introduction

Quantum error-correcting codes are an essential ingredient for the realization of universal fault-tolerant quantum computers. It turns out that, compared to general stabilizer codes, the class of so-called CSS codes [1, 2] allows more simple, direct implementations of a larger class of fault-tolerant operations. For example, any CSS code allows the transversal implementation of the CNOT gate [3].

While the error-correcting capabilities of CSS codes are in general less than those of the larger class of stabilizer codes [4], there are also a couple of advantages in terms of error-correction. The complexity of error correction is exponential in the number of independent syndromes [5]. For CSS codes, the syndromes can be grouped into syndromes for X- and Z-errors, and error correction can be performed independently for the two types of errors. This yields a square root speedup. Likewise, in order to determine the minimum distance of a CSS code, one has to compute that of two codes over an alphabet of size q, while for stabilizer codes, the alphabet size is $$q^2$$. There is again a square root advantage.

After a short summary of the required basic notions of both classical and quantum codes in the next section, we present our main results in Sect. 3. Then, we apply the new construction to CSS codes $$[\![n,0,d]\!]_2$$ for qubits, yielding explicit constructions of codes with the best parameters known to date.

## 2 Background

In this section, we recall basic definitions and properties of both classical and quantum error-correcting codes. For more details, see, e.g., the book [6] for classical codes and the articles [7, 8] for quantum codes.

### 2.1 Classical codes

Let $$q=p^m$$ be a prime power. Then, there is a finite field $$\mathbb {F}_q$$ with q elements. By $$C=[n,k,d]_q$$, we denote a linear block code of length n, dimension k, and minimum distance (at least) d. The minimum (Hamming) distance is the minimum number of positions in which two codewords of C differ. For linear codes, the minimum distance equals the minimum (Hamming) weight of the code, i.e., the minimum number of positions at which a nonzero codeword of C is non-zero.

The (Euclidean) dual code $$C^\perp =\left[ n,n-k,d^\perp \right] _q$$ is defined as

\begin{aligned} C^\bot =\left\{ {\textbf{v}}\in \mathbb {F}_q:{\textbf{v}}\cdot {\textbf{c}}=\sum _{i=1}^n v_i c_i =0\text { for all }{\textbf{c}}\in C\right\} . \end{aligned}
(1)

For $$1\le i\le n$$, the shortened code $$\sigma _i(C)$$ is obtained by selecting all codewords $${\textbf{c}}\in C$$ that are zero at the i-th position and then deleting that position, i.e.,

\begin{aligned} \sigma _i(C) =\left\{ \left( c_1,\ldots ,c_{i-1},c_{i+1},\ldots ,c_n\right) \in \mathbb {F}_q^{n-1}:\left( c_1,\ldots ,c_{i-1},0,c_{i+1},\ldots ,c_n\right) \in C\right\} . \end{aligned}
(2)

As we are taking a subset of the codewords of the original code, the minimum distance does not decrease. Similarly, the punctured code $$\pi _i(C)$$ is obtained by deleting the i-th coordinate of C, i.e.,

\begin{aligned} \pi _i(C)=\left\{ \left( c_1,\ldots ,c_{i-1},c_{i+1},\ldots ,c_n\right) \in \mathbb {F}_q^{n-1}:\left( c_1,\ldots ,c_{i-1},c_i,c_{i+1},\ldots ,c_n\right) \in C\right\} . \end{aligned}
(3)

In this case, the minimum distance is in general decreased by one, as we are removing one coordinate. When we omit the index i, $$\sigma (C)$$ and $$\pi (C)$$ refer to the shortened/punctured code with respect to the last position $$i=n$$.

The following proposition summarizes properties of the shortened and punctured code (see, e.g., [9, Sections 1.5.1 and 1.5.3]).

### Proposition 1

For a linear code $$C=[n,k,d]_q$$ with $$d>1$$ and coordinate i not being identically zero, the shortened and the punctured code have parameters

\begin{aligned} \sigma _i(C)&{}=[n-1,k-1,d]_q\end{aligned}
(4)
\begin{aligned} \text {and}\qquad \pi _i(C)&{}=[n-1,k,d-1]_q. \end{aligned}
(5)

Moreover, shortening the dual code equals the dual of the punctured code and vice versa:

\begin{aligned} \sigma _i(C^\perp )&{}=\left( \pi _i(C)\right) ^\bot \end{aligned}
(6)
\begin{aligned} \text {and}\qquad \pi _i(C^\perp )&{}=\left( \sigma _i(C)\right) ^\bot . \end{aligned}
(7)

When coordinate i of the code C is identically zero, the dimension of the shortened code remains k, as (2) involves all codewords of C. Likewise, for $$d=1$$, when puncturing the code at the position i where a codeword of weight 1 is nonzero, the dimension drops to $$k-1$$, as deleting that position results in the zero vector. Moreover, in some cases the minimum distance of the shortened or punctured code might be larger, e.g., when all minimum weight codewords are nonzero at that position (shortening) or all minimum weight words are zero at that position (puncturing).

Later, we will use so-called quadratic residue (QR) codes. Their properties are summarized as follows (for the precise definitions, see, e.g., [6, Chapter 16] for prime fields, and [9, Section 6.6] or [10, Section 4.6] for the general case).

### Proposition 2

(QR codes) Let q be a prime power and $$n>2$$ a prime such that q is a quadratic residue modulo n (i.e., $$q=a^2\bmod n$$ for some integer a). The quadratic residue codes $${\mathcal {Q}}$$, $$\overline{{\mathcal {Q}}}$$, $${\mathcal {N}}$$, and $$\overline{{\mathcal {N}}}$$ are cyclic codes of length n over $$\mathbb {F}_q$$ with the following properties:

1. (i)

$$\overline{{\mathcal {Q}}} < {\mathcal {Q}}$$ and $$\overline{{\mathcal {N}}} < {\mathcal {N}}$$

2. (ii)

$${\mathcal {Q}}$$ and $${\mathcal {N}}$$ are equivalent with $${\mathcal {Q}}=[n,(n+1)/2,d]_q$$ and $${\mathcal {N}}=[n,(n+1)/2,d]_q$$.

3. (iii)

$$\overline{{\mathcal {Q}}}$$ and $$\overline{{\mathcal {N}}}$$ are equivalent with $$\overline{{\mathcal {Q}}}=[n,(n-1)/2,d+1]_q$$ and $$\overline{{\mathcal {N}}}=[n,(n-1)/2,d+1]_q$$.

4. (iv)

$${\mathcal {Q}}^\perp = \overline{{\mathcal {Q}}}$$ and $${\mathcal {N}}^\perp =\overline{{\mathcal {N}}}$$ for $$n\equiv 3\mod 4$$

5. (v)

$${\mathcal {Q}}^\perp = \overline{{\mathcal {N}}}$$ and $${\mathcal {N}}^\perp =\overline{{\mathcal {Q}}}$$ for $$n\equiv 1\mod 4$$

The extended QR codes $$\widehat{{\mathcal {Q}}}$$ and $$\widehat{{\mathcal {N}}}$$ are obtained adding one coordinate to $${\mathcal {Q}}$$ and $${\mathcal {N}}$$, respectively, such that $$\widehat{{\mathcal {Q}}}^\perp =\widehat{{\mathcal {N}}}$$ for $$n\equiv 1\mod 4$$, while $$\widehat{{\mathcal {Q}}}^\perp =\widehat{{\mathcal {Q}}}$$ and $$\widehat{{\mathcal {N}}}^\perp =\widehat{{\mathcal {N}}}$$ for $$n\equiv 3\mod 4$$. The extended QR codes have the following properties:

1. (vi)

$$\widehat{{\mathcal {Q}}}=[n+1,(n+1)/2,d+1]_q$$ and $$\widehat{{\mathcal {N}}}=[n+1,(n+1)/2,d+1]_q$$

2. (vii)

The automorphism group of the extended QR code $$\widehat{{\mathcal {Q}}}$$ contains the projective special linear group $$PSL_2(n)$$.

### 2.2 Quantum codes

By $${\mathcal {C}}=[\![n,k,d]\!]_q$$, we denote a quantum-error correcting code (QECC) that is a subspace of dimension $$q^k$$ of the complex vector space $${\mathcal {H}}=\left( \mathbb {C}^q\right) ^{\otimes n}\cong \mathbb {C}^{q^n}$$. When the minimum distance is d, all errors acting on at most $$d-1$$ of the n subsystems (tensor components) can be detected or act trivially on the code. Alternatively, one can correct up to $$d-1$$ erasures or up to $$\lfloor (d-1)/2\rfloor$$ errors. Most of the QECCs in the literature are so-called stabilizer codes which can be constructed from certain additive codes over the field $$\mathbb {F}_{q^2}$$ [7]. Here we focus on so-called CSS codes, named after Calderbank & Shor [1] and Steane [2].

### Proposition 3

(CSS construction) Let $$C_1=[n,k_1,d_1']_q$$ and $$C_2=[n,k_2,d_2']_q$$ be linear codes over $$\mathbb {F}_q$$ with $$C_2^\bot \le C_1$$. Then, there is a CSS code with parameters $${\mathcal {C}}=[\![n,k_1+k_2-n,d]\!]_q$$. The minimum distance is $$d = \min (d_1,d_2)\ge \min (d_1',d_2')$$. For $$C_2^\perp \ne C_1$$,

\begin{aligned} d_1&{}=\mathop {\textrm{wgt}}(C_1\setminus C_2^\perp )=\min \{\mathop {\textrm{wgt}}(\textbf{v}):\textbf{v}\in C_1\setminus C_2^\perp \}\ge d_1'\end{aligned}
(8)
\begin{aligned} \text {and}\qquad d_2&{}=\mathop {\textrm{wgt}}(C_2\setminus C_1^\perp )=\min \{\mathop {\textrm{wgt}}(\textbf{v}):\textbf{v}\in C_2\setminus C_1^\perp \}\ge d_2'. \end{aligned}
(9)

For $$C_2^\perp =C_1$$, $$d_1=d_1'$$ and $$d_2=d_2'$$. Then, the CSS code has parameters $${\mathcal {C}}=[\![n,0,d]\!]_q$$ with $$d=\min (d_1',d_2')$$.

As CSS codes are a subclass of stabilizer codes, their parameters need not be optimal. On the other hand, CSS codes allow to correct X- and Z-errors independently. Steane [2] uses the notation $$\{n,k,d_1,d_2\}$$ in order to stress that for $$d_1 > d_2$$, the code can correct more, say, Z-errors than X-errors. Such codes are known as asymmetric quantum codes [11], and the notation $$[\![n,k,d_1/d_2]\!]_q$$ is used in the literature [12]. To avoid possible confusion, we will use the notation $$[\![n,k,\{d_1,d_2\}]\!]_q$$, which indicates both minimum distances and also stresses that the role of the codes $$C_1$$ and $$C_2$$ in the CSS construction can be swapped.

## 3 Main results

For a quantum code $${\mathcal {C}}=[\![n,k,d]\!]_q$$ that is not the tensor product of quantum codes of lengths $$n-1$$ and 1, deleting any coordinate results in a code $${\mathcal {C}}=[\![n-1,k,d-1]\!]_q$$ (see [8, Theorem 4.1 (3)]). If the code is $${\mathcal {C}}=[\![n,k,d]\!]_q$$ a tensor product $${\mathcal {C}}={\mathcal {C}}_{n-1}\otimes {\mathcal {C}}_1$$ of codes of lengths $$n-1$$ and 1, respectively, then deleting the last coordinate yields the code $${\mathcal {C}}_{n-1}$$ which has parameters $${\mathcal {C}}_{n-1}=[\![n-1,k,d]\!]_q$$ for $${\mathcal {C}}_1=[\![1,0,1]\!]_q$$, or a code $${\mathcal {C}}_{n-1}=[\![n-1,k-1,d']\!]_q$$ for $${\mathcal {C}}_1=[\![1,1,1]\!]_q$$. In the latter case, the original code has distance $$d=1$$, and $$d'$$ is the distance of the tensor factor $${\mathcal {C}}_{n-1}$$.

In the following, we show that for CSS codes, we can reduce the length by 2 while the minimum distance is decreased only by 1.

### Theorem 4

Let $${\mathcal {C}}=[\![n,k,\{d_1,d_2\}]\!]_q$$ with $$d_1>1$$ be a CSS code. Then, for all $$i\in \{1,\ldots ,n\}$$, there is a CSS code $${\mathcal {C}}_i=[\![n-1,k,\{d_1-1,d_2\}]\!]_q$$.

### Proof

Let $$C_1=[n,k_1,d_1']_q$$ and $$C_2=[n,k_2,d_2']_q$$ be the classical codes used for the construction of the CSS code $${\mathcal {C}}=[\![n,k,\{d_1,d_2\}]\!]_q$$. Then, $$C_2^\perp \le C_1$$ and $$k=k_1+k_2-n$$. For a fixed position $$i\in \{1,\ldots ,n\}$$, consider the codes $$\pi _i(C_1)$$ and $$\sigma _i(C_2)$$ of length $$n-1$$. By Proposition 1, $$\left( \sigma _i(C_2)\right) ^\perp =\pi _i(C_2^\perp )$$, and hence, $$\left( \sigma _i(C_2)\right) ^\perp \le \pi _i(C_1)$$. Using the codes $$\sigma _i(C_2)$$ and $$\pi _i(C_1)$$ in the CSS construction, we obtain a code $$\widetilde{{\mathcal {C}}}=[\![n-1,{\widetilde{k}},\{{\widetilde{d}}_1,{\widetilde{d}}_2\}]\!]_q$$.

It remains to show that the code has the claimed parameters. Concerning the dimension k, we distinguish two cases.

1. 1.

When the coordinate i in the code $$C_2$$ is identically zero, then the shortened code has parameters $$\sigma _i(C_2)=\left[ n-1,k_2,d_2'\right] _q$$. Moreover, the dual code $$C_2^\perp \le C_1$$ contains a word of weight one that is non-zero at position i. Then, the punctured code has parameters $$\pi _i(C_1)=\left[ n-1,k_1-1,{\widetilde{d}}_1'\right] _q$$. The dimension of the CSS code is $${\widetilde{k}}=(k_1-1)+k_2-(n-1)=k_1+k_2-n=k$$.

2. 2.

When the coordinate i in the code $$C_2$$ is not identically zero, the shortened code has parameters $$\sigma _i(C_2)=\left[ n-1,k_2-1,d_2'\right] _q$$. Moreover, the dual code $$C_2^\perp \le C_1$$ does not contain a word of Hamming weight one that is non-zero only at position i. As $$d_1>1$$, $$C_1$$ does not contain such a word of weight one either. Then, the punctured code has parameters $$\pi _i(C_1)=\left[ n-1,k_1,d_1'-1\right] _q$$. Again $${\widetilde{k}}=k_1+(k_2-1)-(n-1)=k_1+k_2-n=k$$.

Concerning the minimum distances $${\widetilde{d}}_1$$ and $${\widetilde{d}}_1$$, first consider the case $$k=0$$. In this case, the minimum distances of asymmetric CSS codes are equal those of the classical codes, and hence, $${\widetilde{d}}_1=d_1-1$$ and $${\widetilde{d}}_2=d_2$$ as claimed. For $$k>0$$, we distinguish two cases. To simplify notation, we set $$i=n$$.

1. 1.

Assume that $$\pi _i(C_1)\setminus \left( \sigma _i(C_2)\right) ^\perp$$ contains a word $$\widetilde{{\textbf{v}}}=(v_1,\ldots ,v_{n-1})$$ of weight strictly less than $$d_1-1$$. Then, the code $$C_1$$ contains a word $${\textbf{v}}=(v_1,\ldots ,v_{n-1},v_n)$$ of weight strictly less than $$d_1=\mathop {\textrm{wgt}}\left( C_1\setminus C_2^\perp \right)$$. Therefore, $${\textbf{v}}\in C_2^\perp$$, which implies $$\widetilde{{\textbf{v}}}\in \pi _i\left( C_2^\perp \right) =\left( \sigma _i(C_2)\right) ^\perp$$, a contradiction. Hence, $${\widetilde{d}}_1\ge d_1-1$$.

2. 2.

Assume that $$\sigma _i(C_2)\setminus \left( \pi _i(C_1)\right) ^\perp$$ contains a word $$\widetilde{{\textbf{u}}}=(u_1,\ldots ,u_{n-1})$$ of weight strictly less than $$d_2$$. Then, the code $$C_2$$ contains a word $${\textbf{u}}=(u_1,\ldots ,u_{n-1},0)$$ of weight strictly less than $$d_2=\mathop {\textrm{wgt}}\left( C_2\setminus C_1^\perp \right)$$. Therefore, $${\textbf{u}}\in C_1^\perp$$, which implies $$\widetilde{{\textbf{u}}}\in \sigma _i\left( C_1^\perp \right) =\left( \pi _i(C_1)\right) ^\perp$$, a contradiction. Hence, $${\widetilde{d}}_2\ge d_2$$.

$$\square$$

Note that this result can also be found in [14, Theorem 4.2 (i)], using a slightly different proof technique. La Guardia also discusses the special case [14, Theorem 4.2 (ii)] that puncturing the classical code $$C_1$$ does not decrease its minimum distance, and hence, the minimum distances of the resulting asymmetric quantum code do not change. The following direct consequence of Theorem 4 appears to be new:

### Theorem 5

Let $${\mathcal {C}}=[\![n,k,\{d_1,d_2\}]\!]_q$$ with $$d_1,d_2>1$$ be a CSS code. Then, there is a CSS code $$\widehat{{\mathcal {C}}}=[\![n-2,k,\{d_1-1,d_2-1\}]\!]_q$$.

### Proof

Using Theorem 4, we obtain a CSS code $${\mathcal {C}}'=[\![n-1,k,\{d_1-1,d_2\}]\!]_q$$. Switching the roles of $$C_1$$ and $$C_2$$ in the CSS construction, again using Theorem 4 we obtain a CSS code $$\widehat{{\mathcal {C}}}=[\![n-2,k,\{d_1-1,d_2-1\}]\!]_q$$. $$\square$$

### Corollary 6

Let $${\mathcal {C}}=[\![n,k,d]\!]_q$$ with $$d>1$$ be a CSS code. Then, there is a CSS code $$\widehat{{\mathcal {C}}}=[\![n-2,k,d-1]\!]_q$$.

### Proof

This follows directly from Theorem 5 together with the fact that the minimum distance of a CSS code $$\widehat{{\mathcal {C}}}=[\![n,k,d-1]\!]_q$$ is $$d=\min (d_1,d_2)$$. $$\square$$

In the literature, usually the general situation of puncturing quantum codes is discussed (see, e.g., [13, Theorem 6 d)] for qubit codes, [15, Proposition 2.8] for q-dimensional quantum systems, and [8, Theorem 4.1 (3)] for the general case), i.e., the existence of a code $$[\![n,k,d]\!]_q$$ with $$n,d\ge 2$$ implies the existence of a code $$[\![n-1,k,d-1]\!]_q$$. Puncturing a code twice hence results in a code with parameters $$[\![n-2,k,d-2]\!]_q$$, while for CSS codes the minimum distance only drops by one.

Triggered by a question by Chinmay Nirkhe, we note that the results of Theorems 4 and 5 are the best possible for general codes. For asymmetric CSS codes $$[\![n,k,\{d_1,d_2\}]\!]_q$$, the Singleton bound is $$n+2\ge k+d_1+d_2$$ [12, Lemma 3.3], while for codes $$[\![n,k,d]\!]_q$$ the Singleton bound reads $$n+2\ge k+2d$$ [16]. When starting with a quantum MDS CSS code, i.e., a code that meets the bound with equality, reducing the length by one and preserving the dimension imply that one of the minimum distance has to be reduced by one as well. Similarly, starting with a QMDS codes $$[\![n,k,d]\!]_q$$, when reducing the length by two the distance has to be reduced by at last one.

## 4 Examples

First, we apply our results to quantum quadratic residue codes (for details, see [7, Section IX] (for $$k=1$$) and [17, 18]).

### Proposition 7

(quantum QR codes) Let q be a prime power and $$n>2$$ a prime such that q is a quadratic residue modulo n. Then, there are CSS codes with parameters

\begin{aligned}{} & {} {\mathcal {C}}_{\text {QR}}&{}=[\![n,1,d]\!]_q \end{aligned}
(10)
\begin{aligned} \text {and}\qquad{} & {} \widehat{{\mathcal {C}}}_{\text {QR}}&{}=[\![n+1,0,d+1]\!]_q, \end{aligned}
(11)

where d is the minimum distance of the classical QR code $${\mathcal {Q}}=[n,(n+1)/2,d]_q$$.

### Proof

(sketch) For the code $${\mathcal {C}}_{\text {QR}}=[\![n,1,d]\!]_q$$, in the case $$n\equiv 3\mod 4$$, we use $$C_1=C_2={\mathcal {Q}}$$. By Proposition 2 (i) and (iv), $$C_2^\perp ={\mathcal {Q}}^\perp =\overline{{\mathcal {Q}}}<{\mathcal {Q}}=C_1$$. When $$n\equiv 1\mod 4$$, we use $$C_1={\mathcal {Q}}$$ and $$C_2={\mathcal {N}}$$. By Proposition 2 (i) and (v), $$C_2^\perp ={\mathcal {N}}^\perp =\overline{{\mathcal {Q}}}<{\mathcal {Q}}=C_1$$. As the dimensions of $${\mathcal {Q}}$$ and $$\overline{{\mathcal {Q}}}$$ differ by one, we get a CSS code of dimension $$k=1$$. Both $${\mathcal {Q}}$$ and $${\mathcal {N}}$$ have parameters $$[n,(n+1)/2,d]_q$$, and hence, the minimum distance of the CSS code equals that of the classical QR codes.

For the code $$\widehat{{\mathcal {C}}}_{\text {QR}}=[\![n+1,0,d+1]\!]_q$$, we use $$C_1=C_2^\perp =\widehat{{\mathcal {Q}}}$$. Then, $$C_1^\perp =C_2$$ equals either $$\widehat{{\mathcal {Q}}}$$ for $$n\equiv 3\mod 4$$, or $$\widehat{{\mathcal {N}}}$$ for $$n\equiv 3\mod 1$$. Both $$\widehat{{\mathcal {Q}}}$$ and $$\widehat{{\mathcal {N}}}$$ have parameters $$[n+1,(n+1)/2,d+1]_q$$. Hence, then minimum distance of the CSS code equals $$d+1$$. $$\square$$

Applying Theorem 5 repeatedly to quantum QR codes $$\widehat{{\mathcal {C}}}_{\text {QR}}$$ with $$q=2$$, we obtain qubit CSS codes with the parameters shown in Table 1. The parameters of the codes in the first column of the table can also be found in [17], together with references for particular codes. All codes in Table 1 have the largest minimum distance among the explicitly known stabilizer codes (see [19]). As quantum codes with $$k=0$$ are by definition pure, a code with parameters $$[\![n,0,d]\!]_q$$ implies the existence of codes $$[\![n-k,k,d-k]\!]_q$$ for $$0\le k< d$$ (see [7, Lemma 70]). For the codes of Table 1, however, the minimum distance of the resulting codes is smaller than the best known stabilizer codes in [19]. The same is true for quantum QR codes with $$k=1$$. The derived CSS codes with $$k>0$$ might nonetheless find application in a fault-tolerant context.

Note that the binary extended QR code of length 152 has only minimum distance 20, while there is a self-dual binary code $$[152,76,24]_2$$ (see [19]). This yields a CSS code $$[\![152,0,24]\!]_2$$. Moreover, there are self-dual binary codes $$[136,68,24]_2$$ and $$[160,80,24]_2$$ which yield CSS codes $$[\![134,0,24]\!]_2$$ and $$[\![160,0,24]\!]_2$$, respectively. Applying Theorem 5 to these codes yields the codes shown in Table 2.

For the codes $$[\![206,0,24^*]\!]_2$$, $$[\![204,0,24^*]\!]_2$$, and $$[\![202,0,24^*]\!]_2$$ derived from the code $$\widehat{{\mathcal {C}}}_{\text {QR}}=[\![224,0,32]\!]_2$$, the true minimum distance is larger than what is guaranteed by Theorem 5. This is related to the fact that when puncturing a classical code at m positions, the minimum distance will be larger than $$d-m$$ in case every codeword of minimum weight has at least one zero at the m positions [20]. For the code $$[\![202,0,24^*]\!]_2$$, by Theorem 5, the minimum distance is at least 21. Using Magma V2.27-3 [21], we have verified that the minimum distance is 24. The calculation took about 20 hours wall-clock time using 48 cores. When we apply Theorem 5 repeatedly, then the minimum distance of the codes in the sequence is monotonically decreasing. This implies that the codes of length 206 and 204 have minimum distance at least 24 as well, while the lower bounds are 23 and 22, respectively.

In general, to compute the minimum distance of a CSS code $${\mathcal {C}}=[\![n,0,\{d_1,d_2\}]\!]_q$$ derived from classical codes $$C_1=[n,k,d_1]_q$$ and $$C_2=[n,n-k,d_2]_q$$ with $$C_2^\perp =C_1$$, one would have to compute the minimum distance of both $$C_1$$ and $$C_2$$. By Proposition 2 (vii), the automorphism group of an extended QR code $$\widehat{{\mathcal {Q}}}=[n+1,(n+1)/2,d+1]_q$$ contains the group $$PSL_2(n)$$. In turn, $$PSL_2(n)$$ contains an involution $$\tau$$ with zero ($$n\equiv 3\bmod 4$$) or two ($$n\equiv 1 \bmod 4$$) fixed points. We can select the positions $$I_s$$ for shortening and the positions $$I_p$$ for puncturing such that $$I_s^\tau = I_p$$. In this case, the shortened and punctured codes $$C_1$$ and $$C_2$$ will be permutation equivalent, i.e., they have the same parameters. Hence, we have to compute the minimum distance of only one of the codes.

For the code $$[\![208,0,25^*]\!]_2$$, the lower bound on the minimum distance by Theorem 5 is 24, but it turns out that the true minimum distance is 25. Using 48 cores, the verification took about 125 hours wall-clock time.

The minimum distance of the codes in Tables 1 and 2 is the largest among the codes that have been explicitly constructed [19]. At the same time, for $$n>100$$, the Gilbert–Varshamov bound in [22, Corollary 2.3, 1)] implies the existence of quantum codes $$[\![n,0,d]\!]_q$$ for even n with larger minimum distance. However, for length $$n>100$$ it is essentially infeasible to determine the minimum distance of a random quantum code.

Further examples can be derived from the extended ternary QR code $$C=[60,30,18]_3$$, which yields a CSS code $$[\![60,0,18]\!]_3$$. From this code, we can derive the codes in Table 3 which achieve the Gilbert–Varshamov (GV) bound in [22, Corollary 2.3]. The minimum distance of the codes $$[\![59,1,17^*]\!]_3$$ and $$[\![60,0,18^*]\!]_3$$ is larger than the GV bound. The codes in Table 3 have the largest minimum distance among codes known to the author.

## 5 Conclusions

We have presented a propagation rule for the parameters of CSS codes that results in better parameters than the corresponding construction for general quantum error-correcting codes. In the case of qubit codes $$[\![n,0,d]\!]_2$$, this allows us to explicitly construct CSS codes with the largest minimum distance among the known codes. As already mentioned in the last section, counting arguments imply the existence of possibly non-CSS codes with even larger minimum distance, but these have yet to be constructed.