1 Introduction

Quantum error-correcting codes (QECCs) are an important tool in quantum computation since they allow us to protect quantum information from quantum noise and, in particular, from decoherence. The existence of quantum processors that improve the behaviour of classical ones (Arute 2019) explains the importance of obtaining good QECCs. A q-ary QECC of length n, q being a power of a prime p, is a subspace of the Hilbert space \(\mathbb {C}^{q^n}\), where \(\mathbb {C}\) denotes the complex numbers. Their parameters are written as \(((n,K,d))_q\), where K is the dimension and d the distance. The most common QECCs are stabilizer codes (Ketkar et al. 2006). Many of these codes satisfy \(K=q^k\), for some nonnegative integer k, and then their parameters are expressed as \([[n,k,d]]_q\); abusing the notation we say that k is the dimension of these codes. QECCs were first introduced in the binary case (Calderbank and Shor 1996; Gottesman 1996; Calderbank et al. 1998; Ashikhmin et al. 2000a, b) and later in the general case (Bierbrauer and Edel 2000; Ashikhmin and Knill 2001; Ketkar et al. 2006; Aly et al. 2007; La Guardia 2014; Cao and Cui 2020; Galindo and Hernando 2022; Galindo et al. 2023), where we have cited only some references of a vast literature on the subject. QECCs in the nonbinary case are convenient for fault-tolerant quantum computation (Shor 1996; Knill et al. 1998; Gottesman 1999; Luo and Ma 2019).

Stabilizer quantum codes are intimately related to self-orthogonal additive codes, where duality is given by a trace-symplectic form (Ashikhmin and Knill 2001; Ketkar et al. 2006). As particular cases of the above construction, stabilizer quantum codes can be obtained from self-orthogonal linear codes with respect to Hermitian or Euclidean inner products. The Euclidean case corresponds to the so-called CSS construction given by Calderbank and Shor (1996) and by Steane (1996). Next we recall this result (Ketkar et al. 2006, Lemma 20), where \(\perp _e\) stands for Euclidean dual and \(\textrm{wt}\) for Hamming weight.

Theorem 1

Consider two q-ary linear codes \(C_i\), \(i=1,2\), with respective parameters \([n,k_i,d_i]_q\), and assume that \(C_2^{\perp _e} \subseteq C_1\). Then, there exists a stabilizer quantum code with parameters \([[n, k_1+ k_2 -n, d]]_q\) with minimum distance

$$\begin{aligned} d= \min \left\{ \textrm{wt} (\varvec{c}) \; | \; \varvec{c} \in \left( C_1 \setminus C_2^{\perp _e}\right) \cup \left( C_2 \setminus C_1^{\perp _e}\right) \right\} . \end{aligned}$$

Quantum codes obtained from the CSS procedure enjoy several advantages. Indeed, they can be used for privacy amplification of quantum cryptography (Shor and Preskill 2000) and for constructing asymmetric quantum codes (Ioffe and Mézard 2007; Sarpevalli et al. 2000), but they have mainly computational virtues, among others the smaller size of the supporting alphabet (Grassl 2023).

Another good property of CSS codes is that they can be improved by using the Steane enlargement procedure. This procedure was initially proposed by Steane in the binary case (Steane 1999) and afterwards generalized to the general case (Hamada 2008; Ling et al. 2010) (see also Galindo et al. 2015). Denote by \(\mathbb {F}_q\) the finite field with q elements, the specific result is the following one:

Theorem 2

Let C be a linear code over \(\mathbb {F}_q\) of length n and dimension k. Suppose that \(C^{\perp _e} \subseteq C\) and C can be enlarged to a q-ary linear code \(C'\) of length n and dimension \(k' \ge k+2\). Then, there exists a stabilizer quantum code with parameters \([[n, k+k'-n, d]]_q\), where \(d \ge \min \{d_1, \lceil \frac{q+1}{q} d_2 \rceil \}\), \(d_1 = \textrm{wt} \left( C {\setminus } (C')^{\perp _e}\right) \) and \(d_2 = \textrm{wt} \left( C' {\setminus } (C')^{\perp _e}\right) \).

As mentioned, self-orthogonal codes (or codes containing their duals) have to be considered for providing stabilizer quantum codes and this fact determines the parameters of the obtained codes. However, one can use any linear code without no condition whenever encoder and decoder share entanglement, which increases the capacity of communication (Brun et al. 2006). These codes are named entanglement-assisted quantum error-correcting codes (EAQECCs). Apart from the parameters length n, dimension k and minimum distance d used for quantum codes, EAQECCs include a new one c, which gives the minimum number of (pairs of) maximally entangled quantum states required and then, the parameters of these codes are expressed as \([[n,k,d;c]]_q\).

A formula for computing the value c of binary EAQECCs was first given for the CSS construction (Hsieh et al. 2007). Afterwards, always in the binary case, more general constructions where treated by Wilde and Brun (2008). In the general case, formulae for obtaining the parameters of q-ary EAQECCs which extend those in Hsieh et al. (2007), Wilde and Brun (2008) can be found in Galindo et al. (2019). Using them, parameters of many specific constructions of EAQECCs are recently given (Qian and Zhang 2018; Sari and Kolotoglu 2019; Chen et al. 2019; Qian and Zhang 2019; Guo and Li 2020; Luo and Cao 2019; Du et al. 2020; Galindo et al. 2021).

Next we recall two of the main results on EAQECCs we will use in this article. To begin with, we consider the vector space \(\mathbb {F}_q^{2n}\) where n is a positive integer. The symplectic product of two vectors \((\varvec{x}|\varvec{y})\) and \((\varvec{z}|\varvec{t})\) in \(\mathbb {F}_q^{2n}\) is defined as

$$\begin{aligned} (\varvec{x}|\varvec{y}) \cdot _s (\varvec{z}|\varvec{t}):= \varvec{x} \cdot _e \varvec{t} - \varvec{z} \cdot _e \varvec{y}, \end{aligned}$$

where \(\cdot _e\) means Euclidean inner product. The dual space of a vector subspace \(C \subseteq \mathbb {F}_q^{2n}\) with respect to the symplectic product \(\cdot _s\) is denoted by \(C^{\perp _s}\).

The symplectic weight of a vector \((\varvec{x}|\varvec{y})\) in \(\mathbb {F}_q^{2n}\) is

$$\begin{aligned} \textrm{swt} (\varvec{x}|\varvec{y}):= \# \{j \; | \; (x_j,y_j) \ne (0,0), 1 \le j \le n\}, \end{aligned}$$

