1 Introduction

Like classical linear codes, quantum codes help to protect quantum information during transmission through a quantum channel. These codes have been extensively used in quantum computation which solves challenging problems faster than the classical computation. For instance, the running time of the Shor’s Algorithm [36] to find the prime factors of a large integer is polynomial time in quantum computation, whereas sub-exponential in classical computation. Quantum code was introduced by Shor [35]. Later, Calderbank et al. [9] constructed the quantum codes from classical codes in a formal way. Recall that a q-ary quantum code denoted by \([[n,k,d]]_q\) satisfies the quantum singleton bound \(2d+k\le n+2\) and called maximum distance separable (MDS) if the bound is attained. Clearly, MDS codes have the best error control (highest distance) and best code rate (larger non-redundant bits) compared to the other codes with the same parameters. But, these codes are rare to find. Hence, people have been constructing quantum codes close to MDS and store them to some online platform, like [16]. Usually, to validate the novelty of the approach, researchers are comparing their obtained codes to the codes which are known by most recent articles.

Kai and Zhu [26] determined the quantum codes over \({\mathbb {F}}_4\) from the cyclic codes over \({\mathbb {F}}_4+u{\mathbb {F}}_4\). Qian [31] obtained binary quantum codes by using cyclic codes over \({\mathbb {F}}_2+v{\mathbb {F}}_2\). Later, the study of cyclic codes over finite commutative non-chain rings has been contributed significantly in quantum codes, refer [2, 3, 12, 18, 22, 24, 31, 33]. Further, the constacyclic codes, being a generalized class of cyclic codes, also play an important role in quantum codes construction [10, 23]. In 2018, the u-constacyclic codes over \({\mathbb {F}}_p+u{\mathbb {F}}_p,u^2=1\) by Gao and Wang [17] and constacyclic codes over \({\mathbb {F}}_q+v{\mathbb {F}}_p+v^2{\mathbb {F}}_p,v^3=v\) by Ma et al. [28] were studied to obtain non-binary quantum codes. Recently, Ma et al. [29] studied the constacyclic codes over \({\mathbb {F}}_q[u,v]/\langle u^2-1,v^2-v,uv-vu\rangle \) and produced many new quantum codes. Also, Dinh et al. [15] explored some quantum codes from the constacyclic codes over the non-chain ring \({\mathbb {F}}_p[u]/\langle u^{k+1}-u\rangle \). In continuation, Islam et al. [20] considered the structure of constacyclic codes over a class of finite commutative non-chain rings \(R_{k,m}={\mathbb {F}}_{p^m}[u_1,u_2,\ldots ,u_k]/\langle u_i^2-1,u_iu_j-u_ju_i\rangle _{i\ne j=1,2,\ldots ,k}\), where \(m\ge 1, k\ge 2\) are integers and constructed many MDS and good quantum codes compared to the best-known codes. In addition, Alkenani et al. [1] studied the constacyclic codes over the finite non-chain ring \({\mathbb {F}}_q[u_1,u_2]/\langle u_1^2-u_1,u_2^2-u_2,u_1u_2-u_2u_1\rangle \) to obtain quantum codes. Therefore, it is clear that the constacyclic code over finite non-chain rings is one of the rich resources to produce new quantum codes. Hence, it is logical to study these codes over different and new non-chain rings which are capable to explore more new codes. This motivates us to study the constacyclic codes over a class of finite commutative non-chain rings \(R={\mathbb {F}}_q[u,v]/\langle u^2-\gamma u,v^2-\delta v,uv=vu=0\rangle \), where \(\gamma ,\delta \in {\mathbb {F}}_q^{*}\).

On the other side, the additive codes were introduced by Delsarte and Levenshtein [11] in 1998. One of the most common tasks in the study of additive codes is to find their generator polynomials, dual codes and bounds on minimum distances [6, 7, 21, 34]. Despite the application in steganography [32], these codes are also useful to construct good quantum codes [4]. In 2019, Aydogdu and Abualrub [5] studied the quantum codes from \({\mathbb {Z}}_2\times ({\mathbb {Z}}_2+u{\mathbb {Z}}_2)\) and Diao et al. [14] considered \({\mathbb {Z}}_p{\mathbb {Z}}_p[v]\)-additive cyclic codes to obtain good quantum codes. To the best of our knowledge, very few articles [4, 5, 13, 14, 27] have engaged to construct new quantum codes using additive codes. So, still there is a huge scope to explore quantum codes using cyclic and constacyclic codes over the mixed alphabets. Toward this, we extend our study to the constacyclic codes over the mixed alphabets \({\mathbb {F}}_qR\) with two main motives as follows:

  1. (i)

    The article obtains many new and better quantum codes compared to the existing codes (available in recent articles) from the constacyclic codes over the class of non-chain rings R.

  2. (ii)

    The article determines the structure of \({\mathbb {F}}_qR\)-additive constacyclic codes of length (nm) and constructs better quantum codes compared to the known codes.

2 Preliminary

For a prime p and \(q=p^r\), let \(R={\mathbb {F}}_q[u,v]/\langle u^2-\gamma u,v^2-\delta v,uv=vu=0\rangle \), where \(\gamma ,\delta \in {\mathbb {F}}_q^{*}\). Thus, R is a finite commutative Frobenius, non-chain and semi-local ring (with unity) of characteristic p. Also, R has \(q^3\) elements and three maximal ideals \(\langle u+v\rangle ,\langle \gamma -u\rangle \) and \(\langle \delta -v\rangle \). The explicit representation of R is

$$\begin{aligned} R={\mathbb {F}}_q+u{\mathbb {F}}_q+v{\mathbb {F}}_q,\quad \mathrm{where}\;u^2=\gamma u,v^2=\delta v,uv=vu=0, \end{aligned}$$

and each member of R is of the form \(z=z_1+uz_2+vz_3\), where \(z_i\in {\mathbb {F}}_q,\) for \(i=1,2,3\). Let \(\xi _1=\frac{\gamma \delta -\gamma v-\delta u}{\gamma \delta }, \xi _2=\frac{u}{\gamma }\) and \(\xi _3=\frac{v}{\delta }\). Then, \(\xi _i^2=\xi _i,\xi _i\xi _j=0\) if \(i\ne j\), and \(\sum _{i=1}^3\xi _i=1\). Therefore, \(R= \bigoplus _{i=1}^3\xi _iR\cong \bigoplus _{i=1}^3\xi _i{\mathbb {F}}_q\). Hence, an element \(\lambda =\lambda _1+u\lambda _2+v\lambda _3\in R\) has a unique representation \(\lambda =\lambda _1\xi _1+(\lambda _1+\gamma \lambda _2)\xi _2 +(\lambda _1+\delta \lambda _3)\xi _3\). Further, the units of R are classified by the below lemma.

Lemma 1

Let \(\lambda =\lambda _1+u\lambda _2+v\lambda _3\in R\) be a nonzero element. Then, \(\lambda \) is a unit in R if and only if \(\lambda _1,\lambda _1+\gamma \lambda _2, \lambda _1+\delta \lambda _3\) are units in \({\mathbb {F}}_q\).

