1 Introduction

Quantum error-correcting(QEC) codes were introduced to preserve coherent states against noise and other unwanted interactions in quantum computation and quantum communication. Given a prime power q, an \([[n,k,d]]_{q}\) QEC code is a \(q^{k}\)-dimensional vector subspace of the Hilbert space \((\mathbb {C}^{q})^{\otimes n}\cong \mathbb {C}^{q^{n}}\) with minimum distance d, which can detect up to \(d-1\) quantum errors and correct up to \(\lfloor \frac{d-1}{2}\rfloor\) quantum errors. As we know, QEC codes can be constructed from classical linear codes with certain self-orthogonality properties. However, self-orthogonal conditions of some famous codes, such as LDPC codes and Turbo codes are hard to determine. In 2006, a more general framework named entanglement-assisted stabilizer formalism was introduced [2, 19], the related codes are called entanglement-assisted quantum error-correcting(EAQEC) codes, which can increase the communication capacity and can be contructed from any classical linear codes without self-orthogonality properties by utilizing pre-shared entanglement between the sender and the receiver. After that, many EAQEC codes with good parameters have been constructed. (Please see, for example, [8, 10, 11, 16, 24,25,26,27, 33, 44] and the relevant references therein).

Assume that q is a prime power. A q-ary EAQEC code encodes k information qudits into n channel qudits by utilizing c pairs of maximally entangled states, denoted by \([[n,k,d;c]]_{q}\), can correct up to \(\lfloor \frac{d-1}{2}\rfloor\) errors, where d is the minimum distance of the EAQEC code. Actually, if \(c=0\), it is indeed the standard \([[n,k,d]]_{q}\) QEC code. In this paper, QEC codes are also regarded as EAQEC codes. Similar to QEC codes, the parameters of EAQEC codes are mutually restricted, and there is an entanglement-assisted (EA) quantum Singleton bound for EAQEC codes.

Theorem 1

[1, 2, 14, 24] Assume that \(\mathsf {Q}\) is an \([[n,k,d;c]]_{q}\) EAQEC code. If \(d \leqslant \frac{n+2}{2}\), then

$$\begin{aligned}2(d-1) \leqslant n-k+c,\end{aligned}$$

where \(0\leqslant c \leqslant n-1\).

If \(c=0\), it is the quantum Singleton bound and a QEC code achieving this bound is called a quantum MDS code. When \(d \leqslant \frac{n+2}{2}\), an \([[n,k,d;c]]_{q}\) EAQEC code achieving such bound is called an EAQMDS code. Recently, for \(d > \frac{n+2}{2}\), Grassl [13] gave some examples of EAQEC codes with parameters beating such bound. A difficulty in the construction of EAQEC codes is to determine the number of maximally entangled states. There are two main techniques to find such number for present. One is through computing the hull dimension of linear codes [15], and the other is through decomposing the defining sets of constacyclic codes [6, 31]. When the number of maximally entangled states c is fixed, EAQMDS codes are optimal in the sense that they have the largest minimum distance. So far, many families of EAQMDS codes have been constructed from LCD codes [39], k-Galois dual codes [30], generalized Reed-Solomon codes and Goppa codes [3, 9, 12, 28, 36, 37], etc.

Due to the rich algebraic structure and efficient encoding and decoding circuits, constacyclic codes including cyclic codes and negacyclic codes are preferred objects on the construction of EAQMDS codes and many EAQMDS codes have been constructed from them. Among the obtained results, the lengths of these EAQMDS codes divide \(q^{2}-1\) (Please see, for example, [6, 29, 31, 32, 34, 35, 41]) or \(q^{2}+1\) (Please see, for example, \(q^{2}+1\) in [6, 35, 40, 41]; \(\frac{q^{2}+1}{2}\) in [6, 45]; \(\frac{q^{2}+1}{5}\) in [7, 21, 34, 45]; \(\frac{q^{2}+1}{10}\) in [21, 35, 45]; \(\frac{q^{2}+1}{13}\) in [21, 43]; \(\frac{q^{2}+1}{17}\) in [21], etc). Recently, Chen et al. [4, 5] constructed some families of EAQMDS codes of length \(\frac{q^{2}+1}{a}\), where \(a=t^{2}+1\) and \(t\geqslant 2\) is a positive integer, which can be seen as the generalization of EAQMDS codes of lengths \(\frac{q^{2}+1}{5}\), \(\frac{q^{2}+1}{10}\) and \(\frac{q^{2}+1}{17}\). Concrete parameters of already known EAQMDS codes of lengths \(\frac{q^{2}+1}{5}\) and \(\frac{q^{2}+1}{13}\) are listed in Table 1, which will be used in the sequel.

Table 1 Known entanglement-assisted quantum MDS codes of lengths \(\frac{q^{2}+1}{5}\) and \(\frac{q^{2}+1}{13}\)

In this paper, through the analysis of the intersection of the defining set \(\mathscr {Z}\) of constacyclic codes (including cyclic codes) and \(-q\mathscr {Z}\), we obtain some families of EAQMDS codes of length \(\frac{q^{2}+1}{\rho }\), where \(\rho =a^{2}+(a+1)^{2}\) and \(a\geqslant 2\) is a positive integer. It can be easily derived that there are very little even prime power q to satisfy \(\frac{q^{2}+1}{\rho }\) to be an integer, except for \(\rho =5\), which had already been extensively studied in [5, 7, 21] (Please see Table 1). Hence, here we only consider q being an odd prime power, and \(a\geqslant 2\). The concrete parameters of the EAQMDS codes constructed in this paper are listed in Table 2.

Table 2 Obtained entanglement-assisted quantum MDS codes of length \(\frac{q^{2}+1}{\rho }\)

The paper is organized as follows. In Section 2, some notations and basic results of constacyclic codes and EAQEC codes are presented. In Sections 3 and 4, some families of EAQMDS codes with small pre-shared entangled states are derived from constacyclic codes and cyclic codes, respectively. The conclusion is given in Section 5.

2 Preliminaries

Let \(\mathbb {F}_{q^{2}}\) be the Galois field with \(q^{2}\) elements, where q is a prime power. A \(q^{2}\)-ary linear code \(\mathscr {C}\) of length n with dimension k and minimum distance d, denoted by \([n,k,d]_{q^{2}}\), is a linear subspace of \(\mathbb {F}_{q^{2}}^{n}\) and its parameters satisfy the well-known Singleton bound: \(d\leqslant n-k+1\). If \(d=n-k+1\), then \(\mathscr {C}\) is called a maximun distance separable (MDS) code. For two vectors \({\textbf {x}}=(x_{0}, x_{1},\ldots ,x_{n-1})\), and \({\textbf {y}}=(y_{0}, y_{1},\ldots ,y_{n-1})\in \mathbb {F}_{q^{2}}^{n}\), define their Hermitian inner product as

$$\begin{aligned} \langle {\textbf {x}}, {\textbf {y}}\rangle :=x_{0}{y_{0}^{q}}+x_{1}{y_{1}^{q}}+\cdots +x_{n-1}y_{n-1}^{q}. \end{aligned}$$

The vectors \({\textbf {x}}\) and \({\textbf {y}}\) are called orthogonal with respect to the Hermitian inner product if \(\langle {\textbf {x}}, {\textbf {y}}\rangle =0\). For a \(q^{2}\)-ary linear code \(\mathscr {C}\), its Hermitian dual code \(\mathscr {C}^{\bot _{H}}\) is defined as

$$\begin{aligned} \mathscr {C}^{\bot _{H}}:=\{{\textbf {x}}\in \mathbb {F}_{q^{2}}^{n}:\langle {\textbf {x}}, {\textbf {y}}\rangle =0 ~\text {for all} ~ {\textbf {y}}\in \mathscr {C}\}. \end{aligned}$$

Then, \(\mathscr {C}^{\bot _{H}}\) is a \(q^{2}\)-ary linear code with dimension \(n-\dim (\mathscr {C})\).

Let \(\tau\): \(\tau (c_{0},c_{1},\ldots ,c_{n-1})=(\lambda c_{n-1},c_{0},\ldots ,c_{n-2})\) be the constacyclic shift on \(\mathbb {F}_{q^{2}}^{n}\). A \(q^{2}\)-ary linear code \(\mathscr {C}\) of length n is called a \(\lambda\)-constacyclic code if \(\tau (\mathscr {C})=\mathscr {C}\). In case \(\lambda =1\), those constacyclic codes are called cyclic codes. Defining a map

