1 Introduction

Quantum error-correcting codes were presented to protect quantum information from decoherence during quantum communication and quantum computation. After the initial works of [23, 24], the theory of quantum error-correcting codes has been developed rapidly. In [6], Calderbank et al. gave a method to construct binary quantum error-correcting codes from classical self-orthogonal codes over \(\mathrm{GF}(4)\) with respect to a certain inner product, and then, Ashikhmin et al. generalized these results to non-binary case in [4]. Afterward, many good quantum error-correcting codes have been constructed by using classical cyclic codes over finite fields (see Refs. [7, 10, 16, 18, 22, 25]).

In recent years, there has been tremendous interest in studying the construction of quantum codes from cyclic codes over finite rings. Qian et al. [21] constructed binary quantum codes from cyclic codes of odd length over the finite chain ring \({\mathbb {F}}_2+u{\mathbb {F}}_2\) with \(u^2=0\). Then, Kai and Zhu [15] gave a quaternary construction of quantum codes from cyclic codes of odd length over the finite chain ring \({\mathbb {F}}_4+u{\mathbb {F}}_{4}\) with \(u^2=0\). In [1, 2], Ashraf et al. constructed new quantum codes from cyclic codes over \({\mathbb {F}}_{3}+v{\mathbb {F}}_{3}\) with \(v^2=1\) and \({\mathbb {F}}_{p}+v{\mathbb {F}}_{p}\) with \(v^2=v\), respectively. Gao [12] gave a construction of quantum codes from cyclic codes over finite non-chain ring \({\mathbb {F}}_{q}+v{\mathbb {F}}_{q}+v^2{\mathbb {F}}_{q}+v^3{\mathbb {F}}_{q}\) with \(v^4=v\). Dertli et al. [8] constructed some new quantum codes from cyclic codes over the ring \({\mathbb {F}}_{2}+u{\mathbb {F}}_{2}+v{\mathbb {F}}_{2}+uv{\mathbb {F}}_{2}\) with \(u^2=u, v^2=v, uv=vu\). Motivated by this study, Ashraf et al. [3] again obtained new non-binary quantum codes from cyclic codes over \({\mathbb {F}}_{q}+u{\mathbb {F}}_{q}+v{\mathbb {F}}_{q}+uv{\mathbb {F}}_{q}\) with \(u^2=u, v^2=v, uv=vu\). With the continuous development of coding theory over finite rings, Tang et al. [26] constructed many good quantum codes from dual-containing cyclic codes over the finite chain ring \({\mathbb {F}}_{2^{m}}+u{\mathbb {F}}_{2^{m}}+\cdots +u^{k}{\mathbb {F}}_{2^{m}}\), where \(u^{k+1}=0\), m is a positive integer. Liu et al. [19] obtained good quantum codes from cyclic codes over the finite chain ring \({\mathbb {F}}_{p^{2m}}+u{\mathbb {F}}_{p^{2m}}\), where \(u^2=0\). These results illustrate that some good or optimal quantum codes can be constructed by cyclic codes over finite rings.

Constacyclic codes generalize the structural properties of cyclic codes naturally and provide more flexibility in constructing new quantum codes. However, few coding scholars have constructed quantum codes from constacyclic codes over finite rings. Lately, Gao et al. [14] constructed some good non-binary quantum codes from u-constacyclic codes over \({\mathbb {F}}_{p}+u{\mathbb {F}}_{p}\) with \(u^{2}=1\), and Gao in [11] considered the structure of cyclic codes over \({\mathbb {F}}_{p}+u{\mathbb {F}}_{p}+u^2{\mathbb {F}}_{p}\), where \(u^3=u\) and p is an odd prime. Motivated by the above work, we consider constructing quantum codes from (\(\alpha +\beta v+\gamma v^{2}\))-constacyclic codes over the finite non-chain ring \(R={\mathbb {F}}_{q}+v{\mathbb {F}}_{q}+v^2{\mathbb {F}}_{q}\), where \(v^3=v\) and q is an odd prime power. By the Gray map from this ring to the finite field \({\mathbb {F}}_q\), we get some better quantum codes than previous studies.

The paper is organized as follows: In Sect. 2, we give some basic results on R and define an \({\mathbb {F}}_q\)-linear Gray map from \(R^{n}\) to \({\mathbb {F}}_{q}^{3n}\). We devote Sect. 3 to a discussion of \((\alpha +\beta v+\gamma v^{2})\)-constacyclic codes over R. A necessary and sufficient condition for the existence of Euclidean dual-containing \((\alpha +\beta v+\gamma v^{2})\)-constacyclic codes over R is given. We get some new quantum codes comparing with previous studies by the Calderbank–Shor–Steane (CSS) construction in Sect. 4. In Sect. 5, we take \(q=p^2\) and give a necessary and sufficient condition for the existence of Hermitian dual-containing \((\alpha +\beta v+\gamma v^{2})\)-constacyclic codes over R. We also get some new quantum codes from Hermitian constacyclic codes. Section 6 concludes the paper.

2 Preliminaries

Let \(R={\mathbb {F}}_{q}[v]/\langle v^3-v\rangle ={\mathbb {F}}_{q}+v{\mathbb {F}}_{q}+v^2{\mathbb {F}}_{q}\), where \(q=p^r, p\) is an odd prime, \(v^3=v\). Then \(v^3-v=v(v-1)(v+1)\) over \({\mathbb {F}}_q\). R is a finite commutative non-chain ring with identity and characteristic p. It is also principal and has three maximal ideals \(\langle v\rangle \), \(\langle v-1\rangle \) and \(\langle v+1\rangle \).

Let \(f_{0}=v, f_{1}=v-1\), \(f_{2}=v+1\) and \(\hat{f}_{i}=(v^3-v)/f_{i}\) for each \(i=0,1,2\). Then, there exist \(a_{i}\), \(b_{i}\in {\mathbb {F}}_{q}[v]\) such that \(a_{i}f_{i}+b_{i}\hat{f}_{i}=1\). Let \(e_{i}=b_{i}\hat{f}_{i}+\langle v^3-v\rangle \). Then \(e_{0}=1-v^2\), \(e_{1}=2^{-1}(v^2+v)\) and \(e_{2}=2^{-1}(v^2-v)\). Hence, we have the following direct results.

  1. 1.

    \(e_{0}\), \(e_{1}\), \(e_{2}\) are nonzero idempotents in R, and \(e_{i}e_{j}=0\) if \(i\ne j\) for any \(i,j=0,1,2\).

  2. 2.

    \(e_{0}+e_{1}+e_{2}=1\) in R.

  3. 3.

    \(R=Re_{0}\oplus Re_{1}\oplus Re_{2}={\mathbb {F}}_{q}e_{0}\oplus {\mathbb {F}}_{q}e_{1}\oplus {\mathbb {F}}_{q}e_{2}\).

From (3), we know that for any \(r\in R\) there exist \(r_{0}\), \(r_{1}\), \(r_{2}\in {\mathbb {F}}_{q}\) such that r can be expressed uniquely as \(r=r_{0}e_{0}+r_{1}e_{1}+r_{2}e_{2}\).

A code \({\mathscr {C}}\) of length n over R is a non-empty subset of \(R^{n}\), and a code \({\mathscr {C}}\) is linear over R if it is an R-submodule of \(R^{n}\). In this paper, we always assume that \({\mathscr {C}}\) is a linear code over R. The Hamming weight of a codeword \(c=(c_{0},c_{1},\ldots ,c_{n-1})\in {\mathscr {C}}\), denoted by \(\omega t(c)\), is the number of its nonzero entries. The Hamming distance of two codewords xy, denoted by d(xy), is the number of entries where they differ. For a linear code \({\mathscr {C}}\), the minimum Hamming distance is defined as \(d({\mathscr {C}})=\mathrm{min}\{\omega t(c)|0\ne c\in {\mathscr {C}}\}\).

For any \(r=r_{0}e_{0}+r_{1}e_{1}+r_{2}e_{2}\in R\), r can be expressed by \(\varvec{r}=(r_{0},r_{1},r_{2})\in {\mathbb {F}}_{q}^{3}\). The \(GL_{3}({\mathbb {F}}_{q})\) is the set of all \(3\times 3\) invertible matrices over \({\mathbb {F}}_{q}\). For any \(M\in GL_{3}({\mathbb {F}}_{q})\), define a Gray map \({\varPhi }\) as follows

$$\begin{aligned} \Phi :~R\rightarrow & {} {\mathbb {F}}_q^3 \\ {\varvec{r}}=(r_{0},r_{1},r_{2})\mapsto & {} (r_{0},r_{1},r_{2})M. \end{aligned}$$

Clearly, \(\Phi \) is an \({\mathbb {F}}_{q}\)-module isomorphism. For the sake of convenience, we let \(\varvec{r}M\) express \((r_{1},r_{2},r_{3})M\). Similarly, the Gray map can be naturally extended to \(R^n\) as follows:

