1 Introduction

Quantum error-correcting codes play an important role in quantum computations and quantum communications. In [4, 5], Calderbank et al. found that we can construct quantum codes from classical self-orthogonal codes over \(\mathbb {F}_{2}\) or \(\mathbb {F}_{4}\) with respect to certain inner product. This was then generalized to the nonbinary case in [2, 20]. Thereafter, many quantum codes have been constructed by classical linear codes with Euclidean or Hermitian self-orthogonality [1, 6, 21].

Let q be a prime power, an \([[n,k,d]]_{q}\) quantum code is a \(q^{k}\)-dimensional subspace of \(\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 in classical coding theory, one of the central tasks in quantum coding theory is to construct quantum codes with good parameters. The following theorem gives a bound on the achievable minimum distance of a quantum code.

Theorem 1.1

([15, 16] Quantum Singleton Bound) Quantum codes with parameters \([[n,k,d]]_{q}\) satisfy

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

A quantum code achieving this bound is called a quantum maximum-distance-separable (MDS) code. Just as in the classical linear codes, quantum MDS codes form an important family of quantum codes. Constructing quantum MDS codes has become a central topic for quantum codes in recent years. There are many methods to construct quantum codes, and the following theorem is one of the most frequently used construction methods since we can obtain quantum MDS codes with length larger than \(q+1\).

Theorem 1.2

([2] Hermitian Construction) If C is an \([n,k,d]_{q^{2}}\)-linear code such that \(C^{\bot H}\subseteq C\), then there exists an \([[n,2k-n,\ge d]]_{q}\)-quantum code.

For the quantum MDS codes, we have the following corollary.

Corollary 1.3

There is an \([[n,n-2k,k+1]]_{q}\) quantum MDS code whenever there exists a classical Hermitian self-orthogonal \([n,k,n-k+1]_{q^{2}}\)-MDS code.

There have been many papers on the construction of quantum MDS codes (see [3, 714, 1719, 23, 24] and the references therein). However, it is not an easy task to construct quantum MDS codes with length \(n>q+1\) and minimum distance \(d>\frac{q}{2}\). In this paper, we construct some new quantum MDS codes with minimum distance \(d>\frac{q}{2}\) through classical Hermitian self-orthogonal generalized Reed–Solomon codes.

This paper is organized as follows. In Sect. 2 we recall the basics about linear codes and some properties of generalized Reed–Solomon codes. In Sects. 345 and 6, we give seven new classes of quantum MDS codes from generalized Reed–Solomon codes. Section 7 concludes the paper.

2 Preliminaries

Throughout this paper, let \(\mathbb {F}_{q}\) be the finite field with q elements and \(\mathbb {F}_{q}^{*}\) be the multiplicative group of nonzero elements of \(\mathbb {F}_{q}\), where q is a prime power. A linear \([n,k]_{q}\) code C over \(\mathbb {F}_{q}\) is a k-dimensional subspace of \(\mathbb {F}_{q}^{n}\). The weight \(\text{ wt }(x)\) of a codeword \(x\in C\) is the number of nonzero components of x. The distance of two codewords \(x,y\in C\) is \(d(x,y)=\text{ wt }(x-y)\). The minimum distance d of C is the minimum distance between any two distinct codewords of C. An \([n,k,d]_{q}\) code is an \([n,k]_{q}\) code with the minimum distance d.

Given two vectors \(x=(x_{0},x_{1},\ldots ,x_{n-1}),\ y=(y_{0},y_{1},\ldots ,y_{n-1})\in \mathbb {F}_{q}^{n}\), there are two inner products we are interested in. One is the Euclidean inner product which is defined as \(\langle x,y\rangle _{E}=\sum _{i=0}^{n-1}x_{i}y_{i}.\) When \(q=l^{2}\), where l is a prime power, then we can also consider the Hermitian inner product which is defined by \(\langle x,y\rangle _{H}=\sum _{i=0}^{n-1}x_{i}y_{i}^{l}.\) The Euclidean dual code of C is defined as

$$\begin{aligned} C^{\bot E}=\{x\in \mathbb {F}_{q}^{n}|\ \langle x,y\rangle _{E}=0 \text{ for } \text{ all } y\in C\}. \end{aligned}$$

Similarly the Hermitian dual code of C is defined as

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

A linear code C is called Euclidean (Hermitian) self-orthogonal if \(C\subseteq C^{\bot E}\) (\(C\subseteq C^{\bot H}\), respectively).

For a vector \(x=(x_{1},\ldots ,x_{n})\in \mathbb {F}_{q^{2}}^{n}\), let \(x^{i}=(x_{1}^{i},\ldots ,x_{n}^{i})\). For a subset S of \(\mathbb {F}_{q^{2}}^{n}\), we define \(S^{q}\) to be the set \(\{x^{q}|\ x\in S\}\). Then it is easy to see that for a linear code C over \(\mathbb {F}_{q^{2}}\), we have \(C^{\bot H}=(C^{q})^{\bot E}\). Therefore, C is Hermitian self-orthogonal if and only if \(C\subseteq (C^{q})^{\bot E}\), i.e., \(C^{q}\subseteq C^{\bot E}\).

Now we recall the basics of generalized Reed–Solomon codes. Choose n distinct elements \(a_{1},\ldots ,a_{n}\) of \(\mathbb {F}_{q}\) and n nonzero elements \(v_{1},\ldots ,v_{n}\) of \(\mathbb {F}_{q}\). For \(1\le k\le n\), we define the code

$$\begin{aligned} \text{ GRS }_{k}(\mathbf {a},\mathbf {v}):=\{(v_{1}f(a_{1}),\ldots ,v_{n}f(a_{n}))|\ f(x)\in \mathbb {F}_{q}[x] \text{ and } \text{ deg }(f(x))<k\}, \end{aligned}$$

where \(\mathbf {a}=(a_{1},\ldots ,a_{n})\) and \(\mathbf {v}=(v_{1},\ldots ,v_{n})\). The code \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\) is called a generalized Reed–Solomon code over \(\mathbb {F}_{q}\). It is well known that a generalized Reed–Solomon code \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\) is an MDS code with parameters \([n,k,n-k+1]_{q}\). The following lemma presents a criterion to determine whether or not a generalized Reed–Solomon code is Hermian self-orthogonal.

Lemma 2.1

Let \(\mathbf {a}=(a_{1},\ldots ,a_{n})\in \mathbb {F}_{q^{2}}^{n}\) and \(\mathbf {v}=(v_{1},\ldots ,v_{n})\in (\mathbb {F}_{q^{2}}^{*})^{n}\), then \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot H}\) if and only if \(\langle \mathbf {a}^{qj+l},\mathbf {v}^{q+1}\rangle _{E} =0\) for all \(0\le j,l\le k-1\).

Proof

Note that \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot H}\) if and only if \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{q}\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot E}\). It is obvious that \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{q}\) has a basis \(\{(v_{1}^{q}a_{1}^{iq},\ldots ,v_{n}^{q}a_{n}^{iq})|0\le i\le k-1\}\), and \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\) has a basis \(\{(v_{1}a_{1}^{i},\ldots ,v_{n}^{}a_{n}^{i})|0\le i\le k-1\}\). So \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{q}\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot E}\) if and only if \(\sum _{i=1}^{n}v_{i}^{q+1}a_{i}^{qj+l}=0\) for all \(0\le j,l\le k-1\). \(\square \)

