1 Introduction

The importance of quantum information processing is beyond doubt due to its spectacular applications. Nowadays there is some evidence of quantum processors capable of executing certain tasks greatly improving classical processors [2] which increases the interest in tools for the proper functioning of quantum computers such as the quantum error-correcting codes (QECCs). QECCs are mainly designed for protecting quantum information from quantum noise and decoherence. Notice that, despite quantum information cannot be cloned [14, 42], quantum error correction works [38, 40]. These facts explain why many researchers are interested in obtaining QECCs with good parameters (which measure the behaviour of the codes) and the literature contains a large quantity of papers devoted to finding QECCs with better parameters than others previously obtained.

QECCs were firstly introduced in the binary case, where one finds the seminal papers on the subject [4, 5, 7,8,9, 21, 24]. Later QECCs were studied for the general q-ary case (see [1, 3, 6, 11, 12, 16,17,18,19,20, 25, 27, 28, 30,31,32, 35, 39] among many other articles). The general case is particularly interesting for fault-tolerant computing [10, 22, 29, 33, 36, 37, 41].

Let q be a prime power, a q-ary QECC of length n is a subspace of the Hilbert space \({\mathcal {H}}={\mathbb {C}}^{q^n}\). The most used class of quantum codes are stabilizer quantum codes. They are obtained as the intersection of the eigenspaces, corresponding to the eigenvalue 1, of the elements of some subgroup of the error group generated by a suitable error basis of the Hilbert space \({\mathcal {H}}\). The parameters of a QECC, length, dimension and minimum distance, are usually denoted by \(((n,K,d))_q\), where errors with weight less than d either can be detected or have no effect on C but some error with weight d cannot be detected. We are only interested in \(q^k\)-dimensional subspaces of \({\mathcal {H}}\) and, abusing of notation and when no confusion arises, we say that these QECCs have dimension k; in this case, the parameters are usually written as \([[n,k,d]]_q\).

One of the main advantages of stabilizer codes is that their existence is equivalent to that of self-orthogonal additive codes with respect to a certain trace-symplectic form (see [3] or [28, Theorem 13]). This trace-symplectic form is not very used but the above result allows us to deduce that many stabilizer quantum codes can be derived from self-orthogonal classical codes with respect to the Hermitian or the Euclidean inner product. Usually one finds good q-ary stabilizer codes by considering Hermitian self-orthogonal codes over \({\mathbb {F}}_{q^2}\). The specific result, Theorem 2.1, shows that an \([[n,n-2k, \ge d^{\perp _h}]]_q\) quantum code can be constructed from a Hermitian self-orthogonal \([n,k]_{q^2}\) linear code C over \({\mathbb {F}}_{q^2}\), where \(d^{\perp _h}\) stands for the minimum distance of the Hermitian dual code \(C^{\perp _h}\). This result has been extensively used in many papers to give many good QECCs [27, 30, 31, 43].

In the present paper we recall that Theorem 2.1 can be regarded as a special case of a more general result by considering linear codes over certain extensions of \({\mathbb {F}}_{q}\). Indeed, Theorem 2.2 states that if C is a linear code over \({\mathbb {F}}_{q^{2 m}}\), \(m \ge 1\), with parameters \([n,k]_{q^{2 m}}\) which is self-orthogonal with respect to the Hermitian inner product, then there exists an \([[m n, m n - 2 m k, \ge d^{\perp _h}]]_q\) stabilizer quantum code. Theorem 2.2 is a straightforward consequence of [28, Lemma 76] which seems to have gone unnoticed by many researchers because, in the literature, we have not found new quantum codes considering \(m>1\).

We expect that many good quantum codes can be established by this result. Our goal is to give some evidence by stating (and proving) Theorem 3.2 which combined with Theorem 2.2 gives rise to a number of stabilizer quantum codes with good parameters. Theorem 3.2 derives from [27] and gives an easy way to find Hermitian self-orthogonal codes. The above mentioned combination produces, in the binary case, new QECCs which are records according to [23]. Here, the word record means we provide codes for entries in [23] whose constructions were missing. There is no collection of tables as [23] for non-binary QECCs but one can find many papers in the literature about them. Most of these papers are devoted to quantum MDS codes which have relatively small length [13, 26, 43]. Since we are able to construct long QECCs, we use recent articles [12, 34, 39] for comparison and show that with our method we can improve the parameters of a number of codes therein.

