1 Introduction

Quantum error-correcting codes (QECCs) play an important role in quantum communication and quantum computer. Calderbank et al. established the connections between quantum codes and classical codes in [1]. As we know, QECCs can be constructed from dual-containing classical codes [2]. After that, many scholars constructed lots of QECCs with good parameters (see [3,4,5,6,7,8,9]). However, the dual-containing condition forms a barrier in the development of quantum coding theory. Entanglement-assisted quantum error-correcting codes (EAQECCs) theory is a breakthrough in the area of quantum error correction. By using preshared entanglement between the sender and the receiver, Brun et al. proved that arbitrary classical linear error-correcting codes can be used to construct EAQECCs [10]. Since then, many scholars have been interested in EAQECCs and have made good progress.

Let q be a prime power. A q-ary EAQECC can be denoted as [[n,k,d;c]]q, which encodes k logical qubits into n physical qubits with help of c pairs of maximally entangled states, where d is the minimum distance of the code. A quantum code with minimum distance d can detect up to d − 1 quantum errors and correct up to \(\lfloor \frac {d-1}2\rfloor \) quantum errors. Actually, if c = 0, the code is a QECC. The Singleton bound for an EAQECC is given in the following proposition:

Proposition 1

[11] For any [[n,k,d;c]]q EAQECC, if \(d\leq \frac {n+2}{2}\), then it satisfies n + ck ≥ 2(d − 1), where 0 ≤ cn − 1.

An EAQECC attaining the Singleton bound is called an entanglement-assisted quantum MDS (EAQMDS for short) code. Although the dual-containing condition is no longer required, it is still not easy to determine the number of pre-shared maximally entangled states for constructing an EAQECC. There are two main ways to construct EAQMDS codes, namely using constacyclic codes and generalized Reed–Solomon codes.

Fan et al. constructed several classes of EAQMDS codes from Reed-Solomon codes and constacyclic codes with one or more shared entangled states [12]. In [13], Guenda et al. have shown that the number of shared pairs is associated with the hull of classical linear codes. Luo et al. constructed several new infinite families of EAQMDS codes by GRS codes with hulls of arbitrary dimensions [14]. Then, many scholars constructed many EAQMDS codes by using GRS codes [15,16,17,18].

Chen et al. proposed a decomposition of the defining set of negacyclic codes, and obtained four families of EAQMDS codes with the help of 4 or 5 shared entanglement states [19]. Then, Chen et al. constructed four classes of EAQMDS codes from constacyclic codes with length \(n=\frac {q^{2}+1}{5}\) [20]. Recently, Lu et al. proposed the concept of decomposition of the defining set of negacyclic codes, and constructed six classes of EAQMDS codes [21]. Subsequently, many researchers constructed many classes of EAQMDS codes with constacyclic codes (including cyclic codes and negacyclic codes) [22,23,24,25,26].

In this paper, based on cyclic codes and constacyclic codes we have obtained some new classes of EAQMDS codes with parameters [[n,n − 2d + 2 + c,d;c]]q as follows:

  1. (1)

    q = 26m + 5, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 5, 12m + 4 ≤ d ≤ 20m + 4 and d is even.

  2. (2)

    q = 26m + 5, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 9, 20m + 6 ≤ d ≤ 24m + 4 and d is even.

  3. (3)

    q = 26m + 21, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 5, 12m + 12 ≤ d ≤ 20m + 16 and d is even.

  4. (4)

    q = 26m + 21, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 9, 20m + 18 ≤ d ≤ 24m + 20 and d is even.

  5. (5)

    q = 26m + 5, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 4, 10m + 4 ≤ d ≤ 18m + 4 and d is even.

  6. (6)

    q = 26m + 5, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 8, 18m + 6 ≤ d ≤ 22m + 4 and d is even.

  7. (7)

    q = 26m + 21, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 4, 10m + 10 ≤ d ≤ 18m + 14 and d is even.

  8. (8)

    q = 26m + 21, m ≥ 1, \(n=\frac {q^{2}+1}{13}\), c = 8, 18m + 16 ≤ d ≤ 22m + 18 and d is even.

The paper is organized as follows. In Section 2, we recall the basic knowledge of linear codes, constacyclic codes and EAQECCs. In Section 3 and Section 4, we construct some classes of EAQMDS codes from cyclic codes and constacyclic codes. Section 5 contains some comparative results and concludes this paper.

2 Preliminaries

In this section, we will review some relevant concepts on constacyclic codes and EAQECCs for the purpose of this paper.

Let \(\mathbb {F}_{q^{2}}\) be the finite field with q2 elements. Let \(\mathbb {F}_{q^{2}}^{n}\) be the n-dimensional vector space over \(\mathbb {F}_{q^{2}}\), where n is a positive integer. The Hamming weight of \(\boldsymbol {x}\in \mathbb {F}_{q^{2}}^{n}\) is the number of nonzero coordinates of x, and is denoted by wt(x). The Hamming distance of two vectors x and y is the Hamming weight of the xy, denoted by dist(x,y).

