1 Introduction

Construction of good quantum error-correcting codes (quantum codes for short) is an important subject for quantum information and quantum computing [1,2,3,4,5,6,7]. The theory of entanglement-assisted quantum codes is an important discovery in the area of quantum error-correction. Brun et al. proposed a entanglement-assisted stabilizer formalism in [8]. They showed that if the sender and the receiver shared a certain amount of preexisting entanglement, some entanglement-assisted quantum codes can be constructed without dual-containing classical quaternary codes. An entanglement-assisted quantum code can be denoted as \([[n,k,d;c]]_q\), which encodes k information qubits into n channel qubits with the help of c pairs of maximally entangled states and corrects up to \(\left\lfloor \frac{d-1}{2}\right\rfloor \) errors, where d is the minimum distance of the code [9]. If \(n-k=c\), the code is called an entanglement-assisted quantum code with maximal entanglement. In the scheme of entanglement-assisted quantum stabilizer code, it is assumed that halves of maximally entangled states of the receiver are perfect. Many scholars have constructed some entanglement-assisted quantum codes with good parameters in [8, 10,11,12,13,14,15,16,17,18]. Li et al. [19] proposed the concept about a decomposition of the defining set of BCH cyclic codes, and they used this method to construct some entanglement-assisted quantum codes having good parameters. L\(\ddot{u}\) and Li [20]constructed some families of entanglement-assisted quantum codes by using primitive quaternary BCH codes. Qian and Zhang [21] constructed some families of entanglement-assisted quantum codes by using arbitrary binary linear codes and showed the existence of asymptotically good entanglement-assisted quantum codes. Brun et al. [8] proposed the entanglement-assisted Singleton bound for entanglement-assisted quantum codes, which can be called entanglement-assisted quantum maximum distance separable (MDS) codes. A construction of entanglement-assisted quantum MDS codes with a small number of preshared entangled states was provided by Fan et al. [22]. Guenda et al. introduced the hull of classical codes and constructed some families of entanglement-assisted quantum MDS codes in [23]. In [24], if \(d\le (n+2)/2\), then \(k\le n+c-2d+2\) for an \([[n,k,d;c]]_q\) entanglement-assisted quantum code. The result holds for any d whenever entanglement-assisted quantum codes are degenerate or nondegenerate. The authors assumed that \(d\le (n+2)/2\) in [25] is reasonable for quantum codes because of the no-cloning theorem [26]. However, Grassl proposed a construction of entanglement-assisted stabilizer codes whose distance satisfies \(d\ge (n+2)/2\) in [27]. In fact, entanglement can increase the error-correcting ability of quantum codes. These codes that Grassl found are constructed in a quite different way, by transforming the quantum teleportation protocol into an entanglement-assisted quantum code. Lai and Ashikhmin [24] utilized the linear programming bound to provide a refined entanglement-assisted quantum Singleton bound for general case.

In recent years, negacyclic codes have been applied to construct quantum MDS codes. Kai et al. [28] constructed two families of quantum MDS codes by using the negacyclic codes. Kai et al. [29] extended the result in [28] and obtained two families of quantum codes with good parameters and a family of quantum MDS codes. La Guardia [30] used the negacyclic codes to construct two families of quantum MDS-convolutional codes. In [31], the negacyclic codes were applied to construct two families of asymmetric quantum MDS codes. In [32], we used the negacyclic codes in [29] to construct some families of quantum convolutional codes. In [33], some families of asymmetric quantum codes and quantum convolutional codes were constructed and they satisfied the quantum Singleton bound. In general, the parameters of quantum codes constructed from negacyclic codes are more general and better compared with the ones constructed from classical cyclic codes.

In this work, we mainly focus on discussing the constructions of entanglement-assisted quantum codes with distance \(q+1\le d\le (n+2)/2\). We first define a decomposition of the defining set of negacyclic codes, which is convenient for us to obtain the number of shared pairs required, and then we use \(q^2\)-cyclotomic cosets of the defining set of negacyclic codes to construct entanglement-assisted quantum MDS codes with \(d\le (n+2)/2\), the minimum distance of these ones is greater than \(q + 1\). Moreover, we use the method of decomposition of the defining set to construct another two families of entanglement-assisted quantum codes with maximal entanglement. Although these two families of entanglement-assisted quantum codes do not satisfy the entanglement-assisted quantum Singleton bound, it will give us some help in understanding the construction of entanglement-assisted quantum codes.

In this paper, we obtain four families of entanglement-assisted quantum MDS codes as follows:

  1. (1)

    \([[q^2+1,q^2+5-2q-4t, q+2t+1; 4]]_q,\) where \(2\le t\le \frac{ q-1}{2} \), q is an odd prime power with \(q\ge 5\) and \(q\equiv 1~\mathrm{mod}~4\).

  2. (2)

    \([[\frac{q^2+1}{2},\frac{q^2+1}{2}-2q-4t+5, q+2t+1;5]]_q\), where \(2\le t\le \frac{q-1}{2}\), q is an odd prime power with \(q>7\).

  3. (3)

    \([[\lambda (q+1),\lambda (q+1)-2\lambda -2t-q+5, \frac{q+1}{2}+t+\lambda ; 4]]_q\), where q is an odd prime power with \(q\ge 7\), \(\lambda \) is an odd divisor of \(q-1\) with \(\lambda \ge 3\) and \(\frac{q+3}{2}\le t\le \frac{q-1}{2}+\lambda \).

  4. (4)

    \([[2\lambda (q+1),2\lambda (q+1)-4\lambda -2t-q+5, \frac{q+1}{2}+t+2\lambda ; 4]]_q\), where q is an odd prime power with \(q\ge 13\), \(q\equiv ~1~\mathrm{mod}~4\), \(\lambda \) is an odd divisor of \(q-1\) with \(\lambda \ge 3\) and \(\frac{q+3}{2}\le t\le \frac{q-1}{2}+2\lambda \).

We also obtain two families of maximal-entanglement entanglement-assisted quantum codes as follows:

  1. (1)

    \([[\frac{q^2+1}{2},\frac{q^2+1}{2}-5, d\ge 3;5]]_q\), where q is an odd prime power with \(q> 3\).

  2. (2)

    \([[q^2+1,q^2-3, d\ge 3; 4]]_q,\) where q is an odd prime power with \(q\ge 5\) and \(q\equiv 1~\mathrm{mod}~4\).

The main organization of this paper is as follows. In Sect. 2, we present some definitions and basic results of negacyclic codes. In Sect. 3, we state some basic concepts and results of entanglement-assisted quantum codes. In Sect. 4, we construct four families of entanglement-assisted quantum MDS codes and two families of entanglement-assisted quantum codes with maximal entanglement by using a decomposition of the defining set of negacyclic codes.

2 Review of negacyclic codes

In this section, we recall some basic results about negacyclic codes in [28, 29, 33,34,35,36,37,38].

Throughout this paper, let \(F_{q^2}\) be the finite field with \(q^2\) elements, where q is a power of p and p is an odd prime number. Let \(a^q=(a_0^q,a_1^q,\ldots ,a_{n-1}^q)\) denote the conjugation of the vector \(a=(a_0,a_1,\ldots ,a_{n-1}) \). For \(u=(u_0,u_1,\ldots ,u_{n-1}),v=(v_0,v_1,\ldots ,v_{n-1})\in F_{q^2}^n,\) the Hermitian inner product can be defined as

$$\begin{aligned} \langle u,v\rangle _h=u_0^qv_0+u_1^qv_1+\cdots +u_{n-1}^qv_{n-1}. \end{aligned}$$