Note that Lemma 2.1 is just a special case of the so-called puncture code that has been introduced by Rains [20], but Lemma 2.1 is enough for our constructions.

3 q-ary quantum MDS codes, where \(q=2am+1\)

In this section, we consider q-ary quantum MDS codes, where \(q=2am+1\). We need the following lemma for our construction.

Lemma 3.1

Let q be an odd prime power with the form \(2am+1\), \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\) and \(n=\frac{q^{2}-1}{2a}\). Suppose \(\mathbf {a}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{2na+t})\in \mathbb {F}_{q^{2}}^{n}\) and \(\mathbf {u}=(1,\omega ^{a},\ldots ,\omega ^{(n-1)a})\in \mathbb {F}_{q^{2}}^{n}\). Then we have \(\langle \mathbf {a}_{t}^{qj+l},\mathbf {u}^{q+1}\rangle _{E}=0\) for any \(0\le j,l\le (a+1)m-1\).

Proof

For any \(0\le j,l\le (a+1)m-1\), we have

$$\begin{aligned}&\big \langle \mathbf {a}_{t}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=0}^{n-1}\omega ^{[2a(i+1)+t](qj+l)}\omega ^{ia(q+1)}\\&\quad =\omega ^{(t+2a)(qj+l)}\sum _{i=0}^{n-1}\omega ^{2ai\big (qj+l+\frac{q+1}{2}\big )}. \end{aligned}$$

We claim that \(2a(qj+l+\frac{q+1}{2})\not \equiv 0\pmod {q^{2}-1}\). Otherwise \(qj+l=r\frac{q+1}{2}\), we get \(m(q+1)|\frac{r+1}{2}(q+1)\). Then there exists an integer \(r_{1}\) such that \(r=2mr_{1}-1\). Hence \(qj+l=(2mr_{1}-1)\frac{q+1}{2}=mr_{1}q+(r_{1}-a)m-1=(mr_{1}-1)q+(a+r_{1})m\), contradicting to the fact that \(0\le j,l\le (a+1)m-1\). Then we get

$$\begin{aligned}&\big \langle \mathbf {a}_{t}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E} \\&\quad =\omega ^{(t+2a)(qj+l)}\sum _{i=0}^{n-1}\omega ^{2ai\big (qj+l+\frac{q+1}{2}\big )}\\&\quad =0. \end{aligned}$$

\(\square \)

Now, we have the following theorem.

Theorem 3.2

Let q be an odd prime power with the form \(2am+1\). Then for each \(1\le b\le 2a\), there exists a \([[bm(q+1),bm(q+1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m+1\).

Proof

Let \(\mathbf {a}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{2na+t})\in \mathbb {F}_{q^{2}}^{n}\) and \(\mathbf {u}=(1,\omega ^{a},\ldots ,\omega ^{(n-1)a})\in \mathbb {F}_{q^{2}}^{n}\), where \(n=m(q+1)=\frac{q^{2}-1}{2a}\). Take \(\mathbf {a}=(\mathbf {a}_{1},\mathbf {a}_{2},\ldots ,\mathbf {a}_{b})\) and \(\mathbf {v}=(\underbrace{\mathbf {u},\mathbf {u},\ldots ,\mathbf {u}}_{b \text{ times }})\).

Note that if \(\omega ^{2ai_{1}+j_{1}}=\omega ^{2ai_{2}+j_{2}}\), where \(1\le i_{1},i_{2}\le n\) and \(1\le j_{1},j_{2}\le b\), then \(i_{1}=i_{2}\) and \(j_{1}=j_{2}\). Hence the elements of the vector \(\mathbf {a}\) are mutually distinct.

Then for \(0\le j,l\le (a+1)m-1\), by Lemma 3.1, we have

$$\begin{aligned}&\big \langle \mathbf {a}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{b}\big \langle \mathbf {a}_{i}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E}\\&\quad =0. \end{aligned}$$

Hence \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot H}\) for \(1\le k\le (a+1)m\). Then by Corollary 1.3, the conclusion follows. \(\square \)

In particular, taking \(b=1\), we obtain the following corollary which is one of the main results in [7, 24].

Corollary 3.3

Let q be an odd prime power with the form \(2am+1\). Then there exists an \([[m(q+1),m(q+1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m+1\).

The elements of \(\mathbf {a}_{t}\) in Lemma 3.1 form a coset of a subgroup of \(\mathbb {F}_{q^{2}}^{*}\). The following lemma is similar to Lemma 3.1, which takes the vector obtained by deleting \(q+1\) elements from \(\mathbf {a}_{t}\).

Lemma 3.4

Let q be an odd prime power with the form \(2am+1\), \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\) and \(n=\frac{q^{2}-1}{2a}-q-1\). Let \(\mathbf {b}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{q-1-2a+t},\omega ^{q-1+2a+t},\ldots ,\omega ^{2q-2-2a+t},\ldots , \omega ^{q^{2}-q+2a+t}, \cdots ,\omega ^{q^{2}-1-2a+t})\in \mathbb {F}_{q^{2}}^{n}\). Then there exists \(\mathbf {w}\in (\mathbb {F}_{q^{2}}^{*})^{n}\) such that \(\langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\rangle _{E}=0\) for any \(0\le j,l\le (a+1)m-2\).

Proof

Let A be an \((m-2)\times (m-1)\) matrix with \(A_{ij}=\omega ^{aj(q+1)(2i-1)}\in \mathbb {F}_{q}\) for \(1\le i\le m-2\) and \(1\le j\le m-1\). Then there exists \(\mathbf {c}\in \mathbb {F}_{q}^{m-1}\) such that \(A\cdot \mathbf {c}^{t}=0\). Note that by deleting the \(j'\)-th column from matrix A, the remaining matrix is a Vandermonde matrix multiplied by \(\prod _{j\ne j'}\omega ^{aj(q+1)}\), hence all coordinates of \(\mathbf {c}\) are nonzero. So we can represent \(\mathbf {c}\) as \(\mathbf {c}=(\omega ^{a_{1}(q+1)},\ldots ,\omega ^{a_{m-1}(q+1)})\).

Now let \(\mathbf {w}_{i}=(\omega ^{a_{1}+i\frac{q-1}{2}},\ldots ,\omega ^{a_{m-1}+i\frac{q-1}{2}})\) and \(\mathbf {w}=(\mathbf {w}_{0},\mathbf {w}_{1},\ldots ,\mathbf {w}_{q})\). Then for \(0\le j,l\le (a+1)m-2\), we have

$$\begin{aligned}&\big \langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{m-1}\omega ^{a_{i}(q+1)}\sum _{s=0}^{\frac{q-1}{2}}\omega ^{[2s(q-1)+t+2ai](qj+l)}-\sum _{i=1}^{m-1}\omega ^{a_{i}(q+1)}\sum _{s=0}^{\frac{q-1}{2}}\omega ^{[2s(q-1)+q-1+t+2ai](qj+l)}\\&\quad =\omega ^{t(qj+l)}\left( 1-\omega ^{(q-1)(qj+l)}\right) \sum _{i=1}^{m-1}\omega ^{a_{i}(q+1)+2ai(qj+l)}\sum _{s=0}^{\frac{q-1}{2}}\omega ^{2s(q-1)(qj+l)}. \end{aligned}$$