A q2-ary code \({\mathscr{C}}\) of length n is a subset of \(\mathbb {F}_{q^{2}}^{n}\). The minimum distance of \({\mathscr{C}}\), denoted by \(\mathrm {d}({\mathscr{C}})\), is defined by \(\mathrm {d}({\mathscr{C}})=\min \limits \{\text {dist}(\boldsymbol {x},\boldsymbol {y})| \boldsymbol {x}\neq \boldsymbol {y}\in {\mathscr{C}} \}\). The code \({\mathscr{C}}\) is called a q2-ary linear code of length n, if \({\mathscr{C}}\) is a subspace of \(\mathbb {F}_{q^{2}}^{n}\). Clearly, the minimum Hamming distance of linear code \({\mathscr{C}}\) is equal to the minimum nonzero Hamming weight of all codewords in \({\mathscr{C}}\). A q2-ary linear code [n,k,d] is a k-dimensional subspace of \(\mathbb {F}_{q^{2}}^{n}\) and minimum distance d. The Singleton bound for a linear code is given in the following proposition:

Proposition 2

(The Singleton bound) If \({\mathscr{C}}\) is an [n,k,d] code, then nkd − 1.

Codes with nk = d − 1 are called maximum distance separable (abbreviated MDS).

Let \(\boldsymbol {x}=(x_{1},x_{2},\dots ,x_{n})\) and \(\boldsymbol {y}=(y_{1},y_{2},\dots ,y_{n})\) be two vectors in \(\mathbb {F}_{q^{2}}^{n}\), then the Hermitian inner product is defined as \((\boldsymbol {x},\boldsymbol {y})_{H}={\sum }_{i=1}^{n}x_{i}{y_{i}^{q}}\). For a q2-ary linear code \({\mathscr{C}}\) of length n, the Hermitian dual of \({\mathscr{C}}\), denoted by \({\mathscr{C}}^{\bot _{H}}\), is defined by

$$\begin{array}{ll} \mathscr{C}^{\bot_{H}}=\{\boldsymbol{x}\in \mathbb{F}_{q^{2}}^{n}|(\boldsymbol{x},\boldsymbol{y})_{H}=0,~\text{for~all}~\boldsymbol{y}\in \mathscr{C}\}. \end{array}$$

If \(C\subseteq {\mathscr{C}}^{\perp _{H}}\), \({\mathscr{C}}\) is referred to as a Hermitian self-orthogonal code.

Let α be a nonzero element in \(\mathbb {F}_{q^{2}}\). A linear code \({\mathscr{C}}\) of length n is said to be α-constacyclic, if for any codeword \((c_{1},c_{2},\dots ,c_{n}) \in {\mathscr{C}}\) that satisfies \((\alpha c_{n},c_{1},\dots ,c_{n-1}) \in {\mathscr{C}}\). If α = 1, an α-constacyclic code is called a cyclic code. It is well known that a q2-ary α-constacyclic code \({\mathscr{C}}\) of length n is an ideal of \(\mathbb {F}_{q^{2}}[x]/{ \left \langle x^{n}-\alpha \right \rangle }\). Moreover, \({\mathscr{C}}\) can be generated by a monic factor of xnα, i.e., \({\mathscr{C}} = \left \langle f(x)\right \rangle \) and f(x)|(xnα).

Form [4, 27], we can see that the Hermitian dual \({\mathscr{C}}^{\bot _{h}}\) of an α-constacyclic code over \(\mathbb {F}_{q^{2}}\) is an αq-constacyclic code. Let ω be a primitive element of \(\mathbb {F}_{q^{2}}\). We assume \(\gcd (n,q)=1\) and take α = ωi(q− 1) for some \(i\in {0,1,\dots ,q}\). In this case, we have αq+ 1 = 1. Then, the order r of α in \(\mathbb {F}_{q}^{*}\) is \((q+1)/\gcd (i,q+1)\) and the Hermitian dual \({\mathscr{C}}^{\bot h} \) of an α-constacyclic code over \(\mathbb {F}_{q^{2}}\) is α-constacyclic. Let δ be a primitive rn-th root of unity in some extension field of \(\mathbb {F}_{q^{2}}\) such that δn = α and η = δn. Then η is a primitive r-th root of unity, which implies that the roots of xnα are δηj = δ1+jr, for 0 ≤ jn − 1.