If \(\mathcal {C}\) is a k-dimensional subspace of \(F_{q^2}^n\), then \(\mathcal {C}\) is said to be an [nk]-linear code. The number of nonzero components of \(c\in \mathcal {C}\) is said to be the weight wt(c) of the codeword c. The minimum nonzero weight d of all codewords in \(\mathcal {C}\) is said to be the minimum weight of \(\mathcal {C}\). A linear code \(\mathcal {C}\) of length n over \(F_{q^2}\) is said to be negacyclic if for any codeword \((c_0, c_1,\ldots , c_{n-1})\in \mathcal {C}\) we have that \((-c_{n-1}, c_0, c_1,\ldots , c_{n-2})\in \mathcal {C}\). We can see that xc(x) corresponds to a negacyclic shift of c(x) in the quotient ring \(F_{q^2}[x]/\langle x^n+1\rangle ,\) where \(c(x)=c_0 +c_1x+\cdots +c_{n-1}x^{n-1}\). Then, a \(q^2\)-ary negacyclic code \(\mathcal {C}\) of length n is an ideal of \(F_{q^2}[x]/\langle x^n+1\rangle \) and \(\mathcal {C}\) can be generated by a monic polynomial g(x) of \(x^n+1\).

Let \(gcd(n,q)=1\). Then, \(x^n+1\) does not have multiple roots. Let m be the multiplicative order of \(q^2\) modulo 2n. Assume that \(\alpha \) is a primitive 2n-th root of unity in \(F^{*}_{q^{2m}}\) and \( \beta =\alpha ^2\in F_{q^{2m}}.\) Then, \(\beta \) is a primitive n-th root of unity. Hence,

$$\begin{aligned} x^n+1=\Pi _{i=0}^{n-1}\left( x-\alpha \beta ^i\right) =\Pi _{i=0}^{n-1}\left( x-\alpha ^{2i+1}\right) . \end{aligned}$$

The \(q^2\)-cyclotomic coset module 2n containing i is defined by \(C_i\),

$$\begin{aligned} C_i=\left\{ i,iq^2,iq^4,\ldots ,iq^{2(m_i-1)}\right\} , \end{aligned}$$

where \(m_i\) is the smallest positive integer such that \(iq^{2m_i}\equiv i\mod 2n.\)

For a \(q^2\)-ary linear code \(\mathcal {C}\) of length n,  the Hermitian dual code of \(\mathcal {C}\) can be defined as \(\mathcal {C}^{\bot _h}=\{u\in F_{q^2}^n\mid \langle u,v\rangle _h=0~\mathrm{for}~\mathrm{all}~v\in \mathcal {C} \}.\) We can see that a \(q^2\)-ary linear code \(\mathcal {C}\) of length n is called Hermitian self-orthogonal if \(\mathcal {C}\subseteq \mathcal {C}^{\perp _h}.\) Let \(\mathcal {O} _{2n}\) be the set of all odd integers from 1 to 2n. The defining set of a negacyclic code \(\mathcal {C}=\langle g(x)\rangle \) of length n is the set \(Z=\{i\in \mathcal {O}_{2n}\mid \alpha ^i ~\mathrm{is~a~root~of}~ g(x)\}.\) Let \(\mathcal {C}\) be an [nk] negacyclic code over \(F_{q^2}\) with defining set Z. Then, the Hermitian dual \(\mathcal {C}^{\perp _h}\) is also negacyclic and has defining set \(Z^{\perp _h}=\{z\in \mathcal {O}_{2n}|-qz(\mathrm{mod}~2n)\not \in Z\}.\)

Proposition 1

[28, 29] (The BCH bound for negacyclic codes) Let \(\mathcal {C}\) be a \(q^2\)-ary negacyclic code of length n. If the generator polynomial g(x) of \(\mathcal {C}\) has the elements \(\{\alpha ^{1+2i}\mid 0 \le i \le d-2\}\) as the roots where \(\alpha \) is a primitive 2n-th root of unity, then the minimum distance of \(\mathcal {C}\) is at least d.

3 Review of entanglement-assisted quantum codes

Now, let us recall some basic notions and results of entanglement-assisted quantum codes in [11, 23].

Let H be an \((n-k)\times n\) parity check matrix of \(\mathcal {C}\) over \(F_{q^2}.\) Then, \(\mathcal {C}^{\perp _h}\) has an \(n\times (n-k)\) generator matrix \(H^\dag \), where \(H^\dag \) is the conjugate transpose matrix of H over \(F_{q^2}.\)

The following proposition is about the Singleton bound of classical linear codes.

Proposition 2

[39] (Singleton bound) If an [nkd] linear code \(\mathcal {C}\) over \(F_q\) exists, then

$$\begin{aligned} k\le n-d+1. \end{aligned}$$

If \(k=n-d+1,\) then \(\mathcal {C}\) is called an MDS code.

Now, we recall some results of entanglement-assisted quantum codes in [8, 19, 20, 27].

Theorem 1

[19, 20] If \( \mathcal {C}\) is a classical code and H is its parity check matrix over \(F_{q^2}\), then there exist entanglement-assisted codes with parameters \([[n,2k-n+c,d;c]]_{q}\), where \(c=\mathrm{rank}(HH^\dag )\).

Proposition 3

[8, 27] Assume that \(\mathcal {C}\) is an entanglement-assisted quantum code with parameters \([[n,k,d;c]]_q\), if \(d\le (n+2)/2\), then \(\mathcal {C}\) satisfies the entanglement-assisted Singleton bound \(n+c-k\ge 2(d-1).\) If \(\mathcal {C}\) satisfies the equality \(n+c-k= 2(d-1) \) for \(d\le (n+2)/2\), then it is called an entanglement-assisted quantum MDS code.

4 Constructions of entanglement-assisted quantum MDS codes

In [19, 20], the authors gave a definition for decomposition of the defining set of cyclic codes. Here, we define a decomposition of the defining set of negacyclic codes.

Definition 1

Let \(\mathcal {C}\) be a negacyclic code of length n with defining set Z. Assume that \(Z_1=Z\cap (-qZ)\) and \(Z_2=Z\backslash Z_1,\) where \(-qZ=\{n-qx|x\in Z\}.\) Then, \(Z=Z_1\cup Z_2\) is called a decomposition of the defining set of \(\mathcal {C}.\)

Lemma 1

Let \(\mathcal {C}\) be a negacyclic code with length n over \(F_{q^2}\), where gcd(nq) \(=1.\) Suppose that Z is the defining set of the negacyclic code \(\mathcal {C}\) and \(Z=Z_1\cup Z_2\) is a decomposition of Z. Then, the number of entangled states required is \(c=|Z_1|.\)

Proof

From Definition 1, we can assume that the defining sets of negacyclic codes \(\mathcal {C}_1\) and \(\mathcal {C}_2\) are \(Z_1\) and \(Z_2\), respectively. The parity check matrix of \(\mathcal {C}_1\) and \(\mathcal {C}_2\) are \(H_1\) and \(H_2\), respectively. Let H be the parity check matrix of \(\mathcal {C}\). Therefore,

$$\begin{aligned} H=\left( \begin{array}{cccccc c} H_1 \\ H_2 \\ \end{array} \right) , \end{aligned}$$

and

$$\begin{aligned} HH^\dag =\left( \begin{array}{cccccc c} H_1H^\dag _1 &{} H_1H^\dag _2\\ H_2H^\dag _1 &{} H_2H^\dag _2\\ \end{array} \right) . \end{aligned}$$

From the definition of negacyclic codes and Definition 1, we have \(H_2H^\dag _2=0,\) \(H_1H^\dag _2=0\) (because of \(\mathcal {C}_1^{\perp _h}\subseteq \mathcal {C}_2 \)), and \(H_2H^\dag _1=0.\) Then,