$$\begin{aligned} \sigma :\mathbb {F}_{q^{2}}^{n}\longrightarrow \mathscr {R}=\frac{\mathbb {F}_{q^{2}}[x]}{\langle x^{n}-\lambda \rangle } \end{aligned}$$
$$\begin{aligned} (c_{0},c_{1},\ldots ,c_{n-1})\longmapsto c_{0}+c_{1}x+c_{2}x^{2}+\cdots +c_{n-1}x^{n-1} \end{aligned}$$

Then a \(q^{2}\)-ary linear code \(\mathscr {C}\) of length n is a \(\lambda\)-constacyclic code if and only if \(\sigma (\mathscr {C})=\{\sigma ({\textbf {c}})|{\textbf {c}}\in \mathscr {C})\}\) is an ideal of the quotient ring \(\mathscr {R}\). Note that each ideal of \(\mathscr {R}\) is principal. Let \(\mathscr {C}=\langle f(x)\rangle\) be a \(\lambda\)-constacyclic code of length n, where f(x) is a monic polynomial of minimal degree in \(\mathscr {C}\). Then f(x) is called the generator polynomial of \(\mathscr {C}\) and \(f(x)|(x^{n}-\lambda )\).

Assume that \(\text {gcd}(n,q)=1\), \(\text {ord}(\lambda )=r\), and \(\text {ord}_{rn}(q^{2})=m\), i.e., the multiplicative order of \(q^{2}\) modulo rn is m. Then there exists a primitive rn-th root of unity \(\xi\) in \(\mathbb {F}_{q^{2m}}\) such that \(\xi ^{n}=\lambda\), which implies that \(x^{n}-\lambda =\prod _{i=0}^{n-1}(x-\xi ^{1+ri})\). Let \(m_{i}(x)\) be the minimal polynomial of \(\xi ^{1+ri}\) over \(\mathbb {F}_{q^{2}}\) and \(\mathbb {Z}_{n}=\{0,1,2,\ldots ,n-1\}\) be the ring of integers modulo n. For each \(q^{2}\)-ary \(\lambda\)-constacyclic code \(\mathscr {C}\) with generator polynomial f(x) of length n, there is a subset \(\varOmega \subseteq \mathbb {Z}_{n}\) such that \(f(x)=\prod _{i\in \varOmega }m_{i}(x)\). Let \(\mathbb {Z}_{rn}\) be the ring of integers modulo rn. For each \(i\in \mathbb {Z}_{rn}\), the \(q^{2}\)-cyclotomic coset of i modulo rn is defined by

$$\begin{aligned} C_{i}:=\{ i q^{2\ell } \mod rn: 0\leqslant \ell \leqslant \ell _{i}-1 \}, \end{aligned}$$

where \(\ell _{i}\) is the smallest positive integer such that \(iq^{2\ell _{i}}\equiv i~\mod rn\). Assume that \(\mathscr {C}\) is a \(q^{2}\)-ary \(\lambda\)-constacyclic code of length n with generator polynomial f(x), then the set \(\mathscr {Z}=\{i\in \mathbb {Z}_{rn}| f(\xi ^{i})=0\}\), is called the defining set of \(\mathscr {C}\), where \(\xi\) is a primitive rn-th root of unity in some extension field of \(\mathbb {F}_{q^{2}}\). It is clear that \(\mathscr {Z}\) is a union of some \(q^{2}\)-cyclotomic cosets and \(\text {dim}(\mathscr {C})=n-|\mathscr {Z}|\), where \(|\mathscr {Z}|\) denotes the cardinality of the set \(\mathscr {Z}\). The minimum distance of \(\mathscr {C}\) can be estimated by the following well-known bound.

Theorem 2

(BCH bound) [22] Let \(\delta\) be an integer in the range \(2\leqslant \delta \leqslant n\). Assume that \(\mathscr {C}\) is a \(\lambda\)-constacyclic code of length n with defining set \(\mathscr {Z}\). If \(\mathscr {Z}\) consists of \(\delta -1\) consecutive elements, then \(d(\mathscr {C})\geqslant \delta\).

The following lemma gives a criterion for verifying that \(\mathscr {C}\) contains its Hermitian dual code \(\mathscr {C}^{\perp _{H}}\).

Lemma 1

[20] Let \(\mathscr {C}\) be a \(\lambda\)-constacyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}\). Then \(\mathscr {C}\) contains its Hermitian dual code \(\mathscr {C}^{\perp _{H}}\) if and only if \(\mathscr {Z}\bigcap \mathscr {Z}^{-q}=\emptyset\), where \(\mathscr {Z}^{-q}=\{-qz \mod rn|z\in \mathscr {Z}\}\).

As we know, the key in the construction of EAQEC codes is to determine the number of maximally entangled states. Scholars have proposed several methods to solve this problem and the related construction methods for EAQEC codes also have been given. Among these methods, a frequently used one is the decomposition of the defining set of the source codes, please see [6, 34], etc. Similar to such method, we have the following result.

Theorem 3

Let \(\mathscr {C}\) be a \(q^{2}\)-ary \(\lambda\)-constacyclic code of length n with defining set \(\mathscr {Z}\). Suppose that \(\varDelta =\mathscr {Z}\bigcap \mathscr {Z}^{-q}\), where \(\mathscr {Z}^{-q}=\{-qz~{{\,\mathrm{mod~}\,}}rn:z\in \mathscr {Z}\}\). If \(\mathscr {C}\) has parameters \([n,k=n-|\mathscr {Z}|,d]_{q^{2}}\), then there is an EAQEC code with parameters \([[n,n-2|\mathscr {Z}|+|\varDelta |,d;|\varDelta |]]_{q}\).

3 Entanglement-Assisted Quantum MDS codes Derived from Constacyclic Codes

Let \(\eta \in \mathbb {F}_{q^{2}}^{*}\) and \(ord(\eta )=q+1\). In this section, we will construct some EAQMDS codes of length \(n=\frac{q^{2}+1}{\rho }\) from \(\eta\)-constacyclic codes, where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2\) is a positive integer. It is easy to obtain that q is a prime power with the form \(q=\rho m+2a+1\) or \(q=\rho m-2a-1\), where m is a positive integer. As we said before, we only consider q being odd with the form \(q=2\rho m\pm (2a+1)\). Since \(\rho =a^{2}+(a+1)^{2}\) is always odd. Similar to the proof of Lemma 3.12 in [20], We can get the following lemma which will play an important role in our construction.

Lemma 2

[20] Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{q^{2}+1}{2}\), and \(\rho\) be odd. Then all cyclotomic cosets modulo \((q+1)n\) containing \(1+(q+1)i\) are as follows:

  1. (1)

    \(C_{s}=\{s\}\) and \(C_{s\pm \frac{q+1}{2}n}=\{s\pm \frac{q+1}{2}n\}\).

  2. (2)

    \(C_{s-(q+1)i}=\{s-(q+1)i,s+(q+1)i\}\) for \(1\leqslant i\leqslant n/2-1\).

Now we give the construction of EAQMDS codes under the case \(q=2\rho m+2a+1\).

Lemma 3

Let q be an odd prime power with the form \(q=2\rho m+2a+1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{q^{2}+1}{2}\). If \(\mathscr {C}\) is an \(\eta\)-constacyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{j=0}^{\delta } C_{s-(q+1)j}\), where \(0\leqslant \delta \leqslant \frac{(2a+1)q+1}{2\rho }-1\), then \(\mathscr {C}^{\perp _{H}}\subseteq \mathscr {C}\).

Proof

According to Lemma 1, we only need to consider that \(\mathscr {Z}\bigcap \mathscr {Z}^{-q}=\emptyset\). Suppose that \(\mathscr {Z}\bigcap \mathscr {Z}^{-q}\not =\emptyset\), then there exist two integers i and j, where \(0\leqslant i,j\leqslant \frac{(2a+1)q+1}{2\rho }-1\) such that

$$\begin{aligned}s-(q+1)i\equiv -q[s-(q+1)j]q^{2k}\mod (q+1)n,\end{aligned}$$

