1 Introduction

In the past two decades, the field of quantum error correction has experienced a great progress since the establishment of the connections between quantum codes and classical codes (see [3]). One of these connections shows that the construction of quantum codes can be reduced to that of classical linear error-correcting codes with certain self-orthogonality properties (see [2, 3, 13, 17, 19]). The quantum codes obtained in this way are called stabilizer codes. In the literature, many quantum codes have been obtained from classical linear codes with symplectic, Euclidean or Hermitian self-orthogonality (see [1, 14, 20], etc).

For a prime power q, a q-ary ((nKd)) quantum code is a K -dimensional vector subspace of the Hilbert space \(\left( {\mathbb {C}}^q\right) ^{\otimes n}\) which can detect up to \(d-1\) quantum errors, or equivalently, correct up to \(\lfloor (d-1)/2\rfloor \) quantum errors. If we put \(k=\log _q K\), we denote a q-ary ((nKd)) quantum code by \([[n,k,d]]_q\). It is well known that the parameters of an \([[n,k,d]]_q\) quantum code have to satisfy the quantum Singleton bound: \(k\le n-2d+2\). A quantum code achieving this quantum Singleton bound is called a quantum maximum-distance-separable (MDS) code.

In the past few years, a lot of research work has been done for construction of quantum MDS codes and several new families of quantum MDS codes have been constructed (see [4, 5, 7, 8, 1012, 14, 15, 2123]). If the classical MDS conjecture holds, then the length of a q-ary quantum stabilizer MDS code is upper bounded by \(q^2+1\) [13]. It is interesting to construct all possible quantum MDS codes. The problem of constructing q-ary quantum MDS codes with \(n\le q+1\) has been completely solved through classical Euclidean self-orthogonal codes [7, 18]. On the other hand, a few families of q-ary quantum MDS codes with \(n>q+1\) have been given as well, most of which have minimum distance less than or equal to \(q/2+1\) (see [4, 5, 7, 8, 12, 18]). Thus, construction of q-ary quantum MDS codes with minimum distance bigger than \(q/2+1\) turns out to be a more challenging task. Researchers have made a great effort to construct such quantum MDS codes through generalized Reed-Solomon codes, constacyclic codes and negacyclic codes (see [912, 14, 15, 2123]. However, these constructions provide q-ary quantum MDS codes only for some lengths n between \(q+1\) and \(q^2+1\). Therefore, the construction of quantum MDS codes with relatively large minimum distance still remains to be solved.

In this paper, we construct some new quantum MDS codes with minimum distance bigger than \(q/2+1\) through classical Hermitian self-orthogonal generalized Reed-Solomon codes. More precisely, we select a suitable set of distinct elements \(\{\alpha _1,\alpha _2,\dots ,\alpha _n\}\subseteq {\mathbb {F}}_{q^2}\) and a set of nonzero elements \(\{v_1,v_2,\dots ,v_n\}\subseteq {\mathbb {F}}_{q^2}^*\) to obtain a Hermitian self-orthogonal generalized Reed-Solomon code \(\{(v_1f(\alpha _1),v_2f(\alpha _2),\dots ,v_nf(\alpha _n)):\; \deg (f)\le k-1\}\). The key step in the construction of such a code is to find sets \(\{\alpha _1,\alpha _2,\dots ,\alpha _n\}\) and \(\{v_1,v_2,\dots ,v_n\}\). Finding the sets \(\{\alpha _1,\alpha _2,\dots ,\alpha _n\}\) and \(\{v_1,v_2,\dots ,v_n\}\) is further reduced to finding a solution in \(({\mathbb {F}}_q^*)^n\) of the equation \(\sum _{\ell =1}^n\alpha _{\ell }^{qi+j}x_{\ell }=0\) for all \(i,j\in \{0,1,\dots ,k-1\}\).

1.1 Main result and comparison with previous constructions

Previously, the known q-ary quantum MDS codes with minimum distance bigger than \(q/2+1\) have only sporadic and special lengths n. More precisely, there exist q-ary \([[n,n-2d+2,d]]\) quantum MDS codes for the following n and d (we list some of the main results below):

  1. (i)

    \(n=q^2+1\) and \(d=q+1\) (see [14]); and \(n=q^2+1\) and \( d\le q+1\) for even q and odd d (see [8]); and \(n=q^2+1\) and \(d\le q+1\) for \(q\equiv 1\mod 4\) and even d (see [12]).

  2. (ii)

    \(n= q^2\) and \(d\le q\) (see [7, 10, 14]).

  3. (iii)

    \(n=(q^2+1)/2\) and \(q/2+1< d\le q\) for odd q (see [12]).

  4. (iv)

    \(n=r(q+1), r|q-1\) and \(\frac{q-1}{r}\) is even, \(2\le d\le \frac{q+r+1}{2}\) (see [4]).

  5. (v)

    \(n=r(q-1)\) and \(2\le d\le (q+1)/2+r-1, q+1=rt\) with r even (see [21]).

  6. (vi)

    \(n=r(q-1)+1\) and \(d\le (q+r+1)/2\) for \(q\equiv r-1\mod 2r\) (see [9]).

  7. (vii)

    \(n=r(q+1)\) and \(2\le d\le (q+1)/2+r\) for \(r|q-1, r\) odd, q odd (see [11]).

  8. (viii)

    \(n=2r(q+1)\) and \(2\le d\le (q+1)/2+2r\) for \(r|q-1, r\) odd, \(q\equiv 1 \mod 4\) odd (see [11]).

Based on the above quantum codes, by using a propagation rule [6], one can obtain more quantum MDS codes with smaller length and minimum distance that are still bigger than \(q/2+1\).

Our paper demonstrates new q-ary \([[n,n-2k,k+1]]\) quantum MDS codes with the following parameters:

  1. (i)

    Let \(t\ge 1\) be an integer, \(1\le r\le 2t+1\) and \(\gcd (r,q)=1. q\equiv -1\bmod {2t+1}, n=1+\frac{r(q^2-1)}{2t+1}\) and \(k\le \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}\).

  2. (ii)

    Let \(t\ge 1\) be an integer, \(1\le r\le 2t+1\) and \(\gcd (r,q)>1\). \(q\equiv -1\bmod {2t+1}, n=\frac{r(q^2-1)}{2t+1}\) and \(k\le \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}\).

  3. (iii)

    \(1\le k\le q-1\), and some \(n\in [2k,k^2+1]\) .