$$\begin{aligned} \Phi :~R^n\rightarrow & {} {\mathbb {F}}_q^{3n} \\ (\varvec{r}_{0},\varvec{r}_{1},\ldots ,\varvec{r}_{n-1})\mapsto & {} (\varvec{r}_{0}M,\varvec{r}_{1}M,\ldots ,\varvec{r}_{n-1}M). \end{aligned}$$

For any \(\varvec{r}=(r_{0},r_{1},r_{2})\in R\), the Gray weight of \(\varvec{r}\) is defined as the Hamming weight of the vector \(\varvec{r}M\), i.e., \(\omega t_{G}(\varvec{r})=\omega t(\varvec{r}M)\). The Gray weight of \((\varvec{r}_{0},\varvec{r}_{1},\ldots ,\varvec{r}_{n-1})\in R^n\) is defined as \(\sum _{i=0}^{n-1}\omega t_{G}(\varvec{r}_{i})\). For any two distinct codewords \(\varvec{c}_{1}\), \(\varvec{c}_{2}\in {\mathscr {C}}\), the Gray distance is defined as \(d_{G}(\varvec{c}_{1},\varvec{c}_{2})=\omega t_{G}(\varvec{c}_{1}-\varvec{c}_{2})\). The minimum Gray distance of \({\mathscr {C}}\) is defined as \(d_{G}({\mathscr {C}})=\mathrm{min}\{d_{G}(\varvec{c}_{1},\varvec{c}_{2})|\varvec{c}_{1}\ne \varvec{c}_{2},\varvec{c}_{1},\varvec{c}_{2}\in {\mathscr {C}}\}\). Clearly, for a linear code \({\mathscr {C}}\), \(d_{G}({\mathscr {C}})=\mathrm{min}\{\omega t_{G}(\varvec{c})|0\ne \varvec{c}\in {\mathscr {C}}\}\).

Lemma 1

([13], Lemma 2) The Gray map \(\Phi \) is a weight-preserving map from \(R^{n}\)(Gray weight) to \({\mathbb {F}}_{q}^{3n}\)(Hamming weight) and a distance-preserving map from \(R^{n}\)(Gray distance) to \({\mathbb {F}}_{q}^{3n}\)(Hamming distance).

Define

$$\begin{aligned} {\mathscr {C}}_{0}= & {} \{\varvec{x}\in {\mathbb {F}}_{q}^{n}|\exists \varvec{y},\varvec{z}\in {\mathbb {F}}_{q}^{n}, e_{0}\varvec{x}+e_{1}\varvec{y}+e_{2}\varvec{z}\in {\mathscr {C}}\},\\ {\mathscr {C}}_{1}= & {} \{\varvec{y}\in {\mathbb {F}}_{q}^{n}|\exists \varvec{x},\varvec{z}\in {\mathbb {F}}_{q}^{n}, e_{0}\varvec{x}+e_{1}\varvec{y}+e_{2}\varvec{z}\in {\mathscr {C}}\},\\ {\mathscr {C}}_{2}= & {} \{\varvec{z}\in {\mathbb {F}}_{q}^{n}|\exists \varvec{x},\varvec{y}\in {\mathbb {F}}_{q}^{n}, e_{0}\varvec{x}+e_{1}\varvec{y}+e_{2}\varvec{z}\in {\mathscr {C}}\}. \end{aligned}$$

Then \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\), \({\mathscr {C}}_{2}\) are all linear codes of length n over \({\mathbb {F}}_{q}\). Further, the linear code \({\mathscr {C}}\) of length n over R can also be uniquely expressed as

$$\begin{aligned} {\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}. \end{aligned}$$

Let G be a generator matrix of \({\mathscr {C}}\) over R. Then, as an \({\mathbb {F}}_{q}\)-submodule of \(R^{n}\), \({\mathscr {C}}\) also has

$$\begin{aligned} \left( \begin{array}{c} e_{0}G_{0} \\ e_{1}G_{1} \\ e_{2}G_{2}\\ \end{array} \right) \end{aligned}$$

as its generator matrix, where \(G_{0}, G_{1}\) and \(G_{2}\) are generator matrices of \({\mathscr {C}}_{0}, {\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively.

Lemma 2

([13], Proposition 3) Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a linear code of length n over R, the minimum Gray distance of \({\mathscr {C}}\) be d and \(|{\mathscr {C}}|=q^{\sum _{i=0}^{2}k_{i}}\). Then \(\Phi ({\mathscr {C}})\) is an \([3n,\sum _{i=0}^{2}k_{i},d]\) linear code over \({\mathbb {F}}_{q}\), where \(k_{i}\) is the dimension of linear code \({\mathscr {C}}_{i}\), \(i=0,1,2\).

3 (\(\alpha +\beta v+\gamma v^{2}\))-constacyclic codes over R

Let \(\alpha +\beta v+\gamma v^{2} \in R\) be a unit, where \(\alpha \), \(\beta \), \(\gamma \in {\mathbb {F}}_{q}\). For any codeword \((c_{0},c_{1},\ldots ,c_{n-1})\in {\mathscr {C}}\), if \(((\alpha +\beta v+\gamma v^{2})c_{n-1},c_{0},\ldots ,c_{n-2})\in {\mathscr {C}}\), then the linear code \({\mathscr {C}}\) is called a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code. Let R[x] be a polynomial ring over R. Define the map \(\Psi \) as follows

$$\begin{aligned} \Psi :~R^n\rightarrow & {} R_{n}=R[x]/\langle x^n-(\alpha +\beta v+\gamma v^{2})\rangle \\ (c_{0},c_{1},\ldots ,c_{n-1})\mapsto & {} c_{0}+c_{1}x+\cdots +c_{n-1}x^{n-1}. \end{aligned}$$

Clearly, \(\Psi \) is an R-module isomorphism. Therefore, the \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R can be viewed as an ideal of \(R_{n}\).

Lemma 3

Let \(\alpha +\beta v+\gamma v^{2}=\alpha e_{0}+(\alpha +\beta +\gamma )e_{1}+(\alpha -\beta +\gamma )e_{2}\) be an element of R. Then \(\alpha +\beta v+\gamma v^{2}\) is a unit over R if and only if \(\alpha \), \(\alpha +\beta +\gamma \), \(\alpha -\beta +\gamma \) are units of \({\mathbb {F}}_{q}^{*}\).

Proof

By the Chinese Remainder Theorem, we can get \(R={\mathbb {F}}_{q}e_{0}\oplus {\mathbb {F}}_{q}e_{1}\oplus {\mathbb {F}}_{q}e_{2}\). Therefore, \(\alpha +\beta v+\gamma v^{2}=\alpha e_{0}+(\alpha +\beta +\gamma )e_{1}+(\alpha -\beta +\gamma )e_{2}\), where \(e_{i}\) are nonzero idempotents, \(e_{i}e_{j}=0\) if \(i\ne j\) for any \(i,j=0,1,2\) and \(e_{0}+e_{1}+e_{2}=1\) over R. If \(\alpha +\beta v+\gamma v^{2}\) is a unit over R, then there exist \(\delta ,\eta ,\theta \in {\mathbb {F}}_{q}^{*}\) such that \((\alpha +\beta v+\gamma v^{2})^{-1}=\delta e_{0}+\eta e_{1}+e_{2}\theta \). By calculating, we know that \((\alpha e_{0}+(\alpha +\beta +\gamma )e_{1}+(\alpha -\beta +\gamma )e_{2})(\delta e_{0}+\eta e_{1}+e_{2}\theta )=1\), i.e., \(\alpha \delta e_{0}+(\alpha +\beta +\gamma )\eta e_{1}+(\alpha -\beta +\gamma )\theta e_{2}=1\). Then \((\alpha \delta e_{0}+(\alpha +\beta +\gamma )\eta e_{1}+(\alpha -\beta +\gamma )\theta e_{2})e_{0}=e_{0}\), i.e., \(\alpha \delta =1\). Similarly, \((\alpha +\beta +\gamma )\eta =1\), \((\alpha -\beta +\gamma )\theta =1\). Hence, \(\alpha \), \(\alpha +\beta +\gamma \), \(\alpha -\beta +\gamma \) are units of \({\mathbb {F}}_{q}^{*}\). Conversely, suppose that \(\alpha \), \(\alpha +\beta +\gamma \), \(\alpha -\beta +\gamma \) are units of \({\mathbb {F}}_{q}^{*}\), then there exist \(\delta ,\eta ,\theta \in {\mathbb {F}}_{q}^{*}\) such that \(\alpha \delta =1\), \((\alpha +\beta +\gamma )\eta =1\), \((\alpha -\beta +\gamma )\theta =1\). Therefore, \(\alpha \delta e_{0}+(\alpha +\beta +\gamma )\eta e_{1}+(\alpha -\beta +\gamma )\theta e_{2}=(\alpha e_{0}+(\alpha +\beta +\gamma )e_{1}+(\alpha -\beta +\gamma )e_{2})(\delta e_{0}+\eta e_{1}+e_{2}\theta )=1\). Hence, \(\alpha +\beta v+\gamma v^{2}\) is a unit of R.\(\square \)

In this paper, we always assume that \(\alpha +\beta v+\gamma v^{2}\) is a unit of R.

Theorem 1

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a linear code of length n over R. Then \({\mathscr {C}}\) is a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R if and only if \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{q}\), respectively.

Proof

Let \((c_{i,0},c_{i,1},\ldots ,c_{i,n-1})\in {\mathscr {C}}_{i}\) and \({c}_{j}=\sum _{i=0}^{2}e_{i}c_{ij}\), where \(j=0,1,\ldots ,n-1\). Then \((c_{0},c_{1},\ldots ,c_{n-1})\in {\mathscr {C}}\). Since \({\mathscr {C}}\) is a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code, then \(((\alpha +\beta v+\gamma v^{2})c_{n-1},c_{0},\ldots ,c_{n-2})\in {\mathscr {C}}\). Note that \(((\alpha +\beta v+\gamma v^{2})c_{n-1},c_{0},\ldots ,c_{n-2})=e_{0}(\alpha c_{0,n-1},c_{0,0},\ldots ,c_{0,n-2})+e_{1}((\alpha +\beta +\gamma ) c_{1,n-1},c_{1,0},\ldots ,c_{1,n-2})+e_{2}((\alpha -\beta +\gamma ) c_{2,n-1},c_{2,0},\ldots ,c_{2,n-2}).\) By the uniqueness of linear codes decomposition over R, we know that \((\alpha c_{0,n-1},c_{0,0},\ldots ,c_{0,n-2})\in {\mathscr {C}}_{0}\), \(((\alpha +\beta +\gamma ) c_{1,n-1},c_{1,0},\ldots ,c_{1,n-2})\in {\mathscr {C}}_{1}\) and \(((\alpha -\beta +\gamma ) c_{2,n-1},c_{2,0},\ldots ,c_{2,n-2})\in {\mathscr {C}}_{2}\), i.e., \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{q}\), respectively.