Note that

$$\begin{aligned} \sum _{s=0}^{\frac{q-1}{2}}\omega ^{2s(q-1)(qj+l)}={\left\{ \begin{array}{ll}0;&{} \,\, \text{ if } \frac{q+1}{2}\not \mid (qj+l),\\ \frac{q+1}{2};&{} \,\,\text { if }\frac{q+1}{2}|(qj+l).\end{array}\right. } \end{aligned}$$

Now assume \(qj+l=r\frac{q+1}{2}\). If r is even, then \(\omega ^{(q-1)(qj+l)}=1\), and hence \(\langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\rangle _{E}=0\).

If r is odd, then we claim that \(r\not \equiv 2m-1\pmod {2m}\). Otherwise, let \(r=2mx+2m-1\), then \(qj+l=(2mx+2m-1)\frac{q+1}{2}=[(x+1)m-1]q+(a+x+1)m\), contradicting to the fact that \(0\le j,l\le (a+1)m-2\). Therefore \(2a(qj+l)\pmod {q^2-1}\in \{ar(q+1)|1\le r\le 2m-3,\ r \text{ is } \text{ odd }\}\). We have

$$\begin{aligned}&\big \langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E} \\&\quad =\frac{q+1}{2}\omega ^{t(qj+l)}\left( 1-\omega ^{(q-1)(qj+l)}\right) \sum _{i=1}^{m-1}\omega ^{a_{i}(q+1)+2ai(qj+l)}\\&\quad =0, \end{aligned}$$

where the last equality follows from the definition of vector \(\mathbf {c}\). \(\square \)

From Lemmas 3.1 and  3.4, we have the following theorem.

Theorem 3.5

Let q be an odd prime power with the form \(2am+1\). Then for integers bc such that \(b,c\ge 0\), \(1\le b+c\le 2a\) and \(b\ge 1\) or \(m\ge 2\), there exists a \([[(bm+c(m-1))(q+1),(bm+c(m-1))(q+1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m\).

Proof

Let \(\mathbf {a}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{2n_{1}a+t})\in \mathbb {F}_{q^{2}}^{n_{1}}\), \(\mathbf {u}=(1,\omega ^{a},\ldots ,\omega ^{(n_{1}-1)a})\in \mathbb {F}_{q^{2}}^{n_{1}}\), \(\mathbf {b}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots , \omega ^{q-1-2a+t},\omega ^{q-1+2a+t},\ldots ,\omega ^{2q-2-2a+t},\ldots ,\omega ^{q^{2}-q+2a+t},\ldots ,\omega ^{q^{2}-1-2a+t})\in \mathbb {F}_{q^{2}}^{n_{2}}\), and \(\mathbf {w}\) be the vector defined in Lemma 3.4 with length \(n_{2}\), where \(n_{1}=m(q+1)=\frac{q^{2}-1}{2a}\) and \(n_{2}=(m-1)(q+1)=\frac{q^{2}-1}{2a}-q-1\). Take \(\mathbf {a}=(\mathbf {a}_{1},\mathbf {a}_{2},\ldots ,\mathbf {a}_{b},\mathbf {b}_{b+1},\mathbf {b}_{b+2},\ldots ,\mathbf {b}_{b+c})\) and \(\mathbf {v}=(\underbrace{\mathbf {u},\mathbf {u},\ldots ,\mathbf {u}}_{b \text{ times }},\underbrace{\mathbf {w},\mathbf {w},\ldots ,\mathbf {w}}_{c \text{ times }})\).

Note that if \(\omega ^{2ai_{1}+j_{1}}=\omega ^{2ai_{2}+j_{2}}\), where \(1\le i_{1},i_{2}\le n\) and \(1\le j_{1},j_{2}\le b\), then \(i_{1}=i_{2}\) and \(j_{1}=j_{2}\). Hence the elements of the vector \(\mathbf {a}\) are mutually distinct.

Then for \(0\le j,l\le (a+1)m-2\), by Lemmas 3.1 and 3.4, we have

$$\begin{aligned}&\big \langle \mathbf {a}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{b}\big \langle \mathbf {a}_{i}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E}+\sum _{i=b+1}^{b+c}\big \langle \mathbf {b}_{i}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E}\\&\quad =0. \end{aligned}$$

Hence \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot H}\) for \(1\le k\le (a+1)m-1\). Then by Corollary 1.3, the conclusion follows. \(\square \)

4 q-ary quantum MDS codes, where \(q=2am-1\)

In this section, we consider q-ary quantum MDS codes, where \(q=2am-1\). We first prove the following lemma.

Lemma 4.1

Let q be an odd prime power with the form \(2am-1\), \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\) and \(n=\frac{q^{2}-1}{2a}\). Suppose \(\mathbf {a}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{2na+t})\in \mathbb {F}_{q^{2}}^{n}\) and \(\mathbf {u}=(1,\omega ^{2a-1},\omega ^{2(2a-1)},\ldots , \omega ^{(n-1)(2a-1)})\in \mathbb {F}_{q^{2}}^{n}\). Then we have \(\langle \mathbf {a}_{t}^{qj+l},\mathbf {u}^{q+1}\rangle _{E}=0\) for \(0\le j,l\le (a+1)m-3\).

Proof

For any \(0\le j,l\le (a+1)m-3\), we have

$$\begin{aligned}&\big \langle \mathbf {a}_{t}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=0}^{n-1}\omega ^{(2a-1)i(q+1)}\omega ^{[t+2a(i+1)](qj+l)}\\&\quad =\omega ^{(t+2a)(qj+l)}\sum _{i=0}^{n-1}\omega ^{i[(q+1)(2a-1)+2a(qj+l)]}. \end{aligned}$$

We claim that \((q+1)(2a-1)+2a(qj+l)\not \equiv 0\pmod {q^{2}-1}\). Otherwise, \(\frac{q+1}{2a}|(qj+l)\), then let \(qj+l=r\frac{q+1}{2a}\). We get \((q^{2}-1)|(q+1)(r+2a-1)\), then \((q-1)|(r+2a-1)\). There exists an integer \(r_{1}\) such that \(r=r_{1}(q-1)-2a+1\). Then we have \(qj+l=rm=[r_{1}(q-1)-2a+1]m=(r_{1}m-2)q+(2a+1-r_{1})m-2\), this contradicts to the fact that \(0\le j,l\le (a+1)m-3\). We have

$$\begin{aligned}&\big \langle \mathbf {a}_{t}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E}\\&\quad =\omega ^{(t+2a)(qj+l)}\sum _{i=0}^{n-1}\omega ^{i[(q+1)(2a-1)+2a(qj+l)]}\\&\quad =\omega ^{(t+2a)(qj+l)}\sum _{i=0}^{n-1}\omega ^{2ai\big [\frac{(q+1)(2a-1)}{2a}+(qj+l)\big ]}\\&\quad =0. \end{aligned}$$

\(\square \)

Now, we have the following theorem.

Theorem 4.2