Proof

Let \(\lambda \in R\) be a unit such that \(\lambda =\lambda _1\xi _1+(\lambda _1+\gamma \lambda _2)\xi _2+(\lambda _1+\delta \lambda _3)\xi _3\). There exists \(\lambda '=\sum _{i=1}^3\xi _i\lambda _i'\in R\) where \(\lambda _i'\in {\mathbb {F}}_q^{*}\) such that \(\lambda \lambda '=1\). Then, \(\lambda _1\lambda _1'\xi _1+(\lambda _1+\gamma \lambda _2)\lambda _2'\xi _2+(\lambda _1+\delta \lambda _3)\lambda _3'\xi _3=1\). Now, multiplying by \(\xi _1\) in both sides, we get \(\lambda _1\lambda _1'\xi _1=\xi _1\), and this implies \(\lambda _1\lambda _1'=1\). Hence, \(\lambda _1\) is a unit. Similarly, \(\lambda _1+\gamma \lambda _2, \lambda _1+\delta \lambda _3\) are units in \({\mathbb {F}}_q\).

Conversely, let \(\lambda _1,\lambda _1+\gamma \lambda _2, \lambda _1+\delta \lambda _3\) be units in \({\mathbb {F}}_q\). Let \(\lambda '=\lambda _1^{-1}\xi _1+(\lambda _1+\gamma \lambda _2)^{-1}\xi _2+(\lambda _1+\delta \lambda _3)^{-1}\xi _3\). Then, \(\lambda \lambda '=1\). Hence, \(\lambda \) is a unit in R. \(\square \)

Now, we recall that a non-empty subset C of \(R^n\) is said to be a linear code of length n if it is an R-submodule of \(R^n\) and each element of C is known as codeword. Let \(\lambda \in R\) be a unit in R. Then, a linear code C is said to be a \(\lambda \)-constacyclic code if for any codeword \((c_0,c_1,\ldots ,c_{n-1})\in C\) implies \((\lambda c_{n-1},c_0,\ldots ,c_{n-2})\in C\). It is a cyclic code for \(\lambda =1\) and negacyclic code for \(\lambda =-1\). Algebraically, a \(\lambda \)-constacyclic code of length n is identified as an ideal of \(R[x]/\langle x^n-\lambda \rangle \) and each codeword is represented by a polynomial of degree \(n-1\). Throughout the article, we fix \(\lambda =\lambda _1+u\lambda _2+v\lambda _3\), where \(\lambda _i\in {\mathbb {F}}_q\), for \(i=1,2,3\). For a linear code C of length n,  its dual code \(C^{\perp }=\{a\in R^n|\,a\cdot b=0\) for all \(b\in C\}\) is also a linear code where the Euclidean inner product between two vectors \(a=(a_0,a_1,\ldots ,a_{n-1}),b=(b_0,b_1,\ldots ,b_{n-1})\) is defined by \(a\cdot b=\sum _{i=0}^{n-1}a_ib_i\). Here, we see that for a \(\lambda \)-constacyclic code C, dual \(C^{\perp }\) is a \(\lambda ^{-1}\)-constacyclic code of length n over R (Theorem 3). The linear code C is said to be self-dual if \(C=C^{\perp }\) and self-orthogonal if \(C\subseteq C^{\perp }\). Next, we define a Gray map \(\varphi \) which preserves the orthogonality and it is useful to obtain \({\mathbb {F}}_q\)-parameters of the constacyclic codes over R.

Definition 1

A map \(\varphi :R\longrightarrow {\mathbb {F}}_q^{3}\) is defined by

$$\begin{aligned} \varphi (z)=(z_1,z_2,z_3)M, \end{aligned}$$
(1)

where \(z=\sum _{i=1}^3\xi _iz_i\in R\) and \(M\in GL_3({\mathbb {F}}_q)\) is a \(3\times 3\) invertible matrix such that \(MM^\mathrm{T}=\tau I_3\). Here, \(M^\mathrm{T}\) represents the transpose matrix of M\(I_3\) is the identity matrix of order 3 and \(\tau \in {\mathbb {F}}_q^*\).

The map \(\varphi \) is a bijection and can be extended over \(R^n\) componentwise. We define the Gray weight for \(z\in R\) by \(w_G(z)=w_H(\varphi (z))\) and for \(z=(z_1,z_2,\ldots ,z_n)\in R^n\) by \(w_G(z)=\sum _{i=1}^nw_G(z_i)\), where \(w_H\) is the Hamming weight in \({\mathbb {F}}_q\). The Gray distance between \(z,z'\in R^n\) is \(d_G(z,z')=w_G(z-z')\) and for a linear code C is \(d_G(C)=\min \{w_G(z)|\,0\ne z\in C\}\). By the above discussion, the following result is easy to verify.

Lemma 2

The map \(\varphi \) defined in Eq. (1) is linear and distance preserving from \((R^n,d_G)\) to \(({\mathbb {F}}_q^{3n},d_H)\), where \(d_H\) is the Hamming distance.

Lemma 3

Let C be a linear code of length n over R. Then,

  1. 1.

    \(\varphi (C^{\perp })=\varphi (C)^{\perp }\).

  2. 2.

    C is a self-dual code of length n if and only if \(\varphi (C)\) is a self-dual linear code of length 3n over \({\mathbb {F}}_q\).

  3. 3.

    \(\varphi (C)\) is a self-orthogonal linear code of length 3n if C is a self-orthogonal linear code of length n over R.

Proof

  1. 1.

    Let \(z=(z_0,z_1,\ldots ,z_{n-1})\in C^{\perp }\), where \(z_i=\xi _1z_i'+\xi _2z_i''+\xi _3z_i'''\), for \(0\le i\le n-1\). Then, \(\varphi (z)\in \varphi (C^{\perp })\). In order to prove \(\varphi (z)\in \varphi (C)^{\perp }\), let \(y=(y_0,y_1,\ldots ,y_{n-1})\in C,\) where \(y_i=\xi _1y_i'+\xi _2y_i''+\xi _3y_i'''\) for \(0\le i\le n-1\). Now, \(y\cdot z=0\) implies \(\sum _{i=0}^{n-1}y_iz_i=0\), i.e., \(\sum _{i=0}^{n-1}(\xi _1y_i'z_i'+\xi _2y_i''z_i''+\xi _3y_i'''z_i''')=0\). Hence, \(\sum _{i=0}^{n-1}y_i'z_i'=\sum _{i=0}^{n-1}y_i''z_i''=\sum _{i=0}^{n-1}y_i'''z_i'''=0.\) Again,

    $$\begin{aligned}&\varphi (y)=\left[ (y_0',y_0'',y_0''')M,\ldots ,(y_{n-1}',y_{n-1}'',y_{n-1}''')M\right] =(s_0M,\ldots ,s_{n-1}M),\\&\varphi (z)=\left[ (z_0',z_0'',z_0''')M,\ldots ,(z_{n-1}',z_{n-1}'',z_{n-1}''')M\right] =(t_0M,\ldots ,t_{n-1}M),\\&\mathrm{where}\; s_i=(y_i',y_i'',y_i'''), t_i=(z_i',z_i'',z_i''') \;\mathrm{for}\; 0\le i\le n-1. \end{aligned}$$

    Then,

    $$\begin{aligned} \varphi (y)\cdot \varphi (z)&=\varphi (y)\varphi (z)^\mathrm{T} =\sum _{i=0}^{n-1}s_iMM^\mathrm{T}t_i^\mathrm{T}=\tau \sum _{i=0}^{n-1}s_it_i^\mathrm{T}\\&=\tau \sum _{i=0}^{n-1}(y_i'z_i'+y_i''z_i''+y_i'''z_i''')=0. \end{aligned}$$

    Therefore, \(\varphi (z)\in \varphi (C)^{\perp }\) and hence \(\varphi (C^{\perp })\subseteq \varphi (C)^{\perp }\). Since \(\varphi \) is a bijection, \(\mid \varphi (C^{\perp })\mid =\mid \varphi (C)^{\perp }\mid \). Thus, \(\varphi (C^{\perp })= \varphi (C)^{\perp }\).

  2. 2.

    Let C be a self-dual linear code of length n, i.e., \(C=C^{\perp }\). Then, \(\varphi (C)=\varphi (C^{\perp })=\varphi (C)^{\perp }\). Hence, \(\varphi (C)\) is a self-dual linear code of length 3n over \({\mathbb {F}}_q\). On the other side, let \(\varphi (C)\) be a self-dual linear code, i.e., \(\varphi (C)=\varphi (C)^{\perp }=\varphi (C^{\perp })\). Since \(\varphi \) is a bijection, \(C=C^{\perp }\). Hence, C is a self-dual linear code.

  3. 3.

    Let C be a self-orthogonal linear code of length n over R. Then, \(C\subseteq C^{\perp }\), i.e., \(\varphi (C)\subseteq \varphi (C^{\perp })=\varphi (C)^{\perp }\). Thus, \(\varphi (C)\) is a self-orthogonal linear code of length 3n over \({\mathbb {F}}_q\). \(\square \)

Let C be a linear code of length n over R. Let \(C_1=\{z_1\in {\mathbb {F}}_q^n|\), there exist \(z_2,z_3\in {\mathbb {F}}_q^n\) such that \(\xi _1z_1+\xi _2z_2+\xi _3z_3\in C \},C_2=\{z_2\in {\mathbb {F}}_q^n|\) there exist \(z_1,z_3\in {\mathbb {F}}_q^n\) such that \(\xi _1z_1+\xi _2z_2+\xi _3z_3\in C \}, \text { and } C_3=\{z_3\in {\mathbb {F}}_q^n|\) there exist \(z_1,z_2\in {\mathbb {F}}_q^n\) such that \(\xi _1z_1+\xi _2z_2+\xi _3z_3\in C \}\). Then, \(C_1,C_2,C_3\) are linear codes of length n over \({\mathbb {F}}_q\) and C can be uniquely expressed as \(C=\xi _1C_1\oplus \xi _2C_2\oplus \xi _3C_3\). Also, the dual code of C is \(C^{\perp }=\xi _1C_1^{\perp }\oplus \xi _2C_2^{\perp }\oplus \xi _3C_3^{\perp }\) (see [25, 28] for proof of similar results) and generator matrix of C is

$$\begin{aligned} M= \left[ {\begin{array}{c} \xi _1M_{1} \\ \xi _2M_{2}\\ \xi _3M_{3}\\ \end{array} } \right] \end{aligned}$$

where \(M_1,M_2,M_3\) are generator matrices of \(C_1,C_2,C_3\), respectively.

Now, we look for the structure of \(\lambda \)-constacyclic codes from Theorems 1 to 3 without proofs. These results are helpful to obtain quantum codes in the subsequent section. For similar type of results, interested readers can find in [25, 28].

Theorem 1

Let \(C=\xi _1C_1\oplus \xi _2C_2\oplus \xi _3C_3\) be a linear code of length n over R. Then, C is a \(\lambda \)-constacyclic code if and only if \(C_1,C_2\) and \(C_3\) are \(\lambda _1\)-constacyclic, \((\lambda _1+\gamma \lambda _2)\)-constacyclic and \((\lambda _1+\delta \lambda _3)\)-constacyclic codes of length n over \({\mathbb {F}}_q\), respectively.

Theorem 2

Let \(C=\xi _1C_1\oplus \xi _2C_2\oplus \xi _3C_3\) be a \(\lambda \)-constacyclic code of length n over R. Then, there exists a polynomial \(g(x)\in R[x]\) such that \(C=\langle g(x)\rangle \) and \(g(x)\mid x^n-(\lambda _1+u\lambda _2+v\lambda _3)\), where \(g(x)=\sum _{i=1}^3\xi _ig_i(x)\) and \(C_i=\langle g_i(x)\rangle \) for \(i=1,2,3\).

Theorem 3

Let \(C=\xi _1C_1\oplus \xi _2C_2\oplus \xi _3C_3\) be a \(\lambda \)-constacyclic code of length n over R. Let \(C=\langle \sum _{i=1}^3\xi _ig_i(x)\rangle \), where \(x^n-\lambda _1=g_1(x)h_1(x),x^n-(\lambda _1+\gamma \lambda _2)=g_2(x)h_2(x), x^n-(\lambda _1+\delta \lambda _3)=g_3(x)h_3(x)\). Then, \(C^{\perp }=\xi _1C_1^{\perp }\oplus \xi _2C_2^{\perp }\oplus \xi _3C_3^{\perp }\) is a \(\lambda ^{-1}\)-constacyclic code and \(C^{\perp }=\langle \sum _{i=1}^3\xi _ih_i^*(x)\rangle \), where \(h_i^*(x)\) is reciprocal polynomial of \(h_i(x)\), for \(i=1,2,3\).

3 Quantum codes from constacyclic codes over R

In the present section, we construct quantum codes from the dual-containing \(\lambda \)-constacyclic codes by using the CSS construction. First, we determine the necessary and sufficient conditions (Theorem 4) of these codes to contain their duals. Then, we apply CSS construction (Lemma 5) on their Gray images to construct quantum codes. In this connection, first we recall some basic definitions and facts as follows.

Definition 2

Let \({\mathbb {C}}^q\) be the Hilbert space of dimension q. Then, \(({\mathbb {C}}^q)^{\otimes n}={\mathbb {C}}^q\otimes {\mathbb {C}}^q\otimes \cdots \otimes {\mathbb {C}}^q\) (n times) is also a Hilbert space of dimension \(q^n\). Any \(q^k\)-dimensional subspace of \(({\mathbb {C}}^q)^{\otimes n}\) is called a quantum code and denoted by \([[n,k,d]]_q\) where d is the minimum distance. Note that the minimum distance d is defined by using the metric of \(({\mathbb {C}}^q)^{\otimes n}\). Every quantum code satisfies the quantum singleton bound \(2d+k\le n+2\) and known as maximum distance separable (or shortly, MDS) code if the bound is attained. A quantum code \([[n,k,d]]_q\) is said to be better than the quantum code \([[n',k',d']]_q\) if any of the following or both hold:

  1. 1.

    \(d>d'\) when \(\frac{k}{n}=\frac{k'}{n'}\) (larger distance with same code rate).

  2. 2.

    \(\frac{k}{n}>\frac{k'}{n'}\) when \(d=d'\) (larger code rate with same distance).

Now, we recall two important results: Lemma 4 (condition for dual-containing codes over \({\mathbb {F}}_q\)) and Lemma 5 (CSS construction), which will help to determine dual-containing \(\lambda \)-constacyclic codes and quantum codes from these codes, respectively.

Lemma 4

[9] Let \(C=\langle g(x)\rangle \) be an \(\alpha \)-constacyclic code of length n over \({\mathbb {F}}_q\), where \(\alpha =\pm 1\). Then, \(C^{\perp }\subseteq C\) if and only if \(x^n-\alpha \equiv 0\,(\mathrm{mod}\,g(x)g^*(x))\).

Lemma 5

[19] Let C be an [nkd] linear code over \({\mathbb {F}}_q\) such that \(C^{\perp }\subseteq C\). Then, there exists a quantum code \([[n,2k-n,d]]_q\) over \({\mathbb {F}}_q\).

With the help of Lemma 4, we determine the necessary and sufficient conditions of \(\lambda \)-constacyclic codes to contain their duals in the next theorem.

Theorem 4

Let \(C=\xi _1C_1\oplus \xi _2C_2\oplus \xi _3C_3\) be a \(\lambda \)-constacyclic code of length n over R where \(\lambda _1=\pm 1, \lambda _1+\gamma \lambda _2=\pm 1, \lambda _1+\delta \lambda _3=\pm 1\). Also, let \(C_i=\langle g_i(x)\rangle \) where \(x^n-\lambda _1=g_1(x)h_1(x),x^n-(\lambda _1+\gamma \lambda _2)=g_2(x)h_2(x), x^n-(\lambda _1+\delta \lambda _3)=g_3(x)h_3(x)\). Then, \(C^{\perp }\subseteq C\) if and only if

$$\begin{aligned} x^n-\lambda _1&\equiv 0\,(\mathrm{mod}\,g_1(x)g_1^*(x))\\ x^n-(\lambda _1+\gamma \lambda _2)&\equiv 0\,(\mathrm{mod}\,g_2(x)g_2^*(x))\\ x^n-(\lambda _1+\delta \lambda _3)&\equiv 0\,(\mathrm{mod}\,g_3(x)g_3^*(x)). \end{aligned}$$

Proof

Let \(C_i=\langle g_i(x)\rangle \) for \(i=1,2,3\) where

$$\begin{aligned} x^n-\lambda _1&\equiv 0\,(\mathrm{mod}\,g_1(x)g_1^*(x))\\ x^n-(\lambda _1+\gamma \lambda _2)&\equiv 0\,(\mathrm{mod}\,g_2(x)g_2^*(x))\\ x^n-(\lambda _1+\delta \lambda _3)&\equiv 0\,(\mathrm{mod}\,g_3(x)g_3^*(x)). \end{aligned}$$

By Lemma 4, we have \(C^{\perp }_i\subseteq C_i\) for \(i=1,2,3\). Now, \(C^{\perp }=\xi _1C_1^{\perp }\oplus \xi _2C_2^{\perp }\oplus \xi _3C_3^{\perp }\subseteq \xi _1C_1\oplus \xi _2C_2\oplus \xi _3C_3=C\).

On the other hand, let \(C^{\perp }\subseteq C\). Since \(C_i\) is a q-ary linear code such that \(C\equiv \xi _iC_i\,(\mathrm{mod}\,\xi _i)\), \(C^{\perp }_i\subseteq C_i\) for \(i=1,2,3\). Hence, by Lemma 4, we have

$$\begin{aligned} x^n-\lambda _1&\equiv 0\,(\mathrm{mod}\,g_1(x)g_1^*(x))\\ x^n-(\lambda _1+\gamma \lambda _2)&\equiv 0\,(\mathrm{mod}\,g_2(x)g_2^*(x))\\ x^n-(\lambda _1+\delta \lambda _3)&\equiv 0\,(\mathrm{mod}\,g_3(x)g_3^*(x)). \end{aligned}$$

\(\square \)

Now, we are in a position to construct quantum codes by using Lemma 5 and Theorem 4 in the next result.

Theorem 5

Let \(C=\xi _1C_1\oplus \xi _2C_2\oplus \xi _3C_3\) be a \(\lambda \)-constacyclic code of length n over R such that \(C^{\perp }\subseteq C\). Then, there exists a quantum code with parameters \([[3n,2k-3n,d_H]]_q\) over \({\mathbb {F}}_q\), where \(d_H\) is the minimum Hamming distance.

Proof

Since \(C^{\perp }\subseteq C\), we have \(\varphi (C^{\perp })\subseteq \varphi (C)\). Now, by Lemma 3, \(\varphi (C^{\perp })=\varphi (C)^{\perp }\), and this implies that \(\varphi (C)^{\perp }\subseteq \varphi (C)\). Therefore, \(\varphi (C)\) is a dual-containing \([3n,k,d_H]\) linear code over \({\mathbb {F}}_q\). Hence, by Lemma 5, there exists a quantum code \([[3n,2k-3n,d_H]]_q\) over \({\mathbb {F}}_q\). \(\square \)

Remark 1

The dimension \(2k-3n\) of the quantum code obtained in Theorem 5 is always nonnegative due to the fact that \(C^{\perp }\subseteq C\).

4 Quantum codes from \(\pmb {\mathbb {F}}_qR\)-additive constacyclic codes

The set \({\mathbb {F}}_qR=\{(a,b)|\,a\in {\mathbb {F}}_q,b\in R\}\) is a group under componentwise addition. Now, we define a projection map \(\pi :R\longrightarrow {\mathbb {F}}_q\) by \(\pi (z_1+uz_2+vz_3)=z_1\), where \(z_i\in {\mathbb {F}}_q\) for \(i=1,2,3\). With the help of \(\pi \), we define a multiplication \(*:R\times {\mathbb {F}}_q^nR^n\longrightarrow {\mathbb {F}}_q^nR^n\) by \(z*(a_0,a_1,\ldots ,a_{n-1},b_0,b_1\ldots ,b_{m-1})=(\pi (z)a_0,\pi (z)a_1,\ldots ,\pi (z)a_{n-1},zb_0,zb_1\ldots ,zb_{m-1})\) where \(z,b_i\in R, a_i\in {\mathbb {F}}_q\) for all i. Then, it is easy to show that under the multiplication \(*\), the set \({\mathbb {F}}_q^nR^m=\{(a,b)|\,a\in {\mathbb {F}}_q^n,b\in R^m\}\) is an R-module. Recall that a non-empty \(C\subseteq {\mathbb {F}}_q^nR^m\) is called an \({\mathbb {F}}_qR\)-additive linear code of length (nm) if C is an R-submodule of \({\mathbb {F}}_q^nR^m\). For \({\mathbb {F}}_qR\)-additive linear code C of length (nm), its dual is defined as \(C^{\perp }=\{c\in {\mathbb {F}}_q^nR^m|\,c\cdot c'=0\) for all \(c'\in C\}\), where the inner product of any two vectors \(c=(a_0,a_1,\ldots ,a_{n-1},b_0,b_1,\ldots ,b_{m-1}), c'=(a'_0,a'_1,\ldots ,a'_{n-1},b'_0,b'_1,\ldots ,b'_{m-1})\) is defined by \(c\cdot c'=(u+v)\sum _{i=0}^{n-1}a_ia'+\sum _{i=0}^{n-1}b_ib_i'\). It is a routine work to check that \(C^{\perp }\) is also an \({\mathbb {F}}_qR\)-additive linear code of length (nm).

Let \(\lambda \) be a unit in R and denote \(S_{n,m}={\mathbb {F}}_q[x]/\langle x^n-1\rangle \times R[x]/\langle x^m-\lambda \rangle \). Now, we identify each vector \((a,b)\in {\mathbb {F}}_q^nR^m\) to the polynomial \((a(x),b(x))\in S_{n,m}\), where \(a=(a_0,a_1,\ldots ,a_{n-1})\in {\mathbb {F}}_q^n,b=(b_0,b_1,\ldots ,b_{m-1})\in R^m\) and \(a(x)=a_0+a_1x+\cdots +a_{n-1}x^{n-1}\in {\mathbb {F}}_q[x]/\langle x^n-1\rangle , b(x)=b_0+b_1x+\cdots +b_{m-1}x^{m-1}\in R[x]/\langle x^m-\lambda \rangle \). The projection map \(\pi \) acts on the polynomial ring \(R[x]\longrightarrow {\mathbb {F}}_q[x]\) as \(\pi (\sum _{i}r_ix^i)=\sum _{i}\pi (r_i)x^i\), where \(r_i\in R\) for all i. Hence, the extended corresponding multiplication \(*: R[x]\times S_{n,m}\longrightarrow S_{n,m}\) is defined as \(g(x)*(a(x),b(x))=(\pi (g(x))a(x),g(x)b(x))\), where \(b(x),g(x)\in R[x], a(x)\in {\mathbb {F}}_q[x]\). Thus, \(S_{n,m}\) is an R[x]-module under the multiplication \(*\).

Definition 3

Let \(\lambda \) be a unit in R. Then, an \({\mathbb {F}}_qR\)-additive linear code C of length (nm) is said to be \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic if for any \((a,b)\in C\), we have \((\sigma (a),\sigma _{\lambda }(b))\in C\), where \(\sigma _{\lambda }\) is the \(\lambda \)-constacyclic shift and \(\sigma \) is the cyclic shift operator.

It is worth mentioning that an \({\mathbb {F}}_qR\)-additive linear code generalizes both the linear code over \({\mathbb {F}}_q\) and over R. In fact, if \(n=0\), then an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm) is indeed a \(\lambda \)-constacyclic code over R. On the other side, for \(m=0\), an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm) is a cyclic code of length n over \({\mathbb {F}}_q\). In this way, we can conclude that the construction (\({\mathbb {F}}_qR\)-additive codes) in the present section is a more general version of earlier construction of \(\lambda \)-constacyclic codes. The next result characterizes the \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic codes of length (nm) as submodules of \(S_{n,m}\).

Proposition 1

Let C be an \({\mathbb {F}}_qR\)-additive linear code of length (nm). Then, C is an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm) if and only if C is an R[x]-submodule of \(S_{n,m}\).

Proof

Let C be an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm). Let \(z(x)\in R[x]\) and \((a,b)\in C\) whose polynomial representation is (a(x), b(x)) where \(a(x)=a_0+a_1x+\cdots +a_{n-1}x^{n-1},b(x)=b_0+b_1x+\cdots +b_{m-1}x^{m-1}\). Now, \(x*(a(x),b(x))=(a_{n-1}+xa_0+\cdots +a_{n-2}x^{n-1}, \lambda b_{m-1}+xb_0+\cdots +b_{m-2}x^{m-1})=(\sigma (a),\sigma _{\lambda }(b))\in C\). Similarly, for any \(i\ge 2\), we have \(x^i*(a(x),b(x))\in C\). Since C is an R-submodule of \({\mathbb {F}}_q^nR^m\), \(z(x)*(a(x),b(x))\in C\). Hence, C is an R[x]-submodule of \(S_{n,m}\).

Conversely, let C be an R[x]-submodule of \(S_{n,m}\). Suppose \((a,b)\in C\) whose polynomial representation is (a(x), b(x)). Now, \(x*(a(x),b(x))\in C\) where \(x*(a(x),b(x)) =(\sigma (a),\sigma _{\lambda }(b))\). Therefore, C is an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm). \(\square \)

Now, with the help of map \(\varphi \) defined in Eq. (1), we define another Gray map \(\varPhi : {\mathbb {F}}_qR\longrightarrow {\mathbb {F}}_q^4\) by

$$\begin{aligned} \varPhi (a,z)=(a,\varphi (z))=(a,(z_1,z_2,z_3)M),\quad \mathrm{where}\; z=\sum _{i=1}^3\xi _i z_i\in R, a,z_i\in {\mathbb {F}}_q\; \mathrm{for}\; i=1,2,3. \end{aligned}$$
(2)

Since \(\varphi \) is a linear and bijective map, so is \(\varPhi \). Then, the map \(\varPhi \) can be extended over \({\mathbb {F}}_q^nR^m\longrightarrow {\mathbb {F}}_q^{(n+3m)}\) componentwise and preserves the orthogonality as shown in the next result.

Lemma 6

Let C be an \({\mathbb {F}}_qR\)-additive linear code of length (nm). Then, \(\varPhi (C^{\perp })=\varPhi (C)^{\perp }\). Further, C is self-dual if and only if \(\varPhi (C)\) is self-dual.

Proof

Let C be an \({\mathbb {F}}_qR\)-additive linear code of length (nm). Let \(w=(a_0,a_1,\ldots ,a_{n-1},z_0,z_1,\ldots ,z_{m-1})\in C^{\perp }\) where \(z_i=\xi _1z_i'+\xi _2z_i''+\xi _3z_i'''\) for \(0\le i\le m-1\). In order to show \(\varPhi (w)\in \varPhi (C)^{\perp }\), let \(s=(b_0,b_1,\ldots ,b_{n-1},y_0,y_1,\ldots ,y_{m-1})\in C\), where \(y_i=\xi _1y_i'+\xi _2y_2''+\xi _3y_i'''\) for \(0\le i\le m-1\). Now, \(w\cdot s=0\) implies that \((u+v)\sum _{i=0}^{n-1}a_ib_i+\sum _{i=0}^{m-1}y_iz_i=0\), i.e., \((u+v)\sum _{i=0}^{n-1}a_ib_i+\sum _{i=0}^{m-1}(\xi _1y_i'z_i'+\xi _2y_i''z_i''+\xi _3y_i'''z_i''')=0\), which implies \(\sum _{i=0}^{n-1}a_ib_i=0\) and \(\sum _{i=0}^{m-1}(y_i'z_i'+y_i''z_i''+y_i'''z_i''')=0\). Again,

$$\begin{aligned} \varPhi (w)&=\left[ a_0,a_1,\ldots ,a_{n-1}, (z_0',z_0'',z_0''')M,\ldots , (z_{m-1}',z_{m-1}'',z_{m-1}''')M\right] \\&=[a_0,a_1,\ldots ,a_{n-1}, \alpha _0 M,\ldots , \alpha _{m-1} M]\\ \varPhi (s)&=\left[ b_0,b_1,\ldots ,b_{n-1}, (y_0',y_0'',y_0''')M,\ldots , (y_{m-1}',y_{m-1}'',y_{m-1}''')M\right] \\&=[b_0,b_1,\ldots ,b_{n-1}, \beta _0 M,\ldots , \beta _{m-1} M], \end{aligned}$$

where \(\alpha _i=(z_i',z_i'',z_i'''),\beta _i=(y_i',y_i'',y_i''')\) for \(0\le i\le m-1\). Also,

$$\begin{aligned} \varPhi (w)\cdot \varPhi (s)&=\varPhi (w) \varPhi (s)^\mathrm{T}= (u+v)\sum _{i=0}^{n-1}a_ib_i+\sum _{i=0}^{m-1}\alpha _iMM^\mathrm{T}\beta _i^\mathrm{T}\\&=(u+v)\sum _{i=0}^{n-1}a_ib_i+\tau \sum _{i=0}^{m-1}\alpha _i\beta _i^\mathrm{T}\\&=(u+v)\sum _{i=0}^{n-1}a_ib_i+\tau \sum _{i=0}^{m-1}(y_i'z_i'+y_i''z_i''+y_i'''z_i''')=0. \end{aligned}$$

Then, \(\varPhi (w)\in \varPhi (C)^{\perp }\), and hence, \(\varPhi (C^{\perp })\subseteq \varPhi (C)^{\perp }\). Now, \(\varPhi \) being bijection, \(\mid \varPhi (C^{\perp })\mid =\mid \varPhi (C)^{\perp }\mid \). Therefore, \(\varPhi (C^{\perp })= \varPhi (C)^{\perp }\).

Further, let C be self-dual, i.e., \(C=C^{\perp }\). Then, \(\varPhi (C)=\varPhi (C^{\perp })=\varPhi (C)^{\perp }\). Hence, \(\varPhi (C)\) is self-dual. On the other hand, let \(\varPhi (C)\) be self-dual, i.e., \(\varPhi (C)=\varPhi (C)^{\perp }=\varPhi (C^{\perp })\). Since \(\varPhi \) is a bijection, \(C=C^{\perp }\). Thus, C is self-dual. \(\square \)

Now, \(\pi _n:{\mathbb {F}}_q^nR^m\longrightarrow {\mathbb {F}}_q^n\) defined by \(\pi _n(a,b)=a\) and \(\pi _m:{\mathbb {F}}_q^nR^m\longrightarrow R^m\) defined by \(\pi _n(a,b)=b\), where \(a\in {\mathbb {F}}_q^n,b\in R^m\) are two projective R-module homomorphisms. Let C be an \({\mathbb {F}}_qR\)-additive linear code of length (nm). Then, \(C_n=\pi _n(C)\) is a linear code of length n over \({\mathbb {F}}_q\) and \(C_m=\pi _m(C)\) is a linear code of length m over R. If \(C=C_n\times C_m\), then C is said to be separable. Also, for a separable code C, its dual is \(C^{\perp }=C_n^{\perp }\times C_m^{\perp }\). We classify the separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm) in the next result.

Theorem 6

Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive linear code of length (nm). Then, C is an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code if and only if \(C_n\) is a cyclic code and \(C_m\) is a \(\lambda \)-constacyclic code, respectively.

Proof

Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm). Now, let \(a=(a_0,a_1,\ldots ,a_{n-1})\in C_n\) and \(z=(z_0,z_1,\ldots ,z_{m-1})\in C_m\). Then, \((a,z)\in C\) and \((\sigma (a),\sigma _{\lambda }(z))\in C\). Therefore, \(\sigma (a)\in C_n,\sigma _{\lambda }(z)\in C_m\). Hence, \(C_n\) is a cyclic code and \(C_m\) is a \(\lambda \)-constacyclic code, respectively.