For instance, some examples in these classes include q-ary \([n,n-2k, k+1]\)-quantum MDS codes for the cases: (i) \(q\equiv -1\bmod {5}, n=(q^2+4)/5\) and \(1\le k\le (3q-2)/5\); (ii) \(q\equiv -1\bmod {7}, n=(q^2+6)/7\) and \(1\le k\le (4q-3)/7\); (iii) \(2|q, q\equiv -1\bmod {3}, n=2(q^2-1)/3\) and \(1\le k\le (2q-1)/3\); and (iv) \(2|q, q\equiv -1\bmod {5}\), \(n=2(q^2-1)/5\) and \(1\le k\le (3q-2)/5\).

1.2 Organization

The paper is organized as follows. In Sect. 2, we present a systematic method to construct Hermitian self-orthogonal generalized Reed-Solomon codes. We apply the results in Sect. 2 to obtain quantum MDS codes in Sect. 3.

2 Construction of Hermitian self-orthogonal codes

2.1 Hermitian self-orthogonality

For a vector \(\mathbf{v}=(v_1,v_2,\dots ,v_n)\in {\mathbb {F}}_{q^2}^n\), we denote by \(\mathbf{v}^q\) the vector \((v_1^q,v_2^q,\dots ,v_n^q)\). For a subset V in \({\mathbb {F}}_{q^2}^n\), denote by \(V^q\) the set \(\{\mathbf{v}^q:\; \mathbf{v}\in V\}\).

Two vectors \(\mathbf{u},\mathbf{v}\in {\mathbb {F}}_{q^2}^n\) are called Hermitian orthogonal if \(\mathbf{u}\cdot \mathbf{v}^q=0\), where \(\cdot \) denotes the usual Euclidean product or dot product. For an \({\mathbb {F}}_{q^2}\)-linear code C in \({\mathbb {F}}_{q^2}^n\), the Hermitian dual, denoted by \(C^{\perp _H}\), of C is defined to be the set \(\{\mathbf{x}\in {\mathbb {F}}_{q^2}^n:\; \mathbf{x}\cdot \mathbf{c}^q=0\ \hbox { for all}\ \mathbf{c}\in C\}\). It is easy to see that \(C^{\perp _H}\) is an \({\mathbb {F}}_{q^2}\)-linear code and \(C^{\perp _H}=\left( C^{\perp _E}\right) ^q\), where \(C^{\perp _E}\) is the usual Euclidean dual of C. In particular, C is called Hermitian self-orthogonal if \(C\subseteq C^{\perp _H}\). The \({\mathbb {F}}_{q^2}\)-dimension of \(C^{\perp _H}\) is \(n-\dim _{{\mathbb {F}}_{q^2}}(C)\).