Conversely, suppose that linear codes \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{q}\), respectively. Let \((c_{0},c_{1},\ldots ,c_{n-1})\in {\mathscr {C}}\), where \(c_{j}=\sum _{i=0}^{2}e_{i}c_{ij}\), \(j=0,1,\ldots ,n-1\). Then \((c_{i,0},c_{i,1},\ldots ,c_{i,n-1})\in {\mathscr {C}}_{i}\). Since \(((\alpha +\beta v+\gamma v^{2})c_{n-1},c_{0},\ldots ,c_{n-2})=e_{0}(\alpha c_{0,n-1},c_{0,0},\ldots ,c_{0,n-2})+e_{1}((\alpha +\beta +\gamma ) c_{1,n-1},c_{1,0},\ldots ,c_{1,n-2})+e_{2}((\alpha -\beta +\gamma ) c_{2,n-1},c_{2,0},\ldots ,c_{2,n-2})\in e_{0}{\mathscr {C}}_{0}+e_{1}{\mathscr {C}}_{1}+e_{2}{\mathscr {C}}_{2}={\mathscr {C}}\), it follows that the linear code \({\mathscr {C}}\) is a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R. \(\square \)

Theorem 2

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R. Then there exists a polynomial \(g(x)\in R[x]\) with \(g(x)|(x^n-(\alpha +\beta v+\gamma v^{2}))\) such that \({\mathscr {C}}=\langle g(x)\rangle \), where \(g(x)=\sum _{i=0}^{2}e_{i}g_{i}(x)\) and \(g_{0}(x)\), \(g_{1}(x)\) and \(g_{2}(x)\) are the generator polynomials of \(\alpha \)-constacyclic code \({\mathscr {C}}_{0}\), \((\alpha +\beta +\gamma )\)-constacyclic code \({\mathscr {C}}_{1}\) and \((\alpha -\beta +\gamma )\)-constacyclic code \({\mathscr {C}}_{2}\), respectively.

Proof

Since \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{q}\), respectively, we can assume that the generator polynomials of \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(g_{0}(x)\), \(g_{1}(x)\) and \(g_{2}(x)\), respectively. Therefore \(e_{0}g_{0}(x)\in e_{0}{\mathscr {C}}_{0}\subseteq {\mathscr {C}}\), \(e_{1}g_{1}(x)\in e_{1}{\mathscr {C}}_{1}\subseteq {\mathscr {C}}\) and \(e_{2}g_{2}(x)\in e_{2}{\mathscr {C}}_{2}\subseteq {\mathscr {C}}\). Thus, \(\langle \sum _{i=0}^{2}e_{i}g_{i}(x)\rangle \subseteq {\mathscr {C}}\).

On the other hand, let \(f(x)\in {\mathscr {C}}\). Since \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\), there exist \(s(x)g_{0}(x)\in {\mathscr {C}}_{0}\), \(u(x)g_{1}(x)\in {\mathscr {C}}_{1}\), \(t(x)g_{2}(x)\in {\mathscr {C}}_{2}\) such that \(f(x)=e_{0}s(x)g_{0}(x)+e_{1}u(x)g_{1}(x)+e_{2}t(x)g_{2}(x)\), where s(x), u(x), \(t(x)\in {\mathbb {F}}_{q}[x]\). Therefore \(f(x)\in \langle \sum _{i=0}^{2}e_{i}g_{i}(x)\rangle \). Thus, \({\mathscr {C}}\subseteq \langle \sum _{i=0}^{2}e_{i}g_{i}(x)\rangle \), which implies that \({\mathscr {C}}=\langle \sum _{i=0}^{2}e_{i}g_{i}(x)\rangle \).

According to the theory of constacyclic codes over finite field, we know that \(g_{0}(x)|(x^n-\alpha )\), \(g_{1}(x)|(x^n-(\alpha +\beta +\gamma ))\), \(g_{2}(x)|(x^n-(\alpha -\beta +\gamma ))\). Therefore, for \(i=0,1,2\), there exist polynomials \(h_i(x)\in {\mathbb {F}}_{q}[x]\) such that \(x^n-\alpha =g_{0}(x)h_{0}(x)\), \(x^n-(\alpha +\beta +\gamma )=g_{1}(x)h_{1}(x)\), \(x^n-(\alpha -\beta +\gamma )=g_{2}(x)h_{2}(x)\), which imply that \((\sum _{i=0}^{2}e_{i}g_{i}(x))(\sum _{i=0}^{2}e_{i}h_{i}(x))=x^n-(e_{0}\alpha +e_{1}(\alpha +\beta +\gamma )+e_{2}(\alpha -\beta +\gamma ))=x^n-(\alpha +\beta v+\gamma v^{2})\), i.e., \(\sum _{i=0}^{2}e_{i}g_{i}(x)\) is a divisor of \(x^n-(\alpha +\beta v+\gamma v^{2})\). \(\square \)

From Theorem 2, we can get the following result directly and omit the proof process here.

Corollary 1

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R and \(g_{0}(x)\), \(g_{1}(x)\) and \(g_{2}(x)\) be the generator polynomials of \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Then \(|{\mathscr {C}}|=q^{3n-\sum _{i=0}^{2}deg(g_{i}(x))}\).

4 Quantum codes from Euclidean dual-containing (\(\alpha +\beta v+\gamma v^{2}\))-constacyclic codes over R

Let \(\varvec{x}=(x_{0},x_{1},\ldots ,x_{n-1})\), \(\varvec{y}=(y_{0},y_{1},\ldots ,y_{_{n-1}})\in R^n\). The Euclidean inner product of \(\mathbf {x}\) and \(\mathbf {y}\) is defined as

$$\begin{aligned} \varvec{x}\cdot \varvec{y}=x_{0}{y}_{0}+x_{1}{y}_{1}+\cdots +x_{n-1}{y}_{n-1}. \end{aligned}$$

The Euclidean dual \({\mathscr {C}}^{\perp }\) of \({\mathscr {C}}\) is defined as

$$\begin{aligned} {\mathscr {C}}^{\perp }=\{\varvec{x}\in R^n|\varvec{x}\cdot \varvec{y}=0,~for~all~ \varvec{y}\in {\mathscr {C}}\}. \end{aligned}$$

A code \({\mathscr {C}}\) is called Euclidean dual-containing if \({\mathscr {C}}^\perp \subseteq {\mathscr {C}}\) and Euclidean self-orthogonal if \({\mathscr {C}}\subseteq {\mathscr {C}}^{\perp }\).

Lemma 4

([13], Proposition 1) Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a linear code of length n over R. Then \({\mathscr {C}}^{\bot }=e_{0}{\mathscr {C}}_{0}^{\bot }\oplus e_{1}{\mathscr {C}}_{1}^{\bot }\oplus e_{2}{\mathscr {C}}_{2}^{\bot }\). Moreover, \({\mathscr {C}}\) is a Euclidean self-orthogonal code over R if and only if \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are all Euclidean self-orthogonal codes over \({\mathbb {F}}_{q}\).

Lemma 5

([13], Proposition 4) Let \({\mathscr {C}}\) be a linear Euclidean self-orthogonal code of length n over R. Let \(M\in GL_{3}({\mathbb {F}}_{q})\) and \(MM^{T}=\mu I_{3}\), where \(\mu \in {\mathbb {F}}_{q}^{*}={\mathbb {F}}_{q}\backslash \{0\}\) and \(I_{3}\) is a \(3\times 3\) identity matrix over \({\mathbb {F}}_{q}\). Then \(\Phi ({\mathscr {C}})\) is a linear Euclidean self-orthogonal code of length 3n over \({\mathbb {F}}_{q}\).