Conversely, let \(C_n\) be a cyclic code and \(C_m\) be a \(\lambda \)-constacyclic code. Let \((a,z)\in C\). Then, \(a\in C_n\) and \(z\in C_m\), and this implies \(\sigma (a)\in C_n,\sigma _{\lambda }(z)\in C_m\). Hence, \((\sigma (a),\sigma _{\lambda }(z))\in C\). Thus, C is an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm). \(\square \)

Corollary 1

Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive linear code of length (nm), where \(C_n\) is a linear code of length n over \({\mathbb {F}}_q\) and \(C_m=\bigoplus _{i=1}^3\xi _iC_i\) is a linear code of length m over R. Then, C is an \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code if and only if \(C_n\) is cyclic, \(C_1\) is \(\lambda _1\)-constacyclic, \(C_2\) is \((\lambda _1+\gamma \lambda _2)\)-constacyclic and \(C_3\) is \((\lambda _1+\delta \lambda _3)\)-constacyclic codes over \({\mathbb {F}}_q\), respectively.

Here, we use the separable \({\mathbb {F}}_qR\)-additive linear codes to obtain quantum codes. Before that, we discuss the necessary and sufficient conditions of these codes to contain their duals.

Lemma 7

Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive linear code of length (nm). Then, \(C^{\perp }\subseteq C\) if and only if \(C_n^{\perp }\subseteq C_n\) and \(C_m^{\perp }\subseteq C_m\).

