1 Introduction

Quantum error-correcting codes are the most effective coding scheme in reducing decoherence during quantum communications and quantum computations. Qudits are the basic unit of q-dimensional quantum systems used for quantum information processing. A standard quantum code of length n is a \(q^{k}\)-dimensional subspace of the Hilbert space \((\mathbb {C}^{q})^{\otimes n}\), which can encode k qudits of a q-dimensional quantum system into n qudits. Such a quantum code is denoted by \([[n,k,d]]_{q}\), where d is the minimum distance of the code. A quantum code with minimum distance d can detect up to d quantum errors and correct up to \(\lfloor \frac{d-1}{2}\rfloor \) quantum errors. It is well known that standard quantum codes can be obtained from classical linear codes that must satisfy certain dual-containing condition. The dual-containing constraint forms a great obstacle in the construction of quantum codes. A significant breakthrough is the discovery of entanglement-assisted quantum error-correcting (EAQEC) codes by Brun et al. [4]. They showed that non-dual-containing quaternary linear codes can be used to construct EAQEC codes if the sender and receiver share pre-existing entanglement. This indicates the construction of quantum codes is not limited by the dual-containing condition. Later, a general coding scheme of the construction of binary EAQEC codes was built and several explicit construction methods were proposed [20, 21, 25, 45]. Afterwards, lots of binary EAQEC codes were constructed by utilizing various classical linear codes over \(\mathbb {F}_{2}\) or \(\mathbb {F}_{4}\) (see [11, 26, 28]). With the realization of fault-tolerant quantum computation [1, 14, 38] and the construction of concatenation technology [16, 42], non-binary EAQEC codes have received much attention. Galindo et al. [12] extended binary construction methods to arbitrary finite fields and gave complete proofs. Many classes of non-binary EAQEC codes have been derived from classical linear codes such as constacyclic codes, LCD codes and Reed-Solomom codes (see [5, 7, 9, 10, 12, 18, 19, 24, 29, 30]). A difficulty in EAQEC code construction is to determine the number of (pairs of) maximally entangled states. There exist two techniques to find such number for present. One is through computing the hull dimension of linear codes [12, 18], and the other is through decomposing the defining sets of constacyclic codes [30].

Let q be a prime power. A q-ary EAQEC code \(\mathcal {Q}\) encoding k logical qudits into n physical qudits by using c pairs of maximally entangled states, denoted by \([[n,k,d;c]]_{q}\), can correct up to \(\lfloor \frac{d-1}{2}\rfloor \) quantum errors, where d is called the minimum distance of \(\mathcal {Q}\). If \(c=0\), then \(\mathcal {Q}\) is a standard \([[n,k,d]]_{q}\) quantum code. It is desirable to find EAQEC codes with good error-correcting ability. As in classical codes, the parameters of an EAQEC code are mutually restricted. In [4, 27], the authors gave a Singleton-type bound for binary EAQEC codes. Recently, in [2, 17], the authors used different methods to generalize the bound to q-ary EAQEC codes.

Theorem 1.1

([2, 17]) Suppose that \(\mathcal {C}\) is an EAQEC code with parameters \([[n,k,d;c]]_{q}\). Then

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

if \(d\leqslant \frac{n+2}{2}\), where \(0\leqslant c \leqslant {n-1}\).

For \(d\leqslant \frac{n+2}{2}\), if an EAQEC code with parameters \([[n,k,d;c]]_{q}\) meets the bound (1) with equality, then it is said to be an entanglement-assisted quantum maximum distance separable (EAQMDS) code. For \(d>\frac{n+2}{2}\), Grassl [15] gave examples of EAQEC codes with parameters beating the bound (1). When the number c of maximally entangled states is fixed, EAQMDS codes are optimal in the sense that they have the largest minimum distance. During the past decade, a number of EAQMDS codes with length n in the range \(q+2\leqslant n\leqslant q^{2}+1\) were constructed from classical linear codes. Fan et al. [10] obtained EAQMDS codes with a few maximally entangled states from classical MDS codes. Qian and Zhang [41] constructed EAQMDS codes with maximal entangled states from classical LCD codes. Liu et al. [29] obtained EAQMDS codes from k-Galois dual codes. Recently, Hu and Liu [22] used Gabidulin codes to gain EAQMDS codes.

Due to good algebraic structure, constacyclic codes including cyclic codes and negacyclic codes are preferred objects on the construction of EAQMDS codes. In 2011, Lu et al. [28] introduced the decomposition of defining sets of cyclic codes to obtain EAQMDS codes with large minimum distance. The technique was extended to general constacyclic codes in [5, 30, 32], and many classes of EAQMDS codes with length n dividing \(q^2+1\) or \(q^2-1\) were derived from them (see [5, 6, 24, 30, 32, 33, 37, 39, 44]). Koroglu [24] obtained EAQMDS codes based on constacyclic codes. Wang et al. [44] obtained EAQMDS codes with less entangled states from cyclic codes. Recently, Chen et al. [7] constructed EAQMDS cyclic codes with flexible parameters and large minimum distance. Meanwhile, EAQMDS codes on various lengths were found through the generalized Reed-Solomon codes (see [9, 19, 34, 35]).

Let \(n=\frac{q^{2}-1}{r}\), where \(r\mid (q+1)\) and \(r=3,5,7\). In [33], Lu et al. used constacyclic codes to construct EAQMDS codes of length n with minimum distance \(d\leqslant \frac{(q+1)(r+3)}{2r}-1\). In [30], Liu et al. enlarged the minimum distance of EAQMDS codes up to \(d=\frac{(q+1)(r+1)}{r}-1\). In this work, we will further enlarge the range of the minimum distance by employing cyclic codes over \(\mathbb {F}_{q^{2}}\) of length n. We analyze cyclotomic cosets whose elements are respectively from the sets of even integer numbers and odd integer numbers and determine the number of maximally entangled states. Our construction yields many new EAQEC codes with large minimum distance. In particular, in the case when \(r=3\), we obtain EAQEC codes with minimum distance greater than \(2(q+1)\). The paper is organized as follows. In Sect. 2, some notations and results about classical cyclic codes and EAQEC codes are presented. In Sect. 3, we explore the structure of cyclic codes over \(\mathbb {F}_{q^{2}}\) and give a formula of the number of maximally entangled states. In Sect. 4, new EAQEC codes of lengths \(\frac{q^2-1}{r}\ (r=3, 5, 7)\) are constructed from cyclic codes. Comparisons and conclusions are made in the last section.

2 Preliminaries

Let q be a prime power. Let \(\mathbb {F}_{q^{2}}\) be a finite field with \(q^2\) elements. For any \(\alpha \in \mathbb {F}_{q^{2}}\), define the conjugate of \(\alpha \) as \(\bar{\alpha }=\alpha ^q\). For two vectors \(\mathbf{u} =(u_0, u_1, \dots , u_{n-1})\) and \(\mathbf{v} =(v_0, v_1, \dots , v_{n-1})\in \mathbb {F}_{q^{2}}^{n}\), define their Hermitian inner product as

