1 Introduction

Quantum error-correcting codes (QECCs) were extensively studied in the past two decades since the pioneer works of Shor and Steane [1, 2], for details please see [310]. The most widely studied class of quantum codes are binary stabilizer (or additive) QECCs [6, 7], which are also called standard (or regular) QECCs now [1113]. Binary stabilizer QECCs can be constructed from classical codes over finite fields \(\mathbf {F}_{2}\) or \(\mathbf {F}_{4}\) with certain self-orthogonal properties [68], where \(\mathbf {F}_{q}\) is the finite field with q elements. Unfortunately, the need for a self-orthogonal parity check matrix presents a substantial obstacle to importing the classical error-correcting theory into quantum error control entirely, especially in the context of modern codes such as low-density parity check codes [10, 12].

In [12], Brun et al. devised the entanglement-assisted (EA) stabilizer formalism, and this EA-stabilizer formalism includes the standard stabilizer formalism [6, 7] as a special case. They showed that if shared entanglement between the encoder and decoder is available, classical linear quaternary (and binary) codes that are not self-orthogonal can be transformed to EAQECCs. Following [12], there are a lot of papers making further study of EAQECCs [1328], and [13, 1926] show that entanglement can improve the performance of EAQECCs.

An \([[n,k,d_{ea};c]]\) EAQECC encodes k information qubits into n channel qubits with the help of c pairs of maximally entangled Bell states (ebits), and \(d_{ea}\) is the minimum distance of the code. The code can correct up to \(\lfloor \frac{d_{ea}-1}{2}\rfloor \) errors acting on the n channel qubits. If \(c=0\), then an \([[n,k,d_{ea};c]]\) EAQECC is a standard quantum code and is usually denoted as [[nkd]] where \(d=d_{ea}\). Lai et al. constructed many good EAQECCs of small lengths by encoding optimization procedure and showed that entanglement can boost error-correcting ability of quantum codes [13, 22]. A number of their EAQECCs are not equivalent to any standard stabilizer code. An \([[n, k,d_{ea}; c]]\) EAQECC is not equivalent to any standard stabilizer code if there is no \([[n+c,k,\ge d_{ea}]]\) standard QECC [13]. If there is no \([[n+c,k,\ge d_{ea}]]\) standard QECC, then an \([[n,k,d_{ea};c]]\) EAQECC has better error-correcting ability than standard QECC, and this EAQECC achieves the maximum boost to error-correcting power from the c ebits; otherwise, if there is an \([[n+c,k,\ge d_{ea}]]\) standard QECC, then an \([[n,k,d_{ea};c]]\) EAQECC may not be achieving the maximum boost to error-correcting power from the c ebits.

EAQECCs have some advantages over standard QECCs for correcting errors in quantum communication scenario. Except that, EAQECCs also have some usages in quantum cryptography and in fault-tolerant quantum computation [2932]. In [29], using Calderbank–Shor–Steane (CSS) EAQECCs, Luo and Devetak demonstrated a quantum key expansion (QKE) protocol, and this QKE has a potential advantage over the best known quantum key distribution protocol of Bennett–Brassard 1984 (BB84) protocol [30]. In [31], using EAQECCs constructed from classical finite geometry low-density parity check (LDPC) codes, Hsu and Brun presented a QKE protocol with enhanced performance compared to the original QKE protocol of Luo and Devetak. In [32], Wilde and Fattal developed a version of the stabilizer formalism for quantum error correction that is named as the bipartite stabilizer formalism, which extended the EA-stabilizer formalism. Under this bipartite stabilizer formalism, a stabilizer code can be cut into two parts with the help of suitable ebits. They represented the [[7, 1, 3]] Steane code as a bipartite quantum code and showed how this representation gave a simplified, local encoding circuit. As a result, the simplified encoding circuit improved the pseudothreshold for fault-tolerant quantum computation with the Steane code under certain assumptions.

In [13, 22, 25, 26], Lai et al. discussed the construction of optimal EAQECCs. An \([[n, k, d_{ea}; c]]\) EAQECC is optimal in the sense that \(d_{ea}\) is the highest achievable minimum distance for given parameters nk and c. To judge the optimality of an \([[n,k,d_{ea};c]]\) EAQECC, people have deduced some bounds for EAQECCs, such as the EA-Singleton bound [12]; the EA-Hamming bound for nondegenerate EAQECCs [11]; the EA-linear programming bound; and the EA-Plotkin bound [22].

An \([[n, k,d_{ea}; c]]\) is a linear EAQECC if it is constructed from a quaternary linear code. In [25], two of us strengthen the EA-Plotkin bound of [22] in the case of linear EAQECCs and construct three families of linear EAQECCs with very good parameters from quaternary linear codes of dimensions three and four. Using the linear EA-Plotkin bound, we can show some of these linear EAQECCs are optimal codes since they saturate this linear EA-Plotkin bound. Yet there are also many linear EAQECCs whose optimality still cannot be determined by the aforementioned bounds for EAQECCs [11, 12, 22, 23, 25]. Reference [26] shows the EA-quantum Hamming bound does not hold asymptotically for degenerate EAQECCs. Hence, we need to find tighter bound for EAQECCs.

In this paper, we will derive a Griesmer bound for linear EAQECCs, which is a quantum analog of the Griesmer bound for classical codes [3336] and a generalization of the Griesmer bound for linear QECCs [9]. We also obtain a relation between a linear EAQECC and a zero radical quaternary linear code. Combining these two results allows us to judge optimality of known linear EAQECCs which cannot be judged by other bounds for EAQECCs. Then, we construct four families of linear EAQECCs from quaternary linear codes, and all these EAQECCs are optimal codes according to the EA-Griesmer bound, and some of them attain the EA-Griesmer bound.

This paper is organized as follows. Section 2 reviews some facts on quaternary codes and linear EAQECCs. In Sect. 3, we present the EA-Griesmer bound, discuss tightness of our bound and known bounds for EAQECCs, and deduce a necessary condition on existence of linear EAQECCs. Section 4 gives explicit constructions of four families of linear EAQECCs, discusses the optimality of these codes, and then shows the necessary condition on existence of linear EAQECCs is also sufficient for some kinds of EAQECCs, and equivalence of our EAQECCs with standard stabilizer codes is also discussed. Section 5 gives discussion and conclusion.

2 Preliminaries

In order to prove the EA-Griesmer bound and present our results on constructing linear EAQECCs, we briefly review some basic concepts on quaternary codes, linear EAQECCs. For more details, please see [7, 12] and [25].

Let \(\mathbf {F}_{4}=\{0, 1, \omega , \varpi \}\) be the field of four elements, where \(\varpi =1+\omega =\omega ^{2}, \omega ^{3}=1\), and the conjugation of x is defined by \(\overline{x}=x^{2}\) for \(x\in \mathbf {F}_{4}\). Let \(\mathbf {F}_{4}^{n}\) be the n-dimensional row vector space over \(\mathbf {F}_{4}\). An m-dimensional subspace \(\mathcal {C}\) of \(\mathbf {F}_{4}^{n}\) is called an m-dimensional code of length n and is denoted as \(\mathcal {C}=[n,m]_{4}\); if the Hamming distance of \(\mathcal {C}\) is d, then it is denoted as \(\mathcal {C}=[n,m,d]_{4}\). For \(u=(u_{1},u_{2}, \ldots ,u_{n})\) and \(v=(v_{1},v_{2}, \ldots ,v_{n})\in \mathbf {F}_{4}^{n}\), their Hermitian inner product is defined as \((u,v)_{h} =\sum _{1}^{n} u_{j}\overline{v_{j}} =\sum _{1}^{n} u_{j}v_{j}^{2}\). If \(\mathcal {C}\) is an \([n,m]_{4}\) linear code, its Hermitian dual is defined as \(\mathcal {C}^{\perp _{h}}=\{u\in \mathbf {F}_{4}^{n}\mid (u,v)_{h}=0 \hbox { for all } v\in \mathcal {C}\}\), and \(\mathcal {C}^{\perp _{h}}\) is an \([n,n-m]_{4}\) linear code.