Let Orn = {1 + rj|0 ≤ jn − 1}. Then, the defining set of a constacyclic code \({\mathscr{C}}=\left \langle g(x)\right \rangle \) of length n is the set Z = {iOrn|δi is a root of g(x)}. The q2-cyclotmic coset of i modulo rn is defined by \(C_{i}=\{iq^{2j}(\text {mod} rn)|j\in \mathbb {Z}\}\). Then, the defining set of an α-constacyclic code over \(\mathbb {F}_{q^{2}}\) can be seen as union of sets Ci for some iOrn.

As in cyclic codes, there exists the following BCH bound for α-constacyclic codes.

Proposition 3

([28] The BCH bound for constacyclic codes) Let \({\mathscr{C}}=\left \langle g(x)\right \rangle \) be a q2-ary α-constacyclic code of length n, where α is a primitive r-th root of unity. If the polynomial g(x) has the elements {δ1+jr|ljl + d − 2} as the roots, where δ is a rn-th primitive root of unity with δn = α. Then, the minimum distance of \({\mathscr{C}}\) is at least d.

Similar to cyclic codes, constacyclic codes over \(\mathbb {F}_{q^{2}}\) also have the following decomposition.

Definition 1

Let α be an element in \(\mathbb {F}_{q^{2}}^{*}\) with multiplicative order r and \({\mathscr{C}}=\left \langle g(x)\right \rangle \) be an α-constacyclic code of length n with defining set D. Suppose D1 = D ∩−qD and D2 = DD1, where − qD = {rnqx|xD}. Then D = D1D2 is called a decomposition of the defining set of \({\mathscr{C}}\).

Then we have the following result from [22, 23].

Proposition 4

Let \({\mathscr{C}}\) be an α-constacyclic code of length n with defining set D, and D = D1D2 is a decomposition of D. Then there exists an EAQECC with parameters [[n,n − 2|D| + |D1|,d;|D1|]]q, where d is the minimum distance of \({\mathscr{C}}\).

3 Entanglement-Assisted Quantum MDS Codes Derived from Cyclic Codes

In this section, we will construct two classes of EAQMDS codes with length \(n=\frac {q^{2}+1}{13}\) by cyclic codes, where q is an odd prime power. Before our construction, we need the following lemma.

Lemma 1

[29] Let \(n=\frac {q^{2}+1}{13}\) and \(s=\frac {n}{2}\). Then the q2-cyclotomic cosets modulo n containing integers from 0 to n are: C0 = {0}, Cs = {s} and Cs+i = {s + i,si}, where 1 ≤ is − 1.

Let q be an odd prime power, and \(\frac {q^{2}+1}{13}\) be an integer. Then we can easily get q = 26m + 5 or q = 26m + 21. In the following part of this section, we will construct two classes of EAQMDS codes by using cyclic codes.

3.1 The Case q = 26m + 5

Using Lemma 1, we can obtain the cyclic codes with the following parameters.

Lemma 2

Let q,n,s be defined as above, and q = 26m + 5,(m ≥ 1). Assume \({\mathscr{C}}\) is a cyclic code with defining set D and D has the decomposition D = D1D2. Then there exist some cyclic codes with following parameters:

  1. (1)

    If 1 ≤ t ≤ 6m + 1, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 1.

  2. (2)

    If 6m + 2 ≤ t ≤ 10m + 2, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 5.

  3. (3)

    If 10m + 3 ≤ t ≤ 12m + 2, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 9.

Proof

Since q = 26m + 5, then \(n=\frac {q^{2}+1}{13}=52m^{2}+20m+2\) and \(s=\frac {n}{2}=26m^{2}+10m+1\). From Lemma 1 we know that Cs = {s} and Cs+i = {s + i,si}, where 1 ≤ is − 1. Let \(D=\bigcup \limits _{i=0}^{t-1}C_{s+i}\), then D = {s + i|1 − tit − 1}. Clearly, if i = 0, we have − qCs = Cs. If i≠ 0, then

$$ -q(s+i)=-(26m+5)\cdot\frac{q^{2}+1}{26}-iq\equiv\frac{q^{2}+1}{26}-26mi-5i\pmod{\frac{q^{2}+1}{13}} $$