Let \({h}_{0}(x)=\frac{x^n-\alpha }{g_{0}(x)}\), \({h}_{1}(x)=\frac{x^n-(\alpha +\beta +\gamma )}{g_{1}(x)}\) and \({h}_{2}(x)=\frac{x^n-(\alpha -\beta +\gamma )}{g_{2}(x)}\). Let \(\tilde{h}(x)=x^{deg(h(x))}h(x^{-1})\) be the reciprocal polynomial of h(x). We have the following result.

Theorem 3

Let \({\mathscr {C}}=\langle \sum _{i=0}^{2}e_{i}g_{i}(x)\rangle \) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R. Then \({\mathscr {C}}^{\bot }\) is also a \((\alpha +\beta v+\gamma v^2)^{-1}\)-constacyclic code of length n over R, where \((\alpha +\beta v+\gamma v^2)^{-1}=e_{0}\alpha ^{-1}+e_{1}(\alpha +\beta +\gamma )^{-1}+e_{2}(\alpha -\beta +\gamma )^{-1}\). Moreover, \({\mathscr {C}}^{\bot }=\langle \sum _{i=0}^{2}e_{i}\tilde{h}_{i}(x)\rangle \), where \(\tilde{h}_{0}(x)\), \(\tilde{h}_{1}(x)\) and \(\tilde{h}_{2}(x)\) are reciprocal polynomials of \(h_{0}(x)\), \(h_{1}(x)\) and \(h_{2}(x)\), respectively.

Proof

In light of Theorem 1, \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{q}\), respectively. Therefore, \({\mathscr {C}}_{0}^{\bot }\), \({\mathscr {C}}_{1}^{\bot }\) and \({\mathscr {C}}_{2}^{\bot }\) are \(\alpha ^{-1}\)-constacyclic, \((\alpha +\beta +\gamma )^{-1}\)-constacyclic and \((\alpha -\beta +\gamma )^{-1}\)-constacyclic codes of length n over \({\mathbb {F}}_{q}\), respectively. From Lemma 4, we can get that \({\mathscr {C}}^{\bot }\) is a \((\alpha +\beta v+\gamma v^{2})^{-1}\)-constacyclic code of length n over R, where \((\alpha +\beta v+\gamma v^2)^{-1}=e_{0}\alpha ^{-1}+e_{1}(\alpha +\beta +\gamma )^{-1}+e_{2}(\alpha -\beta +\gamma )^{-1}\).

Similar to the proof of Theorem 2, we can get the rest of these results.\(\square \)

In the following, we will construct non-binary quantum codes from (\(\alpha +\beta v+\gamma v^{2}\))-constacyclic codes over R. The construction method bases on the following CSS construction.

Lemma 6

[6] Let \({\mathscr {C}}\) be an [nkd] linear code over \({\mathbb {F}}_{q}\). If \({\mathscr {C}}^{\bot }\subseteq {\mathscr {C}}\), then an \([[n,2k-n,\ge d]]_q\) quantum code can be obtained.

Lemma 7

Let \(\lambda \in {\mathbb {F}}_{q}^{*}\) be a primitive \(r^{th}\) root of unity and let \({\mathscr {C}}\) be a Euclidean dual-containing \(\lambda \)-constacyclic code of length n over \({\mathbb {F}}_{q}\). We then have \(\lambda =\lambda ^{-1}\), i.e., \(\lambda =\pm 1\).

Proof

The proof process is similar to that of Corollary 2.6 in [7], so we omit it here.

Lemma 8

[6] Let \({\mathscr {C}}\) be a \(\kappa \)-constacyclic code with generator polynomial g(x) over \({\mathbb {F}}_{q}\). Then \({\mathscr {C}}\) contains its dual code if and only if

$$\begin{aligned} x^n-\kappa \equiv 0~(mod~g(x)\tilde{g}(x)), \end{aligned}$$

where \(\tilde{g}(x)\) is the reciprocal polynomial of g(x) and \(\kappa =\pm 1\).

Since \({\mathscr {C}}\) is a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R if and only if \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{q}\), respectively. To study Euclidean dual-containing \((\alpha +\beta v+\gamma v^{2})\)-constacyclic codes over R, we assume first that \(\alpha =\pm 1\), \(\alpha +\beta +\gamma =\pm 1\), \(\alpha -\beta +\gamma =\pm 1\) by Lemma 7. According to the above results, we give a necessary and sufficient condition for the existence of Euclidean dual-containing constacyclic codes \({\mathscr {C}}\) of length n over R.

Theorem 4

Let \({\mathscr {C}}=\langle \sum _{i=0}^{2}e_{i}g_{i}(x)\rangle \) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R and \(\alpha =\pm 1\), \(\alpha +\beta +\gamma =\pm 1\), \(\alpha -\beta +\gamma =\pm 1\). Then \({\mathscr {C}}^{\bot } \subseteq {\mathscr {C}}\) if and only if

$$\begin{aligned} \begin{aligned} x^n-\alpha \equiv 0~(mod~g_{0}(x)g_{0}^{*}(x)),\\ x^n-(\alpha +\beta +\gamma ) \equiv 0~(mod~g_{1}(x)g_{1}^{*}(x)),\\ x^n-(\alpha -\beta +\gamma ) \equiv 0~(mod~g_{2}(x)g_{2}^{*}(x)), \end{aligned} \end{aligned}$$

where \(g_{0}^{*}(x)=\frac{1}{g_{0}(0)}\tilde{g}_{0}(x)\), \(g_{1}^{*}(x)=\frac{1}{g_{1}(0)}\tilde{g}_{1}(x)\) and \(g_{2}^{*}(x)=\frac{1}{g_{2}(0)}\tilde{g}_{2}(x)\).

Proof

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}=\langle \sum _{i=0}^{2}e_{i}g_{i}(x)\rangle \) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R, where \({\mathscr {C}}_{0}=\langle g_{0}(x)\rangle \), \({\mathscr {C}}_{1}=\langle g_{1}(x)\rangle \) and \({\mathscr {C}}_{2}=\langle g_{2}(x)\rangle \). If

$$\begin{aligned} \begin{aligned} x^n-\alpha \equiv 0~(mod~g_{0}(x)g_{0}^{*}(x)),\\ x^n-(\alpha +\beta +\gamma ) \equiv 0~(mod~g_{1}(x)g_{1}^{*}(x)),\\ x^n-(\alpha -\beta +\gamma ) \equiv 0~(mod~g_{2}(x)g_{2}^{*}(x)), \end{aligned} \end{aligned}$$

then \({\mathscr {C}}_{0}^{\bot }\subseteq {\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}^{\bot }\subseteq {\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}^{\bot }\subseteq {\mathscr {C}}_{2}\), which implies that \(e_{i}{\mathscr {C}}_{i}^{\bot }\subseteq e_{i}{\mathscr {C}}_{i}\) for \(i=0,1,2\). Therefore

$$\begin{aligned} e_{0}{\mathscr {C}}_{0}^{\bot }\oplus e_{1}{\mathscr {C}}_{1}^{\bot }\oplus e_{2}{\mathscr {C}}_{2}^{\bot }\subseteq e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}, \end{aligned}$$

that is, \({\mathscr {C}}^{\bot } \subseteq {\mathscr {C}}\).

Conversely, if \({\mathscr {C}}^{\bot } \subseteq {\mathscr {C}}\), then \(e_{0}{\mathscr {C}}_{0}^{\bot }\oplus e_{1}{\mathscr {C}}_{1}^{\bot }\oplus e_{2}{\mathscr {C}}_{2}^{\bot }\subseteq e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\). Since \({\mathscr {C}}_{i}\) are the q-ary codes such that \(e_{i}{\mathscr {C}}_{i}\) is equal to \({\mathscr {C}}\) mod \(e_{j}\) for \(i,j=0,1,2\) and \(i\ne j\), it follows that \({\mathscr {C}}_{0}^{\bot }\subseteq {\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}^{\bot }\subseteq {\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}^{\bot }\subseteq {\mathscr {C}}_{2}\). Therefore,

$$\begin{aligned} \begin{aligned} x^n-\alpha \equiv 0~(mod~g_{0}(x)g_{0}^{*}(x)),\\ x^n-(\alpha +\beta +\gamma ) \equiv 0~(mod~g_{1}(x)g_{1}^{*}(x)),\\ x^n-(\alpha -\beta +\gamma ) \equiv 0~(mod~g_{2}(x)g_{2}^{*}(x)). \end{aligned} \end{aligned}$$

\(\square \)

From Lemmas 456 and Theorem 4, we can construct non-binary quantum codes as follows.

Theorem 5

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R. If \({\mathscr {C}}^{\bot } \subseteq {\mathscr {C}}\), then there exists a quantum error-correcting code with parameters \([[3n,2k-3n,\ge d_{G}]]_{q}\), where \(d_{G}\) is the minimum Gray weight of \({\mathscr {C}}\) and k is the dimension of the code \(\Phi ({\mathscr {C}})\).