\(\#\) meaning cardinality and \(x_j\) (respectively, \(y_j\)) being the jth coordinate of the vector \(\varvec{x}\) (respectively, \(\varvec{y}\)). We define the minimum symplectic distance of a subset \(S \subseteq \mathbb {F}_q^{2n}\) as

Our first result, which can be found in (Galindo et al. 2019, Theorem 2), determines the parameters of the EAQECC that one can get from a linear code \(C \subseteq \mathbb {F}_q^{2n}\) over \(\mathbb {F}_q\). Suppose that C has dimension \(n-k\). One desires to obtain a symplectic self-orthogonal \(\mathbb {F}_q\)-vector space \(\tilde{C} \subseteq \mathbb {F}_q^{2n+2c}\), whose projection is C and c is the smallest number of maximally entangled quantum states in \(\mathbb {C}^q \otimes \mathbb {C}^q\). \(\tilde{C}\) provides the quantum circuit which, by means of c maximally entangled pairs, encodes \(k+c\) logical qudits into n physical qudits.

Theorem 3

Let \(C \subseteq \mathbb {F}_q^{2n}\) be a linear code which is generated by the rows of a matrix \((H_X|H_Z)\) of size \((n-k) \times 2n\). Then, C gives rise to an EAQECC with parameters \([[n, k+c, d; c]]_q\), where

$$\begin{aligned} 2c = \textrm{rank}\left( H_X H_Z^T - H_Z H_X^T\right) = \dim _{\mathbb {F}_q} C - \dim _{\mathbb {F}_q} \left( C \cap C^{\perp _s} \right) \end{aligned}$$

and .

The second mentioned result on EAQECCs (Galindo et al. 2019, Theorem 4) is a specialization of Theorem 3 and it shows how the CSS construction can be used for providing q-ary EAQECCs. To state it, consider two \(\mathbb {F}_{q}\)-linear codes \(C_1, C_2 \subseteq \mathbb {F}_q^{n}\) of dimensions \(k_1\) and \(k_2\), and generator matrices \(H_1\) and \(H_2\), respectively. The specific result is the following one, where \(d_H\) means Hamming distance, \(\perp _e\) Euclidean dual and, for a matrix M, \(M^T\) denotes its transpose.

Theorem 4

With the above notation, the code \(C_1 \times C_2 \subseteq \mathbb {F}_q^{2n}\) determines an EAQECC with parameters \([[n, n-k_1-k_2 +c, d; c]]_q\), where

$$\begin{aligned} c = \textrm{rank} \left( H_1H_2^T\right) = \dim _{\mathbb {F}_{q}} C_1 - \dim _{\mathbb {F}_{q}} \left( C_1 \cap C_2^{\perp _e}\right) , \end{aligned}$$

and

$$\begin{aligned} d= \min \left\{ d_H\left( C_1^{\perp _e} \setminus (C_2 \cap C_1^{\perp _e})\right) , d_H\left( C_2^{\perp _e} \setminus (C_1 \cap C_2^{\perp _e})\right) \right\} . \end{aligned}$$

In Sect. 2 of this paper we prove that, with a similar procedure to that given by Steane, one can enlarge the EAQECCs provided by Theorem 4 whenever the involved linear codes \(C_1\) and \(C_2\) coincide. Setting \(C=C_1=C_2\) and expressing C as a direct sum of two linear spaces \(\langle B_r \rangle \) and \(\langle B_t \rangle \), Theorem 6 shows how to compute the parameters of the corresponding enlarged EAQECC. This enlarged code uses an invertible \(t \times t\) matrix A, where t is the dimension of the space \(\langle B_t \rangle \). Under the additional hypothesis that A has no eigenvalue in the supporting field and \(\langle B_t \rangle \subseteq C^{\perp _e}\), Theorem 7 determines the parameters of the enlarged EAQECC. In particular, Theorem 7 proves that the enlarged code keeps the same parameter c and enlarges the dimension with respect to the original EAQECC. Theorem 10, Corollary 12 and Remark 13 study and show the advantages produced by the Steane enlargement of EAQECCs obtained when the spaces \(\langle B_r \rangle \) and \(\langle B_t \rangle \) are Euclidean orthogonal.

Our procedure can be carried out for any decomposition of a linear code as mentioned. As a specific case, Sect. 3 explains how to put our results into practice through certain BCH codes. Regarding BCH codes as subfield-subcodes and applying Theorem 7 and previous results, Theorems 17 and 20 state explicitly those parameters of the Steane enlargement of the EAQECCs given by suitable BCH codes. Finally, in Theorems 21 and 22 and Remark 23, by considering another families of BCH codes, we determine the corresponding parameters of EAQECCs deduced from Theorem 10, Corollary 12 and Remark 13.

In this section we have given a brief introduction to QECCs and EAQECCs, recalling some of the main known results which will be used later. The goal of this article is to explain how a Steane enlargement of EAQECCs can be achieved. We also specialize this construction to certain BCH codes and, as a consequence, we obtain new EAQECCs which enjoy interesting computational advantages (see the last part of the paragraph after Theorem 1). Section 2 introduces the Steane enlargement of EAQECCs and proves several results about their parameters. Subsection 2.3 shows that our procedure gives some e-MDS EAQECCs (i.e., EAQECCs with parameters \([[n,k,d;c]]_q\) such that \(k=c+n-2d+2\)), however the obtained parameters are not new. Sect. 3 applies the results in Sect. 2 to compute the parameters of enlarged codes of EAQECCs associated to BCH codes. Some new good codes deduced from our procedure are also presented at the end of this last section.

2 Steane enlargement of EAQECCs

The goal of this section is to prove that a procedure like the Steane enlargement showed in Theorem 2 can be used in the framework of EAQECCs. Firstly we will see how it applies to codes as described in Theorem 4 and then we will show that, under certain conditions, we are able of determine the parameters of the enlarged EAQECCs and how they improve the original ones.

Let \(C \subseteq \mathbb {F}_q^{n}\) be an \(\mathbb {F}_q\)-linear code with parameters \([n,k,\delta ]_q\). Let B be a matrix with entries in \(\mathbb {F}_q\) whose rows are linearly independent vectors of \(\mathbb {F}_q^n\). Along this paper, by convenience, we denote by \(\langle B \rangle \) the vector subspace of \(\mathbb {F}_q^{n}\) generated by the rows of B. Assume that \(C= \langle B_r \rangle \oplus \langle B_t \rangle \), where \(B_r\) (respectively, \(B_t\)) are \(r \times n\) (respectively, \(t \times n\)) generator matrices of the \(\mathbb {F}_q\)-linear subcodes \(\langle B_r \rangle \) (respectively, \(\langle B_t \rangle \)) of C, and where \(r = \dim _{\mathbb {F}_q} \langle B_r \rangle \) and \(t = \dim _{\mathbb {F}_q} \langle B_t \rangle \). Applying Theorem 4 for \(C_1= C_2 =C\), one obtains an EAQECC, \(\tilde{C}\), with parameters

$$\begin{aligned}{}[[n, n- 2k +c, d;c]]_q, \end{aligned}$$
(1)

where \(k=r+t\), \(d=d_H (C^{\perp _e} {\setminus } C)\) and

(2)

Next, we introduce the linear code \(D_A\) we desire to use in order to provide the Steane enlargement of \(\tilde{C}\).

Definition 5

Given a code \(C= \langle B_r \rangle \oplus \langle B_t \rangle \) as above and such that \(\dim _{\mathbb {F}_q} \langle B_t \rangle \ge 2\), we define the code \(D_A\) as the \(\mathbb {F}_q\)-linear code \(D_A \subseteq \mathbb {F}_q^{2n}\) whose generator matrix is

(3)

where A is a \(t \times t\) invertible matrix over \(\mathbb {F}_q\).

Our general result on Steane enlargement is the following one:

Theorem 6

Let \(C= \langle B_r \rangle \oplus \langle B_t \rangle \subseteq \mathbb {F}_q^{n}\) be an \(\mathbb {F}_q\)-linear code such that \(\dim _{\mathbb {F}_q} \langle B_t \rangle \ge 2\). Assume that A is a \(t \times t\) invertible matrix over \(\mathbb {F}_q\) which has no eigenvalue in \(\mathbb {F}_q\). Then \(D_A\) gives rise to an EAQECC, \(\tilde{D}_A\), which is a Steane enlargement of the EAQECC, \(\tilde{C}\), with parameters

$$\begin{aligned}{}[[n, n-2r-t +c', d', c']]_q, \end{aligned}$$

where , \(\delta _1 = d_H (C^{\perp _e})\) and \(\delta _2 = d_H \left( \langle B_r \rangle ^{\perp _e}\right) \), and

(4)

Proof

The proof follows by applying Theorem 3 to the linear code \(D_A \subseteq \mathbb {F}_q^{2n}\). The size of its generator matrix is \((n-(n-2r-t)) \times 2n\). By Theorem 3, the dimension of the obtained EAQECC is \(n - 2r - t +c'\) and the number of maximally entangled pairs \(c'\) is given by the formula

Then, we have proved that, with the exception of the minimum distance, the parameters of the Steane enlargement of the EAQECC, \(\tilde{C}\), are as in the statement.

With respect to the minimum distance \(d'\), we are going to prove that

which, again by Theorem 3, finishes our proof.

Denote by G a generator matrix of the Euclidean dual \(C^{\perp _e}\) with size \((n-(r+t)) \times n\) and set \(\left( G' \;|\; G \right) ^T\) a generator matrix of the dual vector space \(\langle B_r \rangle ^{\perp _e}\). Then, by the proof of Theorem 2.6 of Ling et al. (2010) (see also Hamada 2008), the symplectic dual \(D_A^{\perp _s}\) of \(D_A\) has

$$\begin{aligned} \left( \begin{array}{cc} \bar{A} G' &{} G'\\ G &{} 0 \\ 0 &{} G \end{array}\right) , \end{aligned}$$

as a generator matrix, where \(\bar{A}:= G' B_t^T \left( A^T \right) ^{-1} \left( G' B_t^T \right) ^{-1}\).

Now, \(\bar{A}\) has no eigenvalue in \(\mathbb {F}_q\) because A has no eigenvalue in \(\mathbb {F}_q\) and if an invertible matrix M with entries in \(\mathbb {F}_q\) has an eigenvalue \(\lambda \in \mathbb {F}_q\), then \(M^T\), \(M^{-1}\) and PMQ, where P and Q are invertible matrices with entries in \(\mathbb {F}_q\), also have an eigenvalue in \(\mathbb {F}_q\). To conclude, again by the proof of Theorem 2.6 of Ling et al. (2010),

proving the lower bound for \(d'\) in the statement. \(\square \)

The following subsections study specific cases where one can give more information about the advantages of using Steane enlargement of EAQECCs. An application of these results by considering BCH codes will be given in Sect. 3.

2.1 The case when \(\langle B_t \rangle \) and C are Euclidean orthogonal

In this subsection we consider the Steane enlargement \(\tilde{D}_A\) of the EAQECC, \(\tilde{C}\), defined by an \(\mathbb {F}_q\)-linear code \(C= \langle B_r \rangle \oplus \langle B_t \rangle \) such that \(\langle B_t \rangle \subseteq C^{\perp _e}\). Keeping the above notation, our result is the following one.

Theorem 7

Let \(C= \langle B_r \rangle \oplus \langle B_t \rangle \subseteq \mathbb {F}_q^n\) be an \(\mathbb {F}_q\)-linear code such that \(\langle B_t \rangle \subseteq C^{\perp _e}\) and \(\dim _{\mathbb {F}_q} \langle B_t \rangle \ge 2\). Set \(t = \dim _{\mathbb {F}_q} \langle B_t \rangle \) and assume that A is a \(t \times t\) invertible matrix over \(\mathbb {F}_q\) which has no eigenvalue in \(\mathbb {F}_q\). Denote by c the minimum required number of maximally entangled states in the EAQECC, \(\tilde{C}\), determined by C. Then, the linear code \(D_A\), introduced in Definition 5, gives rise to an EAQECC, \(\tilde{D}_A\), which is a Steane enlargement of \(\tilde{C}\), with parameters

$$\begin{aligned}{}[[n, n-2r-t +c, d', c]]_q, \end{aligned}$$

where , \(\delta _1 = d_H \left( C^{\perp _e}\right) \) and \(\delta _2 = d_H \left( \langle B_r \rangle ^{\perp _e}\right) \).

Proof

Theorem 6 determines the parameters given in the statement of the EAQECC \(\tilde{D}_A\) with the exception of the fact that the minimum required number of maximally entangled states \(c'\) in \(\tilde{D}_A\) equals c. Now, \(\langle B_t \rangle \subseteq C^{\perp _e}\) and then \(B_t B_t^T =0\) and \(B_r B_t^T =0\). Then, by (2),

$$\begin{aligned} c = \textrm{rank} \left( \begin{array}{cc} B_r B_r^T &{} 0\\ 0 &{} 0 \end{array} \right) = \textrm{rank} \left( B_r B_r^T \right) . \end{aligned}$$

Finally, by (4) and the above equalities, it holds that

$$\begin{aligned} c' = \frac{1}{2} \textrm{rank} \left( \begin{array}{ccc} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} B_r B_r^T \\ 0 &{} -B_r B_r^T &{} 0 \end{array} \right) = \textrm{rank} \left( B_r B_r^T \right) = c, \end{aligned}$$

which concludes the proof. \(\square \)

The above result shows that suitable choices of linear codes C allow us to get Steane enlargements of the EAQECC given by C that enlarge its dimension (by t) and keep the number c of required maximally entangled states.

To finish this subsection we introduce a class of matrices which allows us to get matrices A as required in Theorems 6 and 7. This class of matrices will be also used in the forthcoming Sect. 2.2. Let \(j \ge 2\) be an integer, consider the monic polynomial

$$\begin{aligned} h_{\varvec{a}} (X):= X^j + a_{j-1} X^{j-1} + \cdots + a_1 X + a_0 \in \mathbb {F}_q [X] \end{aligned}$$
(5)

and its corresponding \(j \times j\) (companion) matrix with entries in \(\mathbb {F}_q\):

$$\begin{aligned} L_j (h_{\varvec{a}})= \left( \begin{array}{cccccc} 0 &{} 1 &{} 0 &{} \cdots &{} 0 &{} 0\\ 0 &{} 0 &{} 1 &{} \cdots &{} 0 &{} 0\\ \vdots &{} \vdots &{} \ddots &{} \ddots &{} \cdots &{} \vdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots &{} \ddots &{} \vdots \\ 0 &{} 0 &{} 0 &{} \cdots &{} 0 &{} 1\\ -a_0 &{} -a_1 &{} -a_2 &{} \cdots &{} -a_{j-2} &{} -a_{j-1} \end{array} \right) . \end{aligned}$$

Then the following proposition holds.

Proposition 8

\(h_{\varvec{a}} (X)\) is the characteristic polynomial of the matrix \(L_j (h_{\varvec{a}})\).

Proof

A proof can be found in (Hamada 2008, Lemma 7) or in (Ling et al. 2010, Lemma 2.5). \(\square \)

Remark 9

Let \(t \ge 2\) be a positive integer. Consider the polynomial \(\bar{h}_t:=X^t + X^{t-1} \in \mathbb {F}_q [X]\) which gives rise to the map \(\varphi _{\bar{h}_t}: \mathbb {F}_q \rightarrow \mathbb {F}_q \), \(\varphi _{\bar{h}_t}(x) = \bar{h}_t (x)\). Clearly \(\varphi _{\bar{h}_t}\) is not one-to-one and there exists \(0 \ne \xi \in \mathbb {F}_q\) which is not in the image of \(\varphi _{\bar{h}_t}\). Then the polynomial \(h_t:= \bar{h}_t -\xi \in \mathbb {F}_q [X]\) has no roots in \(\mathbb {F}_q\). As a consequence \(L_t(h_t)\) is a suitable choice of a matrix A for Theorem 7.

2.2 The case when \(\langle B_r \rangle \) and \(\langle B_t \rangle \) are Euclidean orthogonal

This subsection studies the Steane enlargement of the EAQECC \(\tilde{C}\) given by a code \(C= \langle B_r \rangle \oplus \langle B_t \rangle \subseteq \mathbb {F}_q^n\) satisfying that the codes \(\langle B_r \rangle \) and \(\langle B_t \rangle \) are Euclidean orthogonal. Note that Sect. 2.1 studies a special situation of the present subsection, where we are going to give the parameters of the Steane enlargement \(\tilde{D}_A\). In this case, additional conditions will be required to the matrix A.

Set \( \langle B_t \rangle = \langle B_{t_\ell } \rangle \oplus \langle B_{t_Q} \rangle \), where \(\langle B_{t_Q} \rangle \subseteq \langle B_{t} \rangle ^{\perp _e} \). We denote by \(t_\ell \) the dimension of the linear code \(\langle B_{t_\ell } \rangle \). Without loss of generality, assume that the rows of \(B_{t_\ell }\) are compatible with a geometric decomposition of \(\mathbb {F}_q^n\) (see Ruano 2018) and by (Galindo et al. 2019, Section 2.4), \(Z:=B_{t_\ell } B_{t_\ell }^T\) is a matrix such that all its elements are zero but diagonal boxes of the form

$$\begin{aligned} \left( \begin{array}{cc} 0 &{} 1\\ 1 &{} 0 \end{array}\right) , \end{aligned}$$

or \((z_{i})\), \(z_{i} \ne 0\), which in characteristic 2 may include a box as follows:

$$\begin{aligned} \left( \begin{array}{cc} 0 &{} 1\\ 1 &{} 1 \end{array}\right) . \end{aligned}$$

That is,

$$\begin{aligned} Z = \left( \begin{array}{llllllllll} 0 &{}\quad 1 &{} &{} &{} &{} &{} &{} &{} &{} \\ 1 &{}\quad 0 &{} &{} &{} &{} &{} &{} &{} &{} \\ &{} &{}\quad \ddots &{} &{} &{} &{} &{} &{} &{} \\ &{} &{} &{}\quad \quad 0 &{} 1 &{} &{} &{} &{} &{} \\ &{} &{} &{}\quad 1 &{} 0 &{} &{} &{} &{} &{} \\ &{} &{} &{} &{} &{}\quad z_1 &{} &{} &{} &{} \\ &{} &{} &{} &{} &{} &{}\quad \ddots &{} &{} &{} \\ &{} &{} &{} &{} &{} &{} &{}\quad z_s &{} &{} \\ &{} &{} &{} &{} &{} &{} &{} &{}\quad 0 &{}\quad 1 \\ &{} &{} &{} &{} &{} &{} &{} &{} \quad 1 &{}\quad 1 \end{array} \right) , \end{aligned}$$

where the last box may only appear in characteristic 2.

Now consider an invertible matrix

$$\begin{aligned} A = \left( \begin{array}{cc} A_0 Z^{-1} &{} 0 \\ 0 &{} A_1 \end{array} \right) , \end{aligned}$$

where \(A_0\) (respectively, \(A_1\)) are \(t_\ell \times t_\ell \) (respectively, \((t- t_\ell ) \times (t- t_\ell ))\) matrices with entries in \(\mathbb {F}_q\). We also assume that A has no eigenvalue in the finite field \(\mathbb {F}_q\). Then, we are ready to state our main result in this subsection.

Theorem 10

Let \(C= \langle B_r \rangle \oplus \langle B_t \rangle \subseteq \mathbb {F}_q^n\) be an \(\mathbb {F}_q\)-linear code as before. Denote by c the minimum required number of maximally entangled states in the EAQECC \(\tilde{C}\) determined by C. Then, the linear code \(D_A\) gives rise to an EAQECC \(\tilde{D}_A\), which is a Steane enlargement of \(\tilde{C}\), with parameters

$$\begin{aligned}{}[[n, n-2r-t +c', d', c']]_q, \end{aligned}$$

where

$$\begin{aligned} c' = (c-t_\ell ) + \frac{1}{2} \textrm{rank} \left( A_0 - A_0^T\right) = c- \textrm{rank}\left( B_t B_t^T\right) + \frac{1}{2} \textrm{rank} \left( A_0 - A_0^T\right) \end{aligned}$$

and , \(\delta _1 = d_H \left( C^{\perp _e}\right) \) and \(\delta _2 = d_H \left( \langle B_r \rangle ^{\perp _e}\right) \).

Proof

Theorem 6 shows the parameters in the statement with the exception of the formula for \(c'\). The number of maximally entangled states \(c'\) depends on the rank of the matrix in (4). We have assumed that the codes \(\langle B_r \rangle \) and \(\langle B_t \rangle \) are Euclidean orthogonal, therefore \(B_rB_t^T=0\) and the boxes in positions (1, 2), (1, 3), (2, 1) and (3, 1) of the matrix in (4) vanish. In addition, recalling that \(Z= B_{t_\ell } B_{t_\ell }^T\) is an invertible square matrix of size \(t_\ell \), it holds that

$$\begin{aligned} B_t B_t^T = \left( \begin{array}{cc} Z &{} 0\\ 0 &{} 0 \end{array} \right) \end{aligned}$$

and then, the box in position (1, 1) of the matrix in (4), which is \(B_t B_t^T A^T - A B_t B_t^T\), is equal to

$$\begin{aligned} \left( \begin{array}{cc} Z &{} 0\\ 0 &{} 0 \end{array} \right) \left( \begin{array}{cc} (Z^{-1})^T A_0^T &{} 0\\ 0 &{} A_1^T \end{array} \right) - \left( \begin{array}{cc} A_0 Z^{-1} &{} 0\\ 0 &{} A_1 \end{array} \right) \left( \begin{array}{cc} Z &{} 0\\ 0 &{} 0 \end{array} \right) = \left( \begin{array}{cc} A_0^T -A_0 &{} 0\\ 0 &{} 0 \end{array} \right) . \end{aligned}$$

Therefore, it holds that

$$\begin{aligned} c' = \frac{1}{2} \left( \textrm{rank} \left( A_0 -A_0^T\right) \right) + \textrm{rank} \left( B_r B_r^T\right) . \end{aligned}$$
(6)

Now, taking into account that \(\langle B_r \rangle \) and \(\langle B_t \rangle \) are Euclidean orthogonal, by Equality (2), we get

$$\begin{aligned} c= \textrm{rank} \left( B_r B_r^T \right) + \textrm{rank} \left( B_t B_t^T \right) = \textrm{rank} \left( B_r B_r^T \right) +t_\ell . \end{aligned}$$
(7)

Combining equalities (6) and (7), the equalities for \(c'\) in the statement are proved. \(\square \)

We finish this subsection by showing that a matrix A given in terms of the above matrices \(L_j\) is suitable for our purposes.

Lemma 11

Let \(h_{\varvec{a}} (X)\) be a polynomial as in (5) and consider the companion matrix \(L_j:= L_j (h_{\varvec{a}})\). Then

$$\begin{aligned} \textrm{rank} (L_j -L_j^T) \ge j- 2. \end{aligned}$$

Moreover, \(\textrm{rank} (L_j -L_j^T)=j-1\) if j is odd; otherwise, \(\textrm{rank} (L_j -L_j^T)=j\) if and only if

$$\begin{aligned} 1 + a_0 + a_2 + a_4 + \cdots +a_{j-2} \ne 0. \end{aligned}$$

Proof

For a start, it holds that

$$\begin{aligned}{} & {} L_j -L_j^T \\{} & {} \quad = \left( \begin{array}{cccccccccc} 0 &{} 1 &{} 0 &{} 0&{} 0&{} \cdots &{} 0 &{} 0 &{}0 &{} a_0\\ -1 &{} 0 &{} 1 &{} 0&{} 0&{} \cdots &{} 0 &{} 0 &{} 0 &{} a_1\\ 0 &{} -1 &{} 0 &{} 1&{} 0&{} \cdots &{} 0 &{} 0 &{} 0 &{} a_2\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \cdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} 0 &{} 0 &{} 0&{} 0&{} \cdots &{} -1 &{} 0 &{} 1 &{} a_{j-3}\\ 0 &{} 0 &{} 0 &{} 0&{} 0&{} \cdots &{} 0 &{} -1 &{} 0 &{} 1 + a_{j-2}\\ -a_0 &{} -a_1 &{} -a_2 &{} -a_3 &{} -a_4 &{} \cdots &{} -a_{j-4} &{} -a_{j-3} &{} -1 - a_{j-2} &{} 0 \end{array} \right) . \end{aligned}$$

The matrix \(L_j -L_j^T\) is skew-symmetric. This matrix is also alternate even in characteristic 2 because the elements of its diagonal vanish. Then its rank is even (Delsarte and Goethals 1975). In addition, if one deletes the last two rows and the first and the last column, one gets a triangular matrix with ones in the diagonal. Then \(\textrm{rank} (L_j -L_j^T) \ge j- 2\) and we have proved our first statement. Since the rank is even, the statement that \(\textrm{rank} (L_j -L_j^T) = j-1\) when j is odd is clear.

Finally assume that j is even. Then, \(\textrm{rank} (L_j -L_j^T)\) equals either j or \(j-2\). We are going to prove that this rank is j if and only if \(\det (L_j -L_j^T) \ne 0\) if and only if \((1 + a_0 + a_2 + a_4 + \cdots +a_{j-2}) ^2 \ne 0\) if and only if \((1 + a_0 + a_2 + a_4 + \cdots +a_{j-2}) \ne 0\), which concludes the proof. Thus, the fact to prove is that, for j even,

$$\begin{aligned} \det (L_j -L_j^T) = (1 + a_0 + a_2 + a_4 + \cdots +a_{j-2}) ^2. \end{aligned}$$

Indeed, adding the odd rows to the \((j-1)\)th row, we get a new matrix with the same determinant and the same rows with the exception of the \((j-1)\)th one, all the entries of this \((j-1)\)th row are zeros with the exception of the last one, which is

$$\begin{aligned}1+a_0+a_2+a_4+ \cdots + a_{j-2}.\end{aligned}$$

Now we use the Laplace expansion along the \((j-1)\)th row, getting a unique non-vanishing summand. Next we again perform Laplace expansions using, successively, those rows having a unique one as entry (these ones are in the odd files of the initial matrix). Then, it remains to compute the minor given by the determinant of the matrix

$$\begin{aligned} \left( \begin{array}{cccccccc} -1 &{} 1 &{} 0 &{} 0&{} \cdots &{} 0 &{} 0 &{}0 \\ 0 &{} -1 &{} 1 &{} 0&{} \cdots &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} -1 &{} 1&{} \cdots &{} 0 &{} 0 &{} 0 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \cdots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} 0 &{} 0 &{} 0&{} \cdots &{} 0 &{} -1 &{} 1\\ -a_0 &{} -a_2 &{} -a_4 &{} -a_6 &{} \cdots &{} -a_{j-6} &{} -a_{j-4} &{} -1 - a_{j-2} \end{array} \right) . \end{aligned}$$

Finally, adding all the columns in the above matrix to the last column, we get the following matrix (with the same determinant):

$$\begin{aligned} \left( \begin{array}{cccccccc} -1 &{} 1 &{} 0 &{} 0&{} \cdots &{} 0 &{} 0 &{}0 \\ 0 &{} -1 &{} 1 &{} 0&{} \cdots &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} -1 &{} 1&{} \cdots &{} 0 &{} 0 &{} 0 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \cdots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} 0 &{} 0 &{} 0&{} \cdots &{} 0 &{} -1 &{} 0\\ -a_0 &{} -a_2 &{} -a_4 &{} -a_6 &{} \cdots &{} -a_{j-6} &{} -a_{j-4} &{} -(1+a_0+a_2+ \cdots + a_{j-2}) \end{array} \right) . \end{aligned}$$

This proves that \(\det (L_j -L_j^T) = \left( 1+a_0+a_2+a_4+ \cdots + a_{j-2}\right) ^2\), and it finishes the proof. \(\square \)

Keep the notation as in Remark 9. One can use the matrix \( L_{t-t_\ell } \left( h_{t-t_\ell } \right) \) as the box \(A_1\) in the matrix A considered in Theorem 10.

We look for matrices \(A_0\) of the type \(L_j\) to guarantee that A has no eigenvalue in \(\mathbb {F}_q\). Our next proposal allows us to get matrices of the mentioned type such that \(\textrm{rank}(A_0-A_0^T)\) is maximum. Note that, by Theorem 10, this fact enlarges the entanglement but also the dimension of the obtained codes.

To begin with, suppose that either the characteristic of the field \(\mathbb {F}_q\) is odd or it is even and \(t_\ell >2\). Then, set \(\tilde{\phi }_{t_\ell }:=X^{t_\ell } - X^{t_\ell -2} \in \mathbb {F}_q [X]\). The attached map

$$\begin{aligned} \varphi _{\tilde{\phi }_{t_\ell }}: \mathbb {F}_q \rightarrow \mathbb {F}_q \end{aligned}$$

is \(\varphi _{\tilde{\phi }_{t_\ell }}(x) = \tilde{\phi }_{t_\ell } (x)\). As in Remark 9, \(\varphi _{\tilde{\phi }_{t_\ell }}\) is not bijective and one can find a nonzero element \(\xi _1\) in \(\mathbb {F}_q \) such that the polynomial \(\phi _{t_\ell }:= \tilde{\phi }_{t_\ell } - \xi _1 \in \mathbb {F}_q [X]\) has no roots in \(\mathbb {F}_q\). In this case, \(L_{t_\ell } (\phi _{t_\ell })\) is a suitable matrix for being the matrix \(A_0\) involved in the box (1, 1) of A.

When \(q \ne 2\), the characteristic of the field \(\mathbb {F}_q\) is two and \(t_\ell =2\), it suffices to consider the matrix \(L_{t_2} (\phi _{2})\) defined by \(\tilde{\phi }_{2} = \bar{h}_2\), where \(\bar{h}_2\) is the polynomial given in Remark 9, and consider \(\phi _{2} = \tilde{\phi }_{2} - \xi \), where \(\xi \ne 0, 1\) is a suitable value in \(\mathbb {F}_q\). Notice that, in this case, a polynomial \(X^2+X-\varsigma \), \(\varsigma \in \mathbb {F}_q\), either has two different roots or it is irreducible.

Corollary 12

Let \(A_0\) and \(A_1\) be matrices as described in the above paragraphs. Then, the matrix

$$\begin{aligned} A = \left( \begin{array}{cc} A_0 Z^{-1} &{} 0 \\ 0 &{} A_1 \end{array} \right) \end{aligned}$$

can be used to provide a Steane enlargement \(\tilde{D}_A\) of the EAQECC \(\tilde{C}\) given in Theorem 10. Furthermore, the rank of the matrix \(A_0 - A_0^T\) is as large as possible. That is to say, it is \(t_\ell \) (respectively, \(t_\ell -1\)) whenever \(t_\ell \) is even (respectively, odd).

Proof

The proof follows from the fact that our choice of \(A_0\) and \(A_1\) implies that they have no eigenvalue in \(\mathbb {F}_q\) and, then, the same happens to A. Finally by Lemma 11, if \(t_\ell \) is even, the value \(1+a_0+a_2+a_4+ \cdots + a_{j-2}\) corresponding to \(\phi _{t_\ell }\) is \(-\xi _1 \ne 0\) and its rank is maximum. \(\square \)

Remark 13

When \(t_\ell \) is odd, \(\textrm{rank}(A_0-A_0^T)=t_\ell -1\) is the only possibility if one considers matrices \(A_0\) of the type \(L_j\).

Assume now that \(t_\ell \) is even. If \(t_\ell \ge q\) and the characteristic of \(\mathbb {F}_q\) is two, we consider the polynomial \(\eta _{t_\ell }:= X^{t_\ell } - X^{t_\ell - q +1}-1\). Assume that q is odd. Soon we will show that there exists \(0 \ne a \in \mathbb {F}_q\) such that the polynomial \(X^2+aX-1 \in \mathbb {F}_q[X]\) has no roots in \(\mathbb {F}_q\). As a consequence, the polynomial \(\eta _{2w} = X^{2w}+aX^{w}-1\), w being an odd positive integer, has no roots in \(\mathbb {F}_q\). Therefore, if \(t_\ell \ge q\) when the characteristic is two and, otherwise, when \(t_\ell = 2w\), the polynomials \(\eta _{t_\ell }\) provide matrices \(A_0:= L_{t_\ell } (\eta _{t_\ell })\) which are suitable for our purposes and satisfy \(\textrm{rank}(A_0-A_0^T)=t_\ell -2\). For the remaining cases, we have no generic candidate for \(A_0\) such that \(\textrm{rank}(A_0-A_0^T)=t_\ell -2\), however for specific cases and moderate values of q and \(t_\ell \), it is not hard to find suitable polynomials \(\eta _{t_\ell }\) and attached matrices \(A_0\) with the above mentioned rank. Note also that the propagation rules stated in Luo et al. (2022) does not work here since our codes do not come from the Hermitian construction.

It remains to prove that \(X^2+aX-1\) is irreducible for some \(a \ne 0\). It holds if and only if there exists \(0 \ne a \in \mathbb {F}_q\) such that \(a^2 + 4 \ne b^2\) for all \(b \in \mathbb {F}_q\). Consider the attached equation (1): \(x^2 + 4 = y^2\), \(x, y \in \mathbb {F}_q\) and new variables \(x_1 = (x+y)/2\) and \(y_1 = (y-x)/2\) which satisfy \(x=x_1 - y_1\) and \(y=x_1 + y_1\). It follows that (xy) is a solution of (1) if and only if \((x_1,y_1)\) is a solution of the equation (2): \(x_1 y_1 =1\). Thus the map \(\zeta : \mathbb {F}_q^* \rightarrow \mathbb {F}_q\) defined \(\zeta (x_1) =x_1 - x_1^{-1} = x_1^{-1} (x_1^2 -1)\) takes the solutions of (2) into the solutions of (1) and \(x_1 =1\) and \(x_1 = -1\) give solutions of (1) with \(x=0\). This proves that there is some value \(a \ne 0\) in \(\mathbb {F}_q\) satisfying that \(a^2 + 4 = y^2\) has no solution in \(\mathbb {F}_q\), which concludes the proof.

2.3 e-MDS EAQECCs coming from MDS codes and Steane enlargement

The enlargement procedure allows us to get e-MDS EAQECCs by using MDS codes C and Theorems 7 and 10. The obtained EAQECCs are different from those given by Theorem 4 but their parameters are not new since they can be obtained by using other techniques. Let us explain it.

Recall that an \([n,k,d]_q\) code is an MDS code whenever \(k=n-d+1\). In addition, a q-ary EAQECC \([n,k,d;c]_q\) is named e-MDS whenever \(k=c+n-2d+2\). This corresponds to achieve the bound given in Grassl et al. (2022). This bound can be overcomed when \(d > \frac{n}{2}\), but this does not happen when the EAQECC is constructed from Theorem 4. If we consider an \([n,k]_q\) MDS code C with dual minimum distance \(d^{\perp _e}\), the dual code \(C^{\perp _e}\) is also MDS and therefore \(k=d^{\perp _e}-1\). By (1), C gives rise to an e-MDS EAQECC \(\tilde{C}\) with parameters \([[n, n- 2k +c, d^{\perp _e}; c]]_q\), where c is obtained as in (2). We desire to consider MDS codes C as in Theorems 7 and 10 to obtain Steane enlargements \(\tilde{D}_A\) such that they are e-MDS EAQECCs.

In the above mentioned theorems, we write \(C= \langle B_r \rangle \oplus \langle B_t \rangle \) and the minimum distance \(d'\) of \(\tilde{D}_A\) satisfies , \(\delta _1 = d_H \left( C^{\perp _e}\right) \) and \(\delta _2 = d_H \left( \langle B_r \rangle ^{\perp _e}\right) \). The parameters of \(\tilde{C}\) read \([[n, n - 2r-2t +c, r+t+1; c]]_q\). We desire to get e-MDS EAQECCs which forces the code \(\langle B_r \rangle \) to be MDS. Thus, the parameters of \(\tilde{D}_A\) are \([[n, n - 2r- t +c', r+2; c']]_q\) because \(n-r=n - \delta _2 +1\) and one needs \(t=2\) to be \(\tilde{D}_A\) an e-MDS EAQECC. Furthermore, by Corollary 12 and Remark 13, \(c - c' \in \{0,1,2\}\).

Assume \(t=2\), with the (possible) exception of \(c'\), the remaining parameters of \(\tilde{D}_A\) coincide with those of an e-MDS EAQECCs \(\tilde{C'}\) defined by an MDS code \(C'\) whose dimension is \(r+1\). When \(2r+2 \le n\), an EAQECC with parameters as \(\tilde{D}_A\) can be obtained by using the procedure given in (Guenda et al. 2020, Corollary 4.3). Otherwise, assuming that c has some of the values described in (Guenda et al. 2020, Corollary 4.3), one could find a new parameter \(c'\) only when \(c - c'=2\). However this is not possible if \(t=2\), because, with the notation as in Theorem 10, we would need \(t_\ell =2\) and \(A_0\) symmetric which is not possible.

We can obtain e-MDS EAQECCs from MDS codes whose parameters are different than expected. For instance, using a Reed-Solomon code \([8, 5, 4]_9\), our enlargement procedure gives an e-MDS EAQECCs \([[8,1,5;1]]_9\) (this can be derived from our next section setting \(m=s\)). We have used a code with dimension 5 instead of the expected one, \(k=4\).

Above, we have used MDS codes C to obtain enlarged EAQECCs. In this case the quotient \(\delta _2/q\) is small by the MDS conjecture. The enlargement procedure can give better results when the quotient \(\delta _2/q\) is reasonably big. This is because one can look for values of t giving rise to good codes since \(\delta _2\) can be chosen much larger than q improving the bound for \(d'\) in Theorems 7 and 10. BCH codes allow this property to hold. Next, we consider this family of codes.

3 Steane enlargement of EAQECCs given by BCH codes

In this last section we study the Steane enlargement of EAQECCs given by some BCH codes. We divide it in two subsections. The first one shows our results while the second one gives a few examples.

3.1 Results

BCH codes are cyclic codes but we prefer to regard them as subfield-subcodes of certain evaluation codes (Bierbrauer 2002; Cascudo 2019). In fact our BCH codes are J-affine variety codes in one variable with \(J=\{1\}\) as introduced in Galindo et al. (2017), and we will use some results from this source.

Set \(q=p^m\), \(m \ge 1\) and \(n= p^m -1\). We consider the evaluation map

$$\begin{aligned} \textrm{ev}: \frac{\mathbb {F}_q [X]}{\langle X^n - 1\rangle } \rightarrow \mathbb {F}_{q}^{n}, \end{aligned}$$

given by \(\textrm{ev}(h) = (h(R_1), \ldots , h(R_n))\), where \(\{R_i\}_{i=1}^n\) is the set of nth roots of unity in the finite field \(\mathbb {F}_q\). Now define \(H:=\{0, 1, \ldots , n-1\}\) and, for sets \(\emptyset \ne \Delta \subseteq H\), denote by \(C_\Delta \) the linear code over \(\mathbb {F}_q\) generated by \(\{\textrm{ev}(X^i): i \in \Delta \}\). Consider also a positive integer s such that \(s \ne m\) divides m and then, BCH codes over \(\mathbb {F}_{p^s}\) are subfield-subcodes of codes \(C_\Delta \), that is codes the form \(\mathbb {F}_{p^s}^n \cap C_\Delta \). Given \(a \in H\), a minimal cyclotomic coset (with respect to n and s) is a set of elements \(\mathcal {I}_a:=\{a p^{\ell s}: \ell \ge 0\}\), where the products are carried out modulo n (i.e., both a and the elements in \(\mathcal {I}_a\) are representatives in H of classes in the congruence ring \(\mathbb {Z}_n\)). Denote by \(i_a\) the cardinality of \(\mathcal {I}_a\) and set \(\mathcal {I}_a^R = \mathcal {I}_{n-a}\), which we name the reciprocal coset of \(\mathcal {I}_a\). Moreover, \(\mathcal {I}_a\) is named symmetric when \(\mathcal {I}_a =\mathcal {I}_a^R\) and, otherwise, it is called to be asymmetric.

Within each minimal cyclotomic coset, we take its minimal element for the natural ordering and denote by \(\mathcal {A}= \{a_0=0< a_1< \cdots < a_z\}\) the set of these minimal representatives. Then \(\left\{ \mathcal {I}_{a_\nu } \right\} _{\nu =0}^z\) is the set of minimal cyclotomic cosets (with respect to n and s). We will use the following result which can be found in (Galindo et al. 2021, Propositions 1 and 2).

Proposition 14

Keep the above notation.

  1. (1)

    Assume that \(\Delta =\cup _{\nu =\ell _1}^{\ell _2} \mathcal {I}_{a_\nu }\), where \(\ell _1 <\ell _2\) are in \(\{0, 1, \ldots , z\}\). Then, the dimension of the subfield-subcode \(\mathbb {F}_{p^s}^n \cap C_\Delta \) is equal to \(\sum _{\nu =\ell _1}^{\ell _2} i_{a_\nu }\). The same result is true when \(\Delta \) is union of nonconsecutive minimal cyclotomic cosets.

  2. (2)

    Assume now that \(\ell _1=0\) and denote by \(\delta \) the minimum distance of the Euclidean dual code of \(\mathbb {F}_{p^s}^n \cap C_\Delta \), then \(\delta \ge a_{\ell _2 +1} + 1\).

For \( 0 \le \ell < z\), denote \(\Delta (\ell ) = \cup _{\nu =0}^\ell \mathcal {I}_{a_\nu }\) and \(\Delta (\ell )^{\perp _e} =H {\setminus } \cup _{\nu =0}^\ell \mathcal {I}_{a_\nu }^R\). Then, by (Galindo et al. 2021, page 5), the Euclidean dual of \(\mathbb {F}_{p^s}^n \cap C_{\Delta (\ell )}\) coincides with the subfield-subcode \(\mathbb {F}_{p^s}^n \cap C_{\Delta (\ell )^{\perp _e}}\). We decompose \(\Delta (\ell ) = \Delta _r \sqcup \Delta _L\), where \(\Delta _r\) consists of the asymmetric cosets in \(\Delta (\ell )\) whose reciprocal coset is not in \(\Delta (\ell )\) and \(\Delta _L\) is the union of the remaining asymmetric cosets and the symmetric ones. It is clear that \(\Delta (\ell ) = \Delta _r \cup \Delta _L\) and \( \Delta _r \cap \Delta _L = \emptyset \).

The following result follows by applying Theorem 4 (where one considers \(C_1 = C_2 = \mathbb {F}_{p^s}^n \cap C_{\Delta (\ell )}\)) and the first displayed formula in (Galindo et al. 2021, page 7).

Theorem 15

With the above notation, there exists an EAQECC whose parameters are

$$\begin{aligned} \left[ \left[ n, n-2 \sum _{\nu =0}^{\ell } i_{a_\nu } + c, \ge a_{\ell +1} +1; c \right] \right] _{p^s}, \end{aligned}$$

where \(c = \# \Delta _L\), \(\#\) meaning cardinality.

The goal of this section is to compute the parameters of the Steane enlargement of some EAQECCs provided either by Theorem 15 or by the same procedure as in that theorem but associated to another codes \(C_\Delta \). Given a prime number p and distinct positive integers m and s as above, we define the positive integer B(pms) as

$$\begin{aligned} B(p,m,s):= {\left\{ \begin{array}{ll} \left( p^s \right) ^{ \frac{m}{2s} } -1 &{} \text { if } \frac{m}{s} \text { is even},\\ \left( p^s \right) ^{\lceil \frac{m}{2s} \rceil } -p^s +1 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

We will use this integer frequently.

The following result follows from Theorem 3 and Lemma 8 in Aly et al. (2007).

Proposition 16

Let pm and s be integers as above and consider another integer b such that \(0<b <B(p,m,s)\). Then,

a):

\(\mathcal {I}_b \subseteq \mathcal {I}_b^{\perp _e}:= H \setminus \mathcal {I}_b^R\).

b):

\(\# \mathcal {I}_b = \frac{m}{s}\) and this equality also holds when \(b = B(p,m,s)\).

We are ready for stating our first new result in this section. It falls within the case described in Sect. 2.1. We state it and afterwards we give two corollaries.

Theorem 17

Let p be a prime number and m and s distinct positive integers as above. Set \(n= p^m -1\) and \(\mathcal {A}= \{a_0=0< a_1< \cdots < a_z\}\) the set of minimal representatives of the family of minimal cyclotomic cosets (with respect to n and s). Pick indices \(\ell _1< \ell _2 < z\) such that \(a_{\ell _2} < B(p,m,s)\). Then, there is a Steane enlargement of an EAQECC as in Theorem 15 whose parameters are

$$\begin{aligned} \left[ \left[ n, n - \frac{m}{s} (\ell _1 + \ell _2) -1, d';1 \right] \right] _{p^s}, \end{aligned}$$

where .

Proof

With the notation as in Theorem 7, set \(C:= \mathbb {F}_{p^s} \cap C_{\Delta (\ell _2)}\) and \(B_r\) (respectively, \(B_t\)) a generator matrix of the codes \(\mathbb {F}_{p^s} \cap C_{\Delta (\ell _1)}\) (respectively, \(\mathbb {F}_{p^s} \cap C_{\Delta '}\), where \(\Delta ' = \cup _{\nu =\ell _1 +1 }^{\ell _2} \mathcal {I}_{a_\nu }\)). Then, taking into account that the evaluation of a monomial \(X^a\) is orthogonal to that of \(X^b\) except when \( a+b \equiv 0 \mod n\) (see (Galindo et al. 2017, Proposition 2.2)), by Proposition 16 one deduces that \(\Delta _L = \mathcal {I}_{0}\) in the decomposition \(\Delta (\ell _2) = \Delta _r \sqcup \Delta _L\) given before Theorem 15. Thus the value c of the EAQECC given by C is \(c=1\). Finally, if one applies Theorem 7 and considers Propositions 14 and 16, one obtains a Steane enlargement of the EAQECC given by C with parameters

$$\begin{aligned} \left[ \left[ n, n - 2 \left( \frac{m \ell _1}{s} +1 \right) - \left( \frac{m (\ell _2 -\ell _1)}{s}\right) + 1, d';1 \right] \right] _{p^s}, \end{aligned}$$

where . This concludes the proof. \(\square \)

Taking \(\ell _1=0\) and \(\ell _2=1\) in the above theorem, one gets the following result.

Corollary 18

Consider a prime number p and a positive integer \(n= p^m -1\) given by \(m>0\). Set \(s \ne m\) a positive integer such that s divides m. Then, there exists a Steane enlargement of an EAQECC as in Theorem 15 with parameters \(\left[ \left[ n,n- \frac{m}{s} -1, 3;1 \right] \right] _{p^s}\).

Notice that, in Corollary 18, when \(m/s=2\) one gets an e-MDS EAQECC. However the obtained parameters are not new, although to be obtained one needs to consider Hermitian self-orthogonality (Chen 2023, Corollary 3.8) and, in our case, we use only Euclidean inner product.

The following result is a bit weaker than Theorem 17 but depends only on an element in \(\mathcal {A}\).

Corollary 19

Keep the notation as in Theorem 17 and pick \(a_{\ell } \in \mathcal {A}\) such that \(a_{\ell } < B(p,m,s)\). Then, there is a Steane enlargement of an EAQECC as in Theorem 15 whose parameters are

$$\begin{aligned} \left[ \left[ n, n - \frac{m}{s} ( 2 \ell -1 ) -1, a_{\ell +1};1 \right] \right] _{p^s}. \end{aligned}$$

Proof

Apply Theorem 17 for \(\ell _1 = \ell -1\) and \(\ell _2 = \ell \). The proof follows from the fact that \(a_{\ell +1} = a_{\ell } +2\) if \(a_\ell \) +1 is a multiple of \(p^s\) and \(a_{\ell +1} = a_{\ell } +1\) otherwise. Indeed, it is clear that \(a_i=i\) whenever \(i < p^s\) and that, when \(a_\ell +1\) is a multiple of \(p^s\), then \(a_{\ell +1} > a_\ell +1\). Thus, when m/s is even, it suffices to prove that the elements of the form \(b + \lambda p^s < p^{m/2} -1\), \(b, \lambda \) positive integers and \(0 \ne b < p^s\) are minimal representatives in \(\mathcal {A}\). This is true because b is the first element in the \(p^s\)-adic expansion of \(b + \lambda p^s\) and, expressing the \(p^s\)-adic expansion \(a_0 + a_1 p^s + \cdots + a_{\lfloor \frac{n}{s}\rfloor } p^{\lfloor \frac{n}{s}\rfloor s}\) of an integer as \((a_0, a_1, \ldots , a_{\lfloor \frac{n}{s}\rfloor })\), the \(p^s\)-adic expansions of the elements in the coset \( \mathcal {I}_{b + \lambda p^s}\) are obtained by successively shifting the \(p^s\)-adic expansion of \(b + \lambda p^s\). During a while, these shifts are \(p^s\)-adic expansions with a zero in the first position and when one obtains a nonzero in the first position, the corresponding value is larger than \(p^{m/2}-1\). An analogous reasoning proves the result in the case when m/2 is odd. \(\square \)

The following result is also supported on Theorem 7. We keep the same conditions as in Theorem 17. That is, we consider a prime number p, and m and s different positive integers such that s divides m. Let \(\mathcal {A}= \{a_0=0< a_1< \cdots < a_z\}\) be the set of minimal cyclotomic cosets (with respect to \(n = p^m -1\) and s).

Theorem 20

Let \(\ell _1< \ell _2 < z\) two indices such that \(a_{\ell _2} < B(p,m,s)\). Then, there is a Steane enlargement of an EAQECC determined by a code \(C_\Delta \) with parameters:

$$\begin{aligned} \left[ \left[ n, n - \frac{m}{s} (\ell _1 + \ell _2) -1, d';c \right] \right] _{p^s}, \end{aligned}$$

where .

Proof

For a nonnegative integer \(\ell \), define \(\Delta (\ell , R): = \cup _{\nu =0}^{\ell } \mathcal {I}_{a_\nu } \bigcup \cup _{\nu =1}^{\ell } \mathcal {I}_{a_\nu }^R\). Now, with the notation as in Theorem 7, set \(C:= \mathbb {F}_{p^s} \cap C_{\Delta (\ell _1,R) \cup \Delta '}\), where \(\Delta ' = \cup _{\nu = \ell _1 +1}^{\ell _2} \mathcal {I}_{a_\nu }\). Fix \(B_r\) (respectively, \(B_t\)) a generator matrix of the code \(\mathbb {F}_{p^s} \cap C_{\Delta (\ell _1, R)}\) (respectively, \(\mathbb {F}_{p^s} \cap C_{\Delta '}\)).

To compute c, we reason as in the proof of Theorem 17 and \(c=1 + 2 \frac{m}{s} \ell _1\), because the set \(\Delta _L\) in the decomposition \(\Delta (\ell _1,R) \cup \Delta ' = \Delta _r \sqcup \Delta _L\) given before Theorem 15 is \(\Delta (\ell _1,R)\). With respect to the distance, we notice that the values in \(\Delta (\ell , R)\) contain all the consecutive integers from 0 to \(a_{\ell +1} -1\) and their opposites modulo n. Then, using the \(*\) product defined by \((x_1, \ldots , x_n)*(y_1, \ldots , y_n) =(x_1 y_1, \ldots , x_n y_n)\), we deduce that there is code which is isometric to \(C_{\Delta (\ell , R)}\) containing the evaluation of consecutive powers of X. This proves that the minimum Hamming distance of \(\langle B_r \rangle ^{\perp _e}\) is larger than or equal to \(2 a_{\ell _1 +1}\). A close reasoning shows that \(d_H(C^{\perp _e}) \ge a_{\ell _1 +1} + a_{\ell _2 +1}\), which ends the proof. \(\square \)

Our last results fit with the case described in Subsection 2.2. We start with the following one.

Theorem 21

Let p be a prime number and m and s positive integers such that s divides m, \(s\ne m\). Assume that m and m/s are even. Set \(n= p^m -1\) and \(\mathcal {A}= \{a_0=0< a_1< \cdots < a_z\}\) the set of minimal representatives of the family of minimal cyclotomic cosets (with respect to n and s). Let \(0< \ell _2 <z\) that index such that \(a_{\ell _2} = p^{\frac{m}{2}}-1\). Consider an index \( 0 \le \ell _1 < \ell _2\). Then, there is a Steane enlargement of an EAQECC as in Theorem 15 whose parameters are

$$\begin{aligned} \left[ \left[ n, n - \frac{m}{s} (\ell _1 + \ell _2) -1 + \frac{m}{2s}, d'; \frac{m}{2s}+1 \right] \right] _{p^s}, \end{aligned}$$

where .

Proof

We desire to use Theorem 10. Consider \(C:= \mathbb {F}_{p^s} \cap C_{\Delta (\ell _2)}\) and a suitable generator matrix \(B_r\) (respectively, \(B_t\)) of the subfield-codes \(\mathbb {F}_{p^s} \cap C_{\Delta (\ell _1)}\) (respectively, \(\mathbb {F}_{p^s} \cap C_{\Delta '}\), where \(\Delta ' = \cup _{\nu =\ell _1 +1 }^{\ell _2} \mathcal {I}_{a_\nu }\)). With the notation used after Proposition 14 and by (Galindo et al. 2017, Remark 3.4), it holds that \(\Delta _L = \mathcal {I}_{0} \cup \mathcal {I}_{a_{\ell _2}}\) and \(\Delta _r = \cup _{\nu =1}^{\ell _{2}-1} \mathcal {I}_{a_\nu }\) in the decomposition \(\Delta (\ell _2) = \Delta _r \sqcup \Delta _L\). Theorem 15 and Proposition 16 show that the value c of the EAQECC given by C is \(c = 1 + \# \mathcal {I}_{a_{\ell _2}} =1 + (m/s)\).

Finally, the proof follows by applying Theorem 10 and Corollary 12 after noticing that m/s is the rank of a suitable matrix \(A_0 - A_0^T\) as introduced in Subsection 2.2 and \(\textrm{rank}(B_r B_r^T) =1\). Thus we have proved that there is a Steane enlargement of the EAQECC given by C with parameters as in the statement. \(\square \)

As in the proof of Theorem 20, we can add reciprocal cosets and the obtained result is the following one.

Theorem 22

The following statements hold.

i):

Keep the same notation and requirements as in Theorem 20, then there exists a Steane enlargement of an EAQECC determined by a code \(C_\Delta \) with parameters:

$$\begin{aligned} \left[ \left[ n, n - \frac{m}{s} (\ell _1 + \ell _2) -1, d';c' \right] \right] _{p^s},\end{aligned}$$

where and \(c'=1 + \frac{m}{s} (\ell _1+ \ell _2)\).

ii):

If we are under the notation and conditions of Theorem 21, then there is a Steane enlargement of an EAQECC with parameters

$$\begin{aligned} \left[ \left[ n, n - \frac{m}{s} \left( \ell _1 + \ell _2 - \frac{1}{2}\right) -1, d';c' \right] \right] _{p^s}, \end{aligned}$$

where

and \(c'=1 + \frac{m}{s} (\ell _1 + \ell _2 - \frac{1}{2})\).

Proof

To prove the first statement, it suffices to consider \(C:= \mathbb {F}_{p^s} \cap C_{\Delta (\ell _2,R)}\) and suitable matrices \(B_r\) and \(B_t\), where \(B_r\) generates the subfield-code \(\mathbb {F}_{p^s} \cap C_{\Delta (\ell _1,R)}\) and, then, apply the same procedure as in the proof of Theorem 21. A proof for the second statement is analogous after taking into account that the coset \(\mathcal {I}_{a_{\ell _2}}\) is symmetric. Recall that in this last case \(a_{\ell _2} = p^{\frac{m}{2}}-1\). \(\square \)

Remark 23

Under the conditions described in the second paragraph of Remark 13, we can also obtain Steane enlargements of EAQECCs whose parameters coincide with those stated in Theorems 21 and 22 but the entanglement \(c'\) and the dimension, which are one unit less. To do it, it suffices to consider matrices \(A_0\) defined by polynomials \(\eta _{t_\ell }\) as in the mentioned Remark 13.

3.2 Examples

We conclude this section and the paper by providing parameters of EAQECCs obtained from some results given in Sect. 3.1. Note that Steane enlarged codes enjoy the interesting computational advantages described after Theorem 1. We present some EAQECCs with parameters that we have not found in the literature and cannot be obtained from existing ones by means of propagation rules.

We give three tables of q-ary EAQECCs for \(q=2, 4, 9\). Our tables show the parameters of the codes and the involved results to deduce them. The tables also present the values m, s, \(a_{\ell _1}\) and \(a_{\ell _1}\) used in our computations. Our procedure allows us to obtain q-ary EAQECCs with \(q=p^s\) and (relative to q) length \(n=p^m -1 = q^{\frac{m}{s}}-1\) as large as one desires; it suffices to take s and \(\frac{m}{s}\) as large as one needs. We illustrate the case q large with two additional tables corresponding to \(q=25\) and \(q=49\).

Table 1 Parameters of binary EAQECCs
Table 2 Parameters of 4-ary EAQECCs
Table 3 Parameters of 9-ary EAQECCs
Table 4 Parameters of 25-ary EAQECCs
Table 5 Parameters of 49-ary EAQECCs

Table 1 shows some examples in the binary case. To enhance understanding we explain three cases in detail. The same procedure allows us to obtain the parameters of all our tables. The first binary code in the table have parameters \([[15,4,6;3]]_2\) and them follow from the formula in Theorem 21, where \(m=4\), \(s=1\), \(\ell _1=1\), \(a_{\ell _1}= 1\), \(\ell _2=2\), \(a_{\ell _2}= 3\) and \(a_{3}= 5\). If one applies Theorem 17 for \(m=5\), \(s=1\), \(\ell _1=1\), \(a_{\ell _1}= 1\), \(\ell _2=2\), \(a_{\ell _2}= 3\) and \(a_{3}= 5\), then one gets a code with parameters \([[31,15,6;1]]_2\) as in the second line of the table. Finally, the binary code \([[63,32,14;31]]_2\) in the eighth row of the table can be constructed from Theorem 22 by noticing that \(m=6\), \(s=1\), \(\ell _1=2\), \(a_{\ell _1}= 3\), \(\ell _2=3\), \(a_{\ell _2}= 5\) and \(a_{4} =7\). To the best of our knowledge, EAQECCs in Table 1 are new with the exception of those marked with a *. We think they are good since in some cases they compare well with others in the literature. Indeed, our code \([[15,4,6;3]]_2\) (respectively, \([[63,44,8;13]]_2\)) is better than \([[15,4,6;5]]_2\) (respectively, \([[63,42,8;14]]_2\)) appearing in Grassl (2022). This last reference also contains the codes marked with a *, being the best known codes with those parameters. We add them to show that we are able to get good codes.

Table 2 (respectively, 3, 4, 5) provides some examples of new 4-ary (respectively, 9-ary, 25-ary, 49-ary) EAQECCs obtained with our results. Furthermore, in Tables 1, 2 and 3, according to Remark 23, the values k and c can be decreased one unit whenever we apply Theorems 21 and 22. Indeed, one can use the polynomials \(\eta _{t_\ell }\) given in Remark 13 after noticing that \(t_\ell = 6\) in the corresponding cases of Table 3. All the codes in Tables 1, 2, 3, 4 and 5 exceed the Gilbert-Varshamov bound stated in Galindo et al. (2019).