2.2 \({\mathbb {F}}_q\)-solution of equation systems

Let \(\alpha _1,\alpha _2,\dots ,\alpha _n\) be n distinct elements in \({\mathbb {F}}_{q^2}\). Let S be a subset of \(\{0,1,\dots ,q^2-2\}\) and consider the set

$$\begin{aligned} T_S(\alpha _1,\alpha _2,\dots ,\alpha _n):=\{(\alpha _1^{i+qj},\alpha _2^{i+qj},\dots ,\alpha _n^{i+qj}):\; i,j\in S\}. \end{aligned}$$
(1)

Here, \(0^0\) is set to be 1. We simply denote \(T_S(\alpha _1,\alpha _2,\dots ,\alpha _n)\) by \(T_S\) if there is no confusion.

Lemma 2.1

The \({\mathbb {F}}_{q^2}\)-linear span \(\mathrm{Span}(T_S)\) has a basis in \({\mathbb {F}}_q^n\).

Proof

Let V be the set \(\{\mathbf{v}\in \mathrm{Span}(T_S):\; \mathbf{v}^q=\mathbf{v}\}\). Then it is clear that \(V=\mathrm{Span}(T_S)\cap {\mathbb {F}}_q^n\). Thus, it is sufficient to show that every vector in \(\mathrm{Span}(T_S)\) is an \({\mathbb {F}}_{q^2}\)-linear combination of vectors in V.

Note that \(T_S^q=T_S\) since \((\alpha _{\ell }^{i+qj})^q=\alpha _{\ell }^{iq+j}\) for all \(1\le \ell \le n\) and \(i,j\in S\). This implies that \(\mathrm{Span}(T_S)^q=\mathrm{Span}(T_S)\).

Let \({1,\alpha }\) be an \({\mathbb {F}}_q\)-basis of \({\mathbb {F}}_{q^2}\). For any \(\mathbf{v}\in \mathrm{Span}(T_S)\), consider the vectors \(\mathbf{v}_1=\mathbf{v}+\mathbf{v}^q\) and \(\mathbf{v}_2=\alpha \mathbf{v}+\alpha ^q\mathbf{v}^q\). It is easy to see that both \(\mathbf{v}_1\) and \(\mathbf{v}_2\) belong to V. Since the \(2\times 2\) matrix \(\left( \begin{array}{cc} 1&{}1\\ \alpha &{}\alpha ^q\end{array}\right) \) is invertible, we have

$$\begin{aligned} \left( \begin{array}{c} \mathbf{v}\\ \mathbf{v}^q\end{array}\right) =\left( \begin{array}{cc} 1&{}1\\ \alpha &{}\alpha ^q\end{array}\right) ^{-1}\left( \begin{array}{c} \mathbf{v}_1\\ \mathbf{v}_2\end{array}\right) . \end{aligned}$$
(2)

This completes the proof. \(\square \)

Lemma 2.2

If the \({\mathbb {F}}_{q^2}\)-linear span \(\mathrm{Span}(T_S)\) has dimension less than n, then the system of equations \(A_S\mathbf{x}=\mathbf{0}\) has a nonzero solution in \({\mathbb {F}}_q^n\), where the rows of \(A_S\) consist of all \(|S|^2\) vectors in \(T_S\).

Proof

Let \(\mathbf{v}_1,\mathbf{v}_2,\dots ,\mathbf{v}_k\in {\mathbb {F}}_q^n\) be an \({\mathbb {F}}_{q^2}\)-basis of \(\mathrm{Span}(T_S)\), where k is the dimension of the \({\mathbb {F}}_{q^2}\)-linear span \(\mathrm{Span}(T_S)\). Let A be the \(k\times n\) matrix whose rows consist of \(\mathbf{v}_1,\mathbf{v}_2,\dots ,\mathbf{v}_k\). Then the system of equations \(A\mathbf{x}=\mathbf{0}\) and \(A_S\mathbf{x}=\mathbf{0}\) has the same solution space. Since \(k<n\) and A is a matrix with entries in \({\mathbb {F}}_q\), the system \(A\mathbf{x}=\mathbf{0}\) has at least one nonzero solution in \({\mathbb {F}}_q^n\). Thus, it is also a solution of \(A_S\mathbf{x}=\mathbf{0}\). The proof is completed. \(\square \)