$$\begin{aligned} HH^\dag =\left( \begin{array}{cccccc c} H_1H^\dag _1 &{} 0\\ 0 &{} 0\\ \end{array} \right) . \end{aligned}$$

We can see that \(c=\mathrm{rank}(HH^\dag )=\mathrm{rank}(H_1H_1^\dag )\). Since \(H_1\) is a full rank matrix, then we have \(c=\mathrm{rank}(H_1)=|Z_1|.\)

Lemma 2

[28] Let \(n=q^2+1\), \(s=n/2\), and \(q\equiv 1~(\mathrm{mod}~ 4)\). Then, we have the following properties:

  1. (1)

    The \(q^2\)-cyclotomic cosets modulo 2n containing some integers from 1 to 2n are \(C_s=\{s\},\) \(C_{3s}=\{3s\},\) and \(C_{s-2i}=\{s-2i,s+2i\}\) for \(1\le i\le s-1;\)

  2. (2)

    If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=\cup _{i=0}^{\delta }C_{s-2i}\),where \(0\le \delta \le (q-1)/2,\) then \(\mathcal {C}^{\perp _h}\subseteq \mathcal {C}.\)

Theorem 2

Let \(n=q^2+1\) and \(s=n/2\), where q is an odd prime power with \(q\ge 5\) and \(q\equiv 1(\mathrm{mod}~4)\). If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=\cup _{i=0}^{\frac{q-1}{2}+t}C_{s-2i}\), then there exist entanglement-assisted quantum codes with parameters \([[q^2+1,q^2+5-2q-4t, q+2t+1; 4]]_q,\) where \(2\le t\le \frac{ q-1}{2} \).

Proof

From Lemma 2, we can assume that the defining set of negacyclic code \(\mathcal {C}\) is \(Z=\cup _{i=0}^{\frac{q-1}{2}+t}C_{s-2i},\) then \(\mathcal {C}\) is a negacyclic code with parameters \([q^2+1,q^2+1-q-2t, q+2t+1]_{q^2}\) from Propositions 1 and 2. Therefore, we have the following result.

$$\begin{aligned} Z_1= & {} Z\cap (-qZ)\\= & {} \left( \left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \cup \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \right) \\&\cap \left( -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \cup -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) \right) \\= & {} \left( \left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \cap -q \left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \\&\cup \left( \left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) \right) \\&\cup \left( \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \\&\cup \left( \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) \right) \\= & {} C_{s-q-1}\cup C_{s-q+1}.\qquad \qquad (*) \end{aligned}$$

From Lemma 2, we have

$$\begin{aligned} \left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =\emptyset . \end{aligned}$$

In order to get the result of equation \((*)\), we have to show that

$$\begin{aligned} \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right)= & {} C_{s-q-1},\\ \left( \cup _{i=0}^{\frac{q-1}{2} }C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right)= & {} C_{s-q+1}, \end{aligned}$$

and

$$\begin{aligned} \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =\emptyset \end{aligned}$$

as follows.

Firstly, we show that