In [12], Brun et al. said that an EAQECC \(\mathcal {Q}^{ea}=[[n,2m-n+c,d;c]]\) can be constructed from an \([n,m,d]_{4}\) linear code \(\mathcal {C}\), the EA-stabilizer of \(\mathcal {Q}^{ea}\) is \(\mathcal {C}^{\perp _{h}}\), and \(\mathcal {Q}^{ea}\) is called a linear EAQECC in [25]. This statement was accurately specified as the following theorem.

Theorem 2.1

[25] If \(\mathcal {C}\) is an \([n,m,d]_{4}\) linear code and \(R(\mathcal {C})=\mathcal {C}\cap \mathcal {C}^{\perp _{h}}\) forms an \([n,r,d^{\prime }]_{4}\) linear code, then \(\mathcal {C}^{\perp _{h}}\) EA-stabilizes an EAQECC \(\mathcal {Q}^{ea}\) with parameters \([[n,2m-n+c,d_{ea};c]]=[[n,m-r,d_{ea};n-m-r]]\), where \(d_{ea}=min \{wt(\alpha ) \mid \alpha \in \mathcal {C}\setminus R(\mathcal {C})\}\ge d\). In particular, if \(d^{\prime }> d\), then \(\mathcal {Q}^{ea}=[[n,m-r,d;n-m-r]]\) is a nondegenerate EAQECC.

For the determination of \(d_{ea}\) and the nondegenerate or degenerate property of \(\mathcal {Q}^{ea}\), please see Section 3 of [25]. To simplify statements in following sections, we give some definitions and results on quaternary linear codes.

Definition 2.2

Suppose \(\mathcal {C}\) is an \([n,m]_{4}\) code, \(R(\mathcal {C})=\mathcal {C}\cap \mathcal {C}^{\perp _{h}}\) is called radical code of \(\mathcal {C}\) (or \(\mathcal {C}^{\perp _{h}}\)), and its dimension \(r=dim R(\mathcal {C})\) over \(\mathbf {F}_{4}\) is called radical dimension of \(\mathcal {C}\). An \([n,m]_{4}\) code \(\mathcal {C}\) with radical dimension r is denoted as \([n,m]^{(r)}_{4}\). An \([n,m]^{(0)}_{4}\) code \(\mathcal {C}\) is called a zero radical code since \(R(\mathcal {C})=\{0\}\).

Definition 2.3

Let \(0\le r \le m \le n\). An \([n,m,d]^{(r)}_{4}\) code is called optimal with given radical dimension r if there is no \([n,m,\ge d+1]^{(r)}_{4}\) code.

In [37], some low-dimensional optimal zero radical codes are determined as follows.

Lemma 2.4

[37]

  1. (1)

    If \(n=5t+i\ge 2\) with \(0\le i\le 4\), then the following codes \([5t,2,4t-1]^{(0)}_{4}, [5t+1,2,4t]^{(0)}_{4}, [5t+2,2,4t+1]^{(0)}_{4}, [5t+3,2,4t+2]^{(0)}_{4}, [5t+4,2,4t+2]^{(0)}_{4}\) are optimal zero radical codes.

  2. (2)

    If \(n=21t+i\ge 6\) with \(0\le i\le 20\), then the following codes are optimal zero radical codes:

    1. (i)

      \([21t+i,3,16t+i-2]^{(0)}_{4}\) for \(t\ge 1\) and \(1\le i\le 5\),

    2. (ii)

      \([21t+i,3,16t+i-3]^{(0)}_{4}\) for \(6\le i\le 9\),

    3. (iii)

      \([21t+i,3,16t+i-4]^{(0)}_{4}\) for \(10\le i\le 13\),

    4. (iv)

      \([21t+i,3,16t+i-5]^{(0)}_{4}\) for \(15\le i\le 18\),

    5. (v)

      \([21t+i,3,16t+i-6]^{(0)}_{4}\) for \(19\le i\le 21\).

The Griesmer bound is a well-known bound for classical linear codes. It says that [2932]: If an \([n,k,d]_{q}\) linear code over \(\mathbf {F}_{q}\) exists, then

$$\begin{aligned} g_{q}(k,d)=\sum ^{k-1}_{i=0}\left\lceil \frac{d}{q^{i}}\right\rceil \le n, \end{aligned}$$

where \(\lceil x\rceil \) denotes the smallest integer greater than or equal to x. In [38], Sarvepalli et al. derived a quantum Griesmer bound for CSS quantum codes (a special kind of stabilizer codes) and pointed out that a similar Griesmer bound for linear standard QECC can be obtained by their approach. In fact, a Griesmer bound for linear standard QECC can also be deduced from Lemma 4 of [9] as follows:

An [[nkd]] linear QECC satisfies the following bound of Griesmer type [9]:

$$\begin{aligned} g_{Q}(k,d)=\sum ^{k-1}_{i=0}\left\lceil \frac{d}{4^{i}}\right\rceil \le \frac{n+k}{2}. \end{aligned}$$
(1)

Notation 1

In the following sections, we use [nm] and \([n,m]^{(r)}\) to denote \([n,m]_{4}\) code and \([n,m]^{(r)}_{4}\) code for short, respectively. In each generator matrix of a quaternary linear code, we use 2 and 3 to represent \(\omega \) and \(\varpi \), respectively. For a matrix P, the conjugate transpose of P is denoted as \(P^{\dagger }\), and the juxtaposition \((P, P, \ldots ,P)\) of s-copies of P is denoted as sP. We judge the optimality of linear EAQECCs only by the linear EA-Griesmer bound.

Let \(\mathbf {1}_{m}=(1,1,\cdots ,1)\) and \(\mathbf {0}_{m}=(0,0,\cdots ,0)\) be the all one vector and the all zero vector of length m, respectively. For \(k\ge 2\), let \(N_{k}=\frac{4^{k}-1}{3}\). Construct

$$\begin{aligned}&S_{2}= \left( \begin{array}{cccccc} 0&{}1&{}1&{}1&{}1\\ 1&{}0&{}1&{}2&{}3\\ \end{array} \right) , \quad S_{3}= \left( \begin{array}{cccccc} S_{2}&{}\mathbf {0}_{2\times 1}&{}S_{2}&{}S_{2}&{}S_{2}\\ \mathbf {0}_{5}&{}1&{}\mathbf {1}_{5}&{}2\cdot \mathbf {1}_{5}&{}3\cdot \mathbf {1}_{5}\\ \end{array} \right) ,\\&\ldots ,\\&S_{k+1}=\left( \begin{array}{ccccc} S_{k}&{}\mathbf{0^{T}_{k}}&{}S_{k}&{} S_{k}&{} S_{k}\\ \mathbf 0_{N_{k}}&{}1&{}\mathbf 1_{N_{k}}&{}2\cdot \mathbf 1_{N_{k}}&{}3\cdot \mathbf 1_{N_{k}}\\ \end{array} \right) . \end{aligned}$$

Then \(S_{2}S_{2}^{\dagger }=0, S_{3}S_{3}^{\dagger }=0\) and \(S_{k}S_{k}^{\dagger }=0\). From [36], we know \(S_{2}\) generates the [2, 4, 5] Simplex code with weight polynomial \(1+15y^{4}, S_{3}\) generates the [3, 16, 21] Simplex code with weight polynomial \(1+63y^{16}\), and \(S_{k}\) generates the \([N_{k},k,4^{k-1}]\) Simplex code with weight polynomial \(1+(4^{k}-1)y^{4^{k-1}}\).

3 The EA-Griesmer bound for linear EAQECCs