Let Δi be an integer, which satisfies 1 ≤Δin and − q(s + i) ≡Δi (mod n). And then we have the following cases to discuss the value of Δi:

  • Case 1. If 1 ≤ im, then Δi = 26(mi)m + 10m − 5i + 1. Therefore, it is easy to get that |Δis|≥ 26m + 5, and the equality holds if and only if i = 1.

  • Case 2. If m + 1 ≤ i ≤ 3m, then Δi = 26(3mi)m + 30m − 5i + 3. Therefore, it is easy to get that |Δis|≥ 10m + 2, and the equality holds if and only if i = 2m.

  • Case 3. If 3m + 1 ≤ i ≤ 5m, then Δi = 26(5mi)m + 50m − 5i + 5. Therefore, it is easy to get that |Δis|≥ 6m + 1, and the equality holds if and only if i = 4m + 1.

  • Case 4. If 5m + 1 ≤ i ≤ 7m + 1, then Δi = 26(7mi)m + 70m − 5i + 7. Therefore, it is easy to get that |Δis|≥ 4m + 1, and the equality holds if and only if i = 6m + 1.

  • Case 5. If 7m + 2 ≤ i ≤ 9m + 1, then Δi = 26(9mi)m + 90m − 5i + 9. Therefore, it is easy to get that |Δis|≥ 12m + 2, and the equality holds if and only if i = 8m + 2.

  • Case 6. If 9m + 2 ≤ i ≤ 11m + 2, then Δi = 26(11mi)m + 110m − 5i + 11. Therefore, it is easy to get that |Δis|≥ 2m, and the equality holds if and only if i = 10m + 2.

  • Case 7. If 11m + 3 ≤ i ≤ 13m + 2, then Δi = 26(13mi)m + 130m − 5i + 13. Therefore, it is easy to get that |Δis|≥ 8m + 2, and the equality holds if and only if i = 12m + 2.

In conclusion, if 1 ≤ t ≤ 6m + 1, we can easily get D1 = D ∩−qD = Cs and |D1| = 1. If 6m + 2 ≤ t ≤ 10m + 2, we can easily get D1 = D ∩−qD = CsCs+ 4m+ 1Cs+ 6m+ 1 and |D1| = 5. If 10m + 3 ≤ t ≤ 12m + 2, we can easily get D1 = D ∩−qD = CsCs+ 4m+ 1Cs+ 6m+ 1Cs+ 2mCs+ 10m+ 2 and |D1| = 9. In addition, from Propositions 2 and 3, we can get the code \({\mathscr{C}}\) have parameters [n,n − 2t + 1,2t]. □

Using the cyclic codes constructed by Lemma 2 and Proposition 4, we can obtain the following EAQMDS codes.

Theorem 1

Let m ≥ 1,t,d be integers and q = 26m + 5 be an odd prime power. Then, there exist [[n,n − 2d + 2 + c,d;c]]q EAQMDS codes if one of the following holds:

  1. (1)

    \(n=\frac {q^{2}+1}{13}\), c = 1, 2 ≤ d ≤ 12m + 2 and d is even.

  2. (2)

    \(n=\frac {q^{2}+1}{13}\), c = 5, 12m + 4 ≤ d ≤ 20m + 4 and d is even.

  3. (3)

    \(n=\frac {q^{2}+1}{13}\), c = 9, 20m + 6 ≤ d ≤ 24m + 4 and d is even.

Example 1

Let m = 1,3,4. Then, there exist [[n,n − 2d + c + 2,d;c]]q EAQMDS codes, where the values of q,n,d,c can be found in Table 1.

Table 1 The values of n,d,c in Example 1

3.2 The Case q = 26m + 21

Similar to Lemma 2, we can obtain the cyclic codes with the following parameters.

Lemma 3

Let q,n,s be defined as above, and q = 26m + 21,(m ≥ 1). Assume \({\mathscr{C}}\) is a cyclic code with defining set D and D has the decomposition D = D1D2. Then there exist some cyclic codes with following parameters:

  1. (1)

    If 1 ≤ t ≤ 6m + 5, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 1.

  2. (2)

    If 6m + 6 ≤ t ≤ 10m + 8, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 5.

  3. (3)

    If 10m + 9 ≤ t ≤ 12m + 10, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 9.

Proof

Since q = 26m + 21, then \(n=\frac {q^{2}+1}{13}=52m^{2}+84m+34\) and \(s=\frac {n}{2}=26m^{2}+42m+17\). From Lemma 1 we know that Cs = {s} and Cs+i = {s + i,si}, where 1 ≤ is − 1. Let \(D=\bigcup \limits _{i=0}^{t-1}C_{s+i}\), then D = {s + i|1 − tit − 1}. Clearly, if i = 0, we have − qCs = Cs. If i≠ 0, then

$$ -q(s+i)=-(26m+21)\cdot\frac{q^{2}+1}{26}-iq\equiv\frac{q^{2}+1}{26}-26mi-21i \left( \!\!\!\!\!\!\!\mod{\frac{q^{2}+1}{13}}\right). $$