Let q be an odd prime power with the form \(2am-1\). Then for each \(1\le b\le 2a\), there exists a \([[bm(q-1),bm(q-1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m-1\).

Proof

Let \(\mathbf {a}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{2na+t})\in \mathbb {F}_{q^{2}}^{n}\) and \(\mathbf {u}=(1,\omega ^{2a-1},\omega ^{2(2a-1)},\ldots ,\omega ^{(n-1)(2a-1)})\in \mathbb {F}_{q^{2}}^{n}\), where \(n=m(q-1)=\frac{q^{2}-1}{2a}\). Take \(\mathbf {a}=(\mathbf {a}_{1},\mathbf {a}_{2},\ldots ,\mathbf {a}_{b})\) and \(\mathbf {v}=(\underbrace{\mathbf {u},\mathbf {u},\ldots ,\mathbf {u}}_{b \text{ times }})\).

Note that if \(\omega ^{2ai_{1}+j_{1}}=\omega ^{2ai_{2}+j_{2}}\), where \(1\le i_{1},i_{2}\le n\) and \(1\le j_{1},j_{2}\le b\), then \(i_{1}=i_{2}\) and \(j_{1}=j_{2}\). Hence the elements of the vector \(\mathbf {a}\) are mutually distinct.

Then for \(0\le j,l\le (a+1)m-3\), from Lemma 4.1, we have

$$\begin{aligned}&\big \langle \mathbf {a}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{b}\big \langle \mathbf {a}_{i}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E}\\&\quad =0. \end{aligned}$$

Hence \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot H}\) for \(1\le k\le (a+1)m-2\). Then by Corollary 1.3, the conclusion follows. \(\square \)

In particular, taking \(b=1\) or letting a be an odd integer and \(b=2\), we obtain the following two corollaries which are the main results in [22].

Corollary 4.3

Let q be an odd prime power with the form \(2am-1\). Then there exists an \([[m(q-1),m(q-1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m-1\).

Corollary 4.4

Let q be an odd prime power with the form \(2am-1\), where a is an odd integer. Then there exists a \([[2m(q-1),2m(q-1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m-1\).

In order to construct more quantum MDS codes, we need the following lemma [11].

Lemma 4.5

[11] Let A be an \((n-1)\times n\) matrix of rank \(n-1\) over \(\mathbb {F}_{q^{2}}\). Then the equation \(Ax=0\) has a nonzero solution in \(\mathbb {F}_{q}\) if and only if \(A^{(q)}\) and A are row equivalent, where \(A^{(q)}\) is obtained from A by raising every entry to its q-th power.

Then we have the following lemma.

Lemma 4.6

Let q be an odd prime power with the form \(2am-1\) and \(n=\frac{q^{2}-1}{2a}-q+1\). Suppose \(\mathbf {b}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots , \omega ^{q+1-2a+t}, \omega ^{q+1+2a+t},\ldots ,\omega ^{2q+2-2a+t},\ldots ,\omega ^{q^{2}-q-2+2a+t},\ldots ,\omega ^{q^{2}-1-2a+t})\in \mathbb {F}_{q^{2}}^{n}\). Then there exists \(\mathbf{{w}}\in (\mathbb {F}_{q^{2}}^{*})^{n}\) such that \(\langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\rangle _{E} =0\) for \(0\le j,l\le (a+1)m-4\).

Proof

Let \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\). We also let A be an \((m-2)\times (m-1)\) matrix with \(A_{ij}=\omega ^{2aj(m-3+(q-1)(i-1))}\) for \(1\le i\le m-2,\ 1\le j\le m-1\).

Since \((m-3+(q-1)(i-1))q\equiv (m-3+(q-1)(m-i-2))\pmod {q^{2}-1}\) for \(1\le i\le m-2\), then \(A^{(q)}\) and A are row equivalent. By Lemma 4.5, there exists \(\mathbf {c}\in \mathbb {F}_{q}^{m-1}\) such that \(A\cdot \mathbf {c}^{t}=0\). Note that by deleting any one column of matrix A, the remaining matrix is a Vandermonde matrix, hence all coordinates of \(\mathbf {c}\) are nonzero. So we can represent \(\mathbf {c}\) as \(\mathbf {c}=(\omega ^{a_{1}(q+1)},\ldots ,\omega ^{a_{m-1}(q+1)})\).

Now let \(\mathbf {w}=(\omega ^{a_{1}},\ldots , \omega ^{a_{m-1}},\omega ^{a_{1}-(m-3)},\ldots ,\omega ^{a_{m-1}-(m-3)},\ldots ,\omega ^{a_{1}-(m-3)(q-2)},\ldots , \omega ^{a_{m-1}-(m-3)(q-2)})\in (\mathbb {F}_{q^{2}}^{*})^{n}\). Then for \(0\le j,l \le (a+1)m-4 \), we have

$$\begin{aligned}&\big \langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E}\\&\quad =\sum _{i=1}^{m-1}\omega ^{a_{i}(q+1)+2ai(qj+l)}\sum _{s=0}^{q-2}\omega ^{(q+1)(qj+l-m+3)s}. \end{aligned}$$

Note that

$$\begin{aligned} \sum _{s=0}^{q-2}\omega ^{(q+1)(qj+l-m+3)s}=\left\{ \begin{array}{lll}0;&{} \,\,\quad \text { if }(q-1)\not \mid (qj+l-m+3),\\ q-1;&{} \,\,\quad \text { if }(q-1)|(qj+l-m+3).\end{array}\right. \end{aligned}$$

Assume \(qj+l-m+3=t(q-1)\), we claim that \(t\not \equiv m-2,m-1\pmod {m}\). Otherwise, if \(t\equiv m-2\pmod {m}\), let \(t=rm+m-2\), then \(0\le r\le a\). If \(r\le a-1\), then \(qj+l=t(q-1)+m-3=(mr+m-3)q+(q-mr-1)=(mr+m-3)q+(2a-r)m-2\) and \((2a-r)m-2>(a+1)m-4\) which is a contradiction. If \(r=a\), then \(qj+l=t(q-1)+m-3=(am+m-3)q+(am-2)\) and \(am+m-3>(a+1)m-4\), which is also a contradiction. Similarly, \(t\not \equiv m-1\pmod {m}\). Hence \(qj+l\pmod {\frac{q^{2}-1}{2a}}\in \{t(q-1)+m-3|0\le t\le m-3\}\). Thus

$$\begin{aligned}&\big \langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E} \\&\quad =(q-1)\sum _{i=1}^{m-1}\omega ^{a_{i}(q+1)+2ai(qj+l)}\\&\quad =0, \end{aligned}$$

where the last equation is from the definition of \(\mathbf {c}\). \(\square \)

Now, we can prove the following theorem.

Theorem 4.7

Let q be an odd prime power with the form \(2am-1\). Then for integers bc such that \(b,c\ge 0\), \(1\le b+c\le 2a\) and \(b\ge 1\) or \(m\ge 2\), there exists a \([[(bm+c(m-1))(q-1),(bm+c(m-1))(q-1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m-2\).

Proof

Let \(\mathbf {a}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{2n_{1}a+t})\in \mathbb {F}_{q^{2}}^{n_{1}}\), \(\mathbf {u}=(1,\omega ^{2a-1},\omega ^{2(2a-1)},\ldots ,\omega ^{(n_{1}-1)(2a-1)})\in \mathbb {F}_{q^{2}}^{n_{1}}\), \(\mathbf {b}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{q+1-2a+t}, \omega ^{q+1+2a+t},\ldots ,\omega ^{2q+2-2a+t},\ldots ,\omega ^{q^{2}-q-2+2a+t},\ldots ,\omega ^{q^{2}-1-2a+t})\in \mathbb {F}_{q^{2}}^{n_{2}}\) and \(\mathbf {w}\) be the vector defined in Lemma 4.6 with length \(n_{2}\), where \(n_{1}=\frac{q^{2}-1}{2a}\) and \(n_{2}=\frac{q^{2}-1}{2a}-q+1\). Take \(\mathbf {a}=(\mathbf {a}_{1},\mathbf {a}_{2},\ldots ,\mathbf {a}_{b},\mathbf {b}_{b+1},\mathbf {b}_{b+2},\ldots ,\mathbf {b}_{b+c})\) and \(\mathbf {v}=(\underbrace{\mathbf {u},\mathbf {u},\ldots ,\mathbf {u}}_{b \text{ times }},\underbrace{\mathbf {w},\mathbf {w},\ldots ,\mathbf {w}}_{c \text{ times }})\).

Note that if \(\omega ^{2ai_{1}+j_{1}}=\omega ^{2ai_{2}+j_{2}}\), where \(1\le i_{1},i_{2}\le n\) and \(1\le j_{1},j_{2}\le b\), then \(i_{1}=i_{2}\) and \(j_{1}=j_{2}\). Hence the elements of the vector \(\mathbf {a}\) are mutually distinct.

Then for \(0\le j,l\le (a+1)m-4\), from Lemmas 4.1 and 4.6, we have

$$\begin{aligned}&\big \langle \mathbf {a}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{b}\big \langle \mathbf {a}_{i}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E}+\sum _{i=b+1}^{b+c}\big \langle \mathbf {b}_{i}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E}\\&\quad =0. \end{aligned}$$

Hence \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot H}\) for \(1\le k\le (a+1)m-3\). Then by Corollary 1.3, the conclusion follows. \(\square \)