Section 2 of the paper is devoted to recall Theorem 2.2 for obtaining QECCs from linear codes. Theorem 3.2 and parameters (some of them displayed in tables) of new QECCs can be found in Section 3. As mentioned all the provided parameters correspond to QECCs obtained by applying Theorems 3.2 and 2.2. In the binary case, our results together with propagation rules determine 91 new QECCs which are records according to [23]. We use the rules that state that the existence of an \([[n,k, d]]_q\) stabilizer code \({\mathcal {D}}\) implies that of an \([[n+1,k, d]]_q\) stabilizer code (lengthening) and, also, when \(k >1\) or \({\mathcal {D}}\) is pure, that of an \([[n,k-1, \ge d]]_q\) stabilizer code (subcode-construction) [28, Lemmas 69 and 71].

2 A construction of stabilizer quantum codes

Let \(q=p^r\), where p is a prime and r a positive integer. Many good q-ary stabilizer quantum codes are obtained from linear codes over the finite field with \(q^2\) elements, \({\mathbb {F}}_{q^2}\), which are self-orthogonal under the Hermitian inner-product. Recall that given two vectors \({\varvec{x}} = (x_1, x_2, \ldots , x_n)\) and \({\varvec{y}} = (y_1, y_2, \ldots , y_n)\) in \({\mathbb {F}}_{q^2}^n\), \(n \ge 1\), their Hermitian inner product is defined by

$$\begin{aligned} {\varvec{x}} \cdot _h {\varvec{y}}{:=} \sum _{i=1}^n x_i y_i^q \in {\mathbb {F}}_{q^2}, \end{aligned}$$

and the specific result to construct stabilizer quantum codes is the following (see [28, Corollary 16 and Lemma 18]).

Theorem 2.1

Let C be an \({\mathbb {F}}_{q^2}\)-linear code of length n and dimension k. Assume that C is Hermitian self-orthogonal, i.e.

$$\begin{aligned} C \subseteq C^{\perp _h} := \left\{ {\varvec{x}} \in {\mathbb {F}}_{q^2}^n \; | \; {\varvec{x}} \cdot _h {\varvec{y}} =0 \text{ for } \text{ all } {\varvec{y}} \text{ in } \text{ C } \right\} . \end{aligned}$$

Then, there exists a q-ary stabilizer quantum code with parameters \([[n,n-2k, \ge d^{\perp _h}]]_q\), where \(d^{\perp _h}\) stands for the minimum distance of the code \(C^{\perp _h}\).

Next we recall a generalization of Theorem 2.1 allowing the use of codes over extension fields of \({\mathbb {F}}_{q^2}\). We will prove that one can obtain long q-ary stabilizer codes with good parameters by considering linear codes over fields \({\mathbb {F}}_{q^{2 m}}\), \(m >0\), which are self-orthogonal with respect to the Hermitian inner product.

Theorem 2.2

Let C be an \({\mathbb {F}}_{q^{2m}}\)-linear code of length n and dimension k, \(m>0\). Suppose that \(C \subseteq C^{\perp _h}\), where

$$\begin{aligned} C^{\perp _h} := \left\{ {\varvec{x}} \in \left( {\mathbb {F}}_{q^{2 m}}\right) ^n \; | \; {\varvec{x}} \cdot _h {\varvec{y}} := \sum _{i=1}^n x_i y_i^{q^{m}} = 0 \text{ for } \text{ all } {\varvec{y}} \text{ in } \text{ C } \right\} . \end{aligned}$$

Then, there exists a stabilizer quantum code with parameters

$$\begin{aligned} \big [\big [ m n, mn - 2 m k, \ge d^\perp _h \big ]\big ]_q, \end{aligned}$$

where \(d^\perp _h\) is the minimum distance of the code \(C^{\perp _h}\).

This result can be deduced from Lemma 76 in [28] (see also [3]) which states that the existence of an \(((n,K,d))_{q^m}\) stabilizer code implies that of an \(((mn,K, \ge d))_q\) stabilizer code. Then, to deduce Theorem 2.2, it suffices to consider the above code C to obtain an \([[n, n- 2k, \ge d^{\perp _h}]]_{q^m}\) stabilizer code by applying Theorem 2.1 and by [28, Lemma 76] there exists a q-ary stabilizer code as in the statement.

Surprisingly we have not found in the literature new quantum codes obtained from Theorem 2.2, \(m>1\). We think that this result goes unnoticed by many researchers. We learned it when a reviewer pointed out to us the existence of [28, Lemma 76] after a first version of this paper where, in a different way, we proved Theorem 2.2 for the particular case where \(m=2^{\ell -1}\), \(\ell \ge 1\).

3 Hermitian self-orthogonal codes and examples

We devote this section to show that Theorem 2.2 allows us to obtain stabilizer quantum codes with better parameters than those in the present literature.

3.1 A useful result