Let Δi be an integer, which satisfies 1 ≤Δin and − q(s + i) ≡Δi (mod n). And then we have the following cases to discuss the value of Δi:

  • Case 1. If 1 ≤ im, then Δi = 26(mi)m + 42m − 21i + 17. Therefore, it is easy to get that |Δis|≥ 26m + 21, and the equality holds if and only if i = 1.

  • Case 2. If m + 1 ≤ i ≤ 3m + 2, then Δi = 26(3mi)m + 126m − 21i + 51. Therefore, it is easy to get that |Δis|≥ 10m + 8, and the equality holds if and only if i = 2m + 2.

  • Case 3. If 3m + 3 ≤ i ≤ 5m + 4, then Δi = 26(5mi)m + 210m − 21i + 85. Therefore, it is easy to get that |Δis|≥ 6m + 5, and the equality holds if and only if i = 4m + 3.

  • Case 4. If 5m + 5 ≤ i ≤ 7m + 5, then Δi = 26(7mi)m + 294m − 21i + 119. Therefore, it is easy to get that |Δis|≥ 4m + 3, and the equality holds if and only if i = 6m + 5.

  • Case 5. If 7m + 6 ≤ i ≤ 9m + 7, then Δi = 26(9mi)m + 378m − 21i + 153. Therefore, it is easy to get that |Δis|≥ 12m + 10, and the equality holds if and only if i = 8m + 6.

  • Case 6. If 9m + 8 ≤ i ≤ 11m + 8, then Δi = 26(11mi)m + 462m − 21i + 187. Therefore, it is easy to get that |Δis|≥ 2m + 2, and the equality holds if and only if i = 10m + 8.

  • Case 7. If 11m + 9 ≤ i ≤ 13m + 10, then Δi = 26(13mi)m + 546m − 21i + 221. Therefore, it is easy to get that |Δis|≥ 8m + 6, and the equality holds if and only if i = 12m + 10.

In conclusion, if 1 ≤ t ≤ 6m + 5, we can easily get D1 = D ∩−qD = Cs and |D1| = 1. If 6m + 6 ≤ t ≤ 10m + 8, we can easily get D1 = D ∩−qD = CsCs+ 4m+ 3Cs+ 6m+ 5 and |D1| = 5. If 10m + 9 ≤ t ≤ 12m + 10, we can easily get D1 = D ∩−qD = CsCs+ 4m+ 3Cs+ 6m+ 5Cs+ 2m+ 2Cs+ 10m+ 8 and |D1| = 9. In addition, from Propositions 2 and 3, we can get the code \({\mathscr{C}}\) have parameters [n,n − 2t + 1,2t]. □

Using the cyclic codes constructed by Lemma 2 and Proposition 4, we can obtain the following EAQMDS codes.

Theorem 2

Let m ≥ 1,t,d be integers and q = 26m + 21 be an odd prime power. Then, there exist [[n,n − 2d + 2 + c,d;c]]q EAQMDS codes if one of the following holds:

  1. (1)

    \(n=\frac {q^{2}+1}{13}\), c = 1, 2 ≤ d ≤ 12m + 10 and d is even.

  2. (2)

    \(n=\frac {q^{2}+1}{13}\), c = 5, 12m + 12 ≤ d ≤ 20m + 16 and d is even.

  3. (3)

    \(n=\frac {q^{2}+1}{13}\), c = 9, 20m + 18 ≤ d ≤ 24m + 20 and d is even.

Example 2

Let m = 1,2,5. Then, there exist [[n,n − 2d + c + 2,d;c]]q EAQMDS codes, where the values of q,n,d,c can be found in Table 2.

Table 2 The values of n,d,c in Example 2

4 Entanglement-Assisted Quantum MDS Codes Derived from Constacyclic Codes

In this section, we will construct two classes of EAQMDS codes with length \(n=\frac {q^{2}+1}{13}\) by α-constacyclic codes, where q is an odd prime power and r = ord(α) = q + 1. Before our construction, we need the following lemma.

Lemma 4

Let \(n=\frac {q^{2}+1}{13}\) and \(s=\frac {q^{2}+1}{2}\). Then the all q2-cyclotomic cosets modulo rn containing s + ir are: Cs = {s}, \(C_{s+\frac {rn}{2}}=\{s+\frac {rn}{2}\}\), Cs+i = {s + ir,sir}, where \(1\leq i\leq \frac {q-1}{2}\) and Cs+i = {s + ir,rn + sir}, where \(\frac {q+1}{2}\leq i\leq \frac {n}{2}-1\).

In the following part of this section, we will construct two classes of EAQMDS codes by using constacyclic codes.

4.1 The Case q = 26m + 5

Using Lemma 4, we can obtain the constacyclic codes with the following parameters.

Lemma 5

Let q,n,s be defined as above, and q = 26m + 5,(m ≥ 1). Assume \({\mathscr{C}}\) is a constacyclic code with defining set D and D has the decomposition D = D1D2. Then there exist some constacyclic codes with following parameters:

  1. (1)

    If 1 ≤ t ≤ 5m + 1, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 0.

  2. (2)

    If 5m + 2 ≤ t ≤ 9m + 2, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 4.

  3. (3)

    If 9m + 3 ≤ t ≤ 11m + 2, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 8.

Proof