for \(k\in \{0,1\}\). We seek some contradictions as follows.

  1. (I)

    If \(k=0\), then

    $$\begin{aligned} s-(q+1)i\equiv -q[s-(q+1)j]\mod (q+1)n, \end{aligned}$$

    which is equivalent to

    $$\begin{aligned} 2\rho (qj+i)\equiv q^{2}+1\mod 2(q^{2}+1). \end{aligned}$$

    Due to \(0\leqslant i,j\leqslant \frac{(2a+1)q+1}{2\rho }-1\), we have \(0\leqslant 2\rho i,2\rho j\leqslant (2a+1)q+1-2\rho\). We now divide into the following subcases.

    (i) If \(0\leqslant 2\rho j\leqslant 2q-2a-1\), then

    $$\begin{aligned}0\leqslant 2\rho (qj+i)\leqslant 2(q^{2}+1)-2\rho -1<2(q^{2}+1).\end{aligned}$$

    Writing \(2\rho i\) in the form \(2\rho i=uq+v\), where \(0\leqslant u\leqslant 2a-1\), \(0\leqslant v\leqslant q-1\), and \(u=2a\), \(0\leqslant v\leqslant q-2\rho +1\). Then \(q^{2}+1=2\rho (qj+i)=(2\rho j+u)q+v\). By the division algorithm, it must be \(q=2\rho j+u\), which contradicts to the form of q.

    (ii) If \(wq-2a\leqslant 2\rho j\leqslant (w+2)q-2a-1\), where \(w=2,4,\ldots ,2a-2\). Then

    $$\begin{aligned} w(q^{2}+1)-2aq-w\leqslant 2\rho (qj+i)\leqslant (w+2)(q^{2}+1)-2\rho -w-1. \end{aligned}$$

    Hence,

    $$\begin{aligned} -(q^{2}+1)<2\rho (qj+i)-w(q^{2}+1)<2(q^{2}+1), \end{aligned}$$

    which means that \((w+1)(q^{2}+1)=2\rho (qj+i)=(2\rho j+u)q+v\). Therefore, \((w+1)q=2\rho j+u\), which also contradicts to the form of q.

    (iii) If \(2aq-2a\leqslant 2\rho j\leqslant (2a+1)q-2\rho +1\), then

    $$\begin{aligned} 2a(q^{2}+1)-2aq-2a\leqslant 2\rho (qj+i)\leqslant (2a+1)(q^{2}+1)+2(a-\rho +1)q-2a-2\rho . \end{aligned}$$

    Hence,

    $$\begin{aligned} -(q^{2}+1)<2\rho (qj+i)\mod 2(q^{2}+1)<q^{2}+1, \end{aligned}$$

    which is a contradiction.

  2. (II)

    If \(k=1\), then

    $$\begin{aligned} s-(q+1)i\equiv -[s-(q+1)j]q^{3}\mod (q+1)n. \end{aligned}$$

    Since \(-[s-(q+1)j]q^{3}=-sq^{3}+(q+1)q^{3}j\equiv -sq-(q+1)qj\mod (q+1)n\), one can get \(s-(q+1)i\equiv -sq-(q+1)qj\mod (q+1)n\), which is equivalent to

    $$\begin{aligned} q^{2}+1+2\rho qj\equiv 2\rho i\mod 2(q^{2}+1). \end{aligned}$$

    Due to \(0\leqslant i,j\leqslant \frac{(2a+1)q+1}{2\rho }-1\), we have \(0\leqslant 2\rho i,2\rho j\leqslant (2a+1)q+1-2\rho\). We now divide into the following subcases.

    (i) If \(0\leqslant 2\rho j\leqslant q-2a-1\), then

    $$\begin{aligned}q^{2}+1\leqslant 2\rho qj+q^{2}+1\leqslant 2q^{2}+1-(2a+1)q<2(q^{2}+1),\end{aligned}$$

    while \(0\leqslant 2\rho i\leqslant (2a+1)q-2\rho +1<q^{2}+1.\) This is a contradiction.

    (ii) If \(wq-2a\leqslant 2\rho j\leqslant (w+2)q-2a-1\), where \(w=1,3,\ldots ,2a-3\). Then

    $$\begin{aligned}(w+1)(q^{2}+1)-2aq-w\leqslant 2\rho qj+q^{2}+1\leqslant (w+3)(q^{2}+1)-(2a+1)q-w-2.\end{aligned}$$

    If \((w+1)(q^{2}+1)-2aq-w\leqslant 2\rho qj+q^{2}+1\leqslant (w+1)(q^{2}+1)-1,\) then \(q^{2}+1<2(q^{2}+1)-2aq-w\leqslant 2\rho qj+q^{2}+1-(w-1)(q^{2}+1)\leqslant 2q^{2}+1\), which is impossible due to (i). If \((w+1)(q^{2}+1)\leqslant 2\rho qj+q^{2}+1\leqslant (w+3)(q^{2}+1)-(2a+1)q-w-2\), then \(0\leqslant 2\rho qj+q^{2}+1-(w+1)(q^{2}+1)\leqslant 2(q^{2}+1)-(2a+1)q-w-2<2(q^{2}+1)\). Writing \(2\rho i\) in the form \(2\rho i=uq+v\), where \(0\leqslant u\leqslant 2a-1\), \(0\leqslant v\leqslant q-1\), and \(u=2a\), \(0\leqslant v\leqslant q-2\rho +1\). Then \(w(q^{2}+1)=2\rho (qj-i)=(2\rho j-u)q-v\). By the division algorithm, it must be \(wq=2\rho j-u\), which contradicts to the form of q.

    (iii) If \((2a-1)q-2a\leqslant 2\rho j\leqslant (2a+1)q-2\rho +1\), then

    $$\begin{aligned}2aq^{2}-2aq+1\leqslant 2\rho qj+q^{2}+1\leqslant (2a+2)q^{2}-(2\rho -1)q+1.\end{aligned}$$

    If \(2aq^{2}-2aq+1\leqslant 2\rho qj+q^{2}+1\leqslant 2a(q^{2}+1)-1,\) then \(q^{2}+1<2(q^{2}+1)-2aq-2a+1\leqslant 2\rho qj+q^{2}+1-(2a-2)(q^{2}+1)\leqslant 2q^{2}+1\), which is also impossible due to (i). If \(2a(q^{2}+1)\leqslant 2\rho qj+q^{2}+1\leqslant (2a+2)q^{2}-(2\rho -1)q+1\), then \(0\leqslant 2\rho qj+q^{2}+1-2a(q^{2}+1)\leqslant 2q^{2}-(2\rho -1)q+1<2(q^{2}+1)\). Hence, \((2a-1)(q^{2}+1)=2\rho (qj-i)=(2\rho j-u)q-v\), which means that \((2a-1)q=2\rho j-u\), and it contradicts to the form of q.

Therefore, we conclude that \(\mathscr {Z}\bigcap \mathscr {Z}^{-q}=\emptyset\) as desired.

Lemma 4

Let q be an odd prime power with the form \(q=2\rho m+2a+1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{q^{2}+1}{2}\). Then

  1. (1)

    \(-qC_{s}=C_{s-\frac{q+1}{2}n}\);

  2. (2)

    \(-qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}=C_{s-\frac{q-2a-1}{2\rho }(q+1)}\);

  3. (3)

    \(-qC_{s-\frac{(4a+1)q+2a+3}{2\rho }(q+1)}=C_{s-\frac{(2a+3)q-4a-1}{2\rho }(q+1)}\).

Proof

  1. (1)

    As \(\rho =a^{2}+(a+1)^{2}\), and a is a positive integer, it is easy to see that \(\rho\) is odd.

    $$\begin{aligned} -qs= & {} -(q+1)s+s\\= & {} -\frac{\rho -1}{\rho }(q+1)s-\frac{q+1}{\rho }s+s \\= & {} -\frac{\rho -1}{2}(q+1)n+s-\frac{q+1}{\rho }s\\\equiv & {} s-\frac{q+1}{2}n \mod (q+1)n,\\ \end{aligned}$$

    which implies that \(-qC_{s}=C_{s-\frac{q+1}{2}n}.\)

  2. (2)

    \(-qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}=C_{s-\frac{q-2a-1}{2\rho }(q+1)}\) holds for the following reason

    $$\begin{aligned}&-q\left[ s\pm \frac{(2a+1)q+1}{2\rho }(q+1)\right] \\= & {} -qs\mp \frac{(2a+1)q^{2}+q}{2\rho }(q+1)\\\equiv & {} s-\frac{q+1}{2}n\mp \frac{(2a+1)(q^{2}+1)+q-2a-1}{2\rho }(q+1)\mod (q+1)n\\\equiv & {} s\mp \frac{q-2a-1}{2\rho }(q+1) \mod (q+1)n.\\ \end{aligned}$$
  3. (3)

    \(-qC_{s-\frac{(4a+1)q+2a+3}{2\rho }(q+1)}=C_{s-\frac{(2a+3)q-4a-1}{2\rho }(q+1)}\) also holds for the following reason

    $$\begin{aligned}&-q\left[ s\pm \frac{(4a+1)q+2a+3}{2\rho }(q+1)\right] \\= & {} -qs\mp \frac{(4a+1)q^{2}+(2a+3)q}{2\rho }(q+1)\\\equiv & {} s-\frac{q+1}{2}n\mp \frac{(4a+1)(q^{2}+1)+(2a+3)q-4a-1}{2\rho }(q+1)\mod (q+1)n\\\equiv & {} s\mp \frac{(2a+3)q-4a-1}{2\rho }(q+1) \mod (q+1)n.\\ \end{aligned}$$

  