$$\begin{aligned} \langle \mathbf{u} ,\mathbf{v} \rangle =u_0\bar{v}_0+u_1\bar{v}_1+\dots +u_{n-1}\bar{v}_{n-1}. \end{aligned}$$

The vectors \(\mathbf {u}\) and \(\mathbf {v}\) are called Hermitian orthogonal if \(\left\langle \mathbf {u},\mathbf {v}\right\rangle =0\). A \(q^2\)-ary linear code \(\mathcal {C}\) of length n with dimension k and minimum distance d, denoted by [nkd], is a k-dimensional subspace of \(\mathbb {F}_{q^{2}}^n\). It is known that, for a \(q^2\)-ary [nkd] linear code, there exists the Singleton bound \(d\leqslant n-k+1\). If \(d=n-k+1\) then \(\mathcal {C}\) is called a maximum distance separable (MDS) code. Define the Hermitian dual code of \(\mathcal {C}\) as

$$\begin{aligned} \mathcal {C}^{\bot _H}=\left\{ \mathbf{{u}}\in {\mathbb {F}^{n}_{q^{2}}\mid \left\langle \mathbf {u},\mathbf {v}\right\rangle }=0, \forall \mathbf{{v}}\in {\mathcal {C}}\right\} . \end{aligned}$$

Then, \(\mathcal {C}^{\bot _H}\) is linear and has dimension \(n-\dim (\mathcal {C})\). The Hermitian hull of \(\mathcal {C}\), denoted by \(Hull_{H}(\mathcal {C})\), is defined as the intersection of \(\mathcal {C}\) and \(\mathcal {C}^{\bot _H}\), i.e., \(Hull_{H}(\mathcal {C})=\mathcal {C}\cap \mathcal {C}^{\bot _H}\).

Let \(\tau \) denote the cyclic shift on \(\mathbb {F}_{q^{2}}^n\) given by \(\tau \left( c_0,c_1,\ldots ,c_{n-1} \right) =\left( c_{n-1},c_0,\ldots ,c_{n-2}\right) .\) A \(q^2\)-ary linear code \(\mathcal {C}\) of length n is called a cyclic code if \(\tau (\mathcal {C})=\mathcal {C}\). Identity \((c_0,c_1,\dots ,c_{n-1})\in \mathbb {F}_{q^{2}}^{n}\) with its polynomial representation \(c(x)=c_0+c_1x+\dots +c_{n-1}x^{n-1}\). Then, xc(x) corresponds to a cyclic shift of c(x) in the quotient ring \(\mathcal {R}=\mathbb {F}_{q^{2}}[x]/\langle x^n-1\rangle \). Hence, a \(q^2\)-ary cyclic code of length n is an ideal of \(\mathcal {R}\). Note that each ideal of \(\mathcal {R}\) is principal. Let \(\mathcal {C}=\langle g(x)\rangle \) be a \(q^2\)-ary cyclic code of length n, where g(x) is a monic polynomial of minimal degree in \(\mathcal {C}\). Then g(x) is a divisor of \(x^n-1\) and called the generator polynomial of \(\mathcal {C}\). The polynomial \(h(x)=(x^n-1)/g(x)\) is called the check polynomial of \(\mathcal {C}\).

Assume that gcd\((n,q)=1\). Let \(\mathbb {Z}_{n}=\{0,1,\ldots ,n-1\}\) denote the the ring of integers modulo n. For any \(i\in \mathbb {Z}_{n}\), the \(q^2\)-cyclotomic coset modulo n containing i is defined by \(C_i=\lbrace iq^{2j}(\bmod ~n)\mid 0\leqslant j\leqslant \ell -1\rbrace \subseteq \mathbb {Z}_{n}\), where \(\ell \) is the smallest positive integer such that \(iq^{2\ell }\equiv i(\bmod ~n)\). The smallest positive integer in \(C_i\) is called the coset leader of \(C_i\). A \(q^2\)-cyclotomic coset \(C_{i}\) is said to be skew symmetric if \(n-qi(\bmod ~n)\in C_{i}\), otherwise it is said to be skew asymmetric. Suppose that \(\mathcal {C}\) is a \(q^2\)-ary cyclic code of length n with generator polynomial g(x). Let \(\beta \) be a primitive n-th root of unity. The set \(T=\{i\in \mathbb {Z}_{n}\mid g(\beta ^i)=0\}\) is called the defining set of \(\mathcal {C}\). It is clear that T is a union of some \(q^2\)-cyclotomic cosets modulo n and \(\dim (\mathcal {C})=n-|T|\). The minimum distance of \(\mathcal {C}\) can be estimated by the BCH bound.

Theorem 2.1

[36] (BCH bound) Suppose that \(\mathcal {C}\) is a cyclic code of length n with defining set T. If T consists of \(\delta -1\) consecutive elements, for \(2\leqslant \delta \leqslant n\), then \(d(\mathcal {C})\geqslant \delta \).

Brun et al. [4] proved that binary EAQEC codes can be constructed from quaternary linear codes. The key to the construction is to determine the number of maximally entangled states. Formulas that obtain the number of maximally entangled states required for a binary EAQEC code were provided in [4, 20, 45]. Galindo et al. [12] proved that these formulas hold true for EAQEC codes over any finite field. The following is one of the construction methods of EAQEC codes, which will be used in the sequel.

Theorem 2.2

([12]) Let \(\mathcal {C}\) be a \(q^2\)-ary [nkd] linear code with parity check matrix H. Then there exists an \([[n,2k-n+c,d;c]]_{q}\) EAQEC code, where \(c=rank (HH^{\dagger })\) and \(H^{\dagger }\) denotes the conjugate transport of H.

A relation between \(\text {rank}(HH^{\dagger })\) and the dimension of the Hermitian hull of a \(q^2\)-ary linear code is established in [12, 18].

Theorem 2.3

([12, 18]) Let \(\mathcal {C}\) be a \(q^2\)-ary [nkd] linear code with parity check matrix H. Then

$$\begin{aligned} rank (HH^{\dagger })=n-k-\dim (Hull_{H}(\mathcal {C})). \end{aligned}$$
(2)

Thus, the problem of determining the number of maximally entangled states is transformed into computing \(\text {rank}(HH^{\dagger })\) or \(\dim (Hull_{H}(\mathcal {C}))\). In the next section, we will use the relation to obtain an approach to finding the number c from the defining set.

3 The number of maximally entangled states

From now on, we assume that q is an odd prime power and n is an even positive integer with \(\gcd (n,q)=1\). Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with parity check matrix H. Following the ideas and methods in [13], we provide a formula that derives the number of maximally entangled states for EAQEC codes from \(\mathcal {C}\). By Theorems 2.2 and 2.3, it suffices to compute the value of either \(\text {rank}(HH^{\dagger })\) or \(\dim (Hull_{H}(\mathcal {C}))\).