Lemma 2.3

Let \(t\ge 1\) be an integer and assume that \(q\equiv -1\bmod {2t+1}\) (and hence \((2t+1)|(q^2-1)\)). For an integer r with \(1\le r\le 2t+1\) and \(\gcd (r,q)=1\), put \(n=1+\frac{r(q^2-1)}{2t+1}\). Let \(\gamma \in {\mathbb {F}}_{q^2}\) be a \(\frac{q^2-1}{2t+1}\)-th primitive root of unity and let \(\beta _1,\dots ,\beta _r\in {\mathbb {F}}_{q^2}^*\) such that \(\{\beta _i\langle \gamma \rangle \}_{i=1}^r\) represent distinct cosets of \({\mathbb {F}}_{q^2}^*/\langle \gamma \rangle \). Label the elements of the set \(\{0\}\cup \left( \cup _{i=1}^r\beta _i\langle \gamma \rangle \right) \) by \(\alpha _1,\alpha _2,\dots ,\alpha _n\). Then the equation system \(A_S\mathbf{x}=\mathbf{0}\) has a nonzero solution in \(({\mathbb {F}}_q^*)^n\) if \(S\subseteq \{0,1,2,\dots , \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}-1\}\).

Proof

First we claim that, for any \(i,j\in S, qi+j\) is not divisible by \((q^2-1)/(2t+1)\) unless \(i=j=0\). Suppose that this were not true. Then \(qi+j\) is equal to \(\ell (q^2-1)/(2t+1)\) for some \(1\le \ell \le 2t\) and \(i,j\in S\). By the identity

$$\begin{aligned} qi+j=\ell \times \frac{q^2-1}{2t+1}=q\times \left( \frac{\ell q+\ell }{2t+1}-1\right) +q-\frac{\ell (q+1)}{2t+1}, \end{aligned}$$

we have

$$\begin{aligned} i=\frac{\ell q+\ell }{2t+1}-1,\qquad j=q-\frac{\ell (q+1)}{2t+1}. \end{aligned}$$
(3)

Case 1. \(\ell \ge t+1\). Then

$$\begin{aligned} i\ge \frac{(t+1)(q+1)}{2t+1}-1>\frac{t+1}{2t+1}\times q-\frac{t}{2t+1}-1. \end{aligned}$$

Thus, \(i \not \in S\) and hence this contradicts the fact that \(i\in S\).

Case 2. \(\ell \le t\). Then

$$\begin{aligned} j\ge q-\frac{t(q+1)}{2t+1}>\frac{t+1}{2t+1}\times q-\frac{t}{2t+1}-1. \end{aligned}$$

Thus, \(j \not \in S\) and hence this contradicts the fact that \(j\in S\).

For \(i,j\in S\) with \((i,j)\ne (0,0)\), by the above fact one can write \(qi+j=c\times \frac{q^2-1}{2t+1}+a\) for some \(c\ge 0\) and \(1\le a\le \frac{q^2-1}{2t+1}-1\).

Now it is clear that the first row of \(A_S\) is the all-one vector \(\mathbf{1}\) and every other row has the form

$$\begin{aligned}&\left( 0,\beta _1^{qi+j},\beta _1^{qi+j}\gamma ^a,\beta _1^{qi+j}\gamma ^{2a}\dots ,\beta _1^{qi+j}\gamma ^{\left( \frac{q^2-1}{2t+1}-1\right) a}, \dots ,\right. \\&\quad \left. \beta _r^{qi+j},\beta _r^{qi+j}\gamma ^a,\beta _r^{qi+j}\gamma ^{2a},\dots ,\beta _r^{qi+j}\gamma ^{\left( \frac{q^2-1}{2t+1}-1\right) a}\right) \end{aligned}$$

for some \(i,j\in S\) with \((i,j)\ne (0,0)\) and \(1\le a\le \frac{q^2-1}{2t+1}-1\). Therefore, the vector \(\left( -\frac{r(q^2-1)}{2t+1},1,1,\dots ,1\right) \) is a solution of the equation \(A_S\mathbf{x}=\mathbf{0}\). The proof is completed. \(\square \)

Lemma 2.4