Lemma 5

Let q be an odd prime power with the form \(q=2\rho m+2a+1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{q^{2}+1}{2}\). If \(\mathscr {C}\) is an \(\eta\)-constacyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{j=0}^{\delta } C_{s-(q+1)j}\), then

$$\begin{aligned} |\mathscr {Z}^{-q}\bigcap \mathscr {Z}| = \left\{ \begin{array}{lll} 0, \quad 0 \leqslant \delta \leqslant \frac{(2a+1)q+1}{2\rho }-1;\\ 4, \quad \frac{(2a+1)q+1}{2\rho }\leqslant \delta \leqslant \frac{(4a+1)q+2a+3}{2\rho }-1;\\ 8,\quad \frac{(4a+1)q+2a+3}{2\rho } \leqslant \delta \leqslant \frac{(4a+3)q-(2a-1)}{2\rho }-1. \end{array}\right. \end{aligned}$$

Proof

(1) Let \(\mathscr {Z}=\bigcup _{j=0}^{\delta } C_{s-(q+1)j}\), where \(0 \leqslant \delta \leqslant \frac{(2a+1)q+1}{2\rho } - 1\). Then \(|\mathscr {Z}^{-q}\bigcap \mathscr {Z}|=0\) follows from Lemma 3.

(2) Let \(\mathscr {Z}=\mathscr {Z}_{1}\bigcup \mathscr {Z}_{2}\bigcup C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\), where \(\mathscr {Z}_{1}=\bigcup _{j=0}^{\frac{(2a+1)q+1}{2\rho }-1} C_{s-(q+1)j}\), \(\mathscr {Z}_{2}=\bigcup _{j=\frac{(2a+1)q+1}{2\rho }+1}^{\delta } C_{s-(q+1)j}\), and \(\frac{(2a+1)q+1}{2\rho }+1\leqslant \delta \leqslant \frac{(4a+1)q+2a+3}{2\rho }-1\). Then

$$\begin{aligned} \mathscr {Z}^{-q}\bigcap \mathscr {Z}= & {} \left( \mathscr {Z}_{1}^{-q}\bigcup \mathscr {Z}_{2}^{-q}\bigcup -qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\right) \bigcap \left( \mathscr {Z}_{1}\bigcup \mathscr {Z}_{2}\bigcup C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\right) \\= & {} \left( \mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{1}\right) \bigcup \left( \mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{2}\right) \bigcup \left( \mathscr {Z}_{1}^{-q}\bigcap C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\right) \bigcup \\&\left( \mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{1}\right) \bigcup \left( \mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{2}\right) \bigcup \left( \mathscr {Z}_{2}^{-q}\bigcap C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\right) \bigcup \\&\left( -qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap \mathscr {Z}_{1}\right) \bigcup \left( -qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap \mathscr {Z}_{2}\right) \bigcup \\&\left( -qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\right) .\\ \end{aligned}$$

According to Lemma 3, \(\mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{1}=\emptyset\). It follows from Lemma 4, one can get

$$\begin{aligned}&-qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}=\emptyset ,\\&-qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap \mathscr {Z}_{1}=C_{s-\frac{q-2a-1}{2\rho }(q+1)},\\&C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap \mathscr {Z}_{1}^{-q}=C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)},\\&-qC_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap \mathscr {Z}_{2}=\emptyset ,\\&C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\bigcap \mathscr {Z}_{2}^{-q}=\emptyset .\\ \end{aligned}$$

Now we only have to proof that \(\mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{2}=\mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{1}=\emptyset\) and \(\mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{2}=\emptyset .\)

Suppose \(\mathscr {Z}_{1}\bigcap \mathscr {Z}_{2}^{-q}\not =\emptyset\), then there exist two integers i and j, where \(0\leqslant i\leqslant \frac{(2a+1)q+1}{2\rho }-1\) and \(\frac{(2a+1)q+1}{2\rho }+1\leqslant j\leqslant \frac{(4a+1)q+2a+3}{2\rho }-1\) such that

$$\begin{aligned}s-(q+1)i\equiv -q[s-(q+1)j]q^{2k}\mod (q+1)n,\end{aligned}$$

for \(k\in \{0,1\}\). We seek some contradictions as follows.

  1. (I)

    If \(k=0\), then

    $$\begin{aligned}s-(q+1)i\equiv -q[s-(q+1)j]\mod (q+1)n,\end{aligned}$$

    which is equivalent to

    $$\begin{aligned} 2\rho (qj+i)\equiv q^{2}+1\mod 2(q^{2}+1). \end{aligned}$$

    Since \(0\leqslant i\leqslant \frac{(2a+1)q+1}{2\rho }-1\) and \(\frac{(2a+1)q+1}{2\rho }+1\leqslant j\leqslant \frac{(4a+1)q+2a+3}{2\rho }-1\), we have \(0\leqslant 2\rho i\leqslant (2a+1)q+1-2\rho\), and \((2a+1)q+1+2\rho \leqslant 2\rho j\leqslant (4a+1)q+2a+3-2\rho\). We now divide into the following subcases.

    (i) If \((2a+1)q+2\rho +1\leqslant 2\rho j\leqslant (2a+3)q-2a-1\), then

    $$\begin{aligned}(2a+1)(q^{2}+1)+(2\rho +1)q-(2a+1)\leqslant 2\rho (qj+i)\leqslant (2a+3)(q^{2}+1)-2(a+\rho +1).\end{aligned}$$

    Hence,

    $$\begin{aligned}-(q^{2}+1)< 2\rho (qj+i)-(2a+2)(q^{2}+1) < q^{2}+1,\end{aligned}$$

    which is a contradiction.

    (ii) If \((2a+3)q-2a\leqslant 2\rho j\leqslant (2a+4)q-2a-1\), then

    $$\begin{aligned}(2a+2)(q^{2}+1)+q^{2}-2(aq+a+1)\leqslant 2\rho (qj+i)\leqslant (2a+4)(q^{2}+1)-2a-2\rho -3.\end{aligned}$$

    Hence,

    $$\begin{aligned}0<2\rho (qj+i)-(2a+2)(q^{2}+1)<2(q^{2}+1).\end{aligned}$$

    Writing \(2\rho i\) in the form \(2\rho i=uq+v\), where \(0\leqslant u\leqslant 2a-1\), \(0\leqslant v\leqslant q-1\), and \(u=2a\), \(0\leqslant v\leqslant q-2\rho +1\). Then \((2a+3)(q^{2}+1)=2\rho (qj+i)=(2\rho j+u)q+v\). By the division algorithm, it must be \((2a+3)q=2\rho j+u\), which contradicts to the form of q.

    (iii) If \(wq-2a\leqslant 2\rho j\leqslant (w+2)q-2a-1\), where \(w=2a+4,\ldots ,4a-2\). Then

    $$\begin{aligned}w(q^{2}+1)-2aq-w\leqslant 2\rho (qj+i)\leqslant (w+2)(q^{2}+1)-2\rho -w-1.\end{aligned}$$

    Hence,

    $$\begin{aligned}-(q^{2}+1)<2\rho (qj+i)-w(q^{2}+1)<2(q^{2}+1),\end{aligned}$$

    which means that \((w+1)(q^{2}+1)=2\rho (qj+i)=(2\rho j+u)q+v\). Therefore, \((w+1)q=2\rho j+u\), which also contradicts to the form of q.

    (iv) If \(4aq-2a\leqslant 2\rho j\leqslant (4a+1)q+2a+3-2\rho\), then

    $$\begin{aligned} 4a(q^{2}+1)-2aq-4a\leqslant 2\rho (qj+i)\leqslant (4a+1)(q^{2}+1)+2(2a-\rho +2)q-2(2a+\rho ). \end{aligned}$$

    Hence,

    $$\begin{aligned} -(q^{2}+1)<2\rho (qj+i)\mod 2(q^{2}+1)<q^{2}+1, \end{aligned}$$

    which is a contradiction.

  2. (II)

    If \(k=1\), then

    $$\begin{aligned}s-(q+1)i\equiv -[s-(q+1)j]q^{3}\mod (q+1)n,\end{aligned}$$

    which is equivalent to

    $$\begin{aligned}q^{2}+1+2\rho qj\equiv 2\rho i\mod 2(q^{2}+1).\end{aligned}$$

    Similar to the discussion of Lemma 3 (2) and Lemma 5 (1), this case is impossible.