Proof

Let \(C^{\perp }=C_n^{\perp }\times C_m^{\perp }\subseteq C=C_n\times C_m\). Then, \(C_n^{\perp }\subseteq C_n\) and \(C_m^{\perp }\subseteq C_m\). On the other hand, if \(C_n^{\perp }\subseteq C_n\) and \(C_m^{\perp }\subseteq C_m\), then \(C^{\perp }=C_n^{\perp }\times C_m^{\perp }\subseteq C_n\times C_m=C\). \(\square \)

Theorem 7

Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm), where \(C_n=\langle f(x)\rangle \) and \(C_m=\langle \sum _{i=1}^3\xi _ig_i(x)\rangle \). Then, \(C^{\perp }\subseteq C\) if and only if

$$\begin{aligned} x^n-1&\equiv 0\,(\mathrm{mod}\,f(x)f^*(x))\\ x^m-\lambda _1&\equiv 0\,(\mathrm{mod}\,g_1(x)g_1^*(x))\\ x^m-(\lambda _1+\gamma \lambda _2)&\equiv 0\,(\mathrm{mod}\,g_2(x)g_2^*(x))\\ x^m-(\lambda _1+\delta \lambda _3)&\equiv 0\,(\mathrm{mod}\,g_3(x)g_3^*(x)), \end{aligned}$$