The parameters of an \([[n,k,d]]_{q}\) quantum codes satisfy the quantum Singleton bound \(2d\le n-k+2\). A quantum code that achieves this bound is called a quantum maximum distance separable (MDS) code. In the following, if we take \(\alpha =1\), \(\beta =0\) and \(\gamma =0\), then \({\mathscr {C}}\) is a cyclic code. By using the computational algebra system Magma [5], we give some examples to construct non-binary quantum codes from cyclic codes over R.

Example 1

Let \(R={\mathbb {F}}_5+v{\mathbb {F}}_5+v^2{\mathbb {F}}_5\), where \(v^3=v\). Let \(n=20\). We have

$$\begin{aligned} \begin{aligned} x^{20}-1=&(x+1)^5(x+2)^5(x+3)^5(x+4)^5\in {\mathbb {F}}_5(x). \end{aligned} \end{aligned}$$

Let \({\mathscr {C}}=\langle g(x)\rangle \) be a cyclic code of length 20 over R and \(g(x)=(1-v^{2})g_{0}(x)+3(v^2+v)g_{1}(x)+3(v^2-v)g_{2}(x)\), where \(g_0(x)=x+2\), \(g_1(x)=x+4\), \(g_2(x)=x^4+x^3+3^2+2x+4\). Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 2 &{} 3 &{} 4 \\ 2 &{} 1 &{} 2 \\ 1 &{} 2 &{} 3 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{5}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(MM^{\top }=4I_{3}\). Since \(x^{20}-1\equiv 0~(mod ~g_{i}(x)g_{i}^{*}(x))\) for \(i=0,1,2\), by Theorem 4 we get \({\mathscr {C}}^\perp \subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [60, 54, 3] linear Euclidean dual-containing code over \({\mathbb {F}}_5\). Then we obtain a new quantum code with parameters \([[60,48,3]]_5\). This quantum code has the larger minimum distance comparing with the known quantum code with parameters \([[60,48,2]]_5\) appeared in [3].

Example 2

Let \(R={\mathbb {F}}_7+v{\mathbb {F}}_7+v^2{\mathbb {F}}_7\), where \(v^3=v\). Let \(n=14\). We have

$$\begin{aligned} \begin{aligned} x^{14}-1=&(x+1)^{7}(x+6)^{7}\in {\mathbb {F}}_7(x). \end{aligned} \end{aligned}$$

Let \({\mathscr {C}}=\langle g(x)\rangle \) be a cyclic code of length 14 over R and \(g(x)=(1-v^{2})g_{0}(x)+4(v^2+v)g_{1}(x)+4(v^2-v)g_{2}(x)\), where \(g_0(x)=1\), \(g_1(x)=x+6\), \(g_2(x)=x^2+2x+1\). Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 5 &{} 2 &{} 1 \\ 6 &{} 5 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{7}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(MM^{\top }=2I_{3}\). Since \(x^{14}-1\equiv 0~(mod ~g_{i}(x)g_{i}^{*}(x))\) for \(i=0,1,2\), by Theorem 4 we get \({\mathscr {C}}^\perp \subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [42, 39, 3] linear Euclidean dual-containing code over \({\mathbb {F}}_7\). Then we obtain a new quantum code with parameters \([[42,36,3]]_7\). This quantum code has the same minimum distance as the known quantum code with parameters \([[41,35,3]]_7\) appeared in [9], but our code has the larger code rate than that code.

Example 3

Let \(R={\mathbb {F}}_{11}+v{\mathbb {F}}_{11}+v^2{\mathbb {F}}_{11}\), where \(v^3=v\). Let \(n=22\). We have

$$\begin{aligned} \begin{aligned} x^{22}-1=&(x+1)^{11}(x+10)^{11}\in {\mathbb {F}}_{11}(x). \end{aligned} \end{aligned}$$

Let \({\mathscr {C}}=\langle g(x)\rangle \) be a cyclic code of length 22 over R and \(g(x)=(1-v^{2})g_{0}(x)+6(v^2+v)g_{1}(x)+6(v^2-v)g_{2}(x)\), where \(g_0(x)=x+10\), \(g_1(x)=x+10\), \(g_2(x)=(x+10)^5\). Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 9 &{} 2 &{} 1 \\ 10 &{} 9 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{11}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(MM^{\top }=9I_{3}\). Since \(x^{22}-1\equiv 0~(mod ~g_{i}(x)g_{i}^{*}(x))\) for \(i=0,1,2\), by Theorem 4 we get \({\mathscr {C}}^\perp \subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [66, 59, 4] linear Euclidean dual-containing code over \({\mathbb {F}}_7\). Then we obtain a new quantum code with parameters \([[66,52,4]]_{11}\). This quantum code has the same minimum distance as the known quantum code with parameters \([[63,39,4]]_{11}\) appeared in [20], but our code has the larger code rate than that code.

Example 4

Let \(R={\mathbb {F}}_{13}+v{\mathbb {F}}_{13}+v^2{\mathbb {F}}_{13}\), where \(v^3=v\). Let \(n=12\). We have

$$\begin{aligned} \begin{aligned} x^{12}-1=&(x+1)(x+2)(x+3)(x+4)(x+5)(x+6)(x+7)(x+8)(x+9)\\&(x+10)\in {\mathbb {F}}_{13}(x). \end{aligned} \end{aligned}$$

Let \({\mathscr {C}}=\langle g(x)\rangle \) be a cyclic code of length 12 over R and \(g(x)=(1-v^{2})g_{0}(x)+7(v^2+v)g_{1}(x)+7(v^2-v)g_{2}(x)\), where \(g_0(x)=x+2, g_1(x)=x+3, g_2(x)=(x+4) (x+5)\). Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 11 &{} 2 &{} 1 \\ 12 &{} 11 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{13}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(MM^{\top }=9I_{3}\). Since \(x^{12}-1\equiv 0~(mod ~g_{i}(x)g_{i}^{*}(x))\) for \(i=0,1,2\), by Theorem 4 we get \({\mathscr {C}}^\perp \subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [36, 32, 3] linear Euclidean dual-containing code over \({\mathbb {F}}_{13}\). Then we obtain a new quantum code with parameters \([[36,28,3]]_{13}\). This quantum code has the same minimum distance as the known quantum code with parameters \([[35,27,3]]_{13}\) appeared in [20], but our code has the larger code rate than that code.

Example 5

Let \(R={\mathbb {F}}_{17}+v{\mathbb {F}}_{17}+v^2{\mathbb {F}}_{17}\), where \(v^3=v\). Let \(n=8\). We have

$$\begin{aligned} \begin{aligned} x^{8}-1=&(x+1)(x+2)(x+4)(x+5)(x+8)(x+9)(x+13)(x+15)(x+16)\\&\in {\mathbb {F}}_{17}(x). \end{aligned} \end{aligned}$$

Let \({\mathscr {C}}=\langle g(x)\rangle \) be a cyclic code of length 8 over R and \(g(x)=(1-v^{2})g_{0}(x)+8(v^2+v)g_{1}(x)+8(v^2-v)g_{2}(x)\), where \(g_0(x)=x+2\), \(g_1(x)=x+4\), \(g_2(x)=(x+4) (x+8)\). Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 15 &{} 2 &{} 1 \\ 16 &{} 15 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{17}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(MM^{\top }=9I_{3}\). Since \(x^{8}-1\equiv 0~(mod ~g_{i}(x)g_{i}^{*}(x))\) for \(i=0,1,2\), by Theorem 4 we get \({\mathscr {C}}^\perp \subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [24, 20, 4] linear Euclidean dual-containing code over \({\mathbb {F}}_{17}\). Then we obtain a new quantum code with parameters \([[24,16,4]]_{17}\). This quantum code satisfies \(n+2-k-2d=2\).

Table 1 New quantum codes \([[n,k,d]]_q\) from cyclic codes over R
Table 2 New quantum codes \([[n,k,d]]_q\) from \((1-2v^2)\)-constacyclic codes over R

Tables 1 and 2 contain some new non-binary quantum error-correcting codes from cyclic codes and \((1-2v^2)\)-constacyclic codes, respectively. The first column of the tables denotes the length of \({\mathscr {C}}\) over \(R={\mathbb {F}}_q+v{\mathbb {F}}_q+v^2{\mathbb {F}}_q\), \(g_i(x)\) are generator polynomials of \({\mathscr {C}}_0\), \({\mathscr {C}}_1\) and \({\mathscr {C}}_2\), respectively, column five denotes the parameters of the Gray images of \({\mathscr {C}}\) over R, the following column denotes the associated quantum codes and the last column denotes the known quantum codes in comparison. Let \(g_i(x)=a_0+a_1x+\cdots +a_dx^d\). For simplicity, we denote \(g_i(x)\) by \(a_0a_1\ldots a_d\) in columns two, three and four. Moreover, we denote 10, 11, 12, 13, 14, 15 by A, B, C, D, E, F.

Remark 1

In Table 1, our quantum codes \([[60,48,3]]_{5}\), \([[132,110,4]]_{5}\) have the larger minimum distance than the known quantum codes in [3]. Moreover, our quantum code \([[24,16,4]]_{17}\) in Example 5 satisfies \(n+2-k-2d=2\). Other new quantum codes have the same minimum distance as the known quantum codes, but our codes have the larger code rate than the known quantum codes. In Table 2, our quantum code \([[60,36,4]]_{7}\) has the larger dimension and minimum distance than the known quantum codes in [12], and \([[18,10,3]]_{13}\) has the larger code rate and minimum distance than the known quantum codes in [12]. Further, new quantum code \([[9,5,3]]_{13}\) is an MDS code. Except new quantum codes \([[33,3,8]]_{5}\) and \([[57,39,5]]_{11}\), the rest of quantum codes have the same minimum distance as the known quantum codes, but our codes have the larger code rate than the known quantum codes.

5 Quantum codes from Hermitian dual-containing (\(\alpha +\beta v+\gamma v^{2}\))-constacyclic codes over R

In this section, we set \(q=p^2\), i.e., \(R={\mathbb {F}}_{p^{2}}+v{\mathbb {F}}_{p^{2}}+v^{2}{\mathbb {F}}_{p^{2}}\). For any \(\lambda \in {\mathbb {F}}_{p^{2}}\), define the conjugate \(\bar{\lambda }=\lambda ^{p}\). Let \(\varvec{a}=(a_{0},a_{1},\ldots ,a_{n-1})\), \(\varvec{b}=(b_{0},b_{1},\ldots ,b_{_{n-1}})\in R^n\). The Hermitian inner product of \(\varvec{a}\) and \(\varvec{b}\) is defined as

$$\begin{aligned} (\varvec{a},\varvec{b})_{H}=a_{0}\bar{b}_{0}+a_{1}\bar{b}_{1}+\cdots +a_{n-1}\bar{b}_{n-1}. \end{aligned}$$

The Hermitian dual \({\mathscr {C}}^{\perp _{H}}\) of \({\mathscr {C}}\) is defined as

$$\begin{aligned} {\mathscr {C}}^{\perp _{H}}=\{\varvec{a}\in R^n|(\varvec{a},\varvec{b})_{H}=0,~for~all~ \varvec{b}\in {\mathscr {C}}\}. \end{aligned}$$

A code \({\mathscr {C}}\) is called Hermitian dual-containing if \({\mathscr {C}}^{\perp _{_{H}}}\subseteq {\mathscr {C}}\) and Hermitian self-orthogonal if \({\mathscr {C}}\subseteq {\mathscr {C}}^{\perp _{H}}\). For any \(\varvec{c}=(c_{0},c_{1},\ldots ,c_{n-1})\in {\mathscr {C}}\), define \(\bar{\varvec{c}}=(c_{0}^{p},c_{1}^{p},\ldots ,c_{n-1}^{p})\). Similarly, for any \(M=(m_{ij})_{0\le i,j\le n-1}\in GL_{n}({\mathbb {F}}_{p^{2}})\), define \(\overline{M}=(m_{ij}^{p})_{0\le i,j\le n-1}\).

Firstly, we recall some results about Hermitian dual-containing constacyclic codes over \({\mathbb {F}}_{p^2}\) in [17].

Assuming that \(\mathrm{gcd}(n,p)=1\). Let \(\omega \) be a primitive rnth root of unity in some extension field of \({\mathbb {F}}_{p^2}\) such that \(\omega ^n=\lambda \). Here, \(\lambda \in {\mathbb {F}}_{p^2}^{*}\), \(\mathrm{ord}_{p^2}(\lambda )=r\). Define \(\varOmega =\{1+ir|0\le i \le n-1\}(\mathrm{mod}~rn)\subseteq \mathbb {Z}_{rn}\). For each \(j\in \varOmega \), let \(C_{j}\) be the \(p^2\)-cyclotomic coset mod rn containing j. Let \({\mathscr {C}}\) be a \(\lambda \)-constacyclic code of length n over \({\mathbb {F}}_{p^2}\) with generator polynomial g(x). The defining set \({\mathscr {C}}\) is given by \(T=\{j\in \varOmega |g(\omega ^j)=0\}\). The defining set of \({\mathscr {C}}\) is the union of some \(p^2\)-cyclotomic cosets mod rn. It can be easily seen that \({\mathscr {C}}^{\bot _{H}}\) has defining set \(T^{\bot _{H}}=\{j\in \varOmega |-pj(~mod~rn)\notin T\}\).

Lemma 9

[7] Let \(\lambda \in {\mathbb {F}}_{p^{2}}^{*}\) be a primitive \(r^{th}\) root of unity and let \({\mathscr {C}}\) be a Hermitian dual-containing \(\lambda \)-constacyclic code of length n over \({\mathbb {F}}_{p^{2}}\). We then have \(\lambda =\lambda ^{-p}\), i.e., \(r|(p+1)\).

Lemma 10

[17] Let \(\lambda \in {\mathbb {F}}_{p^2}^{*}\) be of order r such that \(r|(p+1)\). Let \({\mathscr {C}}\) be a \(\lambda \)-constacyclic code of length n with defining set \(T\subseteq \varOmega \). Then \({\mathscr {C}}\) contains its Hermitian dual code if and only if \(T\cap T^{-p}=\emptyset \), where \(T^{-p}=\{-pz(~mod~rn)|z\in T\}\).

Theorem 6

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a linear code of length n over R. Then \({\mathscr {C}}^{\bot _{H}}=e_{0}{\mathscr {C}}_{0}^{\bot _{H}}\oplus e_{1}{\mathscr {C}}_{1}^{\bot _{H}}\oplus e_{2}{\mathscr {C}}_{2}^{\bot _{H}}\). Moreover, \({\mathscr {C}}\) is a Hermitian self-orthogonal code over R if and only if \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are all Hermitian self-orthogonal codes over \({\mathbb {F}}_{p^{2}}\).

Proof

Define

$$\begin{aligned} C_{0}^{\bot _{H}}= & {} \{\varvec{x}_{0}\in {\mathbb {F}}_{p^{2}}^{n}|\exists \varvec{x}_{1},\varvec{x}_{2}\in {\mathbb {F}}_{p^{2}}^{n},e_{0}\varvec{x}_{0}+e_{1}\varvec{x}_{1}+e_{2}\varvec{x}_{2}\in {\mathscr {C}}^{\bot _{H}}\},\\ C_{1}^{\bot _{H}}= & {} \{\varvec{x}_{1}\in {\mathbb {F}}_{p^{2}}^{n}|\exists \varvec{x}_{0},\varvec{x}_{2}\in {\mathbb {F}}_{p^{2}}^{n},e_{0}\varvec{x}_{0}+e_{1}\varvec{x}_{1}+e_{2}\varvec{x}_{2}\in {\mathscr {C}}^{\bot _{H}}\},\\ C_{2}^{\bot _{H}}= & {} \{\varvec{x}_{2}\in {\mathbb {F}}_{p^{2}}^{n}|\exists \varvec{x}_{0},\varvec{x}_{1}\in {\mathbb {F}}_{p^{2}}^{n},e_{0}\varvec{x}_{0}+e_{1}\varvec{x}_{1}+e_{2}\varvec{x}_{2}\in {\mathscr {C}}^{\bot _{H}}\}, \end{aligned}$$

then \({\mathscr {C}}^{\bot _{H}}=e_{0}C_{0}^{\bot _{H}}\oplus e_{1}C_{1}^{\bot _{H}}\oplus e_{2}C_{2}^{\bot _{H}}\). Clearly, for any \(i=0,1,2\), we have \(C_{i}^{\bot _{H}}\subseteq {\mathscr {C}}_{i}^{\bot _{H}}\). If \(\varvec{c}_{0}\in {\mathscr {C}}_{0}^{\bot _{H}}\), then there exist \(\varvec{x}_{1},\varvec{x}_{2}\in {\mathbb {F}}_{p^{2}}^{n}\) for any \(\varvec{x}_{0}\in {\mathscr {C}}_{0}\) such that \((\varvec{c}_{0},e_{0}\varvec{x}_{0}+e_{1}\varvec{x}_{1}+e_{2}\varvec{x}_{2})_{H}=0\). Let \(\varvec{c}=e_{0}\varvec{x}_{0}+e_{1}\varvec{x}_{1}+e_{2}\varvec{x}_{2}\in {\mathscr {C}}\), then \((e_{0}\varvec{c}_{0},\varvec{c})_{H}=0\). Hence \(e_{0}\varvec{c}_{0}\in {\mathscr {C}}^{\bot _{H}}\). By the uniqueness of linear code decomposition over R, we have \(\varvec{c}_{0}\in {C}_{0}^{\bot _{H}}\), i.e., \({\mathscr {C}}_{0}^{\bot _{H}}\subseteq {C}_{0}^{\bot _{H}}\). Similarly, we can get \({\mathscr {C}}_{1}^{\bot _{H}}\subseteq {C}_{1}^{\bot _{H}}\) and \({\mathscr {C}}_{2}^{\bot _{H}}\subseteq {C}_{2}^{\bot _{H}}\). Therefore, \({\mathscr {C}}^{\bot _{H}}=e_{0}{\mathscr {C}}_{0}^{\bot _{H}}\oplus e_{1}{\mathscr {C}}_{1}^{\bot _{H}}\oplus e_{2}{\mathscr {C}}_{2}^{\bot _{H}}\).

If \({\mathscr {C}}\) is a Hermitian self-orthogonal code over R, then \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\subseteq {\mathscr {C}}^{\bot _{H}}=e_{0}{\mathscr {C}}_{0}^{\bot _{H}}\oplus e_{1}{\mathscr {C}}_{1}^{\bot _{H}}\oplus e_{2}{\mathscr {C}}_{2}^{\bot _{H}}\). Therefore \({\mathscr {C}}_{i}\subseteq {\mathscr {C}}_{i}^{\bot _{H}}\) for \(i=0,1,2\). On the other hand, if \({\mathscr {C}}_{i}\subseteq {\mathscr {C}}_{i}^{\bot _{H}}\) for \(i=0,1,2\), then \(e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\subseteq e_{0}{\mathscr {C}}_{0}^{\bot _{H}}\oplus e_{1}{\mathscr {C}}_{1}^{\bot _{H}}\oplus e_{2}{\mathscr {C}}_{2}^{\bot _{H}}\), i.e., \({\mathscr {C}}\subseteq {\mathscr {C}}^{\bot _{H}}\).\(\square \)

Theorem 7

Let \({\mathscr {C}}\) be a linear Hermitian self-orthogonal code of length n over R. Let \(M\in GL_{3}({\mathbb {F}}_{p^2})\) and \(M(\overline{M})^{T}=\mu I_{3}\), where \(\mu \in {\mathbb {F}}_{p^2}^{*}={\mathbb {F}}_{p^2}\backslash \{0\}\) and \(I_{3}\) is a \(3\times 3\) identity matrix over \({\mathbb {F}}_{p^2}\). Then \(\Phi ({\mathscr {C}})\) is a linear Hermitian self-orthogonal code of length 3n over \({\mathbb {F}}_{p^2}\).

Proof

For any two codewords \(\varvec{c}=(c_{0},c_{1},\ldots ,c_{3n-1})\), \(\varvec{d}=(d_{0},d_{1},\ldots ,d_{3n-1})\in \Phi ({\mathscr {C}})\), there exist two codewords \(\varvec{x}=(x_{0},x_{1},\ldots ,x_{n-1})\), \(\varvec{y}=(y_{0},y_{1},\ldots ,y_{n-1})\in {\mathscr {C}}\) such that \(\varvec{c}=(x_{0}M,x_{1}M,\ldots ,x_{n-1}M)\), \(\varvec{d}=(y_{0}M,y_{1}M,\ldots ,y_{n-1}M)\). Hence, \((\varvec{c},\varvec{d})_{H}=\sum _{j=0}^{n-1}x_{j}M(\overline{M})^{T}\bar{y}_{j}\). Since \(M(\overline{M})^{T}=\mu I_{3}\), \((\varvec{c},\varvec{d})_{H}=\mu \sum _{j=0}^{n-1}x_{j}\bar{y}_{j}\). Since \({\mathscr {C}}\) is a linear Hermitian self-orthogonal code, \((\varvec{x},\varvec{y})_{H}=\sum _{j=0}^{n-1}x_{j}\bar{y}_{j}=0\). Therefore, \((\varvec{c},\varvec{d})_{H}=0\), i.e., \(\Phi ({\mathscr {C}})\) is a linear Hermitian self-orthogonal code of length 3n over \({\mathbb {F}}_{p^2}\).\(\square \)

Theorem 8

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R. Then \({\mathscr {C}}^{\bot _{H}}\) is also a \((\alpha +\beta v+\gamma v^2)^{-p}\)-constacyclic code of length n over R, where \((\alpha +\beta v+\gamma v^2)^{-p}=e_{0}\alpha ^{-p}+e_{1}(\alpha +\beta +\gamma )^{-p}+e_{2}(\alpha -\beta +\gamma )^{-p}\).

Proof

Since \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) is a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R, according to Theorem 1, we have \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{p^2}\), respectively. Therefore \({\mathscr {C}}_{0}^{\bot _{H}}\), \({\mathscr {C}}_{1}^{\bot _{H}}\) and \({\mathscr {C}}_{2}^{\bot _{H}}\) are \(\alpha ^{-p}\)-constacyclic codes, \((\alpha +\beta +\gamma )^{-p}\)-constacyclic codes and \((\alpha -\beta +\gamma )^{-p}\)-constacyclic codes of length n over \({\mathbb {F}}_{p^2}\), respectively. Since \({\mathscr {C}}^{\bot _{H}}=e_{0}{\mathscr {C}}_{0}^{\bot _{H}}\oplus e_{1}{\mathscr {C}}_{1}^{\bot _{H}}\oplus e_{2}{\mathscr {C}}_{2}^{\bot _{H}}\), \({\mathscr {C}}^{\bot _{H}}\) is a \(e_{0}\alpha ^{-p}+e_{1}(\alpha +\beta +\gamma )^{-p}+e_{2}(\alpha -\beta +\gamma )^{-p}\)-constacyclic code of length n over R. Let \((\alpha +\beta v+\gamma v^2)^{-p}=e_{0}\alpha ^{-p}+e_{1}(\alpha +\beta +\gamma )^{-p}+e_{2}(\alpha -\beta +\gamma )^{-p}\), and we get the result directly.\(\square \)

According to the above results, we give a necessary and sufficient condition for the existence of Hermitian dual-containing constacyclic codes \({\mathscr {C}}\) of length n over R. Since \({\mathscr {C}}\) is a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R if and only if \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are \(\alpha \)-constacyclic codes, \((\alpha +\beta +\gamma )\)-constacyclic codes and \((\alpha -\beta +\gamma )\)-constacyclic codes of length n over \({\mathbb {F}}_{p^{2}}\), respectively. For the sake of convenience, we denote by \(l_{0}\), \(l_{1}\), \(l_{2}\), respectively, the following elements

$$\begin{aligned} l_{0}=\alpha ,~l_{1}=\alpha +\beta +\gamma ,~l_{2}=\alpha -\beta +\gamma . \end{aligned}$$

To study Hermitian dual-containing \((\alpha +\beta v+\gamma v^{2})\)-constacyclic codes over R, we assume first that \(ord_{p^{2}}(l_{i})|(p+1)\) by Lemma 9, for \(i=0,1,2\).

Theorem 9

Let \(T_{i}\subseteq \varOmega \) be the defining set of \(l_{i}\)-constacyclic code \({\mathscr {C}}_{i}\) and \(ord_{p^2}(l_{i})|(p+1)\), \(T_{i}^{\bot _{H}}=\{j\in \varOmega |-pj(~mod~rn)\notin T_{i}\}\) be the defining set of \(l_{i}^{-p}\)-constacyclic code \({\mathscr {C}}_{i}^{\bot _{H}}\). Then \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) is a Hermitian dual-containing \((\alpha +\beta v+\gamma v^2)\)-constacyclic code if and only if \(T_{i}\cap T_{i}^{-p}=\emptyset \), where \(T_{i}^{-p}=\{-pz(~mod~rn)|z\in T_{i}\}\) for \(i=0,1,2\).

Proof

From Lemma 10 and Theorem 6, \({\mathscr {C}}\) is a Hermitian dual-containing \((\alpha +\beta v+\gamma v^2)\)-constacyclic code of length n over R \(\Longleftrightarrow \) \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\) are all Hermitian dual-containing codes of length n over R \(\Longleftrightarrow \) \(T_{i}\cap T_{i}^{-p}=\emptyset \) for \(i=0,1,2\).\(\square \)