Finally, suppose \(\mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{2}\not =\emptyset ,\) then there exist two integers i and j, where \(\frac{(2a+1)q+1}{2\rho }+1\leqslant i, j\leqslant \frac{(4a+1)q+2a+3}{2\rho }-1\) such that

$$\begin{aligned} s-(q+1)i\equiv -q[s-(q+1)j]q^{2k}\mod (q+1)n, \end{aligned}$$

for \(k\in \{0,1\}\). Going on the line of the proofs similar to the above cases, one can get such case is impossible either.

Therefore,

$$\begin{aligned} \mathscr {Z}^{-q}\bigcap \mathscr {Z}= & {} C_{s-\frac{q-2a-1}{2\rho }(q+1)}\bigcup C_{s-\frac{(2a+1)q+1}{2\rho }(q+1)}\\= & {} \left\{ s\pm \frac{q-2a-1}{2\rho }(q+1),s\pm \frac{(2a+1)q+1}{2\rho }(q+1)\right\} , \end{aligned}$$

which means that \(|\mathscr {Z}^{-q}\bigcap \mathscr {Z}|=4\).

(3) This case can be proved by using the same method, we omit it here for simplification.

Theorem 4

Let q be an odd prime power with the form \(q=2\rho m+2a+1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\). Then there exist q-ary EAQMDS codes with the following parameters:

  1. (1)

    \([[n,n-2d+2,d]]\), where \(2\leqslant d\leqslant \frac{(2a+1)q+1}{\rho }\) is even;

  2. (2)

    \([[n,n-2d+6,d;4]]\), where \(\frac{(2a+1)q+1}{\rho }+2\leqslant d\leqslant \frac{(4a+1)q+2a+3}{\rho }\) is even;

  3. (3)

    \([[n,n-2d+10,d;8]]\), where \(\frac{(4a+1)q+2a+3}{\rho }+2\leqslant d\leqslant \frac{(4a+3)q-2a+1}{\rho }\) is even.

Proof

Let \(\mathscr {C}\) be an \(\eta\)-constacyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{j=0}^{\delta } C_{s-(q+1)j}\), where \(0\leqslant \delta \leqslant \frac{(4a+3)q-2a+1}{2\rho }-1\). From Lemma 1, we can see that \(\mathscr {Z}\) consists of \(2\delta +1\) consecutive integers \(\{s-(q+1)\delta ,\ldots ,s-(q+1),s,s+(q+1),\ldots ,s+(q+1)\delta \}\), which implies that \(\mathscr {C}\) has minimum distance at least \(2\delta +2\) from Theorem 2. Hence, \(\mathscr {C}\) is a \(q^{2}\)-ary \(\eta\)-constacyclic code with parameters \([n, n-(2\delta +1),\geqslant 2\delta +2]\). According to Lemma 5,

$$\begin{aligned} c=|\mathscr {Z}^{-q}\bigcap \mathscr {Z}| = \left\{ \begin{array}{l} 0, \quad 0 \leqslant \delta \leqslant \frac{(2a+1)q+1}{2\rho} - 1;\\ 4, \quad \frac{(2a+1)q+1}{2\rho }\leqslant \delta \leqslant \frac{(4a+1)q+2a+3}{2\rho }-1;\\ 8,\quad \frac{(4a+1)q+2a+3}{2\rho } \leqslant \delta \leqslant \frac{(4a+3)q-(2a-1)}{2\rho }-1. \end{array}\right. \end{aligned}$$

Combining Theorem 3 with the EA-quantum Singleton bound, there are q-ary EAQMDS codes with parameters as desired. The result follows.

Now we consider the case \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer.

Lemma 6

Let q be an odd prime power with the form \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{q^{2}+1}{2}\). If \(\mathscr {C}\) is an \(\eta\)-constacyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{j=0}^{\delta } C_{s-(q+1)j}\), where \(0\leqslant \delta \leqslant \frac{(2a+1)q-1}{2\rho }-1\), then \(\mathscr {C}^{\perp _{H}}\subseteq \mathscr {C}\).

Proof

The proof is similar to Lemma 3, we omit it here.

Lemma 7

Let q be an odd prime power with the form \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{q^{2}+1}{2}\). Then

  1. (1)

    \(-qC_{s-\frac{(2a+1)q-1}{2\rho }(q+1)}=C_{s-\frac{q+2a+1}{2\rho }(q+1)}\);

  2. (2)

    \(-qC_{s-\frac{(4a+1)q-2a-3}{2\rho }(q+1)}=C_{s-\frac{(2a+3)q+4a+1}{2\rho }(q+1)}\).

Proof

  1. (1)

    \(-qC_{s-\frac{(2a+1)q-1}{2\rho }(q+1)}=C_{s-\frac{q+2a+1}{2\rho }(q+1)}\) holds for the following reason

    $$\begin{aligned}&-q\left[ s\pm \frac{(2a+1)q-1}{2\rho }(q+1)\right] \\= & {} -qs\mp \frac{(2a+1)q^{2}-q}{2\rho }(q+1)\\\equiv & {} s-\frac{q+1}{2}n\mp \frac{(2a+1)(q^{2}+1)-q-2a-1}{2\rho }(q+1)\mod (q+1)n\\\equiv & {} s\pm \frac{q+2a+1}{2\rho }(q+1) \mod (q+1)n.\\ \end{aligned}$$
  2. (2)

    \(-qC_{s-\frac{(4a+1)q-2a-3}{2\rho }(q+1)}=C_{s-\frac{(2a+3)q+4a+1}{2\rho }(q+1)}\) also holds for the following reason

    $$\begin{aligned}&-q\left[ s\pm \frac{(4a+1)q-2a-3}{2\rho }(q+1)\right] \\= & {} -qs\mp \frac{(4a+1)q^{2}-(2a+3)q}{2\rho }(q+1)\\\equiv & {} s-\frac{q+1}{2}n\mp \frac{(4a+1)(q^{2}+1)-(2a+3)q-4a-1}{2\rho }(q+1)\mod (q+1)n\\\equiv & {} s\pm \frac{(2a+3)q+4a+1}{2\rho }(q+1) \mod (q+1)n.\\ \end{aligned}$$

Similar to Lemma 5 and Theorem 4, we have the following results.

Lemma 8

Let q be an odd prime power with the form \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{q^{2}+1}{2}\). If \(\mathscr {C}\) is an \(\eta\)-constacyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{j=0}^{\delta } C_{s-(q+1)j}\), then

$$\begin{aligned} |\mathscr {Z}^{-q}\bigcap \mathscr {Z}| = \left\{ \begin{array}{l} 0, \quad 0 \leqslant \delta \leqslant \frac{(2a+1)q-1}{2\rho }-1;\\ 4, \quad \frac{(2a+1)q-1}{2\rho }\leqslant \delta \leqslant \frac{(4a+1)q-2a-3}{2\rho }-1;\\ 8,\quad \frac{(4a+1)q-2a-3}{2\rho } \leqslant \delta \leqslant \frac{(4a+3)q+(2a-1)}{2\rho }-1. \end{array}\right. \end{aligned}$$

Theorem 5

Let q be an odd prime power with the form \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\). Then there exist q-ary EAQMDS codes with the following parameters:

  1. (1)

    \([[n,n-2d+2,d]]\), where \(2\leqslant d\leqslant \frac{(2a+1)q-1}{\rho }\) is even;

  2. (2)

    \([[n,n-2d+6,d;4]]\), where \(\frac{(2a+1)q-1}{\rho }+2\leqslant d\leqslant \frac{(4a+1)q-2a-3}{\rho }\) is even;

  3. (3)

    \([[n,n-2d+10,d;8]]\), where \(\frac{(4a+1)q-2a-3}{\rho }+2\leqslant d\leqslant \frac{(4a+3)q+2a-1}{\rho }\) is even.

Remark 1

Quantum MDS codes of length \(n=\frac{q^{2}+1}{(m^{2}+1)/2}\) with \(m\geqslant 3\) is odd had been studied in [17]. Let \(m=2a+1\), then it is indeed the quantum MDS codes of length \(n=\frac{q^{2}+1}{\rho }\), where \(\rho =a^{2}+(a+1)^{2}\), and a is a positive integer. We have got such quantum MDS codes with the same parameters in [17].

Remark 2

Let \(a=2\), then \(\rho =13\), \(n=\frac{q^{2}+1}{13}\). EAQMDS codes of length \(n=\frac{q^{2}+1}{13}\) with \(c=4\) and \(c=8\) had been also constructed in [43] from constacyclic codes (please see Table 1), where \(q=26m+5\) and \(26m+21\). It is easy to see that our results coincide with theirs, in other words, we generalize the results in [43].

Example 1