Let \(t\ge 1\) be an integer and assume that \(q\equiv -1\bmod {2t+1}\). For an integer r with \(1\le r\le 2t+1\) and \(\gcd (r,q)>1\), put \(n=\frac{r(q^2-1)}{2t+1}\). Let \(\gamma \in {\mathbb {F}}_{q^2}\) be a \(\frac{q^2-1}{2t+1}\)-th primitive root of unity and let \(\beta _1,\dots ,\beta _r\in {\mathbb {F}}_{q^2}^*\) such that \(\{\beta _i\langle \gamma \rangle \}_{i=1}^r\) represent distinct cosets of \({\mathbb {F}}_{q^2}^*/\langle \gamma \rangle \). Label the elements of the set \(\cup _{i=1}^r\beta _i\langle \gamma \rangle \) by \(\alpha _1,\alpha _2,\dots ,\alpha _n\). Then the equation system \(A_S\mathbf{x}=\mathbf{0}\) has a nonzero solution in \(({\mathbb {F}}_q^*)^n\) if \(S\subseteq \{0,1,2,\dots , \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}-1\}\).

Proof

First of all, the condition \(\gcd (r,q)>1\) implies that the length n is divisible by the characteristic of \({\mathbb {F}}_q\).

From the proof of Lemma 2.3, we know that, for \(i,j\in S\) with \((i,j)\ne (0,0)\), one can write \(qi+j=c\times \frac{q^2-1}{2t+1}+a\) for some \(c\ge 0\) and \(1\le a\le \frac{q^2-1}{2t+1}-1\).

Now it is clear that the first row of \(A_S\) is the all-one vector \(\mathbf{1}\) and every other row has the form

$$\begin{aligned}&\left( \beta _1^{qi+j},\beta _1^{qi+j}\gamma ^a,\beta _1^{qi+j}\gamma ^{2a}\dots ,\beta _1^{qi+j}\gamma ^{\left( \frac{q^2-1}{2t+1}-1\right) a}, \dots ,\right. \\&\quad \left. \beta _r^{qi+j},\beta _r^{qi+j}\gamma ^a,\beta _r^{qi+j}\gamma ^{2a},\dots ,\beta _r^{qi+j}\gamma ^{\left( \frac{q^2-1}{2t+1}-1\right) a}\right) \end{aligned}$$

for some \(i,j\in S\) with \((i,j)\ne (0,0)\) and \(1\le a\le \frac{q^2-1}{2t+1}-1\). Therefore, the vector \(\left( 1,1,\dots ,1\right) \) is a solution of the equation \(A_S\mathbf{x}=\mathbf{0}\). The proof is completed. \(\square \)

2.3 Hermitian self-orthogonal codes

For a subset S of \(\{0,1,2,\dots ,q^2-1\}\), denote by \({\mathcal {P}}_S\) the \({\mathbb {F}}_{q^2}\)-linear space of polynomials

$$\begin{aligned} {\mathcal {P}}_S:=\mathrm{Span}\{x^i:\; i\in S\}. \end{aligned}$$
(4)

In particular, for \(S=\{0,1,2,\dots ,k-1\}\), we denote \({\mathcal {P}}_S\) by \({\mathcal {P}}_k\). It is clear that the dimension of \({\mathcal {P}}_S\) is |S|. Furthermore, for a vector \(\mathbf{v}=(v_1,v_2,\dots ,v_n)\in ({\mathbb {F}}_{q^2}^*)^n\) and n distinct elements \(\alpha _1,\alpha _2,\dots ,\alpha _n\) in \({\mathbb {F}}_{q^2}\), we define the \({\mathbb {F}}_{q^2}\)-linear code

$$\begin{aligned} C_S(\mathbf{a},\mathbf{v})=\{(v_1f(\alpha _1),v_2f(\alpha _2),\dots ,v_nf(\alpha _n)):\; f\in {\mathcal {P}}_S\}, \end{aligned}$$
(5)

where \(\mathbf{a}=(\alpha _1,\alpha _2,\dots ,\alpha _n)\).

Assume that the largest number \(i_{\max }\) of S is less than n, then \(C_S(\mathbf{v})\) is an \([n,|S|,\ge n-i_{\max }]\)-linear code over \({\mathbb {F}}_{q^2}\).

Lemma 2.5