In the following, we will construct non-binary quantum codes from (\(\alpha +\beta v+\gamma v^{2}\))-constacyclic codes over R. The construction method bases on the following Hermitian construction.

Lemma 11

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

From Lemma 9 and Theorems 679, we can construct non-binary quantum codes as follows.

Theorem 10

Let \({\mathscr {C}}=e_{0}{\mathscr {C}}_{0}\oplus e_{1}{\mathscr {C}}_{1}\oplus e_{2}{\mathscr {C}}_{2}\) be a \((\alpha +\beta v+\gamma v^{2})\)-constacyclic code of length n over R. Let \(\Phi ({\mathscr {C}})\) be a \([3n,k,d_{G}]\) linear code over \({\mathbb {F}}_{p^{2}}\), where \(d_{G}\) is the minimum Gray weight of \({\mathscr {C}}\). If \({\mathscr {C}}^{\bot _{H}} \subseteq {\mathscr {C}}\), then there exists a quantum error-correcting code with parameters \([[3n,2k-3n,\ge d_{G}]]_{p}\).

In the following, using the computational algebra system Magma, we give some examples to construct non-binary quantum codes from \((\alpha +\beta v+\gamma v^{2})\)-constacyclic codes over R.

Example 6

Let \(R={\mathbb {F}}_{5^2}+v{\mathbb {F}}_{5^2}+v^2{\mathbb {F}}_{5^2}\), where \(v^3=v\). Let \({\mathscr {C}}=(1-v^2){\mathscr {C}}_{0}+\frac{(v^2+v)}{2}{\mathscr {C}}_{1}+\frac{(v^2-v)}{2}{\mathscr {C}}_{2}\) be a \(w^{12}\)-constacyclic code of length 6 over R, where w is a primitive element of \({\mathbb {F}}_{5^2}\). Let \(T_{0}=\{1\}\), \(T_{1}=\{3\}\) and \(T_{2}=\{1,3\}\) be the defining set of constacyclic codes \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Then \(g_0(x)=x-w^2\), \(g_1(x)=x-w^6\), \(g_2(x)=(x-w^2)(x-w^6)=x^2+w^{13}x+w^{8}\) are generator polynomials of \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 2 &{} 3 &{} 4 \\ 2 &{} 1 &{} 2 \\ 1 &{} 2 &{} 3 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{5^2}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(M(\overline{M})^{\top }=4I_{3}\). Since \(T_{0}^{-5}=\{7\}\), \(T_{1}^{-5}=\{9\}\), \(T_{2}^{-5}=\{7,9\}\), by Theorem 9 we get \({\mathscr {C}}^{\perp _{H}}\subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [18, 14, 4] linear Hermitian dual-containing code over \({\mathbb {F}}_{5^2}\). Then we obtain a new quantum code with parameters \([[18,10,4]]_5\). This quantum code has the same minimum distance as the known quantum code with parameters \([[17,9,4]]_5\) appeared in [9], but our code has the larger code rate than that code.

Example 7

Let \(R={\mathbb {F}}_{7^2}+v{\mathbb {F}}_{7^2}+v^2{\mathbb {F}}_{7^2}\), where \(v^3=v\). Let \({\mathscr {C}}=(1-v^2){\mathscr {C}}_{0}+\frac{(v^2+v)}{2}{\mathscr {C}}_{1}+\frac{(v^2-v)}{2}{\mathscr {C}}_{2}\) be a \(w^{24}\)-constacyclic code of length 12 over R, where w is a primitive element of \({\mathbb {F}}_{7^2}\). Let \(T_{0}=\{1\}\), \(T_{1}=\{5\}\) and \(T_{2}=\{7\}\) be the defining set of constacyclic codes \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Then \(g_0(x)=x-w^2\), \(g_1(x)=x-w^{10}\), \(g_2(x)=x-w^{14}\) are generator polynomials of \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 5 &{} 2 &{} 1 \\ 6 &{} 5 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{7^2}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(M(\overline{M})^{\top }=2I_{3}\). Since \(T_{0}^{-7}=\{17\}\), \(T_{1}^{-7}=\{13\}\), \(T_{2}^{-7}=\{23\}\), by Theorem 9 we get \({\mathscr {C}}^{\perp _{H}}\subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [36, 33, 3] linear Hermitian dual-containing code over \({\mathbb {F}}_{7^2}\). Then we obtain a new quantum code with parameters \([[36,30,3]]_7\). This quantum code has the same length and minimum distance as the known quantum code with parameters \([[36,29,3]]_7\) appeared in [9], but our code has the larger code rate than that code.

Example 8

Let \(R={\mathbb {F}}_{11^2}+v{\mathbb {F}}_{11^2}+v^2{\mathbb {F}}_{11^2}\), where \(v^3=v\). Let \({\mathscr {C}}=(1-v^2){\mathscr {C}}_{0}+\frac{(v^2+v)}{2}{\mathscr {C}}_{1}+\frac{(v^2-v)}{2}{\mathscr {C}}_{2}\) be a \(w^{60}\)-constacyclic code of length 20 over R, where w is a primitive element of \({\mathbb {F}}_{11^2}\). Let \(T_{0}=\{1\}\), \(T_{1}=\{3\}\) and \(T_{2}=\{3,5\}\) be the defining set of constacyclic codes \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Then \(g_0(x)=x-w^3\), \(g_1(x)=x-w^{9}\), \(g_2(x)=(x-w^{9})(x-w^{15})=x^2+w^{74}x+4\) are generator polynomials of \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 9 &{} 2 &{} 1 \\ 10 &{} 9 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{11^2}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(M(\overline{M})^{\top }=9I_{3}\). Since \(T_{0}^{-11}=\{29\}\), \(T_{1}^{-11}=\{7\}\), \(T_{2}^{-11}=\{7,25\}\), by Theorem 9 we get \({\mathscr {C}}^{\perp _{H}}\subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [60, 56, 4] linear Hermitian dual-containing code over \({\mathbb {F}}_{11^2}\). Then we obtain a new quantum code with parameters \([[60,52,4]]_{11}\). This quantum code has parameters satisfying \(n+2-k-2d=2\).

Example 9

Let \(R={\mathbb {F}}_{13^2}+v{\mathbb {F}}_{13^2}+v^2{\mathbb {F}}_{13^2}\), where \(v^3=v\). Let \({\mathscr {C}}=(1-v^2){\mathscr {C}}_{0}+\frac{(v^2+v)}{2}{\mathscr {C}}_{1}+\frac{(v^2-v)}{2}{\mathscr {C}}_{2}\) be a \(w^{84}\)-constacyclic code of length 4 over R, where w is a primitive element of \({\mathbb {F}}_{13^2}\). Let \(T_{0}=\{1\}\), \(T_{1}=\{3\}\) and \(T_{2}=\{5\}\) be the defining set of constacyclic codes \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Then \(g_0(x)=x-w^{21}\), \(g_1(x)=x-w^{63}\), \(g_2(x)=x-w^{105}\) are generator polynomials of \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 11 &{} 2 &{} 1 \\ 12 &{} 11 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{13^2}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(M(\overline{M})^{\top }=9I_{3}\). Since \(T_{0}^{-13}=\{3\}\), \(T_{1}^{-13}=\{1\}\), \(T_{2}^{-13}=\{7\}\), by Theorem 9 we get \({\mathscr {C}}^{\perp _{H}}\subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [12, 9, 3] linear Hermitian dual-containing code over \({\mathbb {F}}_{13^2}\). Then we obtain a new quantum code with parameters \([[12,6,3]]_{13}\). This quantum code has the same length and minimum distance as the known quantum code with parameters \([[12,4,3]]_{13}\) appeared in [12], but our code has the larger code rate than that code.

Example 10

Let \(R={\mathbb {F}}_{19^2}+v{\mathbb {F}}_{19^2}+v^2{\mathbb {F}}_{19^2}\), where \(v^3=v\). Let \({\mathscr {C}}=(1-v^2){\mathscr {C}}_{0}+\frac{(v^2+v)}{2}{\mathscr {C}}_{1}+\frac{(v^2-v)}{2}{\mathscr {C}}_{2}\) be a \(w^{180}\)-constacyclic code of length 18 over R, where w is a primitive element of \({\mathbb {F}}_{19^2}\). Let \(T_{0}=\{1\}\), \(T_{1}=\{3\}\) and \(T_{2}=\{1,3,5\}\) be the defining set of constacyclic codes \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Then \(g_0(x)=x-w^{10}\), \(g_1(x)=x-w^{30}\), \(g_2(x)=(x-w^{10})(x-w^{30})(x-w^{50})=x^3+w^{310}x^2+9x+w^{270}\) are generator polynomials of \({\mathscr {C}}_{0}\), \({\mathscr {C}}_{1}\) and \({\mathscr {C}}_{2}\), respectively. Take

$$\begin{aligned} \begin{aligned} M= \left( \begin{array}{ccc} 17 &{} 18 &{} 1 \\ 18 &{} 17 &{} 2 \\ 2 &{} 1 &{} 2 \\ \end{array} \right) \in GL_{3}({\mathbb {F}}_{19^2}), \end{aligned} \end{aligned}$$

then Gray map \(\Phi \) is defined by an invertible matrix M satisfying \(M(\overline{M})^{\top }=9I_{3}\). Since \(T_{0}^{-19}=\{17\}\), \(T_{1}^{-19}=\{15\}\), \(T_{2}^{-19}=\{13,15,17\}\), by Theorem 9 we get \({\mathscr {C}}^{\perp _{H}}\subseteq {\mathscr {C}}\), and \(\Phi ({\mathscr {C}})\) is a [54, 49, 4] linear Hermitian dual-containing code over \({\mathbb {F}}_{19^2}\). Then we obtain a new quantum code with parameters \([[54,44,4]]_{19}\). This quantum code has parameters satisfying \(n+2-k-2d=4\).

6 Conclusion

In this paper, we give two methods to construct quantum codes from \((\alpha +\beta v+\gamma v^2)\)-constacyclic codes over the finite non-chain ring R. Meanwhile, we use the computational algebra system Magma to find some new quantum codes comparing with previous studies. The results indicate that constacyclic codes over finite non-chain rings are a good resource of constructing quantum codes. This research is very significant for quantum communication. In the future, we will construct more good quantum codes from constacyclic codes over other finite non-chain rings.