$$\begin{aligned} \left( \cup _{i=\frac{q-1}{2}+1}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =C_{s-q-1}. \end{aligned}$$

It is easy to show that \(-qC_{s-q-1}=C_{s-q+1}\). Therefore, we have

$$\begin{aligned}&\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \\&\quad = \left( C_{s-q-1}\cup \left( \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \\&\quad =\left( C_{s-q-1}\cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \\&\qquad \cup \left( \left( \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i} \right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \\&\quad =C_{s-q-1}.\end{aligned}$$

In fact,

$$\begin{aligned} C_{s-q-1}\cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =C_{s-q-1} \end{aligned}$$

from Lemma 2 and

$$\begin{aligned} \left( \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =\emptyset \end{aligned}$$

for \(2\le t\le \frac{q-1}{2}\).

If \(\left( \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \ne \emptyset \) for \(2\le t\le \frac{q-1}{2}\), i.e.,

$$\begin{aligned} \left( \cup _{i=2}^{ t}C_{s-2\left( i+\frac{q-1}{2}\right) } \right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \ne \emptyset \end{aligned}$$

for \(2\le t\le \frac{q-1}{2}\), then there exist two integers l and j, where \(2\le l \le \frac{q-1}{2}\) and \(0\le j\le \frac{q-1}{2}\), such that \(s-2(l+\frac{q -1}{2})\equiv -q(s-2j)q^{2k}~\mathrm{mod}~2n\) for some \(k\in \{0,1\}\). We can seek a contradiction as follows.

  1. (i)

    When \(k=0\), we have \(s-2(l+\frac{q-1}{2})\equiv -q(s-2j)~\mathrm{mod}~2n\). Since \(-q(s-2j)\equiv -s+2jq~\mathrm{mod}~2n\), it follows that \(s-2(l+\frac{q-1}{2})\equiv -s+2qj~\mathrm{mod}~2n\), i.e., \(s \equiv l+\frac{q-1}{2}+qj~\mathrm{mod}~n\). If \( 0\le j \le \frac{q-3}{2}\) and \(2\le l \le \frac{q-1}{2}\), then we have \( \frac{q+3}{2}\le l+\frac{q-1}{2}+qj \le \frac{q-1}{2}+\frac{q-1}{2}+q\frac{q-3}{2}=\frac{q^2-q-2}{2} <s\), which is in contradiction with \(s=\frac{q^2+1}{2}\). If \(j=\frac{q-1}{2}\) and \(2\le l \le \frac{q-1}{2}\), then we have \(s \equiv l+\frac{q-1}{2}+q\frac{q-1}{2}~\mathrm{mod}~n\), it is equivalent to \(1 \equiv l ~\mathrm{mod}~n\), which is in contradiction with \( 2 \le l \le \frac{q-1}{2}\).

  2. (ii)

    When \(k=1\), \(s-2(l+\frac{q -1}{2})\equiv -(s-2j)q^3\equiv -s+2jq(q^2+1)-2jq\equiv -s-2jq~\mathrm{mod}~2n\), i.e., \(s+jq\equiv l+\frac{q -1}{2} ~\mathrm{mod}~n\). We have \(\frac{q+3}{2}\le l+\frac{q -1}{2}\le q-1\) from assumption, while \(s\le s+jq\le s+q\frac{q -1}{2}=\frac{2q^2-q+1}{2}<n\). This yields a contradiction.

From the above discussions, we can see

$$\begin{aligned} \left( \cup _{i=\frac{q-1}{2}+1}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =C_{s-q-1} \end{aligned}$$

for \(2\le t\le \frac{q-1}{2}\).

Secondly, we show that

$$\begin{aligned} \left( \cup _{i=0}^{\frac{q-1}{2} }C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =C_{s-q+1}. \end{aligned}$$

Since

$$\begin{aligned} -q\left( \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) =-qC_{s-q-1}=C_{s-q+1}, \end{aligned}$$

it follows that

$$\begin{aligned} \left( \cup _{i=0}^{\frac{q-1}{2} }C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =C_{s-q+1}. \end{aligned}$$

Finally, we show that

$$\begin{aligned} \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =\emptyset . \end{aligned}$$

If \(\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) \ne \emptyset \) for \(2\le t\le \frac{q-1 }{2}\), i.e.,

$$\begin{aligned} \left( \cup _{i=1}^{t}C_{s-2\left( i+\frac{q-1}{2}\right) }\right) \cap -q\left( \cup _{i= 1}^{ t} C_{s-2\left( i+\frac{q-1}{2}\right) }\right) \ne \emptyset \end{aligned}$$

for \(2\le t\le \frac{q-1 }{2}\), then there exist integers l and j, where \(2\le l,j\le \frac{q-1}{2} \), such that \(s-2(l+\frac{q-1}{2})\equiv -q(s-2(j+\frac{q-1}{2}))q^{2k}~\mathrm{mod}~2n\) for some \(k\in \{0,1\}\). We can seek a contradiction as follows.

  1. (i)

    When \(k=0\), \(s-2(l+\frac{q-1}{2})\equiv -q(s-2(j+\frac{q-1}{2}))~\mathrm{mod}~2n\). Since \(-q(s-2(j+\frac{q-1}{2}))\equiv -s +2q(j+\frac{q-1}{2})~\mathrm{mod}~2n\), it follows that \(s-2(l+\frac{q-1}{2})\equiv -s+2q(j+\frac{q-1}{2})~\mathrm{mod}~2n\), i.e., \(s\equiv l+\frac{q-1}{2}+q(j+\frac{q-1}{2})~\mathrm{mod}~n\). Hence, \(s\equiv l+qj+\frac{q^2-1}{2}~\mathrm{mod}~n\), which is equivalent to \(1\equiv l+qj~\mathrm{mod}~n\). This congruence is in contradiction with \( 2+2q\le l+qj\le \frac{q-1}{2}+q\frac{q-1}{2}=\frac{q^2-1}{2}<n\).

  2. (ii)

    When \(k=1\), \(s-2(l+\frac{q-1}{2})\equiv -q^3(s-2(j+\frac{q-1}{2})) ~\mathrm{mod}~2n\). Since \( -q^3(s-2(j+\frac{q-1}{2})) \equiv -s+2q(q^2+1)(j+\frac{q-1}{2}) -2q(j+\frac{q-1}{2}) \equiv -s-2q(j+\frac{q-1}{2}) ~\mathrm{mod}~2n\), it follows that \(s+q(j+\frac{q-1}{2}) \equiv l+\frac{q-1}{2}~\mathrm{mod}~n\). The congruence is equivalent to \((j-1)q \equiv l ~\mathrm{mod}~n\). Since \(q\le (j-1)q \le \frac{q^2-3q}{2}\), which is in contradiction with \(2\le l \le \frac{q-1}{2}\), it follows that \(\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =\emptyset .\) From Lemma 1, we have \(c=4.\) From Theorem 1, there exist entanglement-assisted quantum codes with parameters \([[q^2+1,q^2+5-2q-4t, q+2t+1; 4]]_q,\) where \(2\le t\le \frac{ q-1}{2} \).

Lemma 3

[28] Let \(n=\frac{q^2+1}{2},\) where q is an odd prime power. If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=\cup _{i=1}^{\delta }C_{2i-1},\) where \(C_{2i-1}=\{2i-1, 1-2i\}\) and \(1\le \delta \le \frac{q-1}{2},\) then \(\mathcal {C}^{\perp _h}\subseteq \mathcal {C}.\)

Now, we use Lemma 4 to express Lemma 3 and show it for complementary.

Lemma 4

Let \(n=\frac{q^2+1}{2}\), \(s=n\) and \(r=2\). Then, we have the following properties:

  1. (1)

    The \(q^2\)-cyclotomic cosets modulo 2n containing some integers from 1 to 2n are \(C_s=\{s\}\) and \(C_{s-2j}=\{s-2j,s+2j\}\) for \(1\le j\le \frac{s-1}{2};\)

  2. (2)

    If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=\cup _{j=1}^{\delta }C_{s-2j}\),where \(1\le \delta \le \frac{q-1}{2} ,\) then \(\mathcal {C}^{\perp _h}\subseteq \mathcal {C}.\)

Proof

(1) It is easy to see that \(C_s=\{s\}\). Now we only need to show that \(C_{s-2j}=\{s-2j,s+2j\}\) for \(1\le j\le \frac{s-1}{2}.\) Since \((s-2j)q^2=sq^2-2j(q^2+1)+2j\equiv s+2j~\mathrm{mod}~2n\), it follows that \(C_{s-2j}=\{s-2j,s+2j\}\) for \(1\le j\le \frac{s-1}{2}.\) Now we show that \(C_{s-2j}\) are disjoint. If there exist two integers l and j, \(1\le l\ne j\le \frac{s-1}{2}\) such that \(C_{s-2j}=C_{s-2l}\), then we have \(s-2l\equiv (s-2j)q^{2k}\equiv s-2jq^{2k}~\mathrm{mod}~2n\) for \(k\in \{0,1\}\).When \(k=0\), \(s-2l\equiv s-2j~\mathrm{mod}~2n\), i.e., \(2l\equiv 2j~\mathrm{mod}~2n\), which is in contradiction with \( l\ne j\). When \(k=1\), we have \(0\equiv l+j~\mathrm{mod}~n\). Since \(2\le l+j\le s-1 \), which is in contradiction with \(0\equiv l+j~\mathrm{mod}~n\). Therefore, \(C_{s-2j}=\{s-2j,s+2j\}\) for \(1\le j\le \frac{s-1}{2}\) are disjoint.

(2) We only need to show that \(Z^{-q}\cap Z=\emptyset \). If we have \(Z^{-q}\cap Z\ne \emptyset \), then there exist two integers l and j, \(1\le l,j\le \frac{q-1}{2}\) such that \(s-2l\equiv -(s-2j)q^{2k+1}~\mathrm{mod}~2n\) for some \(k\in \{0,1\}\). Since \(-sq\equiv s~\mathrm{mod}~2n\) and \(-sq^3\equiv s~\mathrm{mod}~2n\), it follows that \(s-2l\equiv -(s-2j)q^{2k+1}~\mathrm{mod}~2n\), which is equivalent to \(0 \equiv l+jq^{2k+1}~\mathrm{mod}~n\). We seek a contradiction by considering the following cases.

  1. (i)

    For \( k=0\), we have \(1+q\le l+jq\le \frac{q-1}{2}+\frac{q-1}{2}q=\frac{q^2-1}{2}<n\), which is in contradiction with \(0 \equiv l+jq~\mathrm{mod}~n\).

  2. (ii)

    For \(k=1\), we have \(0 \equiv l+jq^{3}~\mathrm{mod}~n\). Since \( jq^{3}=j(q^3+q-q)=jq(q^2+1)-qj\equiv -qj ~\mathrm{mod}~n\), it follows that \(0\equiv l-jq~\mathrm{mod}~n\). In fact, \(1\le l \le \frac{q-1}{2}\) and \(q\le jq \le \frac{q^2-q}{2}\), which is in contradiction with the congruence \(0\equiv l-jq~\mathrm{mod}~n\). Therefore, we have \(\mathcal {C}^{\perp _h}\subseteq \mathcal {C}.\)

Theorem 3

Let \(n=\frac{q^2+1}{2},\) where q is an odd prime power with \(q> 7\). If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=\cup _{i=0}^{\frac{q-1}{2}+t}C_{s-2i}\) for \(2\le t\le \frac{q-1}{2}\), then there exist entanglement-assisted quantum codes with parameters \([[\frac{q^2+1}{2},\frac{q^2+1}{2}-2q-4t+5, q+2t+1;5]]_q\), where \(2\le t\le \frac{q-1}{2}\).

Proof

From Lemma 4, let the defining set of negacyclic code \(\mathcal {C}\) be \(Z=\cup _{i=0}^{\frac{q-1}{2}+t}C_{s-2i}.\) We can see that \(\mathcal {C}\) is a negacyclic code with parameters \(\big [\frac{q^2+1}{2},\frac{q^2+1}{2}-q-2t, q+2t+1\big ]_{q^2}\) from Propositions 1 and 2. Then, we have the following result.

From Lemma 4, we have

$$\begin{aligned} \left( \cup _{i=1}^{\frac{q-1}{2}}C_{s-2i}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}}C_{s-2i}\right) =\emptyset . \end{aligned}$$

Since \(-qC_{s}=C_{s}\) and

$$\begin{aligned}&\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \\&\quad =\left( C_{s}\cup \left( \cup _{i=1}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \cap \left( -qC_{s}\cup -q\left( \cup _{i=1}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \\&\quad =C_{s}\cup \left( \left( \cup _{i=1}^{\frac{q-1}{2}}C_{s-2i}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}}C_{s-2i}\right) \right) , \end{aligned}$$

it follows that

$$\begin{aligned} \left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =C_{s}. \end{aligned}$$

In order to get the result of equation \((**)\), we have to show that

$$\begin{aligned}&\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =C_{s-q-1},\\&\left( \cup _{i=0}^{\frac{q-1}{2} }C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =C_{s-q+1} \end{aligned}$$

and

$$\begin{aligned} \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =\emptyset \end{aligned}$$

as follows.

Firstly, we show that

$$\begin{aligned} \left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =C_{s-q-1}. \end{aligned}$$

From \(-qC_{s-q+1}=C_{s-q-1}\) and \(-qC_{s}=C_{s}\), we have

$$\begin{aligned}&\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \\&\quad = \left( C_{s-q-1}\cup \left( \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \\&\quad = \left( C_{s-q-1}\cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \\&\qquad \cap \left( \left( \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i} \right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) \\&\quad =C_{s-q-1}. \end{aligned}$$

In fact,

$$\begin{aligned} \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i} \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) =\emptyset \end{aligned}$$

for \(2\le t\le \frac{q-1}{2}\). If \( \left( \cup _{i=\frac{q+3}{2}}^{\frac{q-1}{2}+t}C_{s-2i} \right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \ne \emptyset \) for \(2\le t\le \frac{q-1}{2}\), i.e.,

$$\begin{aligned} \left( \cup _{i=2}^{ t}C_{s-2\left( i+\frac{q-1}{2}\right) } \right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \ne \emptyset \end{aligned}$$

for \(2\le t\le \frac{q-1}{2}\), then there exist integers l and j, where \(2\le l \le \frac{q-1}{2}\) and \(0\le j\le \frac{q-1}{2}\), such that \(s-2(l+\frac{q -1}{2})\equiv -q(s-2j)q^{2k}~\mathrm{mod}~2n\) for some \(k\in \{0,1\}\). We can seek a contradiction as follows.

  1. (i)

    When \(k=0\), we have \(s-2(l+\frac{q-1}{2})\equiv -q(s-2j)~\mathrm{mod}~2n\). Since \(-q(s-2j)\equiv s+2jq~\mathrm{mod}~2n\), we have \(s-2(l+\frac{q-1}{2})\equiv s+2qj~\mathrm{mod}~2n\), i.e., \(0 \equiv l+\frac{q-1}{2}+qj~\mathrm{mod}~n\). If \( 0\le j \le \frac{q-3}{2}\) and \(2\le l \le \frac{q-1}{2}\), then we have \( \frac{q+3}{2}\le l+\frac{q-1}{2}+qj \le \frac{q-1}{2}+\frac{q-1}{2}+q\frac{q-3}{2}=\frac{q^2-q-2}{2}<n \), which is in contradiction with \(0 \equiv l+\frac{q-1}{2}+qj~\mathrm{mod}~n\). If \( 2\le l \le \frac{q-1}{2}\) and \(j=\frac{q-1}{2}\), then we have \(0 \equiv l+\frac{q-1}{2}+q\frac{q-1}{2}~\mathrm{mod}~n\) that is equal to \(0 \equiv l-1~\mathrm{mod}~n\), which is in contradiction with \( 1 \le l-1 \le \frac{q-3}{2}\).

  2. (ii)

    When \(k=1\), we have \(s-2(l+\frac{q -1}{2})\equiv -(s-2j)q^3\equiv -s+2jq(q^2+1)-2jq\equiv -s-2jq~\mathrm{mod}~2n\), i.e., \(jq\equiv l+\frac{q -1}{2} ~\mathrm{mod}~n\). When \(j=0\), we have \(0\equiv l+\frac{q -1}{2} ~\mathrm{mod}~n\), which is in contradiction with \(\frac{q+3}{2}\le l+\frac{q -1}{2}\le q-1\). When \(1\le j\le \frac{q-1}{2}\), we have \(q\le jq\le q\frac{q -1}{2}=\frac{q^2-q}{2}<n\), which is in contradiction with \(\frac{q+3}{2}\le l+\frac{q -1}{2}\le q-1\).

From the above discussions, we can see that the result follows.

Secondly, we show that

$$\begin{aligned} \left( \cup _{i=0}^{\frac{q-1}{2} }C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =C_{s-q+1}. \end{aligned}$$

From

$$\begin{aligned} -q\left( \left( \cup _{i=\frac{q-1}{2}+1}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=0}^{\frac{q-1}{2}}C_{s-2i}\right) \right) =-qC_{s-q-1}=C_{s-q+1}, \end{aligned}$$

we have

$$\begin{aligned} \left( \cup _{i=0}^{\frac{q-1}{2} }C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =C_{s-q+1}. \end{aligned}$$

Finally, we show that \(\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =\emptyset .\)

If \(\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) \ne \emptyset \) for \(2\le t\le \frac{q-1 }{2}\), i.e.,

$$\begin{aligned} \left( \cup _{i=1}^{t}C_{s-2\left( i+\frac{q-1}{2}\right) }\right) \cap -q\left( \cup _{i= 1}^{ t} C_{s-2\left( i+\frac{q-1}{2}\right) }\right) \ne \emptyset \end{aligned}$$

for \(2\le t\le \frac{q-1 }{2}\), then there exist integers l and j, where \(2\le l,j \le \frac{q-1}{2} \), such that \(s-2(l+\frac{q-1}{2})\equiv -q(s-2(j+\frac{q-1}{2}))q^{2k}~\mathrm{mod}~2n\) for some \(k\in \{0,1\}\). We can seek a contradiction as follows.

  1. (i)

    When \(k=0\), \(s-2(l+\frac{q-1}{2})\equiv -q(s-2(j+\frac{q-1}{2}))~\mathrm{mod}~2n\). Since \(-q(s-2(j+\frac{q-1}{2}))\equiv -s +2q(j+\frac{q-1}{2})~\mathrm{mod}~2n\), it follows that \(s-2(l+\frac{q-1}{2})\equiv -s+2q(j+\frac{q-1}{2})~\mathrm{mod}~2n\), i.e., \(0\equiv l+\frac{q-1}{2}+q(j+\frac{q-1}{2})~\mathrm{mod}~n\). Hence, \(0\equiv l+qj+\frac{q^2-1}{2}~\mathrm{mod}~n\), which is equivalent to \(1\equiv l+qj~\mathrm{mod}~n\). This congruence is in contradiction with \( 2+ 2q\le l+qj\le \frac{q-1}{2}+q\frac{q-1}{2}=\frac{q^2-1}{2}<n\).

  2. (ii)

    When \(k=1\), \(s-2(l+\frac{q-1}{2})\equiv -q^3(s-2(j+\frac{q-1}{2})) ~\mathrm{mod}~2n\). Since \( -q^3(s-2(j+\frac{q-1}{2}) \equiv -s+2q(q^2+1)(j+\frac{q-1}{2}) -2q(j+\frac{q-1}{2}) \equiv -s-2q(j+\frac{q-1}{2}) ~\mathrm{mod}~2n\), it follows that \( q(j+\frac{q-1}{2}) \equiv l+\frac{q-1}{2}~\mathrm{mod}~n\). The congruence is equivalent to \((j-1)q \equiv l ~\mathrm{mod}~n\). Since \(q\le (j-1)q \le \frac{q^2-3q}{2}<n\), which is in contradiction with \(2\le l \le \frac{q-1}{2}\), then we have \(\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t}C_{s-2i}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}}^{\frac{q-1}{2}+t} C_{s-2i}\right) =\emptyset \).

From Lemma 1, we have \(c=5.\) From Theorem 1, there exist entanglement-assisted quantum codes with parameters \([[\frac{q^2+1}{2},\frac{q^2+1}{2}-2q-4t+5, q+2t+1;5]]_q\), where \(2\le t\le \frac{q-1}{2}\).

Lemma 5

[36] Let \(n=\lambda (q+1)\), where q is an odd prime power, \(\lambda \) is an odd divisor of \(q-1\). Then, we have the following properties:

  1. (1)

    The \(q^2\)-cyclotomic cosets modulo 2n containing some integers from 1 to 2n are \(C_{2i-1}=\{2i-1\}\) for \(1\le i\le n;\)

  2. (2)

    If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code with length 2n and the defining set is \(Z=\cup _{i=1}^{\delta }C_{2i-1}\), where \(C_{2i-1}=\{2i-1\}\) for \(1\le \delta \le \frac{q-1}{2}+\lambda \),then \( \mathcal {C}^{\perp _h}\subseteq \mathcal {C}.\)

Theorem 4

Let \(n=\lambda (q+1)\), where q is an odd prime power with \(q\ge 7\), \(\lambda \) is an odd divisor of \(q-1\) with \(\lambda \ge 3\). If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=\cup _{i=1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1}.\) Then there exist entanglement-assisted quantum codes with parameters \([[\lambda (q+1),\lambda (q+1)-2\lambda -2t-q+5, \frac{q+1}{2}+\lambda +t;4]]_{q}\) for \(\frac{q+3}{2} \le t\le \frac{q-1}{2}+\lambda \).

Proof

From Lemma 5, let the defining set of negacyclic code \(\mathcal {C}\) be \(Z=\cup _{i=1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1},\) \(\mathcal {C}\) is a negacyclic code with parameters \([\lambda (q+1),\lambda (q+1)-(\frac{q-1}{2}+\lambda +t), \frac{q+1}{2}+\lambda +t]_{q^2}\) from Propositions 1 and 2. Then, we have the following result.

$$\begin{aligned} Z_1= & {} Z\cap (-qZ)\\= & {} \left( \left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \cup \left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \right) \\&\cap \left( -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \cup -q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) \right) \\= & {} \left( \left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \right) \\&\cup \left( \left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) \right) \\&\cup \left( \left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \right) \\&\cup \left( \left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1})\cap -q(\cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) \right) \\= & {} C_{2\left( \frac{q+1}{2}+\lambda \right) -1}\cup C_{2\lambda -1}\cup C_{2\left( \frac{q-1}{2}+\lambda \right) -1}\cup C_{2\left( \lambda +q\right) -1} . \qquad \qquad (***) \end{aligned}$$

From Lemma 5, we have \(\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) =\emptyset \). In order to get the result of equation \((***)\), we have to show that

$$\begin{aligned}&\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) = C_{2\left( \frac{q+1}{2}+\lambda \right) -1}\cup C_{2\left( \lambda +q\right) -1},\\&\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) =C_{2\lambda -1}\cup C_{2\left( \frac{q-1}{2}+\lambda \right) -1} \end{aligned}$$