Since q = 26m + 5, then \(n=\frac {q^{2}+1}{13}=52m^{2}+20m+2\) and \(s=\frac {q^{2}+1}{2}=338m^{2}+130m+13=1+(13m+2)r\). Let s1 = 13m + 2, then s = 1 + rs1. From Lemma 1 we know that Cs = {s} and Cs+i = {s + i,si}, where \(1\leq i\leq \frac {q-1}{2}\). Let \(D=\bigcup \limits _{i=0}^{t-1}C_{s+ir}\), then D = {s + ir|1 − tit − 1}. If i = 0, it is easy to prove \(-qC_{s}=C_{s+\frac {rn}{2}}\). If i≠ 0, then

$$ \begin{array}{@{}rcl@{}} -q(s+ir)&=&-\frac{q(q^{2}+1)}{2}-iq(q+1)=-\frac{(q+1)(q^{2}+1)}{2}-iq(q+1)+\frac{q^{2}+1}{2}\\ &\equiv&(q+1)\frac{q^{2}+1}{26}-iq(q+1)+(q+1)(13m+2)+1\\ &\equiv&1+(26m^{2}+23m+3-26mi-5i)r\pmod{rn}. \end{array} $$

Let Δi be an integer, which satisfies 1 ≤ 1 + rΔirn and − q(s + ir) ≡ 1 + rΔi (mod n). And then we have the following cases to discuss the value of Δi:

  • Case 1. If 0 ≤ im, then Δi = 26(mi)m + 23m − 5i + 3. Therefore, it is easy to get that |Δis1|≥ 5m + 1, and the equality holds if and only if i = m.

  • Case 2. If m + 1 ≤ i ≤ 3m + 1, then Δi = 26(3mi)m + 43m − 5i + 5. Therefore, it is easy to get that |Δis1|≥ 11m + 2, and the equality holds if and only if i = 3m + 1.

  • Case 3. If 3m + 2 ≤ i ≤ 5m + 1, then Δi = 26(5mi)m + 63m − 5i + 7. Therefore, it is easy to get that |Δis1|≥ m, and the equality holds if and only if i = 5m + 1.

  • Case 4. If 5m + 2 ≤ i ≤ 7m + 1, then Δi = 26(7mi)m + 83m − 5i + 9. Therefore, it is easy to get that |Δis1|≥ 9m + 2, and the equality holds if and only if i = 7m + 1.

  • Case 5. If 7m + 2 ≤ i ≤ 9m + 2, then Δi = 26(9mi)m + 103m − 5i + 11. Therefore, it is easy to get that |Δis1|≥ 7m + 1, and the equality holds if and only if i = 9m + 2.

  • Case 6. If 9m + 3 ≤ i ≤ 11m + 2, then Δi = 26(9mi)m + 103m − 5i + 11. Therefore, it is easy to get that |Δis1|≥ 3m + 1, and the equality holds if and only if i = 11m + 2.

In conclusion, if 1 ≤ t ≤ 5m + 1, we can easily get \(D_{1}=D\cap -qD=\varnothing \) and |D1| = 0. If 5m + 2 ≤ t ≤ 9m + 2, we can easily get D1 = D ∩−qD = Cs+mrCs+(5m+ 1)r and |D1| = 4. If 9m + 3 ≤ t ≤ 11m + 2, we can easily get D1 = D ∩−qD = Cs+mrCs+(5m+ 1)rCs+(7m+ 1)rCs+(9m+ 2)r and |D1| = 8. In addition, from Propositions 2 and 3, we can get the code \({\mathscr{C}}\) have parameters [n,n − 2t + 1,2t]. □

Using the constacyclic codes constructed by Lemma 2 and Proposition 4, we can obtain the following EAQMDS codes.

Theorem 3

Let m ≥ 1,t,d be integers and q = 26m + 5 be an odd prime power. Then, there exist [[n,n − 2d + 2 + c,d;c]]q EAQMDS codes if one of the following holds:

  1. (1)

    \(n=\frac {q^{2}+1}{13}\), c = 0, 2 ≤ d ≤ 10m + 2 and d is even.

  2. (2)

    \(n=\frac {q^{2}+1}{13}\), c = 4, 10m + 4 ≤ d ≤ 18m + 4 and d is even.

  3. (3)

    \(n=\frac {q^{2}+1}{13}\), c = 8, 18m + 6 ≤ d ≤ 22m + 4 and d is even.

Example 3

Let m = 1,3,4. Then, there exist [[n,n − 2d + c + 2,d;c]]q EAQMDS codes, where the values of q,n,d,c can be found in Table 3.

Table 3 The values of n,d,c in Example 3

4.2 The Case q = 26m + 21

Similar to Lemma 5, we can obtain the constacyclic codes with the following parameters.

Lemma 6