Next we state and prove a result derived from [27, Theorem 2.5] which provides suitable linear codes to apply Theorem 2.2. This procedure gives some binary stabilizer quantum codes which are records according to [23] (in the sense explained in the introduction) and also some q-ary stabilizer quantum codes, \(q \ne 2\), improving the parameters of codes in the recent literature.

We start by recalling Theorem 2.5 in [27].

Theorem 3.1

Let e be a prime power and set \(Q=e^2\). Consider an integer \(2 \le n \le Q\) and write \(n=n_1 + n_2 + \cdots + n_t\), where \(1 \le t \le e\) and \(2 \le n_i \le e\) for all \(1 \le i \le t\). Then, for any positive integer

$$\begin{aligned} 1 \le k \le \frac{\min \{n_1, n_2, \ldots , n_t\}}{2}, \end{aligned}$$

there exists an \([n,k]_Q\) linear code \({\mathcal {C}}\) over the field \({\mathbb {F}}_Q\) which is Hermitian self-orthogonal. \({\mathcal {C}}\) is a generalized Reed-Solomon code and, therefore, it is a maximum distance separable (MDS) code and the minimum distance of \({\mathcal {C}}^{\perp _h}\) is \(k+1\).

Next we state a new result which will be useful.

Theorem 3.2

Let \(e>2\) be a prime power and set \(Q:= e^2\). Consider an integer \(2 \le n \le Q\) and write n as \(n=a e + b\), where \(0 \le a < e\) and \(0 \le b < e\), i.e. the e-adic expression of n, and include the case \(a=e\) and \(b=0\).

Define \(K_n\) as follows: \(K_n:= \lfloor e/2 \rfloor \) when \(b=0\). \(K_n:= \lfloor n/2 \rfloor \) when \(a=0\). \(K_n:= \lfloor (e-1) /2 \rfloor \) when \(a \ne 0\), \(b \ne 0\) and \(a + b \ge e\). Otherwise,

$$\begin{aligned} K_n := \left\lfloor \frac{\max \left\{ \lfloor n/(a+1) \rfloor , a +b \right\} }{2} \right\rfloor . \end{aligned}$$

Then, for each \(1 \le k \le K_n\), there exists an \([n,k]_Q\) linear code \({\mathcal {C}}\) which is self-orthogonal for the Hermitian inner product. \({\mathcal {C}}\) is a generalized Reed-Solomon code and therefore the minimum distance of the Hermitian dual code \({\mathcal {C}}^{\perp _h}\) is \(k+1\).

Proof

Assume \(b=0\), then the result holds by setting \(n_1=n_2 = \cdots = n_a = e\) and applying Theorem 3.1. When \(a=0\), the same theorem with \(n_1=n\) proves the result.

Suppose \(a \ne 0 \ne b\) and \(a + b \ge e\). Let us see that there exist non-negative integers ij such that \(i+j=a\) and positive integers \(n_1 = \cdots = n_i = e\), \(n_{i+1} = \cdots =n_{i+j}=e -1\) and \(n_{a+1}= e -1\) that are suitable to apply Theorem 3.1, which concludes the result in this case. Indeed,

$$\begin{aligned} ie + j(e -1) + e -1 = (i+j) e + e -1 -j = a e + e -1 -j =n, \end{aligned}$$

for some j because the fact that \(a+b \ge e\) proves the existence of such a j with \(0 \le j \le e-1\).

Finally, assume \(a +b < e\). Then, on the one hand, setting \(n_1=n_2 = \cdots = n_a = e -1\) and \(n_{a+1} = a +b\), we find the second bound for k, \(\lfloor (a+b)/2 \rfloor \), by Theorem 3.1. With respect to the first one, it is clear that

$$\begin{aligned} (a+1) \left\lfloor \frac{n}{a+1} \right\rfloor \le n \le (a+1) \left( \left\lfloor \frac{n}{a+1} \right\rfloor +1 \right) . \end{aligned}$$

This implies that a set \(\{n_i\}_{i=1}^{a+1}\) as in Theorem 3.1 can be constructed for values \(n_i\) which are either \(\left\lfloor \frac{n}{a+1} \right\rfloor \) or \(\left\lfloor \frac{n}{a+1} \right\rfloor + 1\). This concludes the proof because we can choose the best bound. \(\square \)

Remark 3.3

Combining Theorems 3.2 and 2.1, one gets quantum MDS (QMDS) codes, that is \([[n,n-2k,k+1]]_e\) quantum codes achieving the quantum Singleton bound.

3.2 Examples

In this subsection we determine the parameters of some (constructible) q-ary stabilizer quantum codes for small prime powers q.