and

$$\begin{aligned} \left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) =\emptyset \end{aligned}$$

as follows.

Firstly, we show that

$$\begin{aligned} \left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) = C_{2\left( \frac{q+1}{2}+\lambda \right) -1}\cup C_{2\left( \lambda +q\right) -1}. \end{aligned}$$

Since \(-qC_{2(\frac{q+1}{2}+\lambda )-1}=C_{2\lambda -1}\) and \(-qC_{2(\frac{q-1}{2}+\lambda )-1}=C_{2(\lambda +q)-1}\) from Lemma 5, we have

$$\begin{aligned}&\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \\&\quad = \left( C_{2\left( \frac{q+1}{2}+\lambda \right) -1}\cup \left( \cup _{i=\frac{q+3}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \\&\quad = \left( C_{2\left( \frac{q+1}{2}+\lambda \right) -1}\cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \right) \\&\qquad \cup \left( \left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \right) \\&\qquad \cup \left( C_{2\left( \lambda +q\right) -1} \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \right) \\&\qquad \cup \left( \left( \cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \right) \\&\quad =C_{2\left( \frac{q+1}{2}+\lambda \right) -1}\cup C_{2\left( \lambda +q\right) -1}. \end{aligned}$$

In fact,

$$\begin{aligned} \left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) =\emptyset \end{aligned}$$

and

$$\begin{aligned} \left( \cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) =\emptyset \end{aligned}$$

for \( \frac{q+3}{2}\le t\le \frac{q-1}{2}+\lambda \). It can be divided into two parts to discuss as follows.

(i) Since \(\left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) =\emptyset \) can be expressed by

$$\begin{aligned}&\left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \\&\quad =\left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\cup C_{2\left( \frac{q-1}{2}+\lambda \right) -1}\right) \\&\quad =\left[ \left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\right) \right] \\&\qquad \cup \left[ \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \cap C_{2\left( q+\lambda \right) -1}\right] =\emptyset . \end{aligned}$$