In this section, we will prove an EA-Griesmer bound for linear EAQECCs based on Theorem 2.1, and this result is inspired by the results of [9] for linear standard QECCs and that of [38] for CSS stabilizer codes. Then, we compare this bound with known upper bounds for EAQECCs. Using this EA-Griesmer bound, one can determine optimality of some known linear EAQECCs that cannot be judged by previously known bounds.

Theorem 3.1

(Linear EA-Griesmer bound) Let \(k\ge 1\) and \(g_{ea}(k,d_{ea})=\sum ^{k-1}_{i=0}\lceil \frac{d_{ea}}{4^{i}}\rceil \). If \(\mathcal {Q}^{ea}=[[n,k,d_{ea};c]]\) is a linear EAQECC, then

$$\begin{aligned} g_{ea}(k,d_{ea})\le \frac{n+c+k}{2}. \end{aligned}$$
(2)

Or equivalently, \(n\ge g_{ea}(k,d_{ea})+r\), where r is the radical dimension of the linear EA-stabilizer of \(\mathcal {Q}^{ea}\).

The bound in Theorem 3.1 is called EA-Griesmer bound for linear EAQECCs. An EAQECC achieving this bound is called a Griesmer EAQECC.

Proof

Let \(\mathcal {C}^{\perp _{h}}\) be linear EA-stabilizer of \(\mathcal {Q}^{ea}\). Suppose \(\mathcal {C}\) is an [nm] linear code over \(F_{4}\) and \(R(\mathcal {C})=\mathcal {C}\cap \mathcal {C}^{\perp _{h}}\) forms an \([n,r]_{4}\) linear code. According to Theorem 2.1, \(\mathcal {Q}^{ea}=[[n,k,d_{ea};c]]=[[n,m-r,d_{ea}; n-(m+r)]]\), where \(r=\frac{n-c-k}{2}\).

According to the equivalence of quaternary codes given by [40], without loss of generality, we can assume \(R(\mathcal {C})\) is generated by \(G_{R}=(I_{r}\ \ X)\) and \(\mathcal {C}\) is generated by \(G =\left( \begin{array}{ccccc} I_{r}&{} X\\ 0_{k\times r}&{}B_{1}\\ \end{array} \right) \). Let \((0_{k\times r} \ \ B_{1})\) generates a code \(\mathcal {B}\) and \(B_{1}\) generates a code \(\mathcal {C}_{1}\). Then \( d(\mathcal {B})=d(\mathcal {C}_{1})=d_{1}\) for some \(d_{1}\), and \(\mathcal {C}_{1}=[n-r,k,d_{1}]= [(n+k+c)/2,k,d_{1}]\).

Since \(\mathcal {B}\subseteq \mathcal {C} \setminus R(\mathcal {C})\), one can deduce \(d_{ea}\le d(\mathcal {B})=d(\mathcal {C}_{1})=d_{1}\). From the Griesmer bound for quaternary linear codes, one can deduce \(g_{ea}(k,d_{ea})\le g_{4}(k,d_{1})=\sum ^{k-1}_{i=0}\lceil \frac{d_{1}}{4^{i}}\rceil \le \frac{n+c+k}{2}=n-r\). Hence the theorem holds.

It is not difficult to show that the code \(\mathcal {C}_{1}=[n-r,k,d_{1}]=[(n+k+c)/2,k,d_{1}]\) given in the proof of Theorem 3.1 is a zero radical code, and \(d_{ea}\le d_{1}\). We call \(\mathcal {C}_{1}\) a reduced code of \(\mathcal {C}\). From the proof of Theorem 3.1, we can determine the minimal distance of linear EAQECC and give a necessary condition under which a linear EAQECC may achieve the EA-Griesmer bound.

Theorem 3.2

Let \(k\ge 1\). If there is a \(\mathcal {Q}^{ea}=[[n, k,d_{ea}; c ]]\) linear EAQECC, then there must be a zero radical \([(n+k+c)/2,k,\ge d_{ea}]\) linear code. Especially, if \(\mathcal {Q}^{ea}\) achieves the EA-Griesmer bound, then there is a zero radical \([(n+k+c)/2,k, d]=[(n+k+c)/2,k, d_{ea}]\) code achieving the classical Griesmer bound.

In next section, we will show the necessary condition in this theorem is also sufficient for d large enough.

Remark 1

If \(R(\mathcal {C})=\{0\}\), then \(c+k=n\) and our bound is reduced into the classical Griesmer bound for quaternary linear codes; if \(R(\mathcal {C})\ne \{0\}\), then \(c+k<n\) and this linear EA-Griesmer is tighter than the classical Griesmer bound; if \(c=0\), then the EA-Griesmer bound is reduced into the Griesmer bound (1) for linear QECCs. If \(k=1\), this EA-Griesmer bound is the same as the EA-Singleton bound and the linear EA-Plotkin bound. For \(k\ge 2\), this EA-Griesmer bound is tighter than the linear EA-Plotkin (and the EA-Plotkin) bound [22, 25], also tighter than the EA-Singleton bound and the EA-linear programming bound.

Example 1

If \(n=15\), an \([[n,2,d_{ea};n-10]]\) code should has \(d_{ea}\le 10\) according to the EA-Singleton bound, and \(d_{ea}\le 9\) according to the EA-linear programming bound and the EA-Hamming bond. Yet \(d_{ea}\le 8\) according to the EA-Griesmer bound. We will show \(d_{ea}\) can achieve 8 in Sect. 4.

Using the EA-Griesmer bound, Theorem 3.2 and Lemma 2.4, one can show that all the EAQECCs constructed in [25] are optimal codes, and the Theorems 4.1–4.3 in [25] can be improved and restated as following Corollaries 3.3, 3.4 and 3.5, respectively.

Corollary 3.3

Let \(n=5s+i\ge 7\) and \(0\le i\le 4\). If \(i=3,4\), then there are \([[n,2,d_{ea};n-4]]\) optimal EAQECCs achieving the EA-Griesmer bound. If \(i=0, 1, 2\), then there are optimal \([[n,2,d_{ea};n-4]]\) codes with lengths one above the EA-Griesmer bound, i.e., \(n=g_{ea}(2,d_{ea})+2\).

Corollary 3.4

Let \(t\ge 1\) and \(n=5t+i\ge 7\) for \(1\le i\le 5\). If \(i=4,5\), then there are \([[n,2,d_{ea};n-6]]\) optimal EAQECCs achieving the EA-Griesmer bound. If \(i= 1, 2,3\), then there are optimal \([[n,2,d_{ea};n-6]]\) EAQECCs with lengths one above the EA-Griesmer bound, i.e., \(n=g_{ea}(2,d_{ea})+3\).

Corollary 3.5

Let \(n=21t+i\ge 8\) and \(0\le i\le 20\).

  1. (1)

    If \(i=4,5,6,9,10,14,19\), then there are optimal EAQECCs \([[n,3,d_{ea};n-5]]\) achieving the EA-Griesmer bound.

  2. (2)

    If \(i=0,1, 7, 8, 11, 12, 13, 15, 16, 17,18, 20\), there are optimal \([[n,3,d_{ea};n-5]]\) EAQECCs with lengths one above the EA-Griesmer bound.

  3. (3)

    If \(i=2,3\), there are optimal \([[n,3,d_{ea};n-5]]\) EAQECCs with lengths two above the EA-Griesmer bound.

Remark 2

For \(n=21t+10\) with \(t\ge 0\), the EAQECC of length n constructed in Theorem 4.3 of [25] should be \([[21t+10,3,16t+6;21t+5]]\) rather than \([[21t+10,3,16t+5;21t+5]]\).

4 Construction of linear EAQECCs