Let \(a=3\), then \(\rho =25\), \(n=\frac{q^{2}+1}{25}\). EAQMDS code of length \(n=\frac{q^{2}+1}{25}\) are constructed. We list some new EAQMDS codes obtained from Theorems 4 and 5 in Table 3.

Table 3 New entanglement-assisted quantum MDS codes

4 Entanglement-Assisted Quantum MDS Codes derived from Cyclic Codes

In this section, we will construct some EAQMDS codes of length \(n=\frac{q^{2}+1}{\rho }\) from cyclic codes, where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2\) is a positive integer. We first give the following useful lemma, which will be used in the sequel.

Lemma 9

[23] Let \(n\mid (q^{2}+1)\) and \(s=\lfloor \frac{n}{2}\rfloor\). If n is odd, then the \(q^{2}\)-cyclotomic cosets modulo n containing integers from 0 to n are: \(C_{0}=\{0\}, C_{i}=\{i, -i\}=\{i, n-i\}\), where \(1\leqslant i\leqslant s\). If n is even, then the \(q^{2}\)-cyclotomic cosets modulo n containing integers from 0 to n are: \(C_{0}=\{0\}, C_{s}=\{s\}\) and \(C_{i}=\{i, -i\}=\{i, n-i\}\), where \(1\leqslant i\leqslant s-1\).

It can be easily checked that n is even if \(q=2\rho m\pm (2a+1)\), i.e. q is an odd prime power. We first consider the case \(q=2\rho m+2a+1\). Due to Lemma 9, we have the following results.

Lemma 10

Let q be an odd prime power with the form \(q=2\rho m+2a+1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{n}{2}\). Then

  1. (1)

    \(-qC_{s}=C_{s}\);

  2. (2)

    \(-qC_{s-\frac{(a+1)q-a}{\rho }}=C_{s-\frac{aq+a+1}{\rho }}\);

  3. (3)

    \(-qC_{s-\frac{(2a+1)q+1}{\rho }}=C_{s-\frac{q-(2a+1)}{\rho }}\).

Proof

  1. (1)

    It is obvious that \(-qs\equiv s\mod n\). Hence, \(-qC_{s}=C_{s}\).

  2. (2)

    \(-qC_{s-\frac{(a+1)q-a}{\rho }}=C_{s-\frac{aq+a+1}{\rho }}\) holds for the following reason

    $$\begin{aligned}&-q\left[ s\pm \frac{(a+1)q-a}{\rho }\right] \\= & {} -qs\mp \frac{(a+1)q^{2}-aq}{\rho }\\\equiv & {} s\mp \frac{(a+1)(q^{2}+1)-aq-(a+1)}{\rho }\mod n\\\equiv & {} s\pm \frac{aq+a+1}{\rho } \mod n.\\ \end{aligned}$$
  3. (3)

    \(-qC_{s-\frac{(2a+1)q+1}{\rho }}=C_{s-\frac{q-(2a+1)}{\rho }}\) also holds for the following reason

    $$\begin{aligned}&-q\left[ s\pm \frac{(2a+1)q+1}{\rho }\right] \\= & {} -qs\mp \frac{(2a+1)q^{2}+q}{\rho }\\\equiv & {} s\mp \frac{(2a+1)(q^{2}+1)+q-(2a+1)}{\rho }\mod n\\\equiv & {} s\mp \frac{q-(2a+1)}{\rho } \mod n.\\ \end{aligned}$$

Lemma 11

Let q be an odd prime power with the form \(q=2\rho m+2a+1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), and \(s=\frac{n}{2}\). If \(\mathscr {C}\) is a cyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{i=0}^{\delta } C_{s-i}\), then

$$\begin{aligned} |\mathscr {Z}^{-q}\bigcap \mathscr {Z}| = \left\{ \begin{array}{l} 1, \quad 0 \leqslant \delta \leqslant \frac{(a+1)q-a}{\rho }-1;\\ 5, \quad \frac{(a+1)q-a}{\rho }\leqslant \delta \leqslant \frac{(2a+1)q+1}{\rho }-1;\\ 9,\quad \frac{(2a+1)q+1}{\rho } \leqslant \delta \leqslant \frac{(2a+2)q-2a}{\rho }-1. \end{array}\right. \end{aligned}$$

Proof

(1) Let \(\mathscr {Z}=C_{s}\bigcup \mathscr {Z}_{1}\), where \(\mathscr {Z}_{1}=\bigcup _{i=1}^{\delta } C_{s-i}\) and \(1\leqslant \delta \leqslant \frac{(a+1)q-a}{\rho }-1\). As \(-qC_{s}=C_{s}\), according to Lemma 1, we only need to consider that \(\mathscr {Z}_{1}\bigcap \mathscr {Z}_{1}^{-q}=\emptyset\). Suppose that \(\mathscr {Z}_{1}\bigcap \mathscr {Z}_{1}^{-q}\not =\emptyset\), then there exist two integers i and j, where \(1\leqslant i,j\leqslant \frac{(a+1)q-a}{\rho }-1\), such that

$$\begin{aligned}s-i\equiv -q(s-j)q^{2k}\mod n,\end{aligned}$$

for \(k\in \{0,1\}\). We seek some contradictions as follows.

  1. (I)

    If \(k=0\), one obtains that \(s-i\equiv -q(s-j)\mod n,\) which is equivalent to

    $$\begin{aligned}\rho (qj+i)\equiv 0\mod q^{2}+1.\end{aligned}$$

    As \(1\leqslant i,j\leqslant \frac{(a+1)q-a}{\rho }-1\), one gets \(\rho \leqslant \rho i,\rho j\leqslant (a+1)q-a-\rho\). We now divide into the following subcases.

    (i) If \(\rho \leqslant \rho j\leqslant q-a-1\), then

    $$\begin{aligned}1<\rho (q+1)\leqslant \rho (qj+i)\leqslant q^{2}-a-\rho <q^{2}+1,\end{aligned}$$

    which is a contradiction.

    (ii) If \(wq-a\leqslant \rho j\leqslant (w+1)q-a-1\), where \(w=1,2,\ldots ,a-1\). Then

    $$\begin{aligned}wq^{2}-aq+\rho \leqslant \rho (qj+i)\leqslant (w+1)q^{2}-a-\rho .\end{aligned}$$

    Hence,

    $$\begin{aligned}-(q^{2}+1)\leqslant -aq+\rho -w\leqslant \rho (qj+i)-w(q^{2}+1)\leqslant q^{2}-a-w-\rho <q^{2}+1.\end{aligned}$$

    Writing \(\rho i\) in the form \(\rho i=uq+v\), where \(u=0\), \(\rho \leqslant v\leqslant q-1\); \(1\leqslant u\leqslant a-1\), \(0\leqslant v\leqslant q-1\); \(u=a\), \(0\leqslant v\leqslant q-a-\rho .\) Hence, \(w(q^{2}+1)=(\rho j+u)q+v\). By the division algorithm, it must be \(wq=\rho j+u\), which contradicts to the form of q.

    (iii) If \(aq-a-1\leqslant \rho j\leqslant (a+1)q-a-\rho\), then

    $$\begin{aligned}aq^{2}-(a+1)q+\rho \leqslant \rho (qj+i)\leqslant (a+1)q^{2}-(\rho -1)q-a-\rho ,\end{aligned}$$

    Hence,

    $$\begin{aligned}-(q^{2}+1)<-(a+1)q+\rho -a\leqslant \rho (qj+i)-a(q^{2}+1)\leqslant q^{2}-(\rho -1)q-2a-\rho <q^{2}+1,\end{aligned}$$

    which means that \(a(q^{2}+1)=\rho (qj+i)=(\rho j+u)q+v\). Therefore, \(aq=\rho j+u\), which also contradicts to the form of q.

  2. (II)

    If \(k=1\), one obtains that \(s-i\equiv -q(s-j)q^{2}\mod n,\) which is equivalent to

    $$\begin{aligned}\rho qj\equiv \rho i\mod q^{2}+1.\end{aligned}$$

    As \(1\leqslant i,j\leqslant \frac{(a+1)q-a}{\rho }-1\), one gets \(\rho \leqslant \rho i,\rho j\leqslant (a+1)q-a-\rho\). We now divide into the following subcases.

    (i) If \(\rho \leqslant \rho j\leqslant q-1\), then

    $$\begin{aligned}\rho q\leqslant \rho qj\leqslant q^{2}-q<q^{2}+1,\end{aligned}$$

    while \(\rho \leqslant \rho i\leqslant (a+1)q-a-\rho <\rho q\). This is a contradiction.

    (ii) If \(wq\leqslant \rho j\leqslant (w+1)q-1\), where \(w=1,2,\ldots ,a-1\). Then

    $$\begin{aligned}wq^{2}\leqslant \rho qj\leqslant (w+1)q^{2}-q.\end{aligned}$$

    If \(wq^{2}\leqslant \rho qj\leqslant w(q^{2}+1)+(a+1)q-a-\rho\), then \(-w\leqslant \rho qj-w(q^{2}+1)\leqslant (a+1)q-a-\rho\), which means that \(\rho qj-w(q^{2}+1)=\rho i.\) Writing \(\rho i\) in the form \(\rho i=uq+v\), where \(u=0\), \(\rho \leqslant v\leqslant q-1\); \(1\leqslant u\leqslant a-1\), \(0\leqslant v\leqslant q-1\); \(u=a\), \(0\leqslant v\leqslant q-a-\rho .\) Hence, \(w(q^{2}+1)=\rho qj-\rho i=(\rho j-u)q-v.\) By the division algorithm, it must be \(wq=\rho j-u\), which contradicts to the form of q. If \(w(q^{2}+1)+(a+1)q-a-\rho +1\leqslant \rho qj\leqslant (w+1)q^{2}-q\), then \(\rho i<(a+1)q-a-\rho +1\leqslant \rho qj-w(q^{2}+1)\leqslant q^{2}-q-w<q^{2}+1\), which is a contradiction.

    (iii) If \(aq\leqslant \rho j\leqslant (a+1)q-a-\rho\), then

    $$\begin{aligned}aq^{2}\leqslant \rho qj\leqslant (a+1)q^{2}-(a+\rho )q.\end{aligned}$$

    If \(aq^{2}\leqslant \rho qj\leqslant a(q^{2}+1)+(a+1)q-a-\rho\), then \(-a\leqslant \rho qj-a(q^{2}+1)\leqslant (a+1)q-a-\rho\), which means that \(\rho qj-a(q^{2}+1)=\rho i.\) Hence, \(a(q^{2}+1)=\rho qj-\rho i=(\rho j-u)q-v.\) By the division algorithm, it must be \(aq=\rho j-u\), which also contradicts to the form of q. If \(a(q^{2}+1)+(a+1)q-a-\rho +1\leqslant \rho qj\leqslant (a+1)q^{2}-(a+\rho )q\), then \(\rho i<(a+1)q-a-\rho +1\leqslant \rho qj-a(q^{2}+1)\leqslant q^{2}-(a+\rho )q-a<q^{2}+1\), which is a contradiction.

Therefore, \(\mathscr {Z}^{-q}\bigcap \mathscr {Z}=C_{s}=\{s\}\), which means that \(|\mathscr {Z}^{-q}\bigcap \mathscr {Z}|=1.\)

(2) Let \(\mathscr {Z}=C_{s}\bigcup \mathscr {Z}_{1}\bigcup C_{s-\frac{(a+1)q-a}{\rho }}\bigcup \mathscr {Z}_{2}\), where \(\mathscr {Z}_{1}=\bigcup _{i=1}^{\frac{(a+1)q-a}{\rho }-1} C_{s-i}\), \(\mathscr {Z}_{2}=\bigcup _{i=\frac{(a+1)q-a}{\rho }+1}^{\delta } C_{s-i}\), and \(\frac{(a+1)q-a}{\rho }+1\leqslant \delta \leqslant \frac{(2a+1)q+1}{\rho }-1\). Then

$$\begin{aligned} \mathscr {Z}^{-q}\bigcap \mathscr {Z}= & {} \left( -qC_{s}\bigcup \mathscr {Z}_{1}^{-q}\bigcup -qC_{s-\frac{(a+1)q-a}{\rho }}\bigcup \mathscr {Z}_{2}^{-q}\right) \bigcap \left( C_{s}\bigcup \mathscr {Z}_{1}\bigcup C_{s-\frac{(a+1)q-a}{\rho }}\bigcup \mathscr {Z}_{2}\right) \\= & {} \left( -qC_{s}\bigcap C_{s}\right) \bigcup \left( -qC_{s}\bigcap \mathscr {Z}_{1}\right) \bigcup \left( -qC_{s}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}\right) \bigcup \left( -qC_{s}\bigcap \mathscr {Z}_{2}\right) \\&\left( \mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{1}\right) \bigcup \left( \mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{2}\right) \bigcup \left( \mathscr {Z}_{1}^{-q}\bigcap C_{s}\right) \bigcup \left( \mathscr {Z}_{1}^{-q}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}\right) \\&\left( -qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap \mathscr {Z}_{1}\right) \bigcup \left( -qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap \mathscr {Z}_{2}\right) \bigcup \left( -qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap C_{s}\right) \bigcup \\&\left( -qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}\right) \bigcup \left( \mathscr {Z}_{2}^{-q}\bigcap C_{s}\right) \bigcup \left( \mathscr {Z}_{2}^{-q}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}\right) \bigcup \\&\left( \mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{1}\right) \bigcup \left( \mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{2}\right) \end{aligned}$$