From Lemma 5, we can see that \( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \cap C_{2(q+\lambda )-1}=\emptyset .\) Now, we have to show \(\left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\right) =\emptyset .\) If

$$\begin{aligned} \left( \cup _{i=\frac{q+3}{2}+\lambda }^{\lambda +q-1}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\right) \ne \emptyset . \end{aligned}$$

This case is equivalent to \(\left( \cup _{i=1}^{\frac{q-3}{2}}C_{2(\frac{q+1}{2}+\lambda +i)-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\right) \ne \emptyset .\) Then there exist integers l and j, where \(1\le l \le \frac{q-3}{2}\) and \(1\le j\le \frac{q-3}{2}+\lambda \), such that \( 2(\frac{q+1}{2}+\lambda +l)-1 \equiv -q( 2j-1) ~\mathrm{mod}~2n\). If \(1\le l \le \frac{q-3}{2}\) and \(1\le j\le \frac{q-3}{2}+\lambda \), then we have \( 2(\frac{q+1}{2}+\lambda +l)-1 \equiv -q( 2j-1)~\mathrm{mod}~2n\), i.e., \( l+\lambda +qj\equiv 0~\mathrm{mod}~n\). Let \(q-1=2\lambda \varepsilon \) with some integer \(\varepsilon \). Then, \( 1\le j \le (\varepsilon +1)\lambda -1\), j can be expressed by the form \(j=u\lambda +v \), where \(0\le u\le \varepsilon \) and \(1\le v\le \lambda -1\). Therefore, we have \( l+\lambda +q(u\lambda +v)=l+\lambda (qu+u)+qv-\lambda u+\lambda \equiv l+qv-\lambda u+\lambda \equiv 0~\mathrm{mod}~n\). Since \(1+q-\varepsilon \lambda +\lambda \le l+qv-\lambda u+\lambda \le \frac{q-3}{2}+q(\lambda -1)+\lambda =\lambda (q+1)-\frac{q+3}{2}<n\), which is in contradiction with \(l+qv-\lambda u+\lambda \equiv 0~\mathrm{mod}~n\).

(ii) Since \(\left( \cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) =\emptyset \) can be expressed by

$$\begin{aligned}&\left( \cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \\&\quad =\left( \cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\cup C_{2\left( \frac{q-1}{2}+\lambda \right) -1}\right) \\&\quad =\left[ \left( \cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\right) \right] \\&\qquad \cup \left[ (\cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \cap C_{2\left( q+\lambda \right) -1}\right] =\emptyset .\end{aligned}$$

If \(\left( \cup _{i=\lambda +q+1}^{\frac{q-1}{2}+\lambda +t}C_{2i-1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{2i-1}\right) \ne \emptyset \) for \( \frac{q+3}{2}\le t\le \frac{q-1}{2}+\lambda \), i.e.,

$$\begin{aligned} \left( \cup _{i=1}^{t-\frac{q+1}{2}}C_{ 2\left( i+q+\lambda \right) -1} \right) \cap -q\left( \cup _{i=1}^{\frac{q-3}{2}+\lambda }C_{ 2i-1}\right) \ne \emptyset \end{aligned}$$

for \(1\le t-\frac{q+1}{2}\le \lambda -1\). Then there exist integers l and j, where \( 1\le l\le \lambda -1\) and \(1\le j\le \frac{q-3}{2}+\lambda \), such that \( 2(l+q+\lambda )-1 \equiv -q( 2j-1)~\mathrm{mod}~2n\), i.e., \(0\equiv l+qj+\frac{q-1}{2}+\lambda ~\mathrm{mod}~n\).

Let \(q-1=2\lambda \varepsilon \) with some integer \(\varepsilon \). Then, \( 1\le j \le (\varepsilon +1)\lambda -1\). j can be expressed by the form \(j=u\lambda +v \), where \(0\le u\le \varepsilon \) and \(1\le v\le \lambda -1\). Therefore, we have \( l+\lambda +q(u\lambda +v)+\frac{q-1}{2}=l+\lambda (qu+u)+qv-\lambda u+\lambda +\frac{q-1}{2}\equiv l+qv-\lambda u+\lambda +\frac{q-1}{2}\equiv 0~\mathrm{mod}~n\). If \(0\le u\le \varepsilon \) and \(1\le v\le \lambda -1\), then \(1+q-\varepsilon \lambda +\lambda +\frac{q-1}{2}\le l+qv-\lambda u+\lambda +\frac{q-1}{2}\le \frac{q-3}{2}+q(\lambda -1)+\lambda +\frac{q-1}{2}=\lambda (q+1)-2<n\), which is in contradiction with \(l+qv-\lambda u+\lambda ++\frac{q-1}{2}\equiv 0~\mathrm{mod}~n\).

Secondly, we show that

$$\begin{aligned} \left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) =C_{2\lambda -1}\cup C_{2\left( \frac{q-1}{2}+\lambda \right) -1}. \end{aligned}$$

Since \(\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) = C_{2(\frac{q+1}{2}+\lambda )-1}\cup C_{2(\lambda +q)-1},\) it follows that \(-q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap \left( \cup _{i=1}^{\frac{q-1}{2}+\lambda }C_{2i-1}\right) = -qC_{2(\frac{q+1}{2}+\lambda )-1}\cup -qC_{2(\lambda +q)-1}=C_{2\lambda -1}\cup C_{2(\frac{q-1}{2}+\lambda )-1}.\)

Finally, we show that \(\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) =\emptyset \) for \(\frac{q+3}{2}\le t\le \frac{q-1}{2}+\lambda .\)

If \(\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t}C_{2i-1}\right) \cap -q\left( \cup _{i=\frac{q+1}{2}+\lambda }^{\frac{q-1}{2}+\lambda +t} C_{2i-1}\right) \ne \emptyset \) for \(\frac{q+3}{2}\le t\le \frac{q-1}{2}+\lambda ,\) which is equivalent to \(\left( \cup _{i= 1}^{t}C_{2(\frac{q-1}{2}+\lambda +i)-1}\right) \cap -q\left( \cup _{i= 1}^{t}C_{2(\frac{q-1}{2}+\lambda +i)-1}\right) \ne \emptyset \). Then there exist integers l and j, where \(\frac{q+3}{2}\le l,j\le \frac{q-1}{2}+\lambda ,\) such that \( 2(\frac{q-1}{2}+\lambda +l)-1\equiv -q(2(\frac{q-1}{2}+\lambda +j)-1) ~\mathrm{mod}~2n\), i.e.,\(\frac{q+1}{2}\equiv l+qj~\mathrm{mod}~n\). Since \((q+1)\frac{q+3}{2}\le l+qj \le (q+1)(\frac{q-1}{2}+\lambda )\), we have \(2q+2\le l+qj-n \le \frac{q^2-1}{2}\), which is in contradiction with \(\frac{q+1}{2}\equiv i+qj~\mathrm{mod}~n\). Therefore, the result follows.