The following lemma is a similar result as Lemma 4.6.

Lemma 4.8

Let q be an odd prime power with the form \(2am-1\), where a is an odd integer and \(n=\frac{q^{2}-1}{a}-q+1\). Suppose \(\mathbf {b}_{t}=(\omega ^{a+t},\omega ^{2a+t},\ldots , \omega ^{q-a+1+t},\omega ^{q+a+1+t},\ldots ,\omega ^{2q+2-a+t},\ldots ,\omega ^{q^{2}-q-2+a+t}, \cdots ,\omega ^{q^{2}-1-a+t})\in \mathbb {F}_{q^{2}}^{n}\). Then there exists \(\mathbf {w}\in (\mathbb {F}_{q^{2}}^{*})^{n}\) such that \(\langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\rangle _{E}=0\) for \(0\le j,l\le (a+1)m-3\).

Proof

Let \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\). We also let A be an \((2m-2)\times (2m-1)\) matrix with \(A_{ij}=\omega ^{a(i(q-1)-1)j}\) for \(1\le i\le 2m-2,\ 1\le j\le 2m-1\).

Since \(a(i(q-1)-1)q\equiv a((2m-1-i)(q-1)-1)\pmod {q^{2}-1}\) for \(1\le i\le 2m-1\), then \(A^{(q)}\) and A are row equivalent. By Lemma 4.5, there exists \(\mathbf {c}\in \mathbb {F}_{q}^{2m-1}\) such that \(A\cdot \mathbf {c}^{t}=0\). Since by deleting any one column of matrix A, the remaining matrix is a Vandermonde matrix, then all coordinates of \(\mathbf {c}\) are nonzero. Hence we can represent \(\mathbf {c}\) as \(\mathbf {c}=(\omega ^{a_{1}(q+1)},\ldots ,\omega ^{a_{2m-1}(q+1)})\).

Now let \(\mathbf {v}=(\omega ^{a_{1}},\ldots ,\omega ^{a_{2m-1}},\omega ^{a_{1}+1},\ldots , \omega ^{a_{2m-1}+1}, \cdots ,\omega ^{a_{1}+q-2},\ldots ,\omega ^{a_{2m-1}+q-2})\in (\mathbb {F}_{q^{2}}^{*})^{n}\). Then for \(0\le j, l \le (a+1)m-4 \), we have

$$\begin{aligned}&\big \langle \mathbf {b}_{t}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{2m-1}\omega ^{a_{i}(q+1)+ia(qj+l)}\sum _{s=0}^{q-2}\omega ^{(q+1)(qj+l+1)s}. \end{aligned}$$

Note that