From (1), one knows that \(\mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{1}=\emptyset\). It follows from Lemma 10, one obtains that

$$\begin{aligned}&-qC_{s}\bigcap C_{s}=C_{s},~~ -qC_{s}\bigcap \mathscr {Z}_{1}=\emptyset ,\\&-qC_{s}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}=\emptyset ,~~-qC_{s}\bigcap \mathscr {Z}_{2}=\emptyset ,\\&\mathscr {Z}_{1}^{-q}\bigcap C_{s}=\emptyset ,~~\mathscr {Z}_{1}^{-q}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}=C_{s-\frac{(a+1)q-a}{\rho }},\\&-qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap \mathscr {Z}_{1}=C_{s-\frac{aq+a+1}{\rho }},~~-qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap \mathscr {Z}_{2}=\emptyset ,\\&-qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap C_{s}=\emptyset ,~~-qC_{s-\frac{(a+1)q-a}{\rho }}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}=\emptyset ,\\&\mathscr {Z}_{2}^{-q}\bigcap C_{s}=\emptyset ,~~\mathscr {Z}_{2}^{-q}\bigcap C_{s-\frac{(a+1)q-a}{\rho }}=\emptyset .\\ \end{aligned}$$

Now we only have to prove that \(\mathscr {Z}_{1}^{-q}\bigcap \mathscr {Z}_{2}=\mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{1}=\emptyset\) and \(\mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{2}=\emptyset .\)

Suppose \(\mathscr {Z}_{1}\bigcap \mathscr {Z}_{2}^{-q}\not =\emptyset\), then there exist two integers i and j, where \(1\leqslant i\leqslant \frac{(a+1)q-a}{\rho }-1\) and \(\frac{(a+1)q-a}{\rho }+1\leqslant j\leqslant \frac{(2a+1)q+1}{\rho }-1\) such that

$$\begin{aligned}s-i\equiv -q(s-j)q^{2k}\mod n,\end{aligned}$$

for \(k\in \{0,1\}\). We seek some contradictions as follows.

  1. (I)

    If \(k=0\), then it is equivalent to

    $$\begin{aligned}\rho (qj+i)\equiv 0\mod q^{2}+1.\end{aligned}$$

    As \(1\leqslant i\leqslant \frac{(a+1)q-a}{\rho }-1\) and \(\frac{(a+1)q-a}{\rho }+1\leqslant j\leqslant \frac{(2a+1)q+1}{\rho }-1\), obviously, \(\rho \leqslant \rho i\leqslant (a+1)q-a-\rho\) and \((a+1)q-a+\rho \leqslant \rho j\leqslant (2a+1)q+1-\rho\). We now divide into the following subcases.

    (i) If \((a+1)q-a+\rho \leqslant \rho j\leqslant (a+2)q-a-1\), then

    $$\begin{aligned}(a+1)q^{2}+(\rho -a)q+\rho \leqslant \rho (qj+i)\leqslant (a+2)q^{2}-a-\rho .\end{aligned}$$

    Hence, \(0<(\rho -a)(q+1)-1\leqslant \rho (qj+i)-(a+1)(q^{2}+1)\leqslant q^{2}-2a-\rho -1<q^{2}+1,\) which is a contradiction.

    (ii) If \(wq-a\leqslant \rho j\leqslant (w+1)q-a-1\), where \(w=a+2,a+3,\ldots ,2a-1\). Then

    $$\begin{aligned}wq^{2}-aq+\rho \leqslant \rho (qj+i)\leqslant (w+1)q^{2}-a-\rho .\end{aligned}$$

    So \(-(q^{2}+1)<-aq+\rho -w\leqslant \rho (qj+i)-w(q^{2}+1)\leqslant q^{2}-a-\rho -w<q^{2}+1\), which implies that \(w(q^{2}+1)=\rho (qj+i)\). Writing \(\rho i\) in the form \(\rho i=uq+v\), where \(u=0\), \(\rho \leqslant v\leqslant q-1\); \(1\leqslant u\leqslant a-1\), \(0\leqslant v\leqslant q-1\); \(u=a\), \(0\leqslant v\leqslant q-a-\rho .\) Hence, \(w(q^{2}+1)=(\rho j+u)q+v.\) By the division algorithm, it must be \(wq=\rho j+u\), which contradicts to the form of q.

    (iii) If \(2aq-a\leqslant \rho j\leqslant (2a+1)q-\rho +1\), then

    $$\begin{aligned}2aq^{2}-aq\leqslant \rho (qj+i)\leqslant (2a+1)q^{2}+(a-\rho +2)q-a-\rho .\end{aligned}$$

    So \(-(q^{2}+1)<-aq-2a\leqslant \rho (qj+i)-2a(q^{2}+1)\leqslant q^{2}+(a-\rho +2)q-3a-\rho <q^{2}+1\), which implies that \(2a(q^{2}+1)=\rho (qj+i)=(\rho j+u)q+v\). By the division algorithm, it must be \(2aq=\rho j+u\), which also contradicts to the form of q.

  2. (II)

    If \(k=1\), then \(s-i\equiv -(s-j)q^{3}\mod n,\) which is equivalent to

    $$\begin{aligned} \rho qj\equiv \rho i\mod q^{2}+1. \end{aligned}$$

    Similar to the above discussion, this case is impossible.