Let \(m=\frac{n}{2}\). Then \(x^{n}-1=(x^{m}-1)(x^{m}+1)\) in \(\mathbb {F}_{q^{2}}[x]\). Let \(\xi \) be a primitive n-th root of unity. Then \(\xi ^{2}\) is a primitive m-th root of unity. Then \(x^{m}-1\) has roots \(\xi ^{i}\) for \(i=0,2,\ldots ,2(m-1)\) and \(x^{m}+1\) has roots \(\xi ^{j}\) for \(j=1,3,\ldots ,2m-1\). Let

$$\begin{aligned} \varOmega _{e}=\{0,2,\ldots ,2(m-1)\}\ \ \text {and} \ \ \varOmega _{o}=\{1,3,\ldots ,2m-1\}. \end{aligned}$$

Suppose that \(\mathcal {C}\) is a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set T. Then \(T=T_{e}\cup T_{o}\), where \(T_{e}\) and \(T_{o}\) are the unions of some \(q^2\)-cyclotomic cosets modulo n from \(\varOmega _{e}\) and \(\varOmega _{o}\), respectively. Denote \(T^{-q}=\{-qt(\bmod ~n)\mid t\in T\}\). It can be checked that \(T^{-q}\) is the complement of the defining set of \(\mathcal {C}^{\perp _{H}}\) (see [3]).

Lemma 3.1

Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set \(T=T_{e}\cup T_{o}\). Then \(T\cap T^{-q}=(T_{e}\cap T_{e}^{-q})\cup (T_{o}\cap T_{o}^{-q})\) and \(|T\cap T^{-q}|=|T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|\).

Proof

Notice that \(T_{e}\cap T_{o}=\emptyset \) and \(T_{e}^{-q}\cap T_{o}^{-q}=\emptyset \). We have

$$\begin{aligned} T\cap T^{-q}= & {} (T_{e}\cup T_{o})\cap (T^{-q}_{e}\cup T^{-q}_{o})\\= & {} (T_{e}\cap T_{e}^{-q})\cup (T_{e}\cap T_{o}^{-q})\cup (T_{o}\cap T_{e}^{-q})\cup (T_{o}\cap T_{o}^{-q})\\= & {} (T_{e}\cap T_{e}^{-q})\cup (T_{o}\cap T_{o}^{-q}). \end{aligned}$$

Hence, \(|T\cap T^{-q}|=|T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|\). \(\square \)

It is known that the defining set of \(\mathcal {C}^{\perp _{H}}\) is \(T^{\perp _{H}}=\mathbb {Z}_{n}\backslash T^{-q}\). Denote \(T_{e}^{\perp _{H}}=\varOmega _{e}\backslash T_{e}^{-q}\) and \(T_{o}^{\perp _{H}}=\varOmega _{o}\backslash T_{o}^{-q}\).

Lemma 3.2

Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set \(T=T_{e}\cup T_{o}\). Then the defining set of \(\mathcal {C}^{\perp _{H}}\) is given by \(T^{\perp _{H}}=T_{e}^{\perp _{H}}\cup T_{o}^{\perp _{H}}\).

Proof

Using set operations, we have

$$\begin{aligned} T^{\perp _{H}}= & {} \mathbb {Z}_{n}\backslash T^{-q}\\= & {} (\varOmega _{e}\cup \varOmega _{o})\backslash (T_{e}^{-q}\cup T_{o}^{-q})\\= & {} (\varOmega _{e}\backslash T_{e}^{-q})\cup (\varOmega _{o}\backslash T_{o}^{-q})\\= & {} T_{e}^{\perp _{H}}\cup T_{o}^{\perp _{H}}. \end{aligned}$$

The result follows. \(\square \)

In the light of Lemmas 3.1 and 3.2, we can provide an expression for determining the value of \(\text {rank}(HH^{\dagger })\), which will be helpful for computing the number of maximally entangled states.

Theorem 3.3

Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set \(T=T_{e}\cup T_{o}\) and parity check matrix H. Then \(rank (HH^{\dagger }) =|T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|.\)

Proof

By Lemma 3.1, \(Hull_{H}(\mathcal {C})\) has defining set

$$\begin{aligned} T_{H}= & {} (T_{e}\cup T_{o})\cup (T_{e}^{\perp _{H}}\cup T_{o}^{\perp _{H}})\\= & {} (T_{e}\cup T_{e}^{\perp _{H}})\cup (T_{o}\cup T_{o}^{\perp _{H}}). \end{aligned}$$

Hence,

$$\begin{aligned} \dim (Hull_{H}(\mathcal {C}))= & {} n-|T_{H}|=n-|T_{e}\cup T_{e}^{\perp _{H}}|-|T_{o}\cup T_{o}^{\perp _{H}}|\\= & {} n-\left( |T_{e}|+|T_{e}^{\perp _{H}}|-|T_{e}\cap T_{e}^{\perp _{H}}|\right) -\left( |T_{o}|+|T_{o}^{\perp _{H}}|-|T_{o}\cap T_{o}^{\perp _{H}}|\right) \\= & {} |T_{e}\cap T_{e}^{\perp _{H}}|+|T_{o}\cap T_{o}^{\perp _{H}}|\\= & {} |T_{e}|+|T_{o}|-|T_{e}\cap T_{e}^{-q}|-|T_{o}\cap T_{o}^{-q}|. \end{aligned}$$

From (2),

$$\begin{aligned} c= & {} \text {rank}(HH^{\dagger })\\= & {} |T_{e}|+|T_{o}|-\dim (Hull_{H}(\mathcal {C}))\\= & {} |T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|. \end{aligned}$$

The result follows. \(\square \)

Combining Theorem 2.2 with Theorem 3.3, we can immediately obtain the following result.

Corollary 3.4

Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set \(T=T_{e}\cup T_{o}\). Then there exists an \([[n,2k-n+c,d;c]]_{q}\) EAQEC code, where

$$\begin{aligned} c=|T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|. \end{aligned}$$
(3)

From Corollary 3.4, we see that the parameter c of an EAQEC cyclic code with even length can be calculated by the formula \(|T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|\). Notice that \(T_{e}\cap T_{e}^{-q}\subseteq \varOmega _{e}\), \(T_{o}\cap T_{o}^{-q}\subseteq \varOmega _{o}\) and \(\varOmega _{e}\cap \varOmega _{o}=\emptyset \). So, we can analyze the cyclotomic cosets in the sets \(\varOmega _{e}\) and \(\varOmega _{o}\) independently. Compared with the known formula \(|T\cap T^{-q}|\) [26, 28], the parameter c is more easily determined by (3) along the odd and even lines.

4 Construction of EAQMDS codes from cyclic codes

Let \(n=\frac{q^2-1}{r}\), where q is an odd prime power and r is an odd divisor of \(q+1\). In this section, we are going to use cyclic codes over \(\mathbb {F}_{q^{2}}\) of length n to construct EAQMDS codes. Let \(m=\frac{n}{2}\). Notice that m is even.

Lemma 4.1