$$\begin{aligned} \sum _{s=0}^{q-2}\omega ^{(q+1)(qj+l+1)s}=\left\{ \begin{array}{lll}0;&{}\,\,\text { if }(q-1)\not \mid (qj+l+1),\\ q-1;&{}\,\,\text { if }(q-1)|(qj+l+1).\end{array}\right. \end{aligned}$$

Assume \(qj+l+1=t(q-1)\), then \(t\not \equiv 0,2m-1\pmod {2m}\). Otherwise, if \(t\equiv 0\pmod {2m}\), let \(t=2rm\). Then \(qj+l=t(q-1)-1=(2rm-1)q+(2a-2r)m-2\) and \(\text{ min }\{2rm-1,(2a-2r)m-2\}>(a+1)m-3\), which is a contradiction. Similarly, \(t\not \equiv 2m-1\pmod {2m}\). Thus

$$\begin{aligned}&\sum _{i=1}^{n}v_{i}^{q+1}a_{i}^{qj+l} \\&\quad =(q-1)\sum _{i=1}^{m-1}\omega ^{a_{i}(q+1)+ia(qj+l)}\\&\quad =0, \end{aligned}$$

where the last equation is from the definition of \(\mathbf {c}\). \(\square \)

Then we can immediately get the quantum codes in the following theorem.

Theorem 4.9

Let q be an odd prime power with the form \(2am-1\), where a is an odd integer. Then for integers \(c_{1},c_{2},c_{3}\) such that \(c_{1},c_{2},c_{3}\ge 0\), \(0\le c_{1}+c_{2}\le a\), \(0\le c_{1}+c_{3}\le a\) and \(c_{1}+c_{2}+c_{3}\ge 1\), there exists a \([[(c_{1}(2m-1)+(c_{2}+c_{3})m)(q-1),(c_{1}(2m-1)+(c_{2}+c_{3})m)(q-1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le (a+1)m-1\).

Proof

Let \(\mathbf {a}_{t}=(\omega ^{2a+t},\omega ^{4a+t},\ldots ,\omega ^{2n_{1}a+t})\in \mathbb {F}_{q^{2}}^{n_{1}}\), \(\mathbf {u}=(1,\omega ^{2a-1},\omega ^{2(2a-1)},\ldots ,\omega ^{(n_{1}-1)(2a-1)})\in \mathbb {F}_{q^{2}}^{n_{1}}\), \(\mathbf {b}_{t}=(\omega ^{a+t},\omega ^{2a+t},\ldots , \omega ^{q-a+1+t},\omega ^{q+a+1+t},\ldots ,\omega ^{2q+2-a+t},\ldots ,\omega ^{q^{2}-q-2+a+t},\ldots ,\omega ^{q^{2}-1-a+t})\in \mathbb {F}_{q^{2}}^{n_{2}}\) and \(\mathbf {w}\) be the vector defined in Lemma 4.8 with length \(n_{2}\), where \(n_{1}=m(q-1)=\frac{q^{2}-1}{2a}\) and \(n_{2}=(m-1)(q-1)=\frac{q^{2}-1}{a}-q+1\). Take \(\mathbf {a}=(\mathbf {b}_{1},\mathbf {b}_{2},\ldots ,\mathbf {b}_{c_{1}},\mathbf {a}_{c_{1}+1},\mathbf {a}_{c_{1}+2},\ldots ,\mathbf {a}_{c_{1}+c_{2}},\mathbf {a}_{c_{1}+a+1}, \mathbf {a}_{c_{1}+a+2},\ldots ,\mathbf {a}_{c_{1}+a+c_{3}})\) and \(\mathbf {v}=(\underbrace{\mathbf {w},\mathbf {w},\ldots ,\mathbf {w}}_{c_{1} \text{ times }},\underbrace{\mathbf {u},\mathbf {u},\ldots ,\mathbf {u}}_{c_{2}+c_{3} \text{ times }})\).

Note that if \(\omega ^{2ai_{1}+j_{1}}=\omega ^{2ai_{2}+j_{2}}\), where \(1\le i_{1},i_{2}\le n\) and \(1\le j_{1},j_{2}\le b\), then \(i_{1}=i_{2}\) and \(j_{1}=j_{2}\). Hence the elements of the vector \(\mathbf {a}\) are mutually distinct.

Then for \(0\le j,l\le (a+1)m-3\), from Lemmas 4.1 and 4.8, we have

$$\begin{aligned}&\big \langle \mathbf {a}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{c_{1}}\big \langle \mathbf {b}_{i}^{qj+l},\mathbf {w}^{q+1}\big \rangle _{E}+\sum _{i=c_{1}+1}^{c_{1}+c_{2}}\big \langle \mathbf {a}_{i}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E}+\sum _{i=c_{1}+a+1}^{c_{1}+a+c_{3}}\big \langle \mathbf {a}_{i}^{qj+l},\mathbf {u}^{q+1}\big \rangle _{E}\\&\quad =0. \end{aligned}$$

Hence \(\text{ GRS }_{k}(\mathbf {a},\mathbf {v})\subseteq \text{ GRS }_{k}(\mathbf {a},\mathbf {v})^{\bot H}\) for \(1\le k\le (a+1)m-2\). Then by Corollary 1.3, the conclusion follows. \(\square \)

5 q-ary quantum MDS codes, where \(q=2am-1\) and \(\text{ gcd }(a,m)=1\)

In this section, we consider q-ary quantum MDS codes, where \(q=2am-1\) and \(\text{ gcd }(a,m)=1\). As a preparation, we have the following lemma.

Lemma 5.1

Let q be an odd prime power with the form \(q=2am-1\), where \(\text{ gcd }(a,m)=1\). Let \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\), \(f\in \{0,1\}\), and st be integers such that \(0\le s\le m,\ 0\le t\le a-1\) and \(s+t\ge 1\). Suppose \(\mathbf {b}_{i,f}=(\omega ^{2a+i(q+1)+f},\omega ^{4a+i(q+1)+f},\ldots ,\omega ^{2as+i(q+1)+f})\), \(\mathbf {c}_{i,f}=(\omega ^{2m+i(q+1)+f},\omega ^{4m+i(q+1)+f},\ldots ,\omega ^{2mt+i(q+1)+f})\) and \(\mathbf {a}_{f}=(\mathbf {b}_{0,f},\mathbf {c}_{0,f},\mathbf {b}_{1,f},\mathbf {c}_{1,f},\ldots ,\mathbf {b}_{q-2,f}, \mathbf {c}_{q-2,f})\). Then there exists \(\mathbf {v}\in (\mathbb {F}_{q^{2}}^{*})^{(s+t)(q-1)}\) such that \(\langle \mathbf {a}_{f}^{qj+l},\mathbf {v}^{q+1}\rangle _{E}=0\) for \(0\le j,l\le am+s+t-3\).

Proof

Let \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\). We also let A be an \((s+t-1)\times (s+t)\) matrix with \(A_{ij}=\omega ^{2aj(s+t-2+(q-1)(i-1))}\) for \(1\le i\le s+t-1,\ 1\le j\le s\) and \(A_{ij}=\omega ^{2mj(s+t-2+(q-1)(i-1))}\) for \(1\le i\le s+t-1,\ s+1\le j\le s+t\).

Since \((s+t-2+(q-1)(i-1))q\equiv (s+t-2+(q-1)(s+t-1-i))\pmod {q^{2}-1}\) for \(1\le i\le s+t-1\), then \(A^{(q)}\) and A are row equivalent. By Lemma 4.5, there exists \(\mathbf {c}\in \mathbb {F}_{q}^{s+t}\) such that \(A\cdot \mathbf {c}^{t}=0\). Note that by deleting the \(j'\)-th column from matrix A, the remaining matrix is a Vandermonde matrix multiplied by \(\prod _{j_{1}\ne j'}\omega ^{2aj_{1}(s+t-2)}\prod _{j_{2}\ne j'}\omega ^{2mj_{2}(s+t-2)}\), hence all coordinates of \(\mathbf {c}\) are nonzero. So we can represent \(\mathbf {c}\) as \(\mathbf {c}=(\omega ^{e_{1}(q+1)},\ldots ,\omega ^{e_{s+t}(q+1)})\).

Now let \(\mathbf {u}_{i}=(\omega ^{e_{1}+i},\ldots ,\omega ^{e_{s+t}+i})\) and \(\mathbf {v}=(\mathbf {u}_{0},\mathbf {u}_{-(s+t-2)},\ldots ,\mathbf {u}_{-(s+t-2)(q-2)})\), then for any \(0\le j,l\le am+s+t-3\), we have

$$\begin{aligned}&\big \langle \mathbf {a}_{f}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E}\\&\quad =\sum _{i=1}^{s}\sum _{k=0}^{q-2}\omega ^{(2ai+k(q+1)+f)(qj+l)}\omega ^{(e_{i}-(s+t-2)k)(q+1)}\\&\quad \qquad +\sum _{i=1}^{t}\sum _{k=0}^{q-2}\omega ^{(2mi+k(q+1)+f)(qj+l)}\omega ^{(e_{s+i}-(s+t-2)k)(q+1)}\\&\quad =\omega ^{f(qj+l)}\left( \sum _{i=1}^{s}\omega ^{2ai(qj+l)+e_{i}(q+1)}+\sum _{i=1}^{t}\omega ^{2mi(qj+l)+e_{s+i}(q+1)}\right) \sum _{k=0}^{q-2}\omega ^{k(q+1)(qj+l-s-t+2)}. \end{aligned}$$

Note that

$$\begin{aligned} \sum _{k=0}^{q-2}\omega ^{k(q+1)(qj+l-s-t+2)}={\left\{ \begin{array}{ll}0;&{} \text{ if } (q-1)\not \mid (qj+l-s-t+2),\\ q-1;&{} \text{ if } (q-1)|(qj+l-s-t+2).\end{array}\right. } \end{aligned}$$

If \(qj+l-s-t+2=r(q-1)\), we claim that \(0\le r\le s+t-2\) or \(am\le r\le am+s+t-2\). Otherwise, if \(r>s+t-2\), then \(qj+l=r(q-1)+s+t-2=(r-1)q+q+s+t-r-2=(r-1)q+2am+s+t-r-3\). Since \(0\le j,l\le am+s+t-3\), we have \(am\le r\le am+s+t-2\). Note that \(\omega ^{2ai(am(q-1))}=\omega ^{2mi(am(q-1))}=1\), we have

$$\begin{aligned}&\big \langle \mathbf {a}_{f}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\omega ^{f(qj+l)}(q-1)\left( \sum _{i=1}^{s}\omega ^{2ai(r(q-1)+s+t-2)+e_{i}(q+1)} +\sum _{i=1}^{t}\omega ^{2mi(r(q-1)+s+t-2)+e_{s+i}(q+1)}\right) \\&\quad =0, \end{aligned}$$

where the last equation is from the definition of \(\mathbf {c}\). \(\square \)

Then we have the following theorem.

Theorem 5.2

Let q be an odd prime power with the form \(q=2am-1\), where \(\text{ gcd }(a,m)=1\). Then for integer c such that \(1\le c\le 2(a+m-1)\), there exists a \([[c(q-1),c(q-1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le am+c_{1}-1\),

$$\begin{aligned} c_{1}={\left\{ \begin{array}{ll}c;&{} \,\, \text{ if } 1\le c\le a+m-1,\\ \lfloor \frac{c}{2}\rfloor ;&{} \,\, \text{ if } a+m\le c\le 2(a+m-1).\end{array}\right. } \end{aligned}$$

Proof

If \(1\le c\le a+m-1\), let \(c=s+t\) such that \(0\le s\le m,\ 0\le t\le a-1\). Let \(\mathbf {b}_{i}=(\omega ^{2a+i(q+1)},\omega ^{4a+i(q+1)},\ldots ,\omega ^{2as+i(q+1)})\), \(\mathbf {c}_{i}=(\omega ^{2m+i(q+1)},\omega ^{4m+i(q+1)},\ldots ,\omega ^{2mt+i(q+1)})\). Take \(\mathbf {a}=(\mathbf {b}_{0},\mathbf {c}_{0},\mathbf {b}_{1},\mathbf {c}_{1}, \cdots ,\mathbf {b}_{q-2}, \mathbf {c}_{q-2})\).

If \(a+m\le c\le 2(a+m-1)\), \(c_{1}=\lfloor \frac{c}{2}\rfloor \), let \(c_{1}=s_{1}+t_{1}\) and \(c-c_{1}=s_{2}+t_{2}\) such that \(0\le s_{1},s_{2}\le m,\ 0\le t_{1},t_{2}\le a-1\). Let \(\mathbf {b}_{i,0}=(\omega ^{2a+i(q+1)},\omega ^{4a+i(q+1)},\ldots ,\omega ^{2as_{1}+i(q+1)})\), \(\mathbf {c}_{i,0}=(\omega ^{2m+i(q+1)},\omega ^{4m+i(q+1)},\ldots ,\omega ^{2mt_{1}+i(q+1)})\), \(\mathbf {b}_{i,1}=(\omega ^{2a+i(q+1)+1},\omega ^{4a+i(q+1)+1},\ldots ,\omega ^{2as_{2}+i(q+1)+1})\) and \(\mathbf {c}_{i,1}=(\omega ^{2m+i(q+1)+1},\omega ^{4m+i(q+1)+1},\ldots ,\omega ^{2mt_{2}+i(q+1)+1})\). Take \(\mathbf {a}=(\mathbf {b}_{0,0},\mathbf {c}_{0,0},\mathbf {b}_{1,0},\mathbf {c}_{1,0}, \cdots , \mathbf {b}_{q-2,0}, \mathbf {c}_{q-2,0},\mathbf {b}_{0,1},\mathbf {c}_{0,1},\mathbf {b}_{1,1},\mathbf {c}_{1,1}, \cdots ,\mathbf {b}_{q-2,1}, \mathbf {c}_{q-2,1})\).

If \(\omega ^{2ai_{1}+j_{1}(q+1)}=\omega ^{2mi_{2}+j_{2}(q+1)}\), where \(1\le i_{1}\le m\), \(1\le i_{2}\le a-1\) and \(0\le j_{1},j_{2}\le q-2\). Then \(\omega ^{2ai_{1}-2mi_{2}+(j_{1}-j_{2})(q+1)}=1\), therefore \((q+1)|(2ai_{1}-2mi_{2})\), that is \((2am)|(2ai_{1}-2mi_{2})\). And then \(a|mi_{2}\), which contradicts to the fact \(\text{ gcd }(a,m)=1\). Hence the elements of vector \(\mathbf {a}\) are mutually distinct.

Then by Corollary 1.3 and Lemma 5.1, the conclusion follows. \(\square \)

6 q-ary quantum MDS codes, where \(q=2am+1\) and \(\text{ gcd }(a,m)=1\)

In this section, we consider q-ary quantum MDS codes, where \(q=2am+1\) and \(\text{ gcd }(a,m)=1\).

Lemma 6.1

Let q be an odd prime power with the form \(q=2am+1\), where \(\text{ gcd }(a,m)=1\). Let \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\), \(f\in \{0,1\}\), and st be integers such that \(0\le s\le m,\ 0\le t\le a-1\) and \(s+t\ge 1\). Suppose \(\mathbf {b}_{i,f}=(\omega ^{2a+i(q-1)+f},\omega ^{4a+i(q-1)+f},\ldots ,\omega ^{2as+i(q-1)+f})\), \(\mathbf {c}_{i,f}=(\omega ^{2m+i(q-1)+f},\omega ^{4m+i(q-1)+f},\ldots ,\omega ^{2mt+i(q-1)+f})\) and \(\mathbf {a}_{f}=(\mathbf {b}_{0,f},\mathbf {c}_{0,f},\mathbf {b}_{1,f},\mathbf {c}_{1,f},\ldots ,\mathbf {b}_{q,f}, \mathbf {c}_{q,f})\). Then there exists \(\mathbf {v}\in (\mathbb {F}_{q^{2}}^{*})^{(s+t)(q+1)}\) such that \(\langle \mathbf {a}_{f}^{qj+l},\mathbf {v}^{q+1}\rangle _{E}=0\) for \(0\le j,l\le am+s+t-1\).

Proof

Let \(\omega \) be a fixed primitive element of \(\mathbb {F}_{q^{2}}\). We also let A be an \((s+t-1)\times (s+t)\) matrix with \(A_{ij}=\omega ^{2aj((q+1)i-\frac{q+1}{2})}\in \mathbb {F}_{q}\) for \(1\le i\le s+t-1,\ 1\le j\le s\) and \(A_{ij}=\omega ^{2mj((q+1)i-\frac{q+1}{2})}\in \mathbb {F}_{q}\) for \(1\le i\le s+t-1,\ s+1\le j\le s+t\). Then there exists \(\mathbf {c}\in \mathbb {F}_{q}^{s+t}\) such that \(A\cdot \mathbf {c}^{t}=0\). Note that by deleting the \(j'\)-th column from matrix A, the remaining matrix is a Vandermonde matrix multiplied by \(\prod _{j_{1}\ne j'}\omega ^{aj_{1}(q+1)}\prod _{j_{2}\ne j'}\omega ^{mj_{2}(q+1)}\), hence all coordinates of \(\mathbf {c}\) are nonzero. So we can represent \(\mathbf {c}\) as \(\mathbf {c}=(\omega ^{e_{1}(q+1)},\ldots ,\omega ^{e_{s+t}(q+1)})\).

Now let \(\mathbf {u}_{i}=(\omega ^{e_{1}+i\frac{q-1}{2}},\ldots ,\omega ^{e_{s+t}+i\frac{q-1}{2}})\) and \(\mathbf {v}=(\mathbf {u}_{0},\mathbf {u}_{1},\ldots ,\mathbf {u}_{q})\), then for any \(0\le j,l\le am+s+t-1\), we have

$$\begin{aligned}&\big \langle \mathbf {a}_{f}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\sum _{i=1}^{s}\sum _{k=0}^{q}\omega ^{(2ai+k(q-1)+f)(qj+l)}\omega ^{\big (e_{i}+k\frac{q-1}{2}\big )(q+1)}\\&\quad \quad +\sum _{i=1}^{t}\sum _{k=0}^{q}\omega ^{(2mi+k(q-1)+f)(qj+l)}\omega ^{\big (e_{s+i}+k\frac{q-1}{2}\big )(q+1)}\\&\quad =\omega ^{f(qj+l)}\left( \sum _{i=1}^{s}\omega ^{2ai(qj+l)+e_{i}(q+1)}+\sum _{i=1}^{t}\omega ^{2mi(qj+l)+e_{s+i}(q+1)}\right) \sum _{k=0}^{q}\omega ^{k(q-1)\big (qj+l+\frac{q+1}{2}\big )}. \end{aligned}$$

Note that

$$\begin{aligned} \sum _{k=0}^{q}\omega ^{k(q-1)\big (qj+l+\frac{q+1}{2}\big )}={\left\{ \begin{array}{ll}0;&{} \,\, \text{ if } (q+1)\not \mid \big (qj+l+\frac{q+1}{2}\big ),\\ q+1;&{} \,\, \text{ if } (q+1)|\big (qj+l+\frac{q+1}{2}\big ).\end{array}\right. } \end{aligned}$$

If \(qj+l+\frac{q+1}{2}=r(q+1)\), we claim that \(1\le r\le s+t-1\) or \(am+1\le r\le am+s+t-1\). If \(r<am+1\), then \(qj+l=r(q+1)-\frac{q+1}{2}=(r-1)q+r+am\). Since \(0\le j,l\le am+s+t-1\), we have \(1\le r\le s+t-1\). If \(r\ge am+1\), then \(qj+l=r(q+1)-\frac{q+1}{2}=rq+r-am-1\), hence \(am+1\le r\le am+s+t-1\). Note that \(\omega ^{2ai(am(q-1))}=\omega ^{2mi(am(q-1))}=1\), we have

$$\begin{aligned}&\big \langle \mathbf {a}_{f}^{qj+l},\mathbf {v}^{q+1}\big \rangle _{E} \\&\quad =\omega ^{f(qj+l)}(q+1)\left( \sum _{i=1}^{s}\omega ^{2ai\big (r(q+1)-\frac{q+1}{2}\big )+e_{i}(q+1)}+\sum _{i=1}^{t}\omega ^{2mi\big (r(q+1)-\frac{q+1}{2}\big )+e_{s+i}(q+1)}\right) \\&\quad =0, \end{aligned}$$

where the last equation is from the definition of \(\mathbf {c}\). \(\square \)

Combining Lemmas 2.1, 6.1 and Hermitian construction, we have the following theorem.

Theorem 6.2

Let q be an odd prime power with the form \(q=2am+1\), where \(\text{ gcd }(a,m)=1\). Then for integer c such that \(1\le c\le 2(a+m-1)\), there exists a \([[c(q+1),c(q+1)-2d+2,d]]_{q}\)-quantum MDS code, where \(2\le d\le am+c_{1}+1\),

$$\begin{aligned} c_{1}={\left\{ \begin{array}{ll}c;&{} \,\, \text{ if } 1\le c\le a+m-1,\\ \lfloor \frac{c}{2}\rfloor ;&{} \,\, \text{ if } a+m\le c\le 2(a+m-1).\end{array}\right. } \end{aligned}$$

7 Conclusion

Quantum MDS codes are an important family of quantum codes. In this paper, using generalized Reed–Solomon codes and Hermitian construction, we construct many new quantum MDS codes with large minimum distances. In Table 1, we list the quantum MDS codes constructed in this paper. In the following remarks, using our results in this paper, we can produce quantum codes which include some of the previously known results and some new quantum MDS codes.

Table 1 Quantum MDS codes

Remark 7.1

  1. (1)

    Consider the quantum MDS codes having type \([[a(q+1),a(q+1)-2d+2,d]]_{q}\) with large minimum distance. In [7, 14, 24], the authors constructed a class of quantum MDS codes with \(a=\frac{q-1}{\lambda }\) and minimum distance \(2\le d\le \frac{q+1}{2}+\frac{q-1}{\lambda }\), where \(\lambda \) is an even divisor of \(q-1\). In our construction, Class 1 not only works for \(a=\frac{q-1}{\lambda }\), where \(\lambda \) is an even divisor of \(q-1 (take\; b=1)\), but also works for \(a=\frac{q-1}{\lambda }\), where \(\lambda \) is an odd divisor of \(q-1\) (take \(b=2\) and choose m such that \(\frac{q-1}{2m}\) is odd). Moreover, a can be an integer not a divisor of \(q-1 (take\; b\not \mid (q-1))\).

  2. (2)

    Class 2 gives us more choices of a for the quantum MDS codes having type \([[a(q+1),a(q+1)-2d+2,d]]_{q}\) with large minimum distance.

  3. (3)

    Consider the quantum MDS codes having type \([[a(q-1),a(q-1)-2d+2,d]]_{q}\) with large minimum distance. In [14, 22], the authors constructed a class of quantum MDS codes with \(a|(q+1)\). In Class 3 of our construction, the integer a not only can be a divisor of \(q+1\), but also can be an integer not a divisor of \(q+1\).

  4. (4)

    Classes 4 and 5 give us more choices of a for the quantum MDS codes having type \([[a(q-1),a(q-1)-2d+2,d]]_{q}\) with large minimum distance.

  5. (5)

    Class 6 (Class 7) is a class of \([[c(q-1),c(q-1)-2d+2,d]]_{q}\)-quantum MDS code (\([[c(q+1),c(q+1)-2d+2,d]]_{q}\)-quantum MDS code, respectively) with large minimum distance for any \(1\le c\le 2(a+m-1)\), where \(q=2am-1\) (\(q=2am+1\), respectively), \(\text{ gcd }(a,m)=1\). Although, for some choices of c, the quantum codes may be contained in Classes 3, 4 and 5 (Classes 1 and 2, respectively), there still some new quantum MDS codes.