From Lemma 1, we have \(c=4.\) From Theorem 1, there exist entanglement-assisted quantum codes with parameters \([[\lambda (q+1),\lambda (q+1)-2\lambda -2t-q+5, \frac{q+1}{2}+\lambda +t;4]]_{q}\) for \(\frac{q+3}{2} \le t\le \frac{q-1}{2}+\lambda \).

Lemma 6

[36] Let \(n=2\lambda (q+1)\), where q is an odd prime power with \(q\equiv 1~\mathrm{mod}~4\), \(\lambda \) is an odd divisor of \(q-1\).

  1. (1)

    The \(q^2\)-cyclotomic cosets modulo 2n containing some integers from 1 to 2n are \(C_{2i-1}=\{2i-1\}\) for \(1\le i\le n;\)

  2. (2)

    If \(\mathcal {C}\) is \(q^2\)-ary negacyclic code with length 2n and the defining set is \(Z=\cup _{i=1}^{\delta }C_{2i-1}\), where \(C_{2i-1}=\{2i-1\}\) for \(1\le \delta \le \frac{q-1}{2}+2\lambda \),then \( \mathcal {C}^{\perp _h}\subseteq \mathcal {C}.\)

We can obtain a similar result by using the method of Theorem 4 in the following theorem.

Theorem 5

Let \(n=2\lambda (q+1)\), where \(q\ge 13\) is an odd prime power with \(q\equiv 1~\mathrm{mod}~4\), \(\lambda \ge 3\) is an odd divisor of \(q-1\). If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=\cup _{i=1}^{\frac{q-1}{2}+2\lambda +t}C_{2i-1}.\) Then there exist entanglement-assisted quantum codes with parameters \([[2\lambda (q+1),2\lambda (q+1)-4\lambda -2t-q+5, \frac{q+1}{2}+2\lambda +t;4]]_{q}\) for \(\frac{q+3}{2} \le t\le \frac{q-1}{2}+2\lambda \) with \(q\equiv 1~\mathrm{mod}~4\).

Table 1 Sample parameters of entanglement-assisted quantum MDS codes constructed from Theorem 2
Table 2 Sample parameters of optimal entanglement-assisted quantum MDS codes constructed from Theorem 3
Table 3 Sample parameters of entanglement-assisted quantum MDS codes constructed from Theorem 4
Table 4 Sample parameters of entanglement-assisted quantum MDS codes constructed from Theorem 5

Remark 1

From Proposition 3, we can see that these entanglement-assisted quantum codes constructed from Theorems 2, 3, 4 and 5 are quantum MDS codes. There are some entanglement-assisted quantum MDS codes with different lengths are listed in Tables 1, 2, 3, and 4. The distance of these quantum MDS codes is greater than \(q+1\). The readers can also construct some other families of entanglement-assisted quantum MDS codes by using Lemma 1 to obtain entangled states.