In this section, we will construct four families of EAQECCs with parameters \([[n,2;n-8]], [[n,2;n-10]], [[n,3;n-7]]\) and \([[n,3;n-9]]\) for each \(n\ge 12\), all of these EAQECCs are optimal codes, and some of these EAQECCs attain the linear EA-Griesmer bound. Combining these four families of EAQECCs and the results of [25] and [37], we can show the necessary condition of Theorem 3.2 for EA-Griesmer codes is also sufficient.

Our method of constructing EAQECCs is based on Theorem 2.1 and similar to that used in [25] and differs from those of [13, 23, 24]. We will give our constructions in four cases.

Case A. Construction of \([[n,2;n-8]]\) EAQECC

In this case, we discuss construction of \([[n,2,d_{ea};n-8]]\) code from \([n,5]^{(3)}\) code \(\mathcal {C}_{n}\), i.e., \(\mathcal {C}_{n}\) with \(dim R(\mathcal {C}_{n})=3\). Let \(G= G_{5,10}\) as follows:

$$\begin{aligned} G= \left( \begin{array}{cccccc} 1 0 0 1 1 0 0 0 0 1\\ 0 1 0 0 0 1 1 1 0 0\\ 0 0 1 0 0 0 1 1 1 0\\ 0 0 0 1 0 1 0 1 1 1\\ 0 0 0 0 1 2 1 3 2 1\\ \end{array} \right) .\quad \hbox {Then} \quad GG^{\dagger }=\left( \begin{array}{cccccc} 0 0 0 0 0\\ 0 0 0 0 0\\ 0 0 0 0 0\\ 0 0 0 1 3\\ 0 0 0 2 0\\ \end{array} \right) . \end{aligned}$$

Hence \(G_{5,10}\) generates a code \(\mathcal {C}_{10}\) with \(dim R(\mathcal {C}_{10})=3\), \(R(\mathcal {C}_{10})\) is generated by the first three rows of \(G_{5,10}\), and its weight polynomial is \(W_{R}(z)=1+12z^{4}+6z^{6}+27z^{8}+18z^{10}\).

For each given matrix \(A_{2,l}\) of size \(2\times l\), denote \( A_{5,l}= \left( \begin{array}{cccccc} 0_{3\times l}\\ A_{2,l}\\ \end{array} \right) \) and construct \(G_{5,n}=(G_{5,10}\mid A_{5,l})\) for \(n=10+l\). By choosing suitable \(A_{2,l}\), we can make \(G_{5,n}\) generates a code \(\mathcal {C}_{n}\) such that \(R(\mathcal {C}_{n})\) be generated by the first three rows of \(G_{5,n}\) and its weight polynomial be \(W_{R}(z)=1+12z^{4}+6z^{6}+27z^{8}+18z^{10}\).

Theorem 4.1

Let \(t\ge 2\) and \(n=5t+i\ge 10\) for \(0\le i\le 4\). If \(i=0,1\), then there are \([[n,2,n-t-3;n-8]]\) EAQECCs achieving the EA-Griesmer bound. If \(i=2, 3, 4\), then there are \([[n,2,n-t-4;n-8]]\) EAQECCs with \(n=4+g_{ea}(2,d)\), and these codes are optimal and have lengths one above the EA-Griesmer bound.

Proof

Let \(A_{2,1}= \left( \begin{array}{ccccc} 1\\ 3\\ \end{array} \right) , A_{2,2}= \left( \begin{array}{ccccc} 1 0\\ 3 1\\ \end{array} \right) , A_{2,3}= \left( \begin{array}{ccccc} 1 1 0\\ 3 1 1\\ \end{array} \right) , A_{2,4}= \left( \begin{array}{ccccc} 1 1 0 1\\ 3 1 1 2\\ \end{array} \right) \).

For \(t\ge 3\), construct \(A_{2,5(t-2)+i}=(A_{2,i}\mid (t-2)S_{2})\) for \(0\le i\le 4, G_{5,5t+i}=(G_{5,10}\mid A_{5,5(t-2)+i})\) for \(n=5t+i\).

For \(n=5t+i\ge 10\) with \(0\le i\le 4\), let \(\mathcal {C}_{n}\) be the code generated by \(G_{5,n}\). It is easy to check that \(\mathcal {C}_{n}\) satisfies \(dim R(\mathcal {C}_{n})=3, R(\mathcal {C}_{n})\) is generated by the first three rows of \(G_{5,n}\), and its weight polynomial is \(W_{R}(z)=1+12z^{4}+6z^{6}+27z^{8}+18z^{10}\). Since the codes with generator matrices \(G_{5,10}, G_{5,11}, G_{5,12}, G_{5,13}, G_{5,14}\) have weight polynomials

$$\begin{aligned} W_{5,10}(z)= & {} 1+12z^{4}+60z^{5}+198z^{6}+168z^{7}+363z^{8}+156z^{9}+66z^{10},\\ W_{5,11}(z)= & {} 1+12z^{4}+114z^{6}+144z^{7}+339z^{8}+192z^{9}+174z^{10}+48z^{11},\\ W_{5,12}(z)= & {} 1+12z^{4}+30z^{6}+84z^{7}+267z^{8}+216z^{9}+282z^{10}\\&+\,84z^{11}+48z^{12},\\ W_{5,13}(z)= & {} 1+12z^{4}+6z^{6}+24z^{7}+183z^{8}+168z^{9}+330z^{10}+168z^{11}\\&+\,108z^{12}+24z^{13},\\ W_{5,14}(z)= & {} 1+12z^{4}+6z^{6}+87z^{8}+120z^{9}+258z^{10}+240z^{11}+252z^{12}\\&+\,24z^{13}+24z^{14}, \end{aligned}$$

respectively. Hence, for \(n=5t+i\ge 10\) and \(0\le i\le 4\), the code \(\mathcal {C}_{n}\) has weight polynomial \(W_{5,n}(z)=W_{R}(z)+(W_{5, 10+i}(z)-W_{R}(z))z^{4(t-2)}\) for \(0\le i\le 4\). Thus, for \(n= 5t+i, \mathcal {C}^{\perp _h}_{n}\) EA-stabilizes an \([[n,2,d_{ea}(n);n-8]]\) EAQECC, where \(d_{ea}(n)=4t-3,4t-2, 4t-2, 4t-1, 4t\), while \(n=5t,5t+1, 5t+2, 5t+3, 5t+4\), respectively.

It is easy to check that the \([[5t,2,4t-3;5t-8]]\) and \([[5t+1,2,4t-2;5t-7]]\) codes achieve the EA-Griesmer bound; the \([[5t+2,2,4t-2;5t-6]], [[5t+3,2,4t-1;5t-5]]\) and \([[5t+4,2,4t;5t-4]]\) codes are optimal EAQECCs and have lengths one above the EA-Griesmer bound.

Case B. Construction of \([[n,2;n-10]]\) EAQECC

In this case, we discuss construction of \([[n,2,d_{ea};n-10]]\) code from \([n,6]^{(4)}\) code \(\mathcal {C}_{n}\) with \(dim R(\mathcal {C}_{n})=4\). Let \(G=G_{6,12}\) as follows:

$$\begin{aligned} G_{6,12}= \left( \begin{array}{cccccc} 0 1 0 1 0 0 0 2 0 0 0 2\\ 1 0 1 0 0 0 2 0 0 0 2 0\\ 1 0 0 0 1 0 0 0 2 0 2 0\\ 0 1 0 0 0 1 0 0 0 2 0 2\\ 1 0 0 1 0 0 2 0 2 2 0 2\\ 0 1 0 0 0 0 3 1 3 1 3 3\\ \end{array} \right) .\quad \hbox {Then}\quad GG^{\dagger }=\left( \begin{array}{cccccc} 0 0 0 0 0 0\\ 0 0 0 0 0 0\\ 0 0 0 0 0 0\\ 0 0 0 0 0 0\\ 0 0 0 0 0 1\\ 0 0 0 0 1 1\\ \end{array} \right) . \end{aligned}$$