where \(\lambda _1=\pm 1, \lambda _1+\gamma \lambda _2=\pm 1, \lambda _1+\delta \lambda _3=\pm 1\).

Proof

Combining Lemmas 4 and 7, it is verified. \(\square \)

Theorem 7 gives the necessary and sufficient condition for separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic codes to contain their duals. Now, in light of Lemma 5 and fact \(\varPhi (C^{\perp })=\varPhi (C)^{\perp }\), we present the construction of quantum codes from separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code in the next theorem.

Theorem 8

Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm) such that \(C^{\perp }\subseteq C\). Then, there exists a quantum code \([[n+3m,2k-(n+3m),d_H]]_q\) over \({\mathbb {F}}_q\).

Proof

Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm) such that \(C^{\perp }\subseteq C\). Then, \(\varPhi (C^{\perp })\subseteq \varPhi (C)\). By Lemma 6, we have \(\varPhi (C^{\perp })=\varPhi (C)^{\perp }\), and hence, \(\varPhi (C)^{\perp }\subseteq \varPhi (C)\). In this way, \(\varPhi (C)\) is a dual-containing \([n+3m,k,d_H]\) linear code over \({\mathbb {F}}_q\) where \(d_H\) is the minimum Hamming distance. Now, applying Lemma 5 on \(\varPhi (C)\), we have a quantum code over \({\mathbb {F}}_q\) with parameters \([[n+3m,2k-(n+3m),d_H]]_q\). \(\square \)