Let \(n=\frac{q^2-1}{r}\) with odd \(r\mid (q+1)\), and \(a=\frac{q+1}{r}\). Then

  1. 1)

    \(C_{2k}\) is a skew symmetric coset if and only if \(k=\frac{\ell (q-1)}{2}\), for \(0\leqslant \ell \leqslant a-1.\)

  2. 2)

    For \(2k+1\in \varOmega _{o}\), \(C_{2k+1}\) is a skew asymmetric coset.

Proof

  1. 1)

    \(C_{2k}\) is a skew symmetric coset if and only if \(C_{2k}=-qC_{2k}\), if and only if \(2k+q\cdot 2k\equiv 0(\bmod ~n)\), i.e., \((q+1)k\equiv 0(\bmod ~m)\). Hence, \(m\mid (q+1)k\), which means \((q-1)\mid 2kr\). Notice that \(\gcd (q-1,r)=1\). This is equivalent to \((q-1)\mid 2k\). Therefore, \(k=\frac{\ell (q-1)}{2}\), for \(0\leqslant \ell \leqslant a-1.\)

  2. 2)

    Suppose that \(C_{2k+1}=-qC_{2k+1}\). Then \((2k+1)+q(2k+1)\equiv 0(\bmod ~n)\). This implies \((q-1)\mid (2k+1)r\), which means \((q-1)\mid (2k+1)\). This is impossible since \(q-1\) is even and \(2k+1\) is odd. Hence, \(C_{2k+1}\) is a skew asymmetric coset. \(\square \)

Lemma 4.2

Let \(n=\frac{q^2-1}{r}\) with odd \(r\mid (q+1)\). If \(1\leqslant k_{1}, k_{2}\leqslant \frac{q-3}{2}\) and \(k_{1}\ne k_{2}\), then \(C_{2k_{1}}\ne -qC_{2k_{2}}\).

Proof

Suppose there exist two integers \(k_1, k_2\) with \(1\leqslant k_{1}, k_{2}\leqslant \frac{q-3}{2}\) such that \(C_{2k_1}=-qC_{2k_2}\). Observe that, if \(C_{2k_{1}}\ne -qC_{2k_{2}}\), then \(C_{2k_{2}}\ne -qC_{2k_{1}}\) since \(q^2\equiv 1(\bmod ~n)\). So, we can assume \(k_1<k_2\). Hence,

$$\begin{aligned} 2qk_1+2k_2\equiv 0(\bmod ~2m), \end{aligned}$$
(4)

where \(2< k_1+k_2< q-3\). (4) is equivalent to

$$\begin{aligned} qk_1+k_2\equiv 0(\bmod ~m). \end{aligned}$$

So, \(qk_1+k_2=ms\), for some integer s. This gives

$$\begin{aligned} (q-1)\left[ \frac{(q+1)s}{2r}-k_1\right] =k_1+k_2, \end{aligned}$$

which implies that \((q-1)\mid (k_1+k_2)\). This produces a contradiction. \(\square \)

Lemma 4.3

Let \(n=\frac{q^2-1}{r}\) with odd \(r\mid (q+1)\). For any \(k_{1},k_{2}\in \mathbb {Z}_{m}\), if \(C_{2k_{1}+1}=-qC_{2k_{2}+1}\), then \(k_1+k_2+1\equiv 0(\bmod ~\frac{q-1}{2})\).

Proof

We can assume \(k_1<k_2\). It can be seen that \(C_{2k_{1}+1}=-qC_{2k_{2}+1}\) if and only if

$$\begin{aligned} 2qk_1+2k_2+q+1\equiv 0(\bmod ~n), \end{aligned}$$

which is equivalent to

$$\begin{aligned} qk_1+k_2+\frac{q+1}{2}\equiv 0(\bmod ~m). \end{aligned}$$
(5)

By taking both sides of (5) modulo \(\frac{q-1}{2}\), we obtain \(k_1+k_2+1\equiv 0(\bmod ~\frac{q-1}{2}).\) The result follows. \(\square \)

Lemma 4.4

Let \(n=\frac{q^2-1}{r}\) with odd \(r\mid (q+1)\). If \(0\leqslant k_1,k_2\leqslant \frac{q-3}{2}\), then \(C_{2k_{1}+1}=-qC_{2k_{2}+1}\) if and only if \(k_1+k_2=\frac{q-3}{2}\).

Proof

We can assume \(k_1<k_2\). It can be seen that \(C_{2k_{1}+1}=-qC_{2k_{2}+1}\) if and only if

$$\begin{aligned} 2qk_1+2k_2+q+1\equiv 0(\bmod ~n), \end{aligned}$$

which is equivalent to

$$\begin{aligned} qk_1+k_2+\frac{q+1}{2}\equiv 0(\bmod ~m). \end{aligned}$$
(6)

By taking both sides of (6) modulo \(\frac{q-1}{2}\), we obtain \(k_1+k_2+1\equiv 0(\bmod ~\frac{q-1}{2}).\) Since \(k_1<k_2\) and \(1< k_1+k_2+1< q-2\), it follows that \(k_1+k_2=\frac{q-3}{2}\). The result follows. \(\square \)

Based on the lemmas given above, we next explore the cases when \(r=3,5\) and 7 respectively, and construct some classes of EAQMDS codes with larger minimum distance than the codes available in the literature.

4.1 Length \(n=\frac{q^{2}-1}{3}\) with \(3\mid (q+1)\)

Assume that \(q\geqslant 11\) is an odd prime power. Let \(r=3\) and \(3\mid (q+1)\). Then \(n=\frac{q^{2}-1}{3}\) and \(m=\frac{n}{2}\). Now, we are going to find skew asymmetric pairs \((C_{\delta _{1}},C_{\delta _{2}})\) with \(1\leqslant \delta _{2}<\delta _{1}\leqslant \frac{8q-10}{3}\). For cyclotomic cosets \(C_{2k}\) in \(\varOmega _{e}\), by Lemma 4.2, we only need to consider the case when \(k\geqslant \frac{q+1}{2}\).

Lemma 4.5

Let \(n=\frac{q^2-1}{3}\) with \(3\mid (q+1)\). Let \(k_{1}\) and \(k_{2}\) be integers with \(\frac{q+1}{2}\leqslant k_{1}\leqslant \frac{4q-8}{3}\) and \(1\leqslant k_{2}<k_{1}\). The pairs \((2k_{1},2k_{2})\) such that \(C_{2k_2}=-qC_{2k_1}\) are given by \((\frac{4q-2}{3},\frac{2q-4}{3})\), \((\frac{5q-1}{3},\frac{q-5}{3})\) and \((\frac{7q-5}{3},\frac{5q-7}{3})\).

Proof

If \(C_{2k_2}=-qC_{2k_1}\), then

$$\begin{aligned} k_{1}q+k_{2}\equiv 0(\bmod ~m). \end{aligned}$$
(7)