Hence \(G_{6,12}\) generates a code \(\mathcal {C}_{12}\) with \(dim R(\mathcal {C}_{12})=4\), \(R(\mathcal {C}_{12})\) is generated by the first four rows of \(G_{6,12}\), and its weight polynomial is \(W_{R}(z)=1+18z^{4}+12z^{6}+81z^{8}+108z^{10}+36z^{12}\).

For each given matrix \(B_{2,l}\) of size \(2\times l\), denote \( B_{6,l}= \left( \begin{array}{cccccc} 0_{4\times l}\\ B_{2,l}\\ \end{array} \right) \) and construct \(G_{6,n}=(G_{6,12}\mid B_{6,l})\) for \(n=12+l\). By choosing suitable \(B_{2,l}\), we can make \(G_{6,n}\) generate a code \(\mathcal {C}_{n}, R(\mathcal {C}_{n})\) is generated by the first four rows of \(G_{6,n}\) and with weight polynomial \(W_{R}(z)=1+18z^{4}+12z^{6}+81z^{8}+108z^{10}+36z^{12}\). Thus we have the following theorem.

Theorem 4.2

Let \(t\ge 2\) and \(n=5t+i\ge 12\) for \(0\le i\le 4\). If \(i=1,2\), then there are \([[n,2,n-t-4;n-10]]\) EAQECCs achieving the EA-Griesmer bound. If \(i=0, 3, 4\), then there are \([[n,2,n-t-5;n-10]]\) EAQECCs with \(n=5+g_{ea}(2,d)\), and these codes are optimal and have lengths one above the EA-Griesmer bound.

Proof

Let \(B_{2,1}= \left( \begin{array}{ccccc} 0\\ 1\\ \end{array} \right) , B_{2,2}= \left( \begin{array}{ccccc} 1 1\\ 0 2\\ \end{array} \right) , B_{2,3}= \left( \begin{array}{ccccc} 1 1 1\\ 1 1 2\\ \end{array} \right) , B_{2,4}= \left( \begin{array}{ccccc} 0 1 1 1\\ 1 0 1 3\\ \end{array} \right) \).

For \(t\ge 3\), construct \(B_{2,5(t-2)+i}=(B_{2,i}\mid (t-2)S_{2})\) for \(0\le i\le 4, G_{6,5t+i}=(G_{6,12}\mid B_{6,5(t-2)+i-2})\) for \(n=5t+i\).

For \(n=5t+i\ge 12\) with \(0\le i\le 4\), let \(\mathcal {C}_{n}\) be the code generated by \(G_{6,n}\). It is easy to check that \(\mathcal {C}_{n}\) satisfies \(dim R(\mathcal {C}_{n})=4, R(\mathcal {C}_{n})\) is generated by the first four rows of \(G_{6,n}\) and with weight polynomial \(1+18z^{4}+12z^{6}+81z^{8}+108z^{10}+36z^{36}\). Since the codes with generator matrices \(G_{6,12}, G_{6,13}, G_{6,14}\), \(G_{6,15}, G_{6,16}, G_{6,17}, G_{6,18}, G_{6,19}\) have weight polynomials

$$\begin{aligned} W_{6,12}(z)= & {} 1+18z^{4}+276z^{6}+288z^{7}+873z^{8}+\cdots +204z^{12},\\ W_{6,13}(z)= & {} 1+18z^{4}+60z^{6}+216z^{7}+657z^{8}+504z^{9}+\cdots +168z^{13},\\ W_{6,14}(z)= & {} 1+18z^{4}+12z^{6}+108z^{7}+381z^{8}+396z^{9}+\cdots +84z^{14},\\ W_{6,15}(z)= & {} 1+18z^{4}+12z^{6}+333z^{8}+156z^{9}+984z^{10} +\cdots +84z^{15},\\ W_{6,16}(z)= & {} 1+18z^{4}+12z^{6}+81z^{8}+156z^{9}+504z^{10} +\cdots +84z^{16},\\ W_{6,17}(z)= & {} W_{R}(z)+(W_{5, 12}(z)-W_{R}(z))z^{4},\\ W_{6,18}(z)= & {} W_{R}(z)+(W_{5, 13}(z)-W_{R}(z))z^{4}, \\ W_{6,19}(z)= & {} W_{R}(z)+(W_{5, 14}(z)-W_{R}(z))z^{4}, \end{aligned}$$

respectively.

Hence, for \(n=5t+i\ge 15\) and \(0\le i\le 4\), the code \(\mathcal {C}_{n}\) has weight polynomial \(W_{5,n}(z)=W_{R}(z)+(W_{5, 15+i}(z)-W_{R}(z))z^{4(t-3)}\) for \(0\le i\le 4\). Thus, for \(n= 5t+i, \mathcal {C}^{\perp _{h}}_{n}\) EA-stabilizes an \([[n,2,d_{ea}(n);n-10]]\) EAQECC, where \(d_{ea}(n)=4t-4,4t-3, 4t-2, 4t-2, 4t-1\), while \(n=5t,5t+1, 5t+2, 5t+3, 5t+4\), respectively.

It is easy to check that the \([[12,2,6;2]], [[5t+1,2,4t-3;5t-9]]\) and \([[5t+2,2,4t-2;5t-8]]\) codes for \(t\ge 3\) achieve the EA-Griesmer bound; the \([[13,2,6;3]], [[14,2,7;4]], [[5t,2,4t-4;5t-10]], [[5t+3,2,4t-2;5t-7]]\) and \([[5t+4,2,4t-1;5t-6]]\) codes for \(t\ge 3\) are optimal EAQECCs and have lengths one above the EA-Griesmer bound.

Case C. Construction of \([[n,3;n-7]]\) EAQECC

In this case, we discuss construction of \([[n,3,d_{ea};n-7]]\) code from \([n,5]^{(2)}\) code \(\mathcal {C}_{n}\) with \(dim R(\mathcal {C}_{n})=2\). Let \(G=G_{5,8}\) as follows:

$$\begin{aligned} G= \left( \begin{array}{cccccc} 1 0 1 1 1 0 0 0\\ 0 1 0 0 0 1 1 1\\ 0 0 1 0 1 1 2 3\\ 0 0 2 3 1 2 2 0\\ 0 0 3 0 3 2 2 0\\ \end{array} \right) .\quad \hbox {Then} \quad GG^{\dagger }=\left( \begin{array}{cccccc} 0 0 0 0 0\\ 0 0 0 0 0\\ 0 0 1 0 2\\ 0 0 0 1 1\\ 0 0 3 1 0\\ \end{array} \right) . \end{aligned}$$

Hence \(G_{5,8}\) generates a code \(\mathcal {C}_{8}\) with \(dim R(\mathcal {C}_{8})=2\), and \(R(\mathcal {C}_{8})\) is generated by the first two rows of \(G_{5,8}\), and its weight polynomial is \(W_{R}(z)=1+6z^{4}+9z^{8}\).

Denote \(D_{5,21}=\left( \begin{array}{cccccc} 0_{2\times 21}\\ S_{3}\\ \end{array} \right) \) and \(B_{5,l}=\left( \begin{array}{cccccc} 0_{2\times l}\\ B_{3,l}\\ \end{array} \right) \) for a given matrix \(B_{3,l}\) with \(0\le l\le 20\). For each \(n=8+l+21t\ge 9\), we will construct a \(G_{5,n}=(G_{5,8}\mid B_{5,l}\mid tD_{5,l})\) with suitable \(B_{3,l}\), such that \(G_{5,n}\) generate a code \(\mathcal {C}_{n}, R(\mathcal {C}_{n})\) is generated by the first two rows of \(G_{5,n}\) and with weight polynomial \(W_{R}(z)=1+6z^{4}+9z^{8}\), and the minimal weight \(d_{ea}\) of \(\mathcal {C}_{n}\setminus R(\mathcal {C}_{n})\) is as large as possible. Using \(\mathcal {C}_{n}^{\perp _{h}}\) as EA-stabilizer, one can obtain an \([[n,3,d_{ea};n-7]]\) EAQECC. Our results are the following Theorem 4.3; for its proof please see the Appendix A.