Remark 2

Note that the length of the quantum code obtained by using Theorem 5 must be an integral multiple of 3, whereas the code length in Theorem 8 has no such limitation, i.e., we can find code of any length \((n+3m)\) with some suitable choices of n and m. For example, in order to obtain a code of length 40, there are finitely many options for n and m such that \(n+3m=40\), and \(n=m=10\) is one of them. This is one of the advantages to study the \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic codes in quantum codes construction.

5 New codes and comparison

It is well known that some good quantum codes are available in the online database [16]. Along with the database, we also use few recent articles [1, 3, 14, 15, 18, 20, 22, 24, 28,29,30] (published within last two year) to compare our obtained quantum codes. It is worth mentioning that with the help of Theorems 5 and 8, we determine several new and better quantum codes than existing codes which are appeared in the above-mentioned articles. All computations involved in the examples are carried out by the Magma computation system [8].

Example 1

Let \(q=17,n=8\) and \(R={\mathbb {F}}_{17}[u,v]/\langle u^2-\gamma u,v^2-\delta v,uv=vu=0\rangle \) where \(\gamma ,\delta \in {\mathbb {F}}_{17}^*\). If \(\lambda =1-2u\gamma ^{-1}-2v\delta ^{-1},\) then \(\lambda _1=1, \lambda _1+\gamma \lambda _2=\lambda _1+\delta \lambda _3=-1\). Now,

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