Note that \((q-1)\mid m\). Taking both sides of (7) modulo \(q-1\), we have \(k_{1}+k_{2}\equiv 0(\bmod ~q-1)\). Since \(\frac{q+3}{2}\leqslant k_{1}+k_{2}<\frac{8q-16}{3}\), it follows that \(k_{1}+k_{2}=q-1\) or \(2(q-1)\).

  1. 1)

    \(k_{1}+k_{2}=q-1\). Then \(k_{2}=q-1-k_{1}\). Putting it into (7) one obtains \(k_{1}+1\equiv 0(\bmod ~\frac{q+1}{6})\). Note that \(\frac{q+1}{2}\leqslant k_{1}\leqslant q-2\), so \(k_{1}=\frac{2q-1}{3}\) or \(\frac{5q-1}{6}\). Hence, \((2k_{1},2k_{2})=(\frac{4q-2}{3},\frac{2q-4}{3})\) or \((\frac{5q-1}{3},\frac{q-5}{3})\).

  2. 2)

    \(k_{1}+k_{2}=2(q-1)\). Then \(k_{2}=2(q-1)-k_{1}\). Putting it into (7) one obtains \(k_{1}+2\equiv 0(\bmod ~\frac{q+1}{6})\). Note that \(q-1<k_{1}\leqslant \frac{4q-8}{3}\), so \(k_{1}=\frac{7q-5}{6}\). Hence, \((2k_{1},2k_{2})=(\frac{7q-5}{3},\frac{5q-7}{3})\).

This completes the proof. \(\square \)

Lemma 4.6

Let \(n=\frac{q^2-1}{3}\) with \(3\mid (q+1)\). Let \(k_{1}\) and \(k_{2}\) be integers with \(0\leqslant k_{1}\leqslant \frac{4q-8}{3}\) and \(1\leqslant k_{2}<k_{1}\). The pairs \((2k_{1}+1,2k_{2}+1)\) such that \(C_{2k_2+1}=-qC_{2k_1+1}\) are given by \((\frac{2q-1}{3},\frac{q-2}{3})\), \((\frac{5q-4}{3},\frac{4q-5}{3})\), \((2q-1,q-2)\) and \((\frac{7q-2}{3},\frac{2q-7}{3})\).

Proof

From \(C_{2k_2+1}=-qC_{2k_1+1}\), we can get

$$\begin{aligned} qk_1+k_2+\frac{q+1}{2}\equiv 0(\bmod ~m). \end{aligned}$$
(8)

By Lemma 4.3, \(k_1+k_2+1\equiv 0(\bmod ~\frac{q-1}{2}).\) Since \(1\leqslant k_{1}+k_{2}+1<\frac{8q-13}{3}\), it follows that \(k_{1}+k_{2}+1=t\cdot \frac{q-1}{2}\), for \(1\leqslant t\leqslant 5\). Notice that \(k_{1}+k_{2}<2k_{1}\) and \(k_{2}\geqslant 1\).

  1. 1)

    When \(t=1\), \(\frac{q-3}{4}<k_{1}\leqslant \frac{q-5}{2}\) and \(k_{2}=\frac{q-1}{2}-k_{1}-1\). From (8), we obtain \(k_{1}+1\equiv 0(\bmod ~\frac{q+1}{6})\). This gives \(k_1=\frac{q-2}{3}\). Hence, \((2k_{1}+1,2k_{2}+1)=(\frac{2q-1}{3},\frac{q-2}{3})\).

  2. 2)

    When \(t=2\), \(\frac{q-1}{2}<k_{1}\leqslant q-3\) and \(k_{2}=q-k_{1}-2\). From (8), we obtain \(k_{1}+\frac{3}{2}\equiv 0(\bmod ~\frac{q+1}{6})\), which has no solutions. Hence, such pairs \((2k_{1}+1,2k_{2}+1)\) do not exist.

  3. 3)

    When \(t=3\), \(\frac{3q-5}{4}<k_{1}\leqslant \frac{3q-7}{2}\) and \(k_{2}=\frac{3(q-1)}{2}-k_{1}-1\). From (8), we obtain \(k_{1}+2\equiv 0(\bmod ~\frac{q+1}{6})\). This gives \(k_1=\frac{5q-7}{6}\), \(q-1\) or \(\frac{7q-5}{6}\). Hence, \((2k_{1}+1,2k_{2}+1)=(\frac{5q-4}{3},\frac{4q-5}{3}), (2q-1,q-2)\) or \((\frac{7q-2}{3},\frac{2q-7}{3})\).

  4. 4)

    When \(t=4\) or 5, as in Case 2), we can get the pairs \((2k_{1}+1,2k_{2}+1)\) such that \(C_{2k_2+1}=-qC_{2k_1+1}\) do not exist.

This completes the proof. \(\square \)

Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set \(T=T_{e}\cup T_{o}=\cup _{i=1}^{\delta }C_{i}\), where \(1\leqslant \delta \leqslant \frac{8q-10}{3}\). We use the cyclic codes \(\mathcal {C}\) to construct EAQMDS codes with flexible parameters.

Theorem 4.7

Let \(n=\frac{q^2-1}{3}\) with \(3\mid (q+1)\). There exist q-ary EAQMDS codes with parameters

  1. 1)

    \([[n, n-2d+5, d; 3]]_q\), where \(q\leqslant d \leqslant \frac{4q-2}{3}\ (q\geqslant 11)\).

  2. 2)

    \([[n, n-2d+7, d; 5]]_q\), where \(\frac{4q+1}{3}\leqslant d \leqslant \frac{5q-4}{3}\ (q\geqslant 11)\).

  3. 3)

    \([[n, n-2d+11, d; 9]]_q\), where \(\frac{5q+2}{3}\leqslant d \leqslant 2q-2\ (q\geqslant 11)\).

  4. 4)

    \([[n, n-2d+14, d; 12]]_q\), where \(2q\leqslant d \leqslant \frac{7q-5}{3}\ (q\geqslant 17)\).

  5. 5)

    \([[n, n-2d+18, d; 16]]_q\), where \(\frac{7q+1}{3}\leqslant d \leqslant \frac{8q-7}{3}\ (q\geqslant 17)\).

Proof