Let q,n,s be defined as above, and q = 26m + 21,(m ≥ 1). Assume \({\mathscr{C}}\) is a constacyclic code with defining set D and D has the decomposition D = D1D2. Then there exist some constacyclic codes with following parameters:

  1. (1)

    If 1 ≤ t ≤ 5m + 4, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 0.

  2. (2)

    If 5m + 5 ≤ t ≤ 9m + 7, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 4.

  3. (3)

    If 9m + 8 ≤ t ≤ 11m + 9, then the code \({\mathscr{C}}\) has parameters [n,n − 2t + 1,2t] and |D1| = 8.

Proof

Since q = 26m + 21, then \(n=\frac {q^{2}+1}{13}=52m^{2}+84m+34\) and \(s=\frac {q^{2}+1}{2}=338m^{2}+546m+221=1+(13m+10)r\). Let s1 = 13m + 10, then s = 1 + rs1. From Lemma 2 we know that Cs = {s} and Cs+i = {s + i,si}, where \(1\leq i\leq \frac {q-1}{2}\). Let \(D=\bigcup \limits _{i=0}^{t-1}C_{s+ir}\), then D = {s + ir|1 − tit − 1}. If i = 0, it is easy to prove \(-qC_{s}=C_{s+\frac {rn}{2}}\). If i≠ 0, then

$$ \begin{array}{@{}rcl@{}} -q(s+ir)&=&-\frac{q(q^{2}+1)}{2}-iq(q+1)=-\frac{(q+1)(q^{2}+1)}{2}-iq(q+1)+\frac{q^{2}+1}{2}\\ &\equiv&(q+1)\frac{q^{2}+1}{26}-iq(q+1)+(q+1)(13m+10)+1\\ & \equiv&1+(26m^{2}+55m+27-26mi-21i)r\pmod{rn}. \end{array} $$

Let Δi be an integer, which satisfies 1 ≤ 1 + rΔirn and − q(s + ir) ≡ 1 + rΔi (mod n). And then we have the following cases to discuss the value of Δi:

  • Case 1. If 0 ≤ im + 1, then Δi = 26(mi)m + 55m − 21i + 27. Therefore, it is easy to get that |Δis1|≥ 5m + 4, and the equality holds if and only if i = m + 1.

  • Case 2. If m + 2 ≤ i ≤ 3m + 2, then Δi = 26(3mi)m + 139m − 21i + 61. Therefore, it is easy to get that |Δis1|≥ 11m + 9, and the equality holds if and only if i = 3m + 2.

  • Case 3. If 3m + 3 ≤ i ≤ 5m + 4, then Δi = 26(5mi)m + 223m − 21i + 95. Therefore, it is easy to get that |Δis1|≥ m + 1, and the equality holds if and only if i = 5m + 4.

  • Case 4. If 5m + 5 ≤ i ≤ 7m + 6, then Δi = 26(7mi)m + 307m − 21i + 129. Therefore, it is easy to get that |Δis1|≥ 9m + 7, and the equality holds if and only if i = 7m + 6.

  • Case 5. If 7m + 7 ≤ i ≤ 9m + 7, then Δi = 26(9mi)m + 391m − 21i + 163. Therefore, it is easy to get that |Δis1|≥ 7m + 6, and the equality holds if and only if i = 9m + 7.

  • Case 6. If 9m + 8 ≤ i ≤ 9m + 7, then Δi = 26(9mi)m + 475m − 21i + 197. Therefore, it is easy to get that |Δis1|≥ 3m + 2, and the equality holds if and only if i = 11m + 9.

In conclusion, if 1 ≤ t ≤ 5m + 4, we can easily get \(D_{1}=D\cap -qD=\varnothing \) and |D1| = 0. If 5m + 5 ≤ t ≤ 9m + 7, we can easily get D1 = D ∩−qD = Cs+(m+ 1)rCs+(5m+ 4)r and |D1| = 4. If 5m + 5 ≤ t ≤ 9m + 7, we can easily get D1 = D ∩−qD = Cs+(m+ 1)rCs+(5m+ 4)rCs+(7m+ 6)rCs+(9m+ 7)r and |D1| = 8. In addition, from Propositions 2 and 3, we can get the code \({\mathscr{C}}\) have parameters [n,n − 2t + 1,2t]. □

Using the constacyclic codes constructed by Lemma 2 and Proposition 4, we can obtain the following EAQMDS codes.

Theorem 4

Let m ≥ 1,t,d be integers and q = 26m + 21 be an odd prime power. Then, there exist [[n,n − 2d + 2 + c,d;c]]q EAQMDS codes if one of the following holds:

  1. (1)

    \(n=\frac {q^{2}+1}{13}\), c = 0, 2 ≤ d ≤ 10m + 8 and d is even.

  2. (2)

    \(n=\frac {q^{2}+1}{13}\), c = 4, 10m + 10 ≤ d ≤ 18m + 14 and d is even.

  3. (3)

    \(n=\frac {q^{2}+1}{13}\), c = 8, 18m + 16 ≤ d ≤ 22m + 18 and d is even.