3.2.1 Binary stabilizer quantum codes

We start with binary codes. In this case we give a number of quantum codes which are records according to [23], that is we give codes for entries in [23] whose constructions were missing. We explain in detail how we get our first binary code.

We start with the values \(e = 16\) and \(Q=16^2 = 256\). By Theorem 3.2, we can consider the value \(n=63\) because \(2 \le 63 \le 256\) and \(63=n= 3 \cdot 16 + 15\). Thus \(a=3\) and \(b=15\). Since \(a+b \ge 16\), \(K_{63}= \lfloor 15 / 2 \rfloor =7\). Then, by Theorem 3.2, there exists a suitable linear code \({\mathcal {C}}\) over \({\mathbb {F}}_Q\) with length \(n=63\), dimension \(k=6\) and \(d({\mathcal {C}}^{\perp _h}) =7\). The code \({\mathcal {C}}\) gives rise to a \([[63,51,7]]_{16}\) QMDS code by Remark 3.3. Now \(Q=q^{2m}\) for \(q=2\) and \(m=4\). Applying Theorem 2.2, we get a \({[[252,\!204, \ge 7]]_2}\) quantum code which is a record. If we pick \(n=62\) and \(k=7\), then a new record is obtained: \({[[248,\!192, \ge 8]]_2}\).

With an analogous procedure we obtain new records according to [23]. By using either lengthening or subcode-construction (the two propagation rules described at the end of the introduction) we get more records. All of them are grouped in Table 1, where the parameters obtained without propagation rules are marked with a * and those obtained by lengthening (respectively, subcode-construction) are marked with an L (respectively, S).

Table 1 Binary stabilizer quantum records

3.2.2 Non-binary stabilizer quantum codes

As we did in the binary case, we explain in detail the construction of some families of good 4-ary stabilizer quantum codes. We will only show the parameters of the remaining stabilizer codes which can be obtained in a similar way.

Set \(e=16\), \(Q=16^2 = 256\) and, applying Theorem 3.2, pick \(n=76\), which accomplishes \(2 \le 76 \le 256\). Now \(n=76=4 \cdot 16 + 12\), then under the notation of that theorem \(a=4\) and \(b=12\). Since \(a + b \ge 16\), \(K_{76} = 7\), and there exists a linear code over \({\mathbb {F}}_Q\) which is self-orthogonal for the Hermitian inner product, where \(Q=q^{2m}\) for \(q=4\) and \(m=2\). Applying Theorem 2.2, we find the 4-ary stabilizer quantum codes shown in Table 2. The \([[152,148, \ge 2]]_4\) quantum code in Table 2 has worse parameters than the QMDS code with parameters \([[152,150, 2]]_4\) that is known to exist.

Table 2 4-ary stabilizer quantum codes

By lengthening some codes in Table 2, we obtain quantum codes with parameters

$$\begin{aligned}{}[[153,140,\ge 4]]_4,[[153,136,\ge 5]]_4, [[153,132, \ge 6]]_4\; \text{ and }\; [[153,128,\ge 7]]_4 \end{aligned}$$

improving some codes in (and adding a new one to) [39, Table 3].

Looking for more 4-ary stabilizer codes, set \(q=4\) and \(m=3\). Write \(Q=q^{2m}\) and \(e=q^m=64\). Pick \(n=255\) which gives \(a=3\) and \(b=63\) with the notation of Theorem 3.2. Then \(K_{255}=31\) and applying Theorems 3.2 and 2.2 one gets a family of stabilizer codes with parameters

$$\begin{aligned} \left\{ [[765, 765 - 6j, \ge 1+j]]_4 \right\} _{18 \le j \le 31}. \end{aligned}$$

These codes have better parameters than some codes given in [39, Table 2] whose minimum distance d satisfies \(19 \le d \le 32\). For instance we give codes with parameters \([[765, 657, \ge 19]]_4\), \([[765, 651, \ge 20]]_4\) and \([[765, 645, \ge 21]]_4\) while the parameters of the corresponding codes in [39] are \([[765, 643, \ge 19]]_4\), \([[765, 639, \ge 20]]_4\) and \([[765, 631, \ge 21]]_4\).

We conclude this section by giving some more families of stabilizer quantum codes obtained with our procedure.

We start with a 3-ary stablizer quantum code with parameters \([[110,98, \ge 4]]_3\) which improves the quantum code with parameters \([[110,96, \ge 4]]_3\) given in [34]. Our code is obtained by setting, with the previous notation, \(n=55\), \(q=3\) and \(m=2\).

Similarly, considering \(n=234\), we get 5-ary stabilizer quantum codes with parameters as in Table 3.