Let \(C=\langle \sum _{i=1}^3\xi _ig_i(x)\rangle \) be an \((1-2u\gamma ^{-1}-2v\delta ^{-1})\)-constacyclic code of length 8 over R, where \(g_1(x)=(x+2)(x+4)=x^2 + 6x + 8, g_2(x)=(x+5)(x+6)=x^2 + 11x + 13\) and \(g_3(x)=(x + 3)(x + 5)(x + 10)= x^3 + x^2 + 10x + 14\). Let

$$\begin{aligned} M= \left[ {\begin{array}{ccc} 2 &{} 1 &{}2 \\ 15 &{} 2 &{}1 \\ 1 &{} 2 &{}15 \\ \end{array} } \right] \end{aligned}$$

be a \(3\times 3\) invertible matrix such that \(MM^\mathrm{T}=9I_3\). Since \(x^8-1\equiv 0\,(\mathrm{mod}\,g_1(x)g^*_1(x))\) and \(x^8+1\equiv 0\, (\mathrm{mod}\,g_i(x)g^*_i(x))\) for \(i=2,3\), by Theorem 4, we have \(C^{\perp }\subseteq C\). Therefore, \(\varphi (C)\) is a dual-containing [24, 17, 5] linear code over \({\mathbb {F}}_{17}\). Hence, by Theorem 5, we have a quantum code \([[24,10,5]]_{17}\), which has same length and minimum distance but larger code rate than the known code \([[24,8,5]]_{17}\) given by [28].

Example 2

Let \(q=9,n=6,R={\mathbb {F}}_9[u,v]/\langle u^2-\gamma u,v^2-\delta v,uv=vu=0\rangle \) where \(\gamma ,\delta \in {\mathbb {F}}_9^*\). If \(\lambda =1-2u\gamma ^{-1}-2v\delta ^{-1}\), then \(\lambda _1=1, \lambda _1+\gamma \lambda _2=\lambda _1+\delta \lambda _3=-1\). Now,

$$\begin{aligned} x^6-1&= (x + 1)^3(x + 2)^3\in {\mathbb {F}}_9[x]\\ x^6+1&=(x + w^2)^3(x + w^6)^3\in {\mathbb {F}}_9[x]. \end{aligned}$$

Let \(C=\langle \sum _{i=1}^3\xi _ig_i(x)\rangle \) be an \((1-2u\gamma ^{-1}-2v\delta ^{-1})\)-constacyclic code of length 6 over R, where \(g_1(x)=x+2, g_2(x)=x+w^2,g_3(x)=(x+w^2)(x+w^6)^2=x^3 + w^6x^2 + x + w^6\) and \(w^2+2w+2=0\). Also, let

$$\begin{aligned} M= \left[ {\begin{array}{ccc} w &{} -w^7 &{}1 \\ -w^7 &{} 1 &{}w \\ 1 &{} w &{}-w^7 \\ \end{array} } \right] \end{aligned}$$

be a \(3\times 3\) invertible matrix over \({\mathbb {F}}_9\) such that \(MM^\mathrm{T}=I_3\). Since \(x^6-1\equiv 0\,(\mathrm{mod}\,g_1(x)g_1^*(x))\) and \(x^6+1\equiv 0\,(\mathrm{mod}\,g_i(x)g_i^*(x))\), for \(i=2,3\), by Theorem 4 we have \(C^{\perp }\subseteq C\). Therefore, \(\varphi (C)\) is a dual-containing [18, 13, 4] linear code over \({\mathbb {F}}_9\). Thus, by Theorem 5, there exists a quantum code \([[18,8,4]]_{9}\) which has same minimum distance but larger code rate compared to the known code \([[24,8,4]]_{9}\) given by [29].

Example 3