Let S be a subset of \(\{0,1,2,\dots ,q^2-1\}\). Assume that \(A_S\mathbf{x}=\mathbf{0}\) has a solution \((b_1,b_2,\dots ,b_n)\in ({\mathbb {F}}_q^*)^n\). Let \(v_i\in {\mathbb {F}}_{q^2}^*\) such that \(v_i^{q+1}=b_i\) for all \(1\le i\le n\). Then the code \(C_S(\mathbf{a},\mathbf{v})\) is Hermitian self-orthogonal.

The proof of Lemma 2.5 is straightforward. Note that \(v_i\) always exists since \(b_i\in {\mathbb {F}}_q\).

Now we apply Lemmas 2.3 and 2.4 to obtain two classes of Hermitian self-orthogonal codes.

Theorem 2.6

Let \(t\ge 1\) be an integer and assume that \(q\equiv -1\bmod {2t+1}\).

  1. (i)

    For an integer r with \(1\le r\le 2t+1\) and \(\gcd (r,q)=1\), put \(n=1+\frac{r(q^2-1)}{2t+1}\). Then for any \(k\le \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}\), there exists a Hermitian self-orthogonal [nk]-MDS code over \({\mathbb {F}}_{q^2}\).

  2. (ii)

    For an integer r with \(1\le r\le 2t+1\) and \(\gcd (r,q)>1\), put \(n=\frac{r(q^2-1)}{2t+1}\). Then for any \(k\le \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}\), there exists a Hermitian self-orthogonal [nk]-MDS code over \({\mathbb {F}}_{q^2}\).

Proof

  1. (i)

    Consider the set \(S=\{0,1,2,\dots ,k-1\}\). Let \(\gamma \in {\mathbb {F}}_{q^2}\) be a \(\frac{q^2-1}{2t+1}\)-th primitive root of unity and let \(\beta _1,\dots ,\beta _r\in {\mathbb {F}}_{q^2}^*\) such that \(\{\beta _i\langle \gamma \rangle \}_{i=1}^r\) represent distinct cosets of \({\mathbb {F}}_{q^2}^*/\langle \gamma \rangle \). Label the elements of the set \(\{0\}\cup \left( \cup _{i=1}^r\beta _i\langle \gamma \rangle \right) \) by \(\alpha _1,\alpha _2,\dots ,\alpha _n\). Let \(v_i=1\) for all \(2\le i\le n\) and \(v_i\in {\mathbb {F}}_{q^2}^*\) such that \(v_1^{q+1}=-\frac{r(q^2-1)}{2t+1}\). Then by Lemmas 2.3 and 2.5, the code \(C_S(\mathbf{a},\mathbf{v})\) is Hermitian self-orthogonal.

  2. (ii)

    Similarly, this part follows from Lemmas 2.4 and 2.5.

\(\square \)

For certain given length n, Theorem 2.6 provides Hermitian self-orthogonal codes with dimension bigger than q / 2. In the following theorem, for given dimension k, we provide Hermitian self-orthogonal codes for certain length.

Theorem 2.7

For any k with \(1\le k\le q-1\), there exists a Hermitian self-orthogonal [nk]-MDS code for some n with \(2k\le n\le k^2+1\).

Proof

Choose a subset \({\mathcal {A}}=\{\beta _1,\beta _2,\dots ,\beta _{k^2+1}\}\) of \({\mathbb {F}}_{q^2}\) and consider the generalized Reed-Solomon code \(C=\{(f(\beta _1),f(\beta _2),\dots ,f(\beta _{k^2+1})):\; f\in {\mathcal {P}}_k\}\). Then the Euclidean dual \(C^{\perp _E}\) of C has minimum distance \(k+1\). Let \(S=\{0,1,2,\dots ,k-1\}\) and consider the \((k^2+1)\times k^2\) matrix \(A_S\) whose rows consists of \((\beta _1^{qi+j},\beta _2^{qi+j},\dots ,\beta _{k^2+1}^{qi+j})\) for all \(0\le i, j\le k-1\). By Lemma 2.2, the equation \(A_S\mathbf{x}=\mathbf{0}\) has a nonzero solution \(\mathbf{b}=(b_1,b_2,\dots ,b_{k^2+1})\in {\mathbb {F}}_q^n\). It is clear that \(\mathbf{b}\) is a codeword of \(C^{\perp _E}\) and hence the Hamming weight \(\mathrm{wt}_H(\mathbf{b})\ge k+1\). Let the support of \(\mathbf{b}\) be \(\{i_1,i_2,\dots ,i_n\}\) and denote \(\beta _{i_j}\) by \(\alpha _j\). Let \(v_j\in {\mathbb {F}}_{q^2}\) such that \(v_j^{q+1}=b_{i_j}\). Then it is easy to see that \(C_S(\mathbf{a},\mathbf{v})\) is Hermitian self-orthogonal, where \(S=\{0,1,\dots ,k-1\}\). Furthermore, it is clear that \(C_S(\mathbf{a},\mathbf{v})\) is an [nk]-MDS code. Since C is Hermitian self-orthogonal, we must have \(n\ge 2k\). The proof is completed. \(\square \)