Table 3 5-ary stabilizer quantum codes

Notice that we significantly improve the parameters of some codes given in [39, Table 4].

Now we provide the parameters of a family of 7-ary QECCs. Consider \(Q=2401 = 7^4\) and \(n=196\), again by Theorems 3.2 and 2.2 we get a family of stabilizer quantum codes with parameters

$$\begin{aligned} \Big \{[[392, 388 - 4j, \ge 2 +j]]_7 \Big \}_{j=3}^{23}. \end{aligned}$$

Comparing with [12, Table 3], we obtain many more 7-ary quantum codes of length 392. For \(j=3, 4\) our parameters coincide with those in [12] and we get a \([[392,368, \ge 7]]_7\) code which improves the \([[392,364, \ge 7]]_7\) code in [12].

Our next family corresponds to \(q=8\). Theorems 3.2 and 2.2 for \(Q=8^4= 4096\) and \(n=283\) give rise to a new family of QECCs with parameters

$$\begin{aligned} \Big \{[[566, 562 - 4j, \ge 2 +j]]_8 \Big \}_{j=5}^{27}. \end{aligned}$$

After lengthening, one gets a set of QECCs with parameters

$$\begin{aligned} \Big \{[[567, 562 - 4j, \ge 2 +j]]_8 \Big \}_{j=5}^{27}. \end{aligned}$$

As before, we add many new codes to those 8-ary ones in [12, Table 1] of length 567 and obtain a code with parameters \([[567,542, \ge 7]]_8\) improving the \([[567,539, \ge 7]]_8\) code in [12].

To end, set \(Q=6561=9^4\). As above

  • Picking \(n=200\), we get a family of 9-ary stabilizer quantum with parameters:

    $$\begin{aligned} \Big \{[[400, 396 - 4j, \ge 2 +j]]_9 \Big \}_{j=3}^{32}. \end{aligned}$$
  • Setting \(n=400\), we obtain:

    $$\begin{aligned} \Big \{[[800, 796 - 4j, \ge 2 +j]]_9 \Big \}_{j=3}^{39}. \end{aligned}$$
  • With \(n=405\), we obtain:

    $$\begin{aligned} \Big \{[[810, 806 - 4j, \ge 2 +j]]_9 \Big \}_{j=3}^{39}. \end{aligned}$$
  • Finally, with \(n=162\), we get:

    $$\begin{aligned} \Big \{[[324, 320 - 4j, \ge 2 +j]]_9\Big \}_{10 \ne j=7}^{39}. \end{aligned}$$

With respect to Tables 1, 3, 5 and 8 in [12] we add quite a few new codes. In addition we obtain several codes with better parameters than those given in [12]: \([[400,376, \ge 7]]_9\), \([[800,776, \ge 7]]_9\), \([[800,772, \ge 8]]_9\), \([[810,786, \ge 7]]_9\), \([[810,782, \ge 8]]_9\), \([[810,778, \ge 9]]_9\), \([[324,276, \ge 13]]_9\) and \([[324,260, \ge 17]]_9\).

Notice that, when providing our families of q-ary codes, \(q=4, 7, 8, 9\), we have considered different values for the indices j in order to get parameters which are either new or better than or equal to those in [12, 39]. Finally it is worth pointing out that, when comparison is possible, the parameters of our codes are much better than those in [15].

Remark 3.4

We have explained how to get q-ary stabilizer codes with length nm by considering a class of Hermitian self-orthogonal codes of length n over the field \({\mathbb {F}}_{q^{2m}}\), where \(2 \le n \le q^{2m}\). Dimensions and minimum distances of the stabilizer codes depend on the \(q^m\)-adic expression of n. In certain cases, one gets better quantum codes taking Hermitian self-orthogonal codes over fields \({\mathbb {F}}_{q^{2m'}}\) with \(m' <m\). Indeed, when the length of the quantum codes we are looking for is less than or equal to \(m' q^{2m'}\) and if there exists \(n' \le q^{2m'}\) such that \(nm =n'm'\), then, for distances \(d \le \min \{K_n +1, K_{n'}+1\}\) (\(K_n\) and \(K_{n'}\) defined as in Theorem 3.2 for suitable values \(e=q^m\) and \(e'=q^{m'}\)), we obtain stabilizer codes with parameters \([[nm, nm-2m(d-1), \ge d]]_q\) if we use the extension field \({\mathbb {F}}_{q^{2m}}\) and better stabilizer codes with parameters \([[n'm'=nm, nm-2m'(d-1), \ge d]]_q\) when using the extension field \({\mathbb {F}}_{q^{2m'}}\).