Let \(\lambda =\lambda _1+u\lambda _2+v\lambda _3\) be a unit in \(R={\mathbb {F}}_q[u,v]/\langle u^2-\gamma u,v^2-\delta v,uv=vu=0\rangle \) such that \(\lambda _1=\pm 1, \lambda _1+\gamma \lambda _2=\pm 1,\lambda _1+\delta \lambda _3=\pm 1 \), where \(\lambda _i\in {\mathbb {F}}_q,\gamma ,\delta \in {\mathbb {F}}_q^*\), for \(i=1,2,3\). Let \(C=\langle \sum _{i=1}^3\xi _ig_i(x)\rangle \) be a \(\lambda \)-constacyclic code over R such that \(x^n-\lambda _1\equiv 0\,(g_1(x)g^*_1(x)),x^n-(\lambda _1+\gamma \lambda _2)\equiv 0\,(g_2(x)g^*_2(x)),x^n-(\lambda _1+\delta \lambda _3)\equiv 0\,(g_3(x)g^*_3(x))\). Also, let

$$\begin{aligned} M= & {} \left[ {\begin{array}{ccc} 2 &{} 1 &{}2 \\ -2 &{} 2 &{}1 \\ 1 &{} 2 &{}-2 \\ \end{array} } \right] ,\quad \mathrm{satisfying}\;MM^\mathrm{T}=9I_3\;\mathrm{for}\;q\ne 9, \\ M= & {} \left[ {\begin{array}{ccc} w &{} -w^7 &{}1 \\ -w^7 &{} 1 &{}w \\ 1 &{} w &{}-w^7 \\ \end{array} } \right] ,\quad \mathrm{satisfying}\;MM^\mathrm{T}=I_3\;\mathrm{for}\;q= 9. \end{aligned}$$

Then, \(\varphi (C)\) is a dual-containing [nkd] linear code enlisted in the seventh column of Table 1. In the eighth column, we construct \([[n,k,d]]_q\) quantum codes which are better (by means of distance or code rate) compared to the existing codes \([[n',k',d']]_q\) given in the ninth column. In Table 1, the first column represents the length n, the second column represents the value of q, the third column represents the value of \(\lambda \) and the fourth to sixth columns represent the generator polynomials \(g_i(x)\), for \(i=1,2,3\), respectively. In order to precise Table 1, we write the string containing the coefficients of the polynomials \(g_i(x)\) in descending order. For instance, we write the string \(1w^3w^5w^6\) to represent the polynomial \(x^3+w^3x^2+w^5x+w^6\).

Table 1 New quantum codes from \(\lambda \)-constacyclic codes of length n over R
Table 2 New quantum codes from \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic codes of length (nm)

Example 4

Let \(q=5, (n,m)=(30,20), R={\mathbb {F}}_5[u,v]/\langle u^2-\gamma u,v^2-\delta v,uv=vu=0\rangle \) and \(\lambda =1\), where \(\gamma ,\delta \in {\mathbb {F}}_5^*\). Then, \(\lambda _1=\lambda _1+\gamma \lambda _2=\lambda _1+\delta \lambda _3=1\). Now, in \({\mathbb {F}}_5[x]\) we have

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

Let \(C=C_{30}\times C_{20}\) be a separable \({\mathbb {F}}_5R\)-additive cyclic code of length (30, 20) where \(C_{30}=\langle f(x)\rangle \) and \(C_{20}=\langle \sum _{i=1}^3\xi _ig_i(x)\rangle \). Let \(f_1(x)=(x+1)^2(x^2 + x + 1)=x^4 + 3x^3 + 4x^2 + 3x + 1, g_1(x)=x + 3, g_2(x)=(x+1)(x+2)^2=x^3 + 3x + 4\) and \(g_3(x)=x + 2\). Let

$$\begin{aligned} M= \left[ {\begin{array}{ccc} 2 &{} 1 &{}2 \\ 3 &{} 2 &{}1 \\ 1 &{} 2 &{}3 \\ \end{array} } \right] \end{aligned}$$

be a \(3\times 3\) invertible matrix over \({\mathbb {F}}_5\) such that \(MM^\mathrm{T}=9I_3\). Since \(x^{30}-1\equiv 0\,(\mathrm{mod}\,f(x)f^*(x))\) and \(x^{20}-1\equiv 0\,(\mathrm{mod}\,g_i(x)g_i^*(x))\) for \(i=1,2,3\), by Theorem 7, we have \(C^{\perp }\subseteq C\). Moreover, \(\varPhi (C)\) is a dual-containing [90, 81, 3] linear code over \({\mathbb {F}}_5\). Hence, by Theorem 8, there exists a quantum code \([[90,72,3]]_{5}\), which has same length and code rate but larger minimum distance than existing code \([[90,72,2]]_{5}\) given by [3].

Example 5

Let \(\lambda =\lambda _1+u\lambda _2+v\lambda _3\) be a unit in \(R={\mathbb {F}}_q[u,v]/\langle u^2-\gamma u,v^2-\delta v,uv=vu=0\rangle \) such that \(\lambda _1=\pm 1, \lambda _1+\gamma \lambda _2=\pm 1,\lambda _1+\delta \lambda _3=\pm 1 \), where \(\lambda _i\in {\mathbb {F}}_q,\gamma ,\delta \in {\mathbb {F}}_q^*\), for \(i=1,2,3\). Let \(C=C_n\times C_m\) be a separable \({\mathbb {F}}_qR\)-additive \(\lambda \)-constacyclic code of length (nm), where \(C_n=\langle f(x)\rangle \) and \(C_m=\langle \sum _{i=1}^3\xi _ig_i(x)\rangle \) be such that \(x^n-1\equiv 0\,(f(x)f^*(x)),x^m-\lambda _1\equiv 0\,(g_1(x)g^*_1(x)),x^m-(\lambda _1+\gamma \lambda _2)\equiv 0\,(g_2(x)g^*_2(x)),x^m-(\lambda _1+\delta \lambda _3)\equiv 0\,(g_3(x)g^*_3(x))\). Let

$$\begin{aligned} M= \left[ {\begin{array}{ccc} 2 &{} 1 &{}2 \\ -2 &{} 2 &{}1 \\ 1 &{} 2 &{}-2 \\ \end{array} } \right] ,\quad \mathrm{satisfying}\;MM^\mathrm{T}=9I_3. \end{aligned}$$

Then, \(\varPhi (C)\) is a dual-containing [nkd] linear code over \({\mathbb {F}}_q\) given in the eighth column of Table 2. By Theorem 8, we construct quantum codes \([[n,k,d]]_q\) (in the ninth column) better (by means of larger code rate or larger distance) than the existing codes \([[n',k',d']]_q\) (in the tenth column).

6 Conclusion

For the last few years, constacyclic codes over finite non-chain rings have become a great resource to produce good quantum codes. Here, we explore many new quantum codes from these codes over a class of finite commutative non-chain rings R. Further, we extend our study to additive constacyclic codes and construct many quantum codes from them. To validate the novelty of the approach, we also compare our obtained codes to the existing codes that appeared in some recent articles.