Theorem 4.3

Let \(n=21s+i\ge 9\) with \(0\le i\le 20\).

  1. (1)

    If \(n=21t+i\ge 9\) and \(i=5,6,7,10,11,15,20\), then there are \([[n,3,d_{ea};n-7]]\) codes achieving the EA-Griesmer bound.

  2. (2)

    If \(n=21t+i\ge 9\) and \(i=0,1,2, 8, 9, 12, 13,14, 16,17, 18, 19\), then there are optimal \([[n,3,d_{ea};n-7]]\) EAQECCs, and these codes have lengths one above the EA-Griesmer bound.

  3. (3)

    If \(n=21t+i\ge 9\) and \(i=3, 4\), then there are optimal \([[n,3,d_{ea};n-7]]\) EAQECCs, and these codes have lengths two above the EA-Griesmer bound.

Case D. Construction of \([[n,3;n-9]]\) EAQECC

In this case, we discuss construction of \([[n,3,d_{ea};n-9]]\) code from \([n,6]^{(3)}\) code \(\mathcal {C}_{n}\) with \(dim R(\mathcal {C}_{n})=3\). Let \(G=G_{6,12}\) as follows:

$$\begin{aligned} G= \left( \begin{array}{cccccc} 1 0 0 0 0 0 0 0 0 1 1 1\\ 0 1 0 1 1 0 0 0 1 0 0 0\\ 0 0 1 0 0 1 1 1 0 0 0 0\\ 0 0 0 2 0 1 3 2 2 3 0 3\\ 0 0 0 0 3 0 1 1 3 0 2 2\\ 0 0 0 2 3 2 3 1 1 0 0 0\\ \end{array} \right) .\quad \hbox {Then} \quad GG^{\dagger }=\left( \begin{array}{cccccc} 0 0 0 0 0 0\\ 0 0 0 0 0 0\\ 0 0 0 0 0 0\\ 0 0 0 1 0 3\\ 0 0 0 0 0 1\\ 0 0 0 2 1 0\\ \end{array} \right) . \end{aligned}$$

Hence \(G_{6,12}\) generates a code \(\mathcal {C}_{12}\) with \(dim R(\mathcal {C}_{12})=3, R(\mathcal {C}_{12})\) is generated by the first three rows of \(G_{6,12}\), and its weight polynomial is \(W_{R}(z)=1+9z^{4}+27z^{8}+27z^{12}\).

For each given matrix \(D_{3,l}\) of size \(3\times l\), denote \( D_{6,l}= \left( \begin{array}{cccccc} 0_{3\times l}\\ D_{3,l}\\ \end{array} \right) \) and construct \(G_{6,n}=(G_{6,12}\mid D_{6,l})\) for \(n=12+l\). By choosing suitable \(D_{3,l}\), we will construct a \(G_{6,n}\) such that \(G_{6,n}\) generates a code \(\mathcal {C}_{n}, R(\mathcal {C}_{n})\) is generated by the first three rows of \(G_{6,n}\) and with weight polynomial \(W_{R}(z)=1+9z^{4}+27z^{8}+27z^{12}\), and the minimal weight \(d_{ea}\) of \(\mathcal {C}_{n}\setminus R(\mathcal {C}_{n})\) is as large as possible. Using \(\mathcal {C}_{n}^{\perp _{h}}\) as EA- stabilizer, one can obtain an \([[n,3,d_{ea};n-9]]\) EAQECC. Our results are the following Theorem 4.4; for its proof please see the Appendix B.

Theorem 4.4

Let \(n=21t+i\ge 12\) and \(0\le i\le 20\).

  1. (1)

    If \(n=21t+i\ge 12\) and \(i=0,6,7,8,11,12,16\), then there are \([[n,3,d_{ea};n-9]]\) EAQECCs achieving the EA-Griesmer bound.

  2. (2)

    If \(n=21t+i\ge 12\) and \(i=1,2,3, 9, 10, 13, 14, 15, 17, 18, 19,20\), then there are optimal \([[n,3,d_{ea};n-9]]\) EAQECCs, and these codes have lengths one above the EA-Griesmer bound.

  3. (3)

    If \(n=21t+i\ge 12\) and \(i= 4,5\), then there are optimal \([[n,3,d_{ea};n-9]]\) EAQECCs, and these codes have lengths two above the EA-Griesmer bound.

Summarizing the above four theorems and the results of [25] and [36], we can show the conditions given in Theorem 3.2 are also sufficient for some families of EAQECCs.

Theorem 4.5

Let \(0\le r\le 4, 1\le k\le 3\) and \(r+k\le 6\). If there is a quaternary [skd] optimal zero radical code and d is large enough, then there is also an \([[n,k,d_{ea};c]]=[[s+r,k,d;s-k-r]]\) EAQECCs. If the classical [skd] achieves the classical Griesmer bound, then the \([[n,k,d_{ea};c]]\) EAQECCs achieves the EA-Griesmer bound.

Proof

We will prove the theorem in four steps.

  1. (1)

    If \(r=0\) and \(1\le k\le 3\), from [36] we know that an [nkd] zero radical code gives an \([[n,k,d_{ea};c]]=[[n,k,d;n-k]]\) maximal entanglement EAQECC. And, if the zero radical code achieves the classical Griesmer bound, then the \([[n,k,d;n-k]]\) EAQECC achieves the EA-Griesmer bound.

  2. (2)

    If \(k=1\) and \(1\le r\le 4\), let \(d\ge 13\) be odd. Then \(\mathbf {1}_{d}=(1,1,\cdots ,1)\) generates a [d, 1, d] zero radical code and it achieves the classical Griesmer bound, and \(\mathbf {Y}_{d+1}=(1,1,\cdots ,1,0)\) generates a \([d+1,1,d]\) optimal zero radical code.

Construct

$$\begin{aligned} G_{2,d+1}= & {} \left( \begin{array}{cccccc} 1 1 2 3&{} \mathbf {0}_{d-3}\\ 0 1 1 1&{} \mathbf {1}_{d-3}\\ \end{array} \right) , G_{3,d+2}= \left( \begin{array}{cccccc} 1 0 0 0 0&{} 1 2 3&{}\mathbf {0}_{d-6}\\ 0 1 1 2 3&{} 0 0 0&{}\mathbf {0}_{d-6}\\ 0 0 1 1 1&{} 1 1 1&{}\mathbf {1}_{d-6}\\ \end{array} \right) ,\\ G_{4,d+3}= & {} \left( \begin{array}{cccccccccccc} 1 0 0 0 0 0&{} 0 0 0 &{} 1 2 3&{}\mathbf {0}_{d-9}\\ 0 1 0 0 0 0&{} 1 2 3&{}0 0 0&{}\mathbf {0}_{d-9}\\ 0 0 1 1 2 3&{} 0 0 0&{}0 0 0&{}\mathbf {0}_{d-9}\\ 0 0 0 1 1 1&{} 1 1 1&{}1 1 1&{}\mathbf {1}_{d-9}\\ \end{array} \right) , G_{5,d+4}= \left( \begin{array}{cccccccccccccccc} 1 0 0 0 0 0 0 &{} 0 0 0 &{}0 0 0 &{} 1 2 3&{}\mathbf {0}_{d-12}\\ 1 0 0 0 0 0 &{} 0 0 0 &{} 1 2 3&{}0 0 0 &{}\mathbf {0}_{d-12}\\ 0 1 0 0 0 0&{} 1 2 3&{}0 0 0&{}0 0 0 &{}\mathbf {0}_{d-12}\\ 0 0 1 1 2 3&{} 0 0 0&{}0 0 0&{}0 0 0 &{}\mathbf {0}_{d-12}\\ 0 0 0 1 1 1&{} 1 1 1&{}1 1 1&{}1 1 1 &{}\mathbf {1}_{d-12}\\ \end{array} \right) . \end{aligned}$$