Example 4

Let m = 1,2,5. Then, there exist [[n,n − 2d + c + 2,d;c]]q EAQMDS codes, where the values of q,n,d,c can be found in Table 4.

Table 4 The values of n,d,c in Example 4

Remark 1

By comparison, we can see that the codes constructed in Section 3 have larger minimum distance, and the codes constructed in Section 4 have smaller numbers of preshared maximally entangled states.

To be more specific, in the case q = 26m + 5, compared with Throrem 1, the codes constructed in Theorem 3 have smaller numbers of preshared maximally entangled states if the minimum distance d satisfy 2 ≤ d ≤ 10m + 2, 12m + 4 ≤ d ≤ 18m + 4 or 20m + 6 ≤ d ≤ 22m + 4, otherwise, the codes constructed in Theorem 3 have smaller numbers of preshared maximally entangled states.

In the case q = 26m + 21, compared with Throrem 2, the codes constructed in Theorem 4 have smaller numbers of preshared maximally entangled states if the minimum distance d satisfy 2 ≤ d ≤ 10m + 8, 12m + 12 ≤ d ≤ 18m + 14 or 20m + 18 ≤ d ≤ 22m + 18, otherwise, the codes constructed in Theorem 4 have smaller numbers of preshared maximally entangled states.

5 Code Comparisons and Conclusions

In this paper, we constructed four classes of EAQMDS codes from cyclic codes and constacyclic codes with length \(\frac {q^{2}+1}{13}\). According to the entanglement-assisted quantum Singleton bound, the resulting EAQMDS codes are optimal. In Tables 5 and 6, we list the EAQMDS codes constructed in the literatures with length \(n=\frac {q^{2}+1}{a}(a>1)\).

Table 5 Quantum MDS codes with length \(\frac {q^{2}+1}{a}\)
Table 6 Quantum MDS codes with length \(\frac {q^{2}+1}{a}\)

In Theorem 2 of [12], Fan et al. constructed a class of EAQMDS codes with parameters [[n,n − 2d + 3,d;1]]q, where n|q2 + 1 and \(2\leq d\leq 2\lfloor \frac {n}{q+1}\rfloor +2\) is even integer. Let \(n=\frac {q^{2}+1}{13}\), we have 2 ≤ d ≤ 4m + 2 or 2 ≤ d ≤ 4m + 4, where q = 26m + 5 or q = 26m + 21. It means that the EAQMDS codes constructed by Theorems 1 and 2 have larger minimum distance.

Chen et al. constraucted some classes of EAQMDS codes with length \(n=\frac {q^{2}+1}{\alpha }\), where α = t2 + 1 and q = αm + t or q = αm + αt. Since 13 cannot be expressed as t2 + 1, it’s different from the codes we constructed.

In Theorem 3.2 of [34], Jin et al. constructed a class of EAQMDS codes with parameters [[n,n − 4mq + 4q + 4m2 − 8m + 3,2(m − 1)q + 2;4(m − 1)2 + 1]]q, where \(n=\frac {q^{2}+1}{t}\) and \(2\leq m\leq \lfloor \frac {q+1}{4t}\rfloor \). If m = 2, then d = 2q + 2. It’s different from the codes we construct.

In Theorem 3.4 of [35], Lu et al. constructed a class of quantum MDS codes with parameters \([[\frac {q^{2}+1}{13},\frac {q^{2}+1}{13}-2d+d,d]]_{q}\), where 2 ≤ d ≤ 10m + 2 is even for q with the form of 26m + 5; and 2 ≤ d ≤ 10m + 8 is even for q with the form of 26m + 21. Theorems 3 and 4 contain these quantum codes, besides the EAQMDS codes we constructed are new.

In Corollary 8 of [36], Grassl et al. presented a link between a QMDS code and an EAQMDS code: Any QMDS code with parameters [[n,n − 2d + 2,d]]q gives rise to an EAQMDS code with the parameters [[nl,n − 2d + 2,d;l]]q for all l < d. In fact, no QMDS code with length \(n=\frac {q^{2}+1}{13}+l\) and maximum distance \(d\geq \frac {q}{2}\) has been constructed, where l = 4,5,8,9. Therefore, when maximum distance \(d\geq \frac {q}{2}\) the EAQMDS codes we constructed are new.

In conclusion, most of these q-ary EAQMDS codes we constructed are new in the sense that their parameters are not covered by the codes available in the literature.

Constacyclic code is a powerful tool for constructing EAQMDS codes. In the future work, we look forward to getting more EAQMDS codes with large minimum distance from constacyclic codes.