Let \(\mathcal {C}\) be defined as above. We know that \(\mathcal {C}\) is an \([n,n-\delta ,\delta +1]\) MDS code over \(\mathbb {F}_{q^{2}}\).

  1. 1)

    If \(q-1\leqslant \delta \leqslant \frac{4q-5}{3}\), then \(\{\frac{2q-1}{3},\frac{q-2}{3},q-1\}\subseteq T\). By Lemma 4.1 1) and Lemma 4.2, \(T_{e}\cap T_{e}^{-q}=\{q-1\}\). By Lemma 4.1 2) and Lemma 4.6, \(T_{o}\cap T_{o}^{-q}=\{\frac{2q-1}{3},\frac{q-2}{3}\}\). By Theorem 3.3, \(c=|T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|=3\). Applying Corollary 3.4 to \(\mathcal {C}\) one obtains an \([[n,n-2\delta +3,\delta +1;3]]_{q}\) EAQEC code. It can be checked that the parameters meet the Singleton-type bound (1), and hence \(\mathcal {C}\) is an EAQMDS code. This produces the first class of codes.

  2. 2)

    If \(\frac{4q-2}{3}\leqslant \delta \leqslant \frac{5q-7}{3}\), then \(\{\frac{2q-1}{3},\frac{q-2}{3},q-1,\frac{4q-2}{3},\frac{2q-4}{3}\}\subseteq T\). It can be seen that \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{4q-2}{3},\frac{2q-4}{3}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{2q-1}{3},\frac{q-2}{3}\}\). So, \(c=|T_{e}\cap T_{e}^{-q}|+|T_{o}\cap T_{o}^{-q}|=5\). This produces an \([[n,n-2\delta +5,\delta +1;5]]_{q}\) EAQMDS code, which gives the second class of codes.

  3. 3)

    If \(\frac{5q-1}{3}\leqslant \delta \leqslant 2q-3\), then \(\{\frac{2q-1}{3},\frac{q-2}{3},q-1,\frac{4q-2}{3},\frac{2q-4}{3},\frac{5q-4}{3},\frac{4q-5}{3},\frac{5q-1}{3},\frac{q-5}{3}\}\subseteq T\). We have \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{4q-2}{3},\frac{2q-4}{3},\frac{5q-1}{3},\frac{q-5}{3}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{2q-1}{3},\frac{q-2}{3},\frac{5q-4}{3},\frac{4q-5}{3}\}\). So, \(c=9\). This produces an \([[n,n-2\delta +9,\delta +1;9]]_{q}\) EAQMDS code. This gives the third class of codes.

  4. 4)

    If \(2q-1\leqslant \delta \leqslant \frac{7q-8}{3}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{4q-2}{3},\frac{2q-4}{3},\frac{5q-1}{3},\frac{q-5}{3},2q-2\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{2q-1}{3},\frac{q-2}{3},\frac{5q-4}{3},\frac{4q-5}{3},2q-1,q-2\}\). So, \(c=12\). Hence, we get an \([[n,n-2\delta +12,\delta +1;12]]_{q}\) EAQMDS code. This gives the fourth class of codes.

  5. 5)

    If \(\frac{7q-2}{3}\leqslant \delta \leqslant \frac{8q-10}{3}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{4q-2}{3},\frac{2q-4}{3},2q-2,\frac{5q-1}{3},\frac{q-5}{3},\frac{7q-5}{3},\frac{5q-7}{3}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{2q-1}{3},\frac{q-2}{3},\frac{5q-4}{3},\frac{4q-5}{3},2q-1,q-2,\frac{7q-2}{3},\frac{2q-7}{3}\}\). So, \(c=16\). Hence, we have an \([[n,n-2\delta +16,\delta +1;16]]_{q}\) EAQMDS code. This gives the last class of codes. \(\square \)

4.2 Length \(n=\frac{q^{2}-1}{5}\) with \(5\mid (q+1)\)

Assume that \(q\geqslant 19\) is an odd prime power with \(5\mid (q+1)\). Let \(n=\frac{q^{2}-1}{5}\) and \(m=\frac{n}{2}\).

Lemma 4.8

Let \(n=\frac{q^2-1}{5}\) with \(5\mid (q+1)\). Let \(k_{1}, k_{2}\) be integers with \(\frac{q+1}{2}\leqslant k_{1}\leqslant \frac{9q-16}{10}\) and \(1\leqslant k_{2}<k_{1}\). The pairs \((2k_{1},2k_{2})\) with \(C_{2k_2}=-qC_{2k_1}\) are given by \((\frac{6q-4}{5},\frac{4q-6}{5})\), \((\frac{7q-3}{5},\frac{3q-7}{5})\) and \((\frac{8q-2}{5},\frac{2q-8}{5})\).

Proof

If \(C_{2k_2}=-qC_{2k_1}\), then

$$\begin{aligned} k_{1}q+k_{2}\equiv 0(\bmod ~m). \end{aligned}$$
(9)

Taking both sides of (9) modulo \(q-1\), we have \(k_{1}+k_{2}\equiv 0(\bmod ~q-1)\). Since \(\frac{q+3}{2}\leqslant k_{1}+k_{2}<\frac{9q-16}{5}\), it follows that \(k_{1}+k_{2}=q-1\) and \(k_{2}=q-1-k_{1}\). Putting it into (9) one obtains \(k_{1}+1\equiv 0(\bmod ~\frac{q+1}{10})\). Note that \(\frac{q+1}{2}\leqslant k_{1}\leqslant q-2\). So, we can get \((2k_{1},2k_{2})=(\frac{6q-4}{5},\frac{4q-6}{5})\), \((\frac{7q-3}{5},\frac{3q-7}{5})\) or \((\frac{8q-2}{5},\frac{2q-8}{5})\). \(\square \)

Lemma 4.9

Let \(n=\frac{q^2-1}{5}\) with \(5\mid (q+1)\). Let \(k_{1}, k_{2}\) be integers with \(0\leqslant k_{1}\leqslant \frac{9q-16}{10}\) and \(1\leqslant k_{2}<k_{1}\). The pairs \((2k_{1}+1,2k_{2}+1)\) such that \(C_{2k_2+1}=-qC_{2k_1+1}\) are given by \((2k_{1}+1,2k_{2}+1)=(\frac{3q-2}{5},\frac{2q-3}{5})\), \((\frac{4q-1}{5},\frac{q-4}{5})\) and \((\frac{8q-7}{5},\frac{7q-8}{5})\).

Proof

As in the proof of Lemma 4.6, we have

$$\begin{aligned} qk_1+k_2+\frac{q+1}{2}\equiv 0(\bmod ~m) \end{aligned}$$

and

$$\begin{aligned} k_1+k_2+1\equiv 0(\bmod ~\frac{q-1}{2}). \end{aligned}$$
(10)

Since \(1\leqslant k_{1}+k_{2}+1<\frac{9q-11}{5}\), it follows from (10) that \(k_{1}+k_{2}=\frac{q-3}{2}\), \(q-2\) or \(\frac{3q-5}{2}\). Notice that \(k_{1}+k_{2}<2k_{1}\). Then we can get

$$\begin{aligned} (2k_{1}+1,2k_{2}+1)=\left( \frac{3q-2}{5},\frac{2q-3}{5}\right) , \left( \frac{4q-1}{5},\frac{q-4}{5}\right) \ \text {or}\ \left( \frac{8q-7}{5},\frac{7q-8}{5}\right) . \end{aligned}$$

This gives the result. \(\square \)

By using Lemmas 4.8 and 4.9, we can construct EAQMDS codes of length \(n=\frac{q^{2}-1}{5}\).

Theorem 4.10