3 Construction of Quantum codes

The construction of quantum codes in this section is based on a connection between classical Hermitian self-orthogonal codes and quantum codes given in [2].

Lemma 3.1

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

3.1 Quantum MDS codes

Combining Theorem 2.6 with Lemma 3.1 gives the following quantum MDS codes.

Theorem 3.2

There exists a q-ary \([[n,n-2k,k+1]]\)-quantum MDS code for the following qn and k.

  1. (i)

    Let \(t\ge 1\) be an integer and let r satisfy \(1\le r\le 2t+1\) and \(\gcd (r,q)=1\). The parameters qn and k satisfy \(q\equiv -1\bmod {2t+1}, n=1+\frac{r(q^2-1)}{2t+1}\) and \(k\le \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}\).

  2. (ii)

    Let \(t\ge 1\) be an integer and let r satisfy \(1\le r\le 2t+1\) and \(\gcd (r,q)>1\). The parameters qn and k satisfy \(q\equiv -1\bmod {2t+1}, n=\frac{r(q^2-1)}{2t+1}\) and \(k\le \frac{t+1}{2t+1}\times q-\frac{t}{2t+1}\).

Remark 1

The family of quantum MDS codes constructed in Theorem 3.2 are new except for the case of \(t=r=1\) in Theorem 3.2(i) which was presented in [9].

In the following example, we show some quantum MDS codes from Theorem 3.2(i).

Example 3.3

By taking \(r=1\) and \(t=1,2,3,4\) in Theorem 3.2(i), respectively, we obtain the following q-ary quantum codes.

  1. (i)

    If \(q\equiv -1\bmod {3}\), then there exists a q-ary \([(q^2+2)/3,(q^2+2)/3-2k, k+1]\) quantum MDS code for any \(k\le (2q-1)/3\). This class was presented in [9].

  2. (ii)

    If \(q\equiv -1\bmod {5}\), then there exists a q-ary \([(q^2+4)/5,(q^2+4)/5-2k,k+1]\) quantum MDS code for any \(k\le (3q-2)/5\).

  3. (iii)

    If \(q\equiv -1\bmod {7}\), then there exists a q-ary \([(q^2+6)/7,(q^2+6)/7-2k, k+1]\) quantum MDS code for any \(k\le (4q-3)/7\).

Example 3.4

Let q be even. By taking \(r=2\) and \(t=1,2,3,4\) in Theorem 3.2(ii), respectively, we obtain the following q-ary quantum codes.

  1. (i)

    If \(q\equiv -1\bmod {3}\), then there exists a q-ary \([2(q^2-1)/3,2(q^2-1)/3-2k, k+1]\) quantum MDS code for any \(k\le (2q-1)/3\).

  2. (ii)

    If \(q\equiv -1\bmod {5}\), then there exists a q-ary \([2(q^2-1)/5,2(q^2-1)/5-2k,k+1]\) quantum MDS code for any \(k\le (3q-2)/5\).

  3. (iii)

    If \(q\equiv -1\bmod {7}\), then there exists a q-ary \([2(q^2-1)/7,2(q^2-1)/7-2k, k+1]\) quantum MDS code for any \(k\le (4q-3)/7\).

Remark 2

To the best of our knowledge, except for the quantum MDS codes given in Example 3.3(i), all other quantum MDS codes in Examples 3.3 and 3.4 are new.

Theorem 3.5

For any \(1\le k\le q-1\), one can find some \(n\in [2k,k^2+1]\) such that there exists a q-ary \([[n,n-2k,k+1]]\)-quantum MDS code.

Remark 3

Theorem 3.5 in fact produces some new quantum codes. For instance, for even q, we obtain an \([n,n-q-2,q/2+2]\)-quantum MDS codes for some \(n\in [q+2, (q/2+1)^2+1]\). This code could not be produced by propagation rules from known codes.