Let \(G_{m,s}\) generates a code \(\mathcal {C}_{m,s}\) for \(2\le m=r+1, s=d+r\). Then \(\mathcal {C}_{m,s}\) has radical dimension r. It is not difficult to check that \(\mathcal {C}_{m,s}\) gives an \([[n,k,d_{ea};c]]=[[d+r,1,d;d-1-r]]\) EAQECC achieves the EA-Griesmer bound.

Let \(E_{m,s+1}=(G_{m,s}\mid \mathbf {0}^{T}_{m})\) and \(\mathcal {D}_{m,s+1}\) be the code generated by \(E_{m,s+1}\) for \(2\le m=r+1, s=d+r\). Then \(\mathcal {D}_{m,s+1}\) has radical dimension r. It is not difficult to check that \(\mathcal {C}_{m,s}\) gives an \([[n,k,d_{ea};c]]=[[d+r+1,1,d;d-r]]\) EAQECC, and this code has length one above the EA-Griesmer bound. Hence, the theorem holds for \(k=1\) and \(1\le r\le 4\).

  1. (3)

    Let \(k=2\). Theorems 4.1 and 4.2 of [25] have shown the theorem holds for \(1\le r\le 2\) and \(k=2\). According to Theorems 4.1 and 4.2 of this section, we can deduce the theorem also holds for \(3\le r\le 4\) and \(k=2\).

  2. (4)

    Let \(k=3\). Theorem 4.3 of [25] has shown the theorem holds for \(r=1\) and \(k=3\). According to Theorems 4.3 and 4.4 of this section, we can deduce the theorem also holds for \(2\le r\le 3\) and \(k=3\).

Summarizing the above, the theorem follows.

Almost all the \([[n,k,d_{ea};c]]\) codes given above are not equivalent to any \([[n+c,k,d]]\) QECCs, and this can be proved by the following propositions.

Proposition 4.6

If \(n\ge 14 \), then all the \([[n,2,d_{ea};c]]\) EAQECCs constructed in Theorems 4.1 and 4.2 are not equivalent to any \([[n+c,2,d]]\) QECCs.

Proof