Let \(n=\frac{q^2-1}{5}\) with \(5\mid (q+1)\). There exist q-ary EAQMDS codes with parameters

  1. 1)

    \([[n, n-2d+7, d; 5]]_q\), where \(q\leqslant d \leqslant \frac{6q-4}{5}\).

  2. 2)

    \([[n, n-2d+9, d; 7]]_q\), where \(\frac{6q+1}{5}\leqslant d \leqslant \frac{7q-3}{5}\).

  3. 3)

    \([[n, n-2d+11, d; 9]]_q\), where \(\frac{7q+2}{5}\leqslant d \leqslant \frac{8q-7}{5}\).

  4. 4)

    \([[n, n-2d+15, d; 13]]_q\), where \(\frac{8q+3}{5}\leqslant d \leqslant \frac{9q-6}{5}\).

Proof

Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set \(T=T_{e}\cup T_{o}=\cup _{i=1}^{\delta }C_{i}\), where \(1\leqslant \delta \leqslant \frac{9q-11}{5}\). Then \(\mathcal {C}\) is an \([n,n-\delta ,\delta +1]\) MDS code over \(\mathbb {F}_{q^{2}}\).

  1. 1)

    If \(q-1\leqslant \delta \leqslant \frac{6q-9}{5}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{3q-2}{5},\frac{2q-3}{5},\frac{4q-1}{5},\frac{q-4}{5}\}\). So, \(c=5\). By applying Corollary 3.4, we obtain an \([[n,n-2\delta +5,\delta +1;5]]_{q}\) EAQMDS code, which is the first class of codes.

  2. 2)

    If \(\frac{6q-4}{5}\leqslant \delta \leqslant \frac{7q-8}{5}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{6q-4}{5},\frac{4q-6}{5}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{3q-2}{5},\frac{2q-3}{5},\frac{4q-1}{5},\frac{q-4}{5}\}\). So, \(c=7\). Hence, we obtain an \([[n,n-2\delta +7,\delta +1;7]]_{q}\) EAQMDS code, which is the second class of codes.

  3. 3)

    If \(\frac{7q-3}{5}\leqslant \delta \leqslant \frac{8q-12}{5}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{6q-4}{5},\frac{4q-6}{5},\frac{7q-3}{5},\frac{3q-7}{5}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{3q-2}{5},\frac{2q-3}{5},\frac{4q-1}{5},\frac{q-4}{5}\}\). So, \(c=9\). Hence, we obtain an \([[n,n-2\delta +9,\delta +1;9]]_{q}\) EAQMDS code, which gives the third class of codes.

  4. 4)

    If \(\frac{8q-2}{5}\leqslant \delta \leqslant \frac{9q-11}{5}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{6q-4}{5},\frac{4q-6}{5},\frac{7q-3}{5},\frac{3q-7}{5},\frac{8q-2}{5},\frac{2q-8}{5}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{3q-2}{5},\frac{2q-3}{5},\frac{4q-1}{5},\frac{q-4}{5},\frac{8q-7}{5},\frac{7q-8}{5}\}\). So, \(c=13\). Hence, we obtain an \([[n,n-2\delta +13,\delta +1;13]]_{q}\) EAQMDS code, which gives the last class of codes. \(\square \)

4.3 Length \(n=\frac{q^{2}-1}{7}\) with \(7\mid (q+1)\)

Assume that \(q\geqslant 27\) is an odd prime power with \(7\mid (q+1)\). Let \(n=\frac{q^{2}-1}{7}\) and \(m=\frac{n}{2}\).

Lemma 4.11

Let \(n=\frac{q^2-1}{7}\) with \(7\mid (q+1)\). Let \(k_{1}, k_{2}\) be integers with \(\frac{q+1}{2}\leqslant k_{1}\leqslant \frac{11q-24}{14}\) and \(1\leqslant k_{2}<k_{1}\). The pairs \((2k_{1},2k_{2})\) with \(C_{2k_2}=-qC_{2k_1}\) are given by \((\frac{8q-6}{7},\frac{6q-8}{7})\), \((\frac{9q-5}{7},\frac{5q-9}{7})\) and \((\frac{10q-4}{7},\frac{4q-10}{7})\).

Proof

If \(C_{2k_2}=-qC_{2k_1}\), then

$$\begin{aligned} k_{1}q+k_{2}\equiv 0(\bmod ~m). \end{aligned}$$
(11)

Taking both sides of (11) modulo \(q-1\), we have \(k_{1}+k_{2}\equiv 0(\bmod ~q-1)\). Since \(\frac{q+3}{2}\leqslant k_{1}+k_{2}<\frac{11q-24}{7}\), it follows that \(k_{1}+k_{2}=q-1\) and \(k_{2}=q-1-k_{1}\). Putting it into (11) one obtains \(k_{1}+1\equiv 0(\bmod ~\frac{q+1}{14})\). Note that \(\frac{q+1}{2}\leqslant k_{1}\leqslant q-2\). So, we can get \((2k_{1},2k_{2})=(\frac{8q-6}{7},\frac{6q-8}{7})\), \((\frac{9q-5}{7},\frac{5q-9}{7})\) or \((\frac{10q-4}{7},\frac{4q-10}{7})\). \(\square \)

Lemma 4.12

Let \(n=\frac{q^2-1}{7}\) with \(7\mid (q+1)\). Let \(k_{1}, k_{2}\) be integers with \(0\leqslant k_{1}\leqslant \frac{11q-24}{14}\) and \(1\leqslant k_{2}<k_{1}\). The pairs \((2k_{1}+1,2k_{2}+1)\) such that \(C_{2k_2+1}=-qC_{2k_1+1}\) are given by \((2k_{1}+1,2k_{2}+1)=(\frac{4q-3}{7},\frac{3q-4}{7})\), \((\frac{5q-2}{7},\frac{2q-5}{7})\) and \((\frac{6q-1}{7},\frac{q-6}{7})\).

Proof

As in the proof of Lemma 4.6, since \(1\leqslant k_{1}+k_{2}+1<\frac{11q-17}{7}\), it follows that \(k_{1}+k_{2}=\frac{q-3}{2}\) or \(q-2\). Notice that \(k_{1}+k_{2}<2k_{1}\). Then we can get \((2k_{1}+1,2k_{2}+1)=(\frac{4q-3}{7},\frac{3q-4}{7})\), \((\frac{5q-2}{7},\frac{2q-5}{7})\) or \((\frac{6q-1}{7},\frac{q-6}{7})\). \(\square \)

By using Lemmas 4.11 and 4.12, we can find the following EAQMDS codes of length \(n=\frac{q^{2}-1}{7}\).

Theorem 4.13

Let \(n=\frac{q^2-1}{7}\) with \(7\mid (q+1)\). There exist q-ary EAQMDS codes with parameters

  1. 1)

    \([[n, n-2d+9, d; 7]]_q\), where \(q\leqslant d \leqslant \frac{8q-6}{7}\).

  2. 2)

    \([[n, n-2d+11, d; 9]]_q\), where \(\frac{8q+1}{7}\leqslant d \leqslant \frac{9q-5}{7}\).

  3. 3)

    \([[n, n-2d+13, d; 11]]_q\), where \(\frac{9q+2}{7}\leqslant d \leqslant \frac{10q-4}{7}\).

  4. 4)

    \([[n, n-2d+15, d; 13]]_q\), where \(\frac{10q+3}{7}\leqslant d \leqslant \frac{11q-10}{7}\).