Finally, suppose \(\mathscr {Z}_{2}^{-q}\bigcap \mathscr {Z}_{2}\not =\emptyset ,\) then there exist two integers i and j, where \(\frac{(a+1)q-a}{\rho }+1\leqslant i,j\leqslant \frac{(2a+1)q+1}{\rho }-1\) such that

$$\begin{aligned} s-i\equiv -q(s-j)q^{2k}\mod n, \end{aligned}$$

for \(k\in \{0,1\}\). Going on the line of the proofs similar to the above cases, one can get such case is impossible either.

Therefore,

$$\begin{aligned} \mathscr {Z}^{-q}\bigcap \mathscr {Z}= & {} C_{s}\bigcup C_{s-\frac{aq+a+1}{\rho }}\bigcup C_{s-\frac{(a+1)q-a}{\rho }}\\= & {} \left\{ s,s\pm \frac{aq+a+1}{\rho },s\pm \frac{(a+1)q-a}{\rho }\right\} , \end{aligned}$$

which means that \(|\mathscr {Z}^{-q}\bigcap \mathscr {Z}|=5\).

(3) This case can be proved by using the same method, we omit it here for simplification.

Theorem 6

Let q be an odd prime power with the form \(q=2\rho m+2a+1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\). Then there exist q-ary EAQMDS codes with the following parameters:

  1. (1)

    \([[n,n-2d+3,d;1]]\), where \(2\leqslant d\leqslant \frac{(2a+2)q-2a}{\rho }\) is even;

  2. (2)

    \([[n,n-2d+7,d;5]]\), where \(\frac{(2a+2)q-2a}{\rho }+2\leqslant d\leqslant \frac{(4a+2)q+2}{\rho }\) is even;

  3. (3)

    \([[n,n-2d+11,d;9]]\), where \(\frac{(4a+2)q+2}{\rho }+2\leqslant d\leqslant \frac{(4a+4)q-4a}{\rho }\) is even.

Proof

Let \(\mathscr {C}\) be a cyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{i=0}^{\delta } C_{s-i}\), where \(0\leqslant \delta \leqslant \frac{(2a+2)q-2a}{\rho }-1\). From Lemma 9, we can see that \(\mathscr {Z}\) consists of \(2\delta +1\) consecutive integers \(\{s-\delta ,\ldots ,s-1,s,s+1,\ldots ,s+\delta \}\), which implies that \(\mathscr {C}\) has minimum distance at least \(2\delta +2\) from Theorem 2. Hence, \(\mathscr {C}\) is a \(q^{2}\)-ary cyclic code with parameters \([n, n-(2\delta +1),\geqslant 2\delta +2]\). According to Lemma 11,

$$\begin{aligned} c=|\mathscr {Z}^{-q}\bigcap \mathscr {Z}| = \left\{ \begin{array}{l} 1, \quad 0 \leqslant \delta \leqslant \frac{(a+1)q-a}{\rho }-1;\\ 5, \quad \frac{(a+1)q-a}{\rho }\leqslant \delta \leqslant \frac{(2a+1)q+1}{\rho }-1;\\ 9,\quad \frac{(2a+1)q+1}{\rho } \leqslant \delta \leqslant \frac{(2a+2)q-2a}{\rho }-1. \end{array}\right. \end{aligned}$$

Combining Theorem 3 with the EA-quantum Singleton bound, there are q-ary EAQMDS codes with parameters as desired. The result follows.

Similar to the discussions of the case \(q=2\rho m+2a+1\), we have the following results for \(q=2\rho m-2a-1\).

Lemma 12

Let q be an odd prime power with the form \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), \(s=\frac{n}{2}\). Then

  1. (1)

    \(-qC_{s}=C_{s}\);

  2. (2)

    \(-qC_{s-\frac{(a+1)q+a}{\rho }}=C_{s-\frac{aq-a-1}{\rho }}\);

  3. (3)

    \(-qC_{s-\frac{(2a+1)q-1}{\rho }}=C_{s-\frac{q+2a+1}{\rho }}\).

Lemma 13

Let q be an odd prime power with the form \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\), and \(s=\frac{n}{2}\). If \(\mathscr {C}\) is a cyclic code of length n over \(\mathbb {F}_{q^{2}}\) with defining set \(\mathscr {Z}=\bigcup _{i=0}^{\delta } C_{s-i}\), then

$$\begin{aligned} |\mathscr {Z}^{-q}\bigcap \mathscr {Z}| = \left\{ \begin{array}{l} 1, \quad 0 \leqslant \delta \leqslant \frac{(a+1)q+a}{\rho }-1;\\ 5, \quad \frac{(a+1)q+a}{\rho }\leqslant \delta \leqslant \frac{(2a+1)q-1}{\rho }-1;\\ 9,\quad \frac{(2a+1)q-1}{\rho } \leqslant \delta \leqslant \frac{(2a+2)q+2a}{\rho }-1. \end{array}\right. \end{aligned}$$

Theorem 7

Let q be an odd prime power with the form \(q=2\rho m-2a-1\), where \(\rho =a^{2}+(a+1)^{2}\), and \(a\geqslant 2,m\) is a positive integer. Let \(n=\frac{q^{2}+1}{\rho }\). Then there exist q-ary EAQMDS codes with the following parameters:

  1. (1)

    \([[n,n-2d+3,d;1]]\), where \(2\leqslant d\leqslant \frac{(2a+2)q+2a}{\rho }\) is even;

  2. (2)

    \([[n,n-2d+7,d;5]]\), where \(\frac{(2a+2)q + 2a}{\rho } + 2\leqslant d\leqslant \frac{(4a+2)q-2}{\rho }\) is even;

  3. (3)

    \([[n,n-2d+11,d;9]]\), where \(\frac{(4a+2)q-2}{\rho }+2\leqslant d\leqslant \frac{(4a+4)q+4a}{\rho }\) is even.

Remark 3

Let \(a=2\), then \(\rho =13\), \(n=\frac{q^{2}+1}{13}\). EAQMDS codes of length \(n=\frac{q^{2}+1}{13}\) with \(c=1\), \(c=5\) and \(c=9\) had been also constructed in [43] from cyclic codes (please see Table 1), where \(q=26m+5\) and \(26m+21\). It is easy to see that our results coincide with theirs, in other words, we also generalize the results in [43].

Example 2

Let \(a=3\), then \(\rho =25\), \(n=\frac{q^{2}+1}{25}\). EAQMDS code of length \(n=\frac{q^{2}+1}{25}\) are constructed. We list some new EAQMDS codes obtained from Theorems 6 and 7 in Table 4.

Table 4 New entanglement-assisted quantum MDS codes

5 Conclusion

In this paper, EAQMDS codes of length \(n=\frac{q^{2}+1}{\rho }\) have been constructed by exploiting less pre-shared maximally entangled states c, i.e., \(c=0,1,4,5,8,9\), where \(\rho =a^{2}+(a+1)^{2}\) and \(a\geqslant 2\) is a positive integer. Comparing their parameters with all known EAQMDS codes, one can obtain that they are new in the sense that their parameters are not covered by the codes available in the literature, except \(a=2\), which is indeed the results obtained in [43].