Let \(d_{ea}(n,c)\) be the minimum distance of the \([[n,2,d_{ea};c]]\) codes given in Theorems 4.1 and 4.2, and \(d_{max}(n+c)\) the minimum distance of optimal \([[n+c,2]]\) QECC. From Theorem 15 of [8], we know \(d_{max}(n+c)\le 2\lfloor \frac{n+c+1}{6}\rfloor +2\). Thus, we only need to check \(d_{ea}(n,c)-d_{max}(n+c)> 0\).

  1. (1)

    For \(n=5t+i\ge 14\) and \(c=n-8\), the EAQECCs \([[n,2,d_{ea};c]]\) constructed in Theorem 4.1 have parameters \([[5t+i,2,4t+d_{ea}(i);5t+i-8]]\), where

    $$\begin{aligned} d_{ea}(i) = \left\{ \begin{array}{lll} i-3, 0 \le i \le 1,\\ i-4, 2 \le i \le 4.\\ \end{array} \right. \end{aligned}$$

    Since \(d_{max}(n+c)\le 2\lfloor \frac{(10t+2i-7)}{6}\rfloor +2\le \frac{(10t+2i-1)}{3}\), one can deduce \(d_{ea}(n)-d_{max}(n+c)\ge \frac{(2t+1-2i)}{3}+d_{ea}(i)>0\) for \(t\ge 5\). Hence the \([[n,2,d_{ea}(n);n-8]]=[[5t+i,2,4t+d_{ea}(i);5t+i-8]]\) EAQECCs are not equivalent to any \([[n+c,2,d]]\) QECCs for \(n=5t+i\) with \(t\ge 5\).

    For \(n=5t+i\ge 14\) and \(t\le 4\), according to the code table of [41], one can check all our \([[n,2,d_{ea};n-8]]\) codes are not equivalent to any \([[n+c,2,d]]\) QECCs either. Thus the proposition holds for all \([[n,2,d_{ea};n-8]]\) in Theorem 4.1.

  1. (2)

    For \(n=5t+i\ge 14\) and \(c=n-10\), the EAQECCs \([[n,2,d_{ea};c]]\) constructed in Theorem 4.2 have parameters \([[5t+i,2,4t+d_{ea}(i);5t+i-10]]\), where

    $$\begin{aligned} d_{ea}(i) = \left\{ \begin{array}{lll} i-4, 0 \le i \le 2,\\ i-5, 3 \le i \le 4.\\ \end{array} \right. \end{aligned}$$

    Since \(d_{max}(n+c)\le 2\lfloor \frac{(10t+2i-9)}{6}\rfloor +2\le \frac{(10t+2i-3)}{3}\), one can deduce \(d_{ea}(n,c)-d_{max}(n+c)\ge \frac{(2t+3-2i)}{3}+d_{ea}(i)>0\) for \(t\ge 5\). Hence the \([[n,2,d_{ea}(n);n-10]]=[[5t+i,2,4t+d_{ea}(i);5t+i-10]]\) EAQECCs are not equivalent to any \([[n+c,2,d]]\) QECCs for \(n=5t+i\) with \(t\ge 5\).

For \(n=5t+i\ge 14\) and \(t\le 4\), according to the code table of [41], one can check all our \([[n,2,d_{ea};n-10]]\) codes are not equivalent to any \([[n+c,2,d]]\) QECCs either. Thus the proposition holds for all \([[n,2,d_{ea};n-10]]\) with \(n\ge 14\).

Summarizing the previous discussions, the proposition follows.

Proposition 4.7

If \(n\ge 14 \), then all the \([[n,3,d_{ea};c]]\) EAQECCs constructed in Theorems 4.3 and 4.4 do not equivalent to any \([[n+c,3,d]]\) QECCs.

Proof

Let \(d_{ea}(n,c)\) be the minimum distance of the \([[n,3,d_{ea};c]]\) given in Theorems 4.3 and 4.4, \(d_{max}(n+c)\) the minimum distance of optimal \([[n+c,3]]\) QECCs. From Theorem 15 of [8], we know \(d_{max}(n+c)\le 2\lfloor \frac{n+c+1}{6}\rfloor +2\).

  1. (1)

    For \(n=21t+i\ge 10\) and \(c=n-7\), the EAQECCs \([[n,3,d_{ea};c]]\) constructed in Theorem 4.3 have parameters \([[21t+i,3,16t+d_{ea}(i);21t+i-7]]\), where

    $$\begin{aligned} d_{ea}(i) = \left\{ \begin{array}{lll} i-3, 0 \le i \le 2,\\ i-4, 3 \le i \le 7,\\ i-5, 8 \le i \le 11,\\ i-6, 12 \le i \le 15,\\ i-7, 16 \le i \le 20.\\ \end{array} \right. \end{aligned}$$

    Since \(d_{max}(n+c)\le 2\lfloor \frac{2(21t+i-3)}{6}\rfloor +2\le 14t+\frac{2i}{3}\), one can deduce \(d_{ea}(n,c)-d_{max}(n+c)\ge 2t+d_{ea}(i)-\frac{2i}{3}\ge 2t-3> 0\) for \(t\ge 2\). This implies the \([[21t+i,3,16t+d_{ea}(i);21t+i-7]]\) EAQECCs are not equivalent to any \([[n+c,3,d]]\) QECCs for \(n=21t+i\) with \(t\ge 2\).

    For \(n=21t+i\ge 14\) and \(t\le 1\), according to the code table of [41], we can derive all our \([[n,3,d_{ea};n-7]]\) codes for \(n\ge 14\) are not equivalent to any \([[n+c,3,d]]\) QECCs either.

  1. (2)

    For \(n=21t+i\ge 12\) and \(c=n-9\), the EAQECCs \([[n,3,d_{ea};c]]\) constructed in Theorem 4.4 have parameters \([[21t+i,3,16t+d_{ea}(i);21t+i-9]]\), where

    $$\begin{aligned} d_{ea}(i) = \left\{ \begin{array}{lll} i-4, 1 \le i \le 3,\\ i-5, 4 \le i \le 8,\\ i-6, 9 \le i \le 12,\\ i-7, 13 \le i \le 16,\\ i-8, 17 \le i \le 21.\\ \end{array} \right. \end{aligned}$$

    Since \(d_{max}(n+c)\le 2\lfloor \frac{2(21t+i-4)}{6}\rfloor +2\le 14t+\frac{2i-2}{3}\), one can deduce \(d_{ea}(n,c)-d_{max}(n+c)\ge 2t+d_{ea}(i)-\frac{2i-2}{3}\ge 2t-3> 0\) for \(t\ge 2\). Hence the \([[21t+i,3,16t+d_{ea}(i);21t+i-9]]\) EAQECCs are not equivalent to any \([[n+c,3,d]]\) QECCs for \(n=21t+i\) with \(t\ge 2\).

For \(n=21t+i\ge 14\) and \(t\le 1\), according to the code table of [41], we can derive all our \([[n,3,d_{ea};n-7]]\) codes for \(n\ge 14\) are not equivalent to any \([[n+c,k,d]]\) QECCs either.

Summarizing the previous discussions, the proposition holds.

5 Discussion and concluding remarks

In this paper, we have derived an EA-Griesmer bound for linear EAQECCs and deduced a necessary condition on existence of EAQECCs. We have also showed that for some families of zero radical code, the necessary condition is also sufficient.

We constructed four families of optimal EAQECCs. All these codes are degenerate codes, and some of them achieve the EA-Griesmer bound. What is more, all these EAQECCs go beyond earlier constructions and almost all of our \([[n,k,d_{ea};c]]\) codes are not equivalent to any \([[n+c,k,d]]\) QECCs and have better error-correcting ability than any \([[n+c,k,d]]\) QECCs. In fact, except the \([[12,2,6;4]], [[13,2,6;3]], [[12,3,6;5]], [[13,3,6;6]]\) codes, the other EAQECCs constructed in Theorems 4.1, 4.2, 4.3 and 4.4 are not equivalent to any \([[n+c,k,d]]\) QECCs. Propositions 4.6 and 4.7 have shown that our \([[n,k,d_{ea};c]]\) codes are not equivalent to any \([[n+c,k,d]]\) QECCs for \(n\ge 14\). The \([[n,k,d_{ea};c]]\) EAQECCs with parameters [[10, 2, 5; 2]], [[11, 2, 6; 3]], [[12, 2, 6; 2]], [[9, 3, 4; 2]], [[10, 3, 5; 3]], [[11, 3, 6; 4]] and [[12, 3, 6; 3]] are not equivalent to any \([[n+c,k,d]]\) QECCs, and this can be seen from [7, 41]. Thus, there are four EAQECCs \([[12,2,6;4]], [[13,2,6;3]], [[12,3,6;5]], [[13,3,6;6]]\) need for checking. According to [7, 41], the [[12, 2, 6; 4]] and [[13, 2, 6; 3]] codes are equivalent to an optimal [[16, 2, 6]] QECC; the [[12, 3, 6; 5]] and [[13, 3, 6; 4]] codes may be equivalent to a potential optimal [[17, 3, 6]] QECC.

It has been proved that the Griesmer bound for classical linear codes is sharp when the minimum distance d is sufficiently large [42], i.e., for given k, there exists an integer D(k) such that if \(d\ge D(k)\), then the Griesmer bound for classical linear codes can be attained. As for EA-Griesmer bound, the things may be a little complex.

The EAQECCs constructed in [25] and the four families of EAQECCs in this paper have proved the EA-Griesmer bound is tight for linear \([[n,k,d_{ea};c]]\) with \(k\le 3\) and \(c\ge n-10\). Whether this EA-Griesmer bound is also tight for linear EAQECCs with higher dimension, we cannot give a proof at present. We guess it is tight for EAQECCs with higher dimension. To support our guess, we present an example as follows. Let \(k\ge 2\) be even, \(I_{k}\) be the identity matrix, \(N_{k}=\frac{4^{k}-1}{3}, X=(1,1,1,0,\cdots ,0)_{1\times N_{k}}\). For given \(r\ge 1\), construct r matrices \(A_{i}\) of size \(r\times N_{k}\) and \(G_{k,k+1}\) as

$$\begin{aligned} A_{1}=\left( \begin{array}{ccccc} X\\ \mathbf {0}\\ \cdots \\ \mathbf {0}\\ \end{array} \right) ,A_{2}=\left( \begin{array}{ccccc} \mathbf {0}\\ X\\ \cdots \\ \mathbf {0}\\ \end{array} \right) , \ldots , A_{r}=\left( \begin{array}{ccccc} \mathbf {0}\\ \cdots \\ \mathbf {0}\\ X\\ \end{array} \right) , G_{k,k+1}=\left( \begin{array}{ccccc} 110\cdots 00\\ 011\cdots 00\\ \cdots \\ 000\cdots 11 \end{array} \right) .\\ \end{aligned}$$

Construct

$$\begin{aligned} G_{m,n}=G_{k+r,rN_{k}+r+k+1}=\left( \begin{array}{cccccccc} I_{r} &{}A_{1}&{}A_{2}&{}\cdots &{}A_{r}&{}\mathbf {0}\\ \mathbf {0}&{}S_{k}&{}S_{k}&{}\cdots &{}S_{k}&{}G_{k,k+1}\\ \end{array} \right) . \end{aligned}$$

It is easy to check that \(G_{m,n}\) generates an \([n,m]^{(r)}\) code \(\mathcal {C}, \mathcal {C}\) gives an \([[n,k,r4^{k-1}+2;n-k-2r]]=[[n,k,r4^{k-1}+2;n-k-2r]]\) EAQECC with \(n=rN_{k}+r+k+1\). This EAQECC achieves the EA-Griesmer bound, and its rate \(R=\frac{r}{n}\) is very low.

From Theorem 3.2, we know that: For a linear EAQECC \(\mathcal {Q}^{ea}\) that EA-stabilized by \(\mathcal {C}^{\perp _{h}}\) of a linear code \(\mathcal {C}=[n,m]^{(r)}\), the dimension k of \(\mathcal {Q}^{ea}\) is determined by m and the radical dimension r of \(\mathcal {C}\), and the distance \(d_{ea}\) of \(\mathcal {Q}^{ea}\) is no more than the distance d of \(\mathcal {C}_{1}\), where \(\mathcal {C}_{1}\) is a reduced code of \(\mathcal {C}\). Since \(\mathcal {C}_{1}\) is a zero radical code, an optimal zero radical code may be a near-optimal linear code, and hence, for some kinds of code length s, an [skd] optimal zero radical code cannot achieve the classical Griesmer bound no matter how large its distance d is [39, 43]. However, if we make some modification on the condition of [42] and consider impact of r, analogous result of [42] for linear EAQECCs may also hold. So, we put forward the following conjecture.

Conjecture: Let \(r\ge 0\) be a given integer. For each \(k\ge 1\), there exists an integer D(kr) such that if \(d\ge D(k,r)\) and there is a zero radical [skd] code, then there is an \([[n,k,d_{ea};c]]=[[s+r,k,d;s-k-r]]\) EAQECC. If the zero radical [skd] code achieves the classical Griesmer bound, then the \([[n,k,d_{ea};c]]\) EAQECC achieves the EA-Griesmer bound.