Proof

Let \(\mathcal {C}\) be a cyclic code over \(\mathbb {F}_{q^{2}}\) of length n with defining set \(T=T_{e}\cup T_{o}=\cup _{i=1}^{\delta }C_{i}\), where \(1\leqslant \delta \leqslant \frac{11q-17}{7}\). Then \(\mathcal {C}\) is an \([n,n-\delta ,\delta +1]\) MDS code over \(\mathbb {F}_{q^{2}}\).

  1. 1)

    If \(q-1\leqslant \delta \leqslant \frac{8q-13}{7}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{4q-3}{7},\frac{3q-4}{7},\frac{5q-2}{7},\frac{2q-5}{7},\frac{6q-1}{7},\) \(\frac{q-6}{7}\}\). So, \(c=7\). By applying Corollary 3.4, we obtain an \([[n,n-2\delta +7,\delta +1;7]]_{q}\) EAQMDS code, which is the first class of codes.

  2. 2)

    If \(\frac{8q-6}{7}\leqslant \delta \leqslant \frac{9q-12}{7}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{8q-6}{7},\frac{6q-8}{7}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{4q-3}{7},\frac{3q-4}{7},\frac{5q-2}{7},\) \(\frac{2q-5}{7},\frac{6q-1}{7},\frac{q-6}{7}\}\). So, \(c=9\). Hence, we obtain an \([[n,n-2\delta +9,\delta +1;9]]_{q}\) EAQMDS code, which is the second class of codes.

  3. 3)

    If \(\frac{9q-5}{7}\leqslant \delta \leqslant \frac{10q-11}{7}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{8q-6}{7},\frac{6q-8}{7},\frac{9q-5}{7},\frac{5q-9}{7}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{4q-3}{7},\frac{3q-4}{7},\frac{5q-2}{7},\frac{2q-5}{7},\frac{6q-1}{7},\frac{q-6}{7}\}\). So, \(c=11\). Hence, we obtain an \([[n,n-2\delta +11,\delta +1;11]]_{q}\) EAQMDS code, which gives the third class of codes.

  4. 4)

    If \(\frac{10q-4}{7}\leqslant \delta \leqslant \frac{11q-17}{7}\), then \(T_{e}\cap T_{e}^{-q}=\{q-1,\frac{8q-6}{7},\frac{6q-8}{7},\frac{9q-5}{7},\frac{5q-9}{7},\frac{10q-4}{7},\frac{4q-10}{7}\}\) and \(T_{o}\cap T_{o}^{-q}=\{\frac{4q-3}{7},\frac{3q-4}{7},\frac{5q-2}{7},\frac{2q-5}{7},\frac{6q-1}{7},\frac{q-6}{7}\}\). So, \(c=13\). Hence, we obtain an \([[n,n-2\delta +13,\delta +1;13]]_{q}\) EAQMDS code, which gives the last class of codes. \(\square \)

5 Comparisons and conclusions

In this paper, we have constructed EAQMDS codes with length \(n=\frac{q^2-1}{r}\), where \(r\mid (q+1)\) and \(r=3,5,7\). Through separating the defining set into the sets of even integer numbers and odd integer numbers, we have determined the number of maximally entangled states. Our construction has produced many new EAQMDS codes with large minimum distance. In [8, 23, 43], some standard quantum MDS codes with the same length have been obtained, and they have minimum distance not more than \(q+1\). Our EAQMDS codes presented in this paper have minimum distance upper limit greater than \(\frac{3(q+1)}{2}\). In particular, when \(r=3\), we obtain the EAQMDS codes with minimum distance upper limit greater than \(2(q+1)\). We now compare our EAQMDS codes with the known ones in the literature.

Table 1 EAQMDS codes of length \(n=\frac{q^{2}-1}{3}\) with \(3\mid (q+1)\)
Table 2 EAQMDS codes of length \(n=\frac{q^{2}-1}{5}\) with \(5\mid (q+1)\)

In [10], Fan et al. constructed EAQMDS codes with parameters \({[}{[}\frac{q^2-1}{r}, \frac{q^2-1}{r}-2d+r+2, d; r{]}{]}_q\), where \(r\mid (q+1)\) and \(\frac{(r-1)(q+1)}{r}+2\leqslant d \leqslant \frac{(r+1)(q+1)}{r}-2\). It is obvious that \(\frac{3(q+1)}{2}>\frac{(r+1)(q+1)}{r}-2\), hence our construction produces more codes processing bigger minimum distance.

In [40], Pang et al. obtained EAQMDS codes with parameters \({[}{[}\frac{q^2-1}{r}, \frac{q^2-1}{r}-2d+2m+1, d; 2m-1{]}{]}_q,\) where \(r\mid (q+1)\), \(1\le m\le \frac{r-1}{2}\) and \(\frac{(r+2m-1)(q+1)}{2r}\leqslant d \leqslant \frac{(q-1)r+(2m+1)(q+1)}{2r}\). It can be seen that these codes have minimum distance not more than q. Hence, our quantum codes have larger minimum distance and higher error-correcting capability.

Table 3 EAQMDS codes of length \(n=\frac{q^{2}-1}{7}\) with \(7\mid (q+1)\)
Table 4 Some new EAQMDS codes and comparisons

In [30], by using constacyclic codes, Liu et al. constructed EAQMDS codes with minimum distance more than \(q+1\). We compare the parameters of our codes with those from [30] in Tables 1, 2 and 3. There for length \(n=\frac{q^{2}-1}{r}\ (r=3,5,7)\), we show almost all the parameters constructed in [30] are covered by our construction based on cyclic codes. Furthermore, new classes of EQAMDS codes have been obtained, which have minimum distance with a wide range. As the minimum distance gets large, the required number of maximally entangled states becomes growing. However, the net rate \(\frac{k-c}{n}\) remains unchanged. In Table 4, we make a comparison between our codes and the known ones in [30] for some special lengths. We find the number c of maximally entangled states changes with the values of r and d. However, it is not easy to describe the changeable rules among the three values. A further consideration is to present an explicit expression to reveal their relation.

Our construction is based on classical cyclic codes over \(\mathbb {F}_{q^{2}}\) with even length which enables us to deal with two classes of cyclotomic cosets independently. It requires the size of the finite field must be an odd prime power. Hence, the construction is generally invalid for the \(2^{\ell }\)-ary case. It is expected to provide a new method for finding new EAQMDS codes over finite fields with characteristic two. For a nonzero element \(\lambda \in \mathbb {F}_{q^{2}}\), \(x^{n}-\lambda \) probably factors as the product of two binomials \(x^{n/2}-\lambda _{1}\) and \(x^{n/2}-\lambda _{2}\) over a finite field. Hence, it is hopeful to construct new EAQMDS codes from certain types of constacyclic codes.