In the above part of this section, we have discussed four families of entanglement-assisted quantum MDS codes constructed from negacyclic codes. In the following part of this section, we will find that there exist entanglement-assisted quantum codes with maximal entanglement.

Theorem 6

Let \(n=q^2+1\) and \(s=n/2\), where \(q\ge 5\) is an odd prime power with \(q\equiv 1(\mathrm{mod}~4)\). If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=C_{s-q+1}\cup C_{s-q-1}\), then there exist maximal-entanglement entanglement-assisted quantum codes with parameters \([[q^2+1,q^2-3, d\ge 3; 4]]_q.\)

Proof

Let the defining set of negacyclic code \(\mathcal {C}\) be \(Z=C_{s-q+1}\cup C_{s-q-1}\). From Lemma 2, we can see that \(\mathcal {C}\) is a negacyclic code with parameters \( [q^2+1,q^2-3, d\ge 3]_{q^2}\). Since \(Z\cap -qZ= C_{s-q+1}\cup C_{s-q-1}\), it follows that \(c=4\) from Lemma 1. From Theorem 1, there exist maximal-entanglement entanglement-assisted quantum codes with parameters \([[q^2+1,q^2-3, d\ge 3; 4]]_q.\)

Theorem 7

Let \(n=\frac{q^2+1}{2}\) and \(s=n\), where q is an odd prime power with \(q> 3\). If \(\mathcal {C}\) is a \(q^2\)-ary negacyclic code of length n with defining set \(Z=C_{s-q+1}\cup C_{s-q-1}\cup C_{s}\), then there exist maximal-entanglement entanglement-assisted quantum codes with parameters \(\left[ \left[ \frac{q^2+1}{2},\frac{q^2+1}{2}-5, d\ge 3;5\right] \right] _q\).

Proof

Let the defining set of negacyclic code \(\mathcal {C}\) be \(Z=C_{s-q+1}\cup C_{s-q-1}\cup C_{s}\). From Lemma 4, we can see that \(\mathcal {C}\) is a negacyclic code with parameters \( \left[ \frac{q^2+1}{2},\frac{q^2+1}{2}-5, d\ge 3\right] _{q^2}\). Since \(Z\cap -qZ= C_{s-q+1}\cup C_{s-q-1}\cup C_{s}\),it follows that \(c=5\) from Lemma 1. From Theorem 1, there exist maximal-entanglement entanglement-assisted quantum codes with parameters \(\left[ \left[ \frac{q^2+1}{2},\frac{q^2+1}{2}-5, d\ge 3;5\right] \right] _q\).

Remark 2

In Theorems 6 and 7, it is not easy for us to obtain maximal-entanglement entanglement-assisted quantum MDS codes under Hermitian construction, because we have to ensure not only that the elements of \(q^2\)-ary cyclotomic cosets of \(Z\cap -qZ\) are continuous, but also that \(Z\cap -qZ=Z\). In the future work, we will optimize the algebraic structure of \(q^2\)-ary cyclotomic cosets to harmonize the conflict.

5 Summary

In this paper, four families of entanglement-assisted quantum codes that satisfy the entanglement-assisted quantum Singleton bound with \(q+1\le d\le (n+2)/2\) are constructed. Moreover, we also construct two families of maximal-entanglement entanglement-assisted quantum codes. These quantum codes constructed in this paper are different from the ones in the literature. In [22], the authors constructed some families of entanglement-assisted quantum codes as follows:

  1. (1)

    \([[q^2+1,q^2-2d+4,d;1]]_q\), where q is a prime power, \(2\le d\le 2q\) is an even integer.

  2. (2)

    \([[\frac{q^2-1}{2},\frac{q^2-1}{2}-2d+4,d;2]]_q\), where q is an odd prime power, \(\frac{q+1}{2}+2 \le d\le \frac{3q }{2} -\frac{1}{2} \).

    In this paper, we can transform the parameters of Theorems 2,3,4, and 5 into the following forms.

  3. (i)

    \([[q^2+1,q^2+7-2d,d;4]]_q\), where \(q+5\le d\le 2q\), q is an odd prime power with \(q\ge 5\) and \(q\equiv 1~\mathrm{mod}~4\).

  4. (ii)

    \([[\frac{q^2+1}{2},\frac{q^2+1}{2}-2d+7, d;5]]_q\), where \(q+5\le d\le 2q\) and q is an odd prime power with \(q>7\).

  5. (iii)

    \([[\lambda (q+1),\lambda (q+1)-2d+6, d;4]]_{q}\), where q is a prime power with \(q\ge 7\), \(\lambda \) is an odd divisor of \(q-1\) with \(\lambda \ge 3\) and \(q+2+\lambda \le d\le q+2\lambda \).

  6. (iv)

    \([[2\lambda (q+1),2\lambda (q+1)-2d+6, d;4]]_{q}\), where q is a prime power with \(q\ge 13\), \(\lambda \) is an odd divisor of \(q-1\) with \(\lambda \ge 3\), \(q\equiv 1~\mathrm{mod}~4\) and \(q+2+2\lambda \le d\le q+4\lambda \).

The performance of an entanglement-assisted quantum code can be measured by net rate \((\frac{k-c}{n})\). Brun et al. [8] showed that it was possible to obtain catalytic codes when the net rate of an entanglement-assisted quantum code was positive. Qian and Zhang [21] used net rate to study the performance of entanglement-assisted quantum codes constructed from linear binary codes. Here, we compare \([[q^2+1,q^2+7-2d,d;4]]_q\) with \([[q^2+1,q^2-2d+4,d;1]]_q\) of [22] by using net rate, we can find that entanglement-assisted quantum codes from Theorem 2 have greater distance. When \(\lambda =\frac{q-1}{2}\) or \(\lambda =\frac{q-1}{4}\), we can obtain \([[ \frac{q^2-1}{2},\frac{q^2-1}{2}-2d+6, d;4]]_{q}\) and compare it with \([[\frac{q^2-1}{2},\frac{q^2-1}{2}-2d+4,d;2]]_q\) of [22] by using net rate, which implies that entanglement-assisted quantum MDS codes constructed from Theorems 4 and 5 have better distance. We can also search for entangled states c by using Lemma 1 to obtain more entanglement-assisted quantum MDS codes. The more entangled states c can increase the error-correcting ability of quantum codes.

In addition, we also construct two families of entanglement-assisted quantum codes with maximal entanglement as follows.

  1. (i)

    \([[\frac{q^2+1}{2},\frac{q^2+1}{2}-5, d\ge 3;5]]_q\), where q is an odd prime power with \(q> 3\).

  2. (ii)

    \([[q^2+1,q^2-3, d\ge 3; 4]]_q,\) where q is an odd prime power with \(q\ge 5\) and \(q\equiv 1~\mathrm{mod}~4\).

From Lemma 1, in order to obtain maximal-entanglement entanglement-assisted quantum codes, the defining set of Z should satisfy \(Z\cap -qZ=Z\); however, it is a necessary condition. If we want to obtain maximal-entanglement entanglement-assisted quantum MDS codes, we have to ensure the defining set Z of negacyclic codes can generate an MDS code however, it is difficult for us to acquire the defining set Z in this manner.

In the future work, we will use other negacyclic codes even constacyclic codes to construct some other entanglement-assisted quantum MDS codes with minimum distance greater than \(q + 1\). Moreover, how to construct maximal-entanglement entanglement-assisted MDS codes from negacyclic codes or other methods is also an interesting topic.