1 Introduction

The classical error-correcting codes protect classical information when it is transmitted through noisy channels. Similarly, quantum error-correcting codes protect quantum information from errors caused by the noise and decoherence in quantum channels. There are some basic differences between the idea of quantum information and that of the classical information. Qubits are the fundamental units of quantum information, whereas for the classical information these fundamental units are bits. Due to the use of qubits, there are some major advantages of quantum information over the classical information, and it has given rise to the idea of quantum computing. The fundamental advantage of quantum computing over classical computing is that quantum computing gives the possibilities of using the laws of quantum mechanics to solve the computational problems, whereas in the conventional or classical computing only a small subset of these possibilities are used. On the other hand, just like the classical information, quantum information can also be processed using high-speed digital computers. The discovery of quantum computers therefore can be a milestone in the field of computing as it will make the processing of information much more faster.

The beginning of quantum error-correcting codes can be marked from the seminal work of Shor [27]. It was followed by the paper of Calderbank et al. [6], where they gave a method to construct quantum error-correcting codes from classical linear codes. This construction is known as the Calderbank–Shor–Steane (CSS) construction. Since then, several authors have proposed different constructions of quantum codes over finite fields from dual containing codes or self-orthogonal codes [6, 25, 26].

In recent years, there has been a lot of interest on codes over finite rings, especially after the landmark paper of Hammons et al. [13] in 1994. In [23], the authors have obtained a condition for the self-orthogonality of codes over the ring \({\mathbb {Z}}_{2^m}\). In [16], the structure of negacyclic codes over finite chain rings is studied. Several researchers have also studied constructions of quantum codes from linear codes over finite rings. Qian et al. [22] gave a construction of quantum codes from cyclic codes over the finite ring \({\mathbb {F}}_2+u{\mathbb {F}}_2, u^2=0\). Kai and Zhu [15] proposed a quaternary construction of quantum codes over \({\mathbb {F}}_4\) from cyclic codes over \({\mathbb {F}}_4+u{\mathbb {F}}_4,u^2=0\), using a Gray map. Liu and Liu [18] extended this work to codes over \({\mathbb {F}}_{q^{2}}+u{\mathbb {F}}_{q^{2}}\), \(u^2=0\). In [18], quantum codes were constructed from dual containing cyclic codes over \({\mathbb {F}}_{q^{2}}+u{\mathbb {F}}_{q^{2}}\), whereas in [15] the same were constructed from self-orthogonal codes over \({\mathbb {F}}_4+u{\mathbb {F}}_4\). Most of these quantum codes are obtained from cyclic codes by using the CSS construction.

Motivated by the above-mentioned works on quantum codes from cyclic codes, in this paper we give a construction of quantum codes from cyclic codes of length n over \(R={\mathbb {F}}_{q^{2}}[u]/\langle u^{k}\rangle \), with \(u^{k}=0\), where \(q=p^m\), p a prime, and \((n,p)=1\). We have defined an appropriate Gray map \(\phi :R\rightarrow {\mathbb {F}}^{k}_{q^{2}}\). In [8], the authors have obtained the generator polynomials for cyclic codes and their duals over finite chain rings. The alphabet \({\mathbb {F}}_{q^{2}}[u]/\langle u^k\rangle \) we are using here is also a finite chain ring, and hence, the generator polynomials of cyclic codes and their duals can be obtained by using the method given in [8]. However, in this paper we obtain alternate generator polynomials for cyclic codes as well as for their duals over \({\mathbb {F}}_{q^{2}}[u]/\langle u^k\rangle \). These generator polynomials for cyclic codes and their duals are then used to derive a condition for a code to be Hermitian self-orthogonal. Then, by using the Hermitian construction [17] on the Gray images of self-orthogonal cyclic codes over R, we obtain parameters of quantum codes over \({\mathbb {F}}_{q}\). The Gray distance of a cyclic code over R is computed directly from the generator matrix of the Gray image of the code using the computational algebra system Magma [4]. For the special case \(R'={\mathbb {F}}_{q^2}+u{\mathbb {F}}_{q^2}\) of R, we have also used an alternative method in which the Gray distance of a code is computed using its residue and torsion codes. It is worth mentioning here that constructions of quantum codes over \({\mathbb {F}}_4+u{\mathbb {F}}_4, u^2=0\), and \({\mathbb {F}}_{q^{2}}+u{\mathbb {F}}_{q^{2}}, u^2=0\), have also been given in [15] and [18], respectively. However, the code alphabet we consider here generalizes the rings given in [15] and [18]. Moreover, our method of deriving Hermitian self-orthogonal codes over \({\mathbb {F}}_{q^{2}}+u{\mathbb {F}}_{q^{2}}, u^2=0\) differs from those given in [15] and [18]. From this construction, we have been able to obtain some new quantum codes with better parameters than some presently known comparable best codes available in the literature.

2 Preliminaries

Let R be the finite commutative ring \({\mathbb {F}}_{q^{2}}+u{\mathbb {F}}_{q^{2}}+\cdots +u^{k-1}{\mathbb {F}}_{q^{2}}={\mathbb {F}}_{q^{2}}[u]/\langle u^{k}\rangle \), where \(u^{k}=0\) and \({\mathbb {F}}_{q^{2}}\) is a field with \(q^{2}\) elements. The ring R is a chain ring with its ideals ordered as

$$\begin{aligned} R\supset uR\supset \cdots \supset u^{k-1}R\supset u^{k}R=0~. \end{aligned}$$

Clearly, R has \(q^{2k}\) elements. The ideal \(uR=\langle u\rangle \) is the unique maximal ideal of R and has \(q^{2(k-1)}\) elements. The nilpotency index of R is k, and its residue field is \(\frac{R}{uR}\simeq {\mathbb {F}}_{q^{2}}\). An element \(a\in R\) is a unit in R if and only if \(a\not \equiv 0~\text{ mod }~u\). A code of length n over R is a nonempty subset of \(R^n\). A linear code over R is an R-submodule of \(R^n\). A linear code C of length n over R is called a cyclic code if it is invariant under the cyclic shift \(\sigma \) on \(R^n\), i.e., for any \((c_0,c_1,\cdots ,c_{n-1}) \in C\),

$$\begin{aligned} \sigma (c_0,c_1,\cdots ,c_{n-1})=(c_{n-1},c_0,\cdots ,c_{n-2}) \in C~. \end{aligned}$$

For any element \(c=(c_0,c_1,\cdots ,c_{n-1}) \in R^n\), its polynomial representation is \(c(x)=c_0+c_1x+\cdots +c_{n-1}x^{n-1}\). It is well known that the cyclic codes of length n over R are precisely the ideals of the ring \(R[x]/\langle x^n-1\rangle \).

For any element \(a \in {\mathbb {F}}_{q^2}\), we define the conjugate of a as \(a^* = a^q\). Now every element \(\lambda \in R\) can be uniquely expressed as

$$\begin{aligned}\lambda =\lambda _0+u\lambda _1+u^2\lambda _2+\cdots +u^{k-1}\lambda _{k-1}~,\end{aligned}$$

where \(\lambda _0,\lambda _1,\cdots ,\lambda _{k-1}\in {\mathbb {F}}_{q^{2}}\). The conjugate of \(\lambda \) is defined as \(\lambda ^*=\lambda _0^* + u\lambda _1^* + u^2\lambda _2^* + \cdots + u^{k-1}\lambda _{k-1}^*\), where \(\lambda _i^* = \lambda _i^q\) is the conjugate of \(\lambda _i\). To define the dual code of a linear code C of length n over R, we consider the Hermitian inner product over R, which is defined as follows:

$$\begin{aligned} (u,v)_H=\sum _{i=1}^{n}u_i v_i^*~, \end{aligned}$$

where \(u=(u_1,u_2,\cdots ,u_n),~ v=(v_1,v_2,\cdots ,v_n)\in R^n\). The Hermitian dual \(C^\perp \) of C is then defined as

$$\begin{aligned} C^\perp =\{u\in R^n \mid (u,v)_H=0~\forall ~ v\in C\}~. \end{aligned}$$

The dual code \(C^\perp \) is also a linear code. A linear code C of length n over R is called (Hermitian) self-orthogonal if \(C\subseteq C^\perp \), and (Hermitian) self-dual if \(C=C^\perp \).

Now since the ring R is a finite commutative Frobenius ring, any linear code C of length n over R must satisfy \(|C||C^\perp |=|R|^n\). To check this condition, we consider the generator matrices of C and \(C^\perp \). The code C is permutation equivalent to a linear code over R with generator matrix of the form

$$\begin{aligned} G= \begin{pmatrix} I_{l_0} &{}~ A_{0,1} &{}~ A_{0,2} &{}~ A_{0,3} &{}~ \cdots &{} A_{0,{k-1}} &{}~ A_{0,k} \\ 0 &{} uI_{l_1}&{} uA_{1,2} &{} uA_{1,3} &{} \cdots &{} uA_{1,{k-1}} &{} uA_{1,k} \\ 0 &{} 0 &{} u^2I_{l_2} &{} u^2A_{2,3} &{} \cdots &{} u^2A_{2,{k-1}} &{} u^2A_{2,k} \\ . &{} . &{} . &{} . &{} \cdots &{} . &{} . \\ 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} u^{k-1}I_{l_{k-1}} &{} u^{k-1}A_{k-1,k} \end{pmatrix}~, \end{aligned}$$

where \(l_i\) are positive integers and \(A_{i,j}\) are matrices over R, \(0 \le i \le k-1\), \(1 \le j \le k\). Then C is an abelian group of the type \(\{l_0,l_1,\cdots ,l_{k-1}\}\) and contains \(({q^{2k}})^{l_0}({q^{2(k-1)}})^{l_1} \cdots ({q^2)}^{l_{k-1}}\) codewords. The dual code \(C^\perp \) is permutation equivalent to a linear code over R with generator matrix of the form

$$\begin{aligned} H= \begin{pmatrix} B_{0,k} &{}~ B_{0,k-1} &{}~ B_{0,k-2} &{}~ \cdots &{}~ B_{0,1} &{}~ I_{n-l_0-l_1-\cdots -l_k} \\ uB_{1,k} &{} uB_{1,k-1}&{} uB_{1,k-2} &{}~ \cdots &{}~ uI_{l_{k-1}} &{}~ 0 \\ 0 &{} 0 &{} 0 &{} \cdots &{} 0 &{}~ 0 \\ . &{} . &{} . &{} \cdots &{} . &{}~ . \\ u^{k-1}B_{k,k} &{} u^{k-1}I_{l_1} &{} 0 &{} \cdots &{} 0 &{}~ 0 \end{pmatrix}~, \end{aligned}$$

where \(B_{i,j}=-\sum _{s=i+1}^{j-1}B_{i,s}A^{tr}_{k-j,k-s}-A^{tr}_{k-j,k-i}\). Then \(C^\perp \) is an abelian group of the type \(\{n-l_0-l_1-\cdots -l_{k-1},l_{k-1},\ldots ,l_1\}\) and it contains \((q^{2k})^{n-l_0-l_1-\cdots -l_{k-1}}(q^{2(k-1)})^{l_{k-1}}\cdots (q^{2})^{l_1}\) elements.

It is easy to check that \(|C||C^\perp |={(q^{2k}})^n=|R|^n\).

3 Gray map on R

In this section, we define a Gray map on R which plays an important role in our construction of quantum codes over \({\mathbb {F}}_{q^2}\). The next result is important for defining the Gray map.

Lemma 1

[9, Corollary 4.2] Let R be a finite local ring with the maximal ideal \(\langle a\rangle \) such that \(|R/\langle a\rangle |\equiv 1(\text{ mod }~4)\). Then there exists an \(\alpha \in R\) with \(\alpha ^2= -1\).

Theorem 1

In the ring R, there exists an element \(\alpha \) such that \(\alpha ^2=-1\).

Proof

The ring R is a local ring with the maximal ideal \(\langle u\rangle \), and \(R/\langle u\rangle = {\mathbb {F}}_{q^2}\). Hence, \(|R/\langle u\rangle |= q^2\). Clearly, \(\text{ char }~R = \text{ char }~{\mathbb {F}}_{q^2} = p\). Now if \(p=2\), then \(\alpha = 1\) is such an element as \(-1=1\) in R. If p is an odd prime, then q is odd, and therefore, it satisfies \(q^{2} \equiv 1(\text{ mod }~4)\). Hence, by Lemma 1, there exists an element \(\alpha \in R\) such that \(\alpha ^2= -1\). \(\square \)

Now we define a Gray map \(\phi \) from R to \({\mathbb {F}}_{q^2}^k\). In the ring \(R={\mathbb {F}}_{q^{2}}[u]/\langle u^{k}\rangle \), every element c can be uniquely expressed as

$$\begin{aligned} c=a_0+ua_1+u^2a_2+\cdots +u^{k-1}a_{k-1}~, \end{aligned}$$

where \(a_i\in {\mathbb {F}}_{q^{2}}\), for \(i=0,1,\cdots ,{k-1}\). Let \(\alpha \) be a fixed element in R such that \(\alpha ^2 = -1\). Then we define a Gray map \(\phi : R\rightarrow {\mathbb {F}}_{q^{2}}^k\) such that

$$\begin{aligned} \phi (a_0+a_1u+\cdots +a_{k-1}u^{k-1}) = \left( \alpha \sum _{i=1}^{k-1} a_i, ~ \sum _{i=1}^{k-2} a_i, ~\alpha \sum _{i=2}^{k-2} a_i, \sum _{i=2}^{k-3} a_i, \ldots , \sum _{i=0}^{k-1} a_i\right) ~. \end{aligned}$$

Thus, for \(k=2\) we have \(\phi (a_0+a_1u) = (\alpha a_1, a_0+a_1)\); for \(k=3\) we have \(\phi (a_0+a_1u+a_2u^2) = (\alpha (a_1+a_2), a_1, a_0+a_1+a_2)\); for \(k=4\) we have \(\phi (a_0+a_1u+a_2u^2+a_3u^3) = (\alpha (a_1+a_2+a_3), a_1+a_2, \alpha a_2, a_0+a_1+a_2+a_3)\), and so on.

It is easy to verify that \(\phi \) preserves linearity. The Gray map \(\phi \) can be extended to \(R^n\) in the usual way, and the extended map, again denoted by \(\phi \), is a bijection from \(R^n\) to \({\mathbb {F}}^{kn}_{q^{2}}\). We define the Gray weight \(w_G(a)\) of any \(a\in R\) as the Hamming weight of \(\phi (a)\), i.e., \(w_G(a)=w_H(\phi (a))\). This weight function can be extended to \(R^n\) in the usual way. If \(v=(v_0,v_1,\cdots ,v_{n-1}) \in R^n\), then \(w_G(v)=\sum _{i=0}^{n-1} w_G(v_i)\). The Gray distance \(d_G(v,v')\) between any two vectors \(v,v'\in R^n\) is then defined as \(w_G(v-v')\). The smallest nonzero Gray distance between all pairs of distinct codewords of a code C over R is called the (minimum) Gray distance of C and is denoted by \(d_G(C)\). The (minimum) Gray weight of C is the smallest nonzero Gray weight among all codewords of C. If C is linear, then the Gray distance C is same as its Gray weight. The Hamming weight \(w_H(c)\) of a codeword \(c\in C\) and the Hamming distance \(d_H(c,c')\) between any two codewords \(c, c' \in C\) are defined in the usual sense. The next result follows immediately from the definition of the Gray map.

Lemma 2

The map \(\phi \) is a distance-preserving map from \((R^n,\text{ Gray } \text{ distance})\) to \(({\mathbb {F}}^{kn}_{q^{2}}, \text{ Hamming } \text{ distance})\) and a weight-preserving map from \((R^n,\text{ Gray } \text{ weight})\) to \(({\mathbb {F}}^{kn}_{q^{2}},\text{ Hamming } \text{ weight})\).

Theorem 2

Let C be a linear code of length n and type \(\{l_0,l_1,\cdots ,l_{k-1}\}\) over R, and let \(C^\perp \) be the Hermitian dual of C. Then \(\phi (C^\perp )=\phi (C)^\perp \).

Proof

Observe that any element \(v\in R^n\) can be expressed as \(v = v_0+uv_1+\cdots + u^{k-1}v_{k-1}\), where \(v_i \in {\mathbb {F}}_{q^2}^n\), \(0 \le i \le k-1\). Let \(c_1=a_0+ua_1+u^2a_2+\cdots +u^{k-1}a_{k-1} \in C\) and \(c_2=b_0+ub_1+u^2b_2+\cdots +u^{k-1}b_{k-1} \in C^\perp \), where \(a_i, b_j \in {\mathbb {F}}_{q^2}^n\), \(0 \le i, j \le k-1\). Then we have \(c_1\cdot c_2=0\), i.e.,

$$\begin{aligned} (a_0+ua_1+u^2a_2+\cdots +u^{k-1}a_{k-1})\cdot (b_0+ub_1+u^2b_2+\cdots +u^{k-1}b_{k-1}) = 0~, \end{aligned}$$

which implies that

$$\begin{aligned} a_0\cdot b^*_0+u(a_0\cdot b^*_1+a_1\cdot b^*_0)+u^2(a_0\cdot b^*_2+a_1\cdot b^*_1+a_2\cdot b^*_0) + \cdots \\ + u^{k-1}(a_0\cdot b^*_{k-1}+a_1\cdot b^*_{k-2}+ \cdots + a_{k-1}\cdot b^*_0) = 0~. \end{aligned}$$

Then,

$$\begin{aligned} a_0\cdot b^*_0 = a_0\cdot b^*_1+a_1\cdot b^*_0 = \cdots = a_0\cdot b^*_{k-1}+a_1\cdot b^*_{k-2}+ \cdots + a_{k-1}\cdot b^*_0=0~.\end{aligned}$$
(1)

Since \(\alpha ^2 = -1\), we have

$$\begin{aligned} \phi (c_1)\cdot \phi (c_2)= & {} \left( \alpha \sum _{i=1}^{k-1} a_i, \sum _{i=1}^{k-2} a_i, \alpha \sum _{i=2}^{k-2} a_i, \sum _{i=2}^{k-3} a_i, \ldots , \sum _{i=0}^{k-1} a_i\right) \cdot \left( \alpha \sum _{j=1}^{k-1} b_j, ~ \sum _{j=1}^{k-2} b_j, \right. \\&\left. \alpha \sum _{j=2}^{k-2} b_j, \sum _{j=2}^{k-3} b_j, \ldots , \sum _{j=0}^{k-1} b_j\right) \\= & {} -\sum _{i=1}^{k-1} a_i \cdot \sum _{j=1}^{k-1} b_j^* + \sum _{i=1}^{k-2} a_i \cdot \sum _{j=1}^{k-2} b_j^* - \sum _{i=2}^{k-2} a_i \cdot \sum _{j=2}^{k-2} b_j^* + \sum _{i=2}^{k-3} a_i \cdot \sum _{j=2}^{k-3} b_j^*\\&\qquad + \cdots + \sum _{i=0}^{k-1} a_i \cdot \sum _{j=0}^{k-1} b_j^*~. \end{aligned}$$

After simplification, and noting from (1) that \(\displaystyle {\sum _{i+j \le k-1} a_i\cdot b_j^* = 0}\), we get

$$\begin{aligned}&\phi (c_1)\cdot \phi (c_2) \\&\quad = -a_{k-1}\cdot b_{k-1}^* - \left( a_{k-1}\cdot \sum _{j=1}^{k-2}b_j^*\right) - \left( b_{k-1}^*\cdot \sum _{i=1}^{k-2}a_i\right) - a_{k-2}\cdot b_{k-2}^* \\&\qquad - \left( a_{k-2}\cdot \sum _{j=2}^{k-3}b_j^*\right) - \left( b_{k-2}^*\cdot \sum _{i=2}^{k-3}a_i\right) - \cdots + \sum _{i+j \le k-1} a_i\cdot b_j^* + \sum _{i+j \ge k} a_i\cdot b_j^*\\&\quad = -\sum _{i+j \ge k} a_i\cdot b_j^* + 0 + \sum _{i+j \ge k} a_i\cdot b_j^* \\&\quad = 0~. \end{aligned}$$

Hence, we have

$$\begin{aligned} \phi (C^\perp ) \subseteq \phi (C)^\perp ~. \end{aligned}$$

Now \(\phi (C)\) is a linear code of length kn and size |C| over \({\mathbb {F}}_{q^{2}}\). So we have

$$\begin{aligned} |\phi (C)^\perp | = \frac{(q^{2})^{kn}}{|\phi (C)|}=\frac{(q^{2})^{kn}}{|C|}~. \end{aligned}$$

Since R is a Frobenius ring, we have

$$\begin{aligned} |C^\perp ||C|=|R|^n=(q^{2})^{kn}~. \end{aligned}$$

This implies that \(|\phi (C^\perp )| = |\phi (C)^\perp |\) and hence \(\phi (C^\perp ) = \phi (C)^\perp \). \(\square \)

4 Generator polynomials of cyclic codes over \({\mathbb {F}}_{q^2}[u]/\langle u^k\rangle \)

We denote the canonical map \(a \mapsto a~(\text {mod}~u)\) from R to \({\mathbb {F}}_{q^{2}}\) by \(^{-}\). The image of a under this map is denoted by \({\overline{a}}\). Clearly, the image of R under this map is the residue field \({\overline{R}} = {\mathbb {F}}_{q^{2}}\) of R. This map can be extended naturally to a map from R[x] to \({\mathbb {F}}_{q^{2}}[x]\), and the image of a polynomial \(f(x) = a_0+a_1x + \cdots + a_nx^n \in R[x]\) under this map is given by \({\overline{f}}(x) = {\overline{a}}_0+{\overline{a}}_1x+\cdots +{\overline{a}}_nx^n \in {\mathbb {F}}_{q^2}[x]\). A polynomial \(f(x) \in R[x]\) is called basic irreducible if \({\overline{f}}(x)\) is irreducible in \({\mathbb {F}}_{q^2}[x]\). Using Hensel’s lemma [20, Theorem XIII.4], we have the following result.

Lemma 3

[16, Lemma 2.3] Let f be a polynomial over R such that \({\overline{f}}\) is square free. If \({\overline{f}}=g_1g_2\cdots g_s\) is the unique factorization of \({\overline{f}}\) into a product of pairwise coprime monic irreducible polynomials in \({\mathbb {F}}_{q^{2}}[x]\), then there exist unique pairwise coprime monic basic irreducible polynomials \(f_1, f_2, \ldots , f_s\) over R such that \(f=f_1f_2\cdots f_s\) and \({\overline{f}}_i=g_i,~1\le i \le s\).

Throughout this paper, we assume that \((n,p)=1\). Then \(x^n-1\) factorizes uniquely into pairwise coprime monic basic irreducible polynomials over R. For any divisor f(x) of \(x^n-1\), we use the notation \({\hat{f}}(x)=\frac{x^n-1}{f(x)}\).

Recall that a cyclic code of length n over R is an ideal of the ring \(R[x]/\langle x^n-1\rangle \). Since we assume \((n ,p) =1\), then it is well known that the ring \(R[x]/\langle x^n-1\rangle \) is a principal ideal ring. The next result gives the form of the generator polynomials of a cyclic code of length n over R.

Theorem 3

[1, Theorem 3.6 (1)] Let C be a cyclic code of length n over \(R={\mathbb {F}}_{q^{2}}[u]/\langle u^k\rangle \). Then there exist polynomials \(a_0(x),a_1(x),\cdots ,a_{k-1}(x)\) in R[x] such that \(C=\langle a_0(x),ua_1(x),\cdots ,u^{k-1}a_{k-1}(x)\rangle \) and \(a_{k-1}(x)|a_{k-2}(x)|\cdots |a_0(x)|(x^n-1)\).

In the next result, we give an alternate form for a cyclic code C of length n over R as \(C=\langle {\hat{G}}_1,u{\hat{G}}_2,\cdots ,u^{k-1}{\hat{G}}_k\rangle \), where \(G_i\) (\(0 \le i \le k\)) are monic pairwise coprime polynomials in \({\mathbb {F}}_{q^{2}}[x]\) such that \(G_0G_1G_2\cdots G_k = x^n-1\). Such a form is given in [8, Theorem 3.4]. However, we derive the result from \(C=\langle a_0(x),ua_1(x),\cdots ,u^{k-1}a_{k-1}(x)\rangle \) as given in Theorem 3 and thus give a new approach of the result .

Theorem 4

Let \(C=\langle a_0(x) ,ua_1(x),u^2a_2(x),\cdots ,u^{k-1}a_{k-1}(x)\rangle \) be a cyclic code of length n over R, where \(a_i(x) \in {\mathbb {F}}_{q^{2}}[x]\) and \(a_{k-1}(x) | a_{k-2}(x) | \cdots | a_0(x) | (x^n-1)\). Then C can also be expressed as \(C=\langle {\hat{G}}_1,u{\hat{G}}_2,\cdots ,u^{k-1}{\hat{G}}_k\rangle \), where \(G_0,G_1,\cdots ,G_k\) are unique pairwise coprime monic polynomials in R[x] such that \(G_0G_1,\cdots G_k=x^n-1\). Moreover, \(|C|=(q^{2})^{\sum _{i=0}^{k-1}(k-i)deg (G_{i+1})}.\)

Proof

Since \((n, p) = 1\), \(x^n-1\) factorizes uniquely into monic pairwise coprime basic irreducible polynomials in R[x]. Now we have

$$\begin{aligned}C=\langle a_0(x), ua_1(x), u^2a_2(x), \cdots , u^{k-1}a_{k-1}(x)\rangle ~,\end{aligned}$$

where \(a_i(x) \in {\mathbb {F}}_{q}[x]\) such that \(a_{k-1}(x) | a_{k-2}(x) | \cdots | a_0(x) | (x^n-1)\). To show that \(C=\langle {\hat{G}}_1, u{\hat{G}}_2,\cdots , u^{k-1}{\hat{G}}_k\rangle \), we use the substitutions \(G_0=a_{k-1}(x)\), \(G_1=(x^n-1)/a_0(x)\) and \(G_i=a_{i-2}(x)/a_{i-1}(x)\) for \(2\le i\le k\). Then \(G_0,G_1,\cdots ,G_k\) are pairwise coprime monic polynomials such that \(G_0G_1\cdots G_k=x^n-1\). Therefore,

$$\begin{aligned} C= & {} \langle a_0(x),ua_1(x),u^2a_2(x),\cdots ,u^{k-1}a_{k-1}(x)\rangle \\= & {} \left\langle \frac{(x^n-1)}{G_1}, \frac{u(x^n-1)}{G_1G_2},\frac{u^2(x^n-1)}{G_1G_2G_3},\cdots ,\frac{u^{k-1}(x^n-1)}{G_1G_2\cdots G_k}\right\rangle \\= & {} \left\langle {\hat{G}}_1, u\frac{{\hat{G}}_2}{G_1}, u^2\frac{{\hat{G}}_3}{G_1G_2}, \ldots , u^{k-1}\frac{{\hat{G}}_k}{G_1G_2\cdots G_{k-1}} \right\rangle ~. \end{aligned}$$

Clearly, \( {\hat{G}}_1, u{\hat{G}}_2, u^2{\hat{G}}_3, \ldots , u^{k-1}{\hat{G}}_k \in \left\langle {\hat{G}}_1, u\frac{{\hat{G}}_2}{G_1}, u^2\frac{{\hat{G}}_3}{G_1G_2}, \ldots , u^{k-1}\frac{{\hat{G}}_k}{G_1G_2\cdots G_{k-1}} \right\rangle \). Therefore,

$$\begin{aligned}\left\langle {\hat{G}}_1, u{\hat{G}}_2, u^2{\hat{G}}_3, \ldots , u^{k-1}{\hat{G}}_k\right\rangle \subseteq C~.\end{aligned}$$

Now we shall show that \(C \subseteq \left\langle {\hat{G}}_1, u {\hat{G}}_2, u^2 {\hat{G}}_3, \ldots u^{k-1} {\hat{G}}_k\right\rangle \). Let

$$\begin{aligned}I = \left\langle {\hat{G}}_1, u {\hat{G}}_2, u^2 {\hat{G}}_3, \ldots u^{k-1} {\hat{G}}_k\right\rangle ~.\end{aligned}$$

We shall show that the elements \({\hat{G}}_1, u{\hat{G}}_2/G_1, u^2{\hat{G}}_3/(G_1G_2), \ldots , u^{k-1}{\hat{G}}_k/(G_1G_2\cdots G_{k-1})\) are all in I.

Clearly, \({\hat{G}}_1 \in I\). Now since \({\hat{G}}_1\) and \(G_1\) are coprime, there exist \(p_1, q_1 \in {\mathbb {F}}_{q^2}[x]\) such that \(p_1{\hat{G}}_1 + q_1G_1 = 1\). Multiplying both sides by \({\hat{G}}_2/G_1\), we get

$$\begin{aligned}p_1{\hat{G}}_1\frac{{\hat{G}}_2}{G_1} + q_1{\hat{G}}_2 = \frac{{\hat{G}}_2}{G_1}~.\end{aligned}$$

So, \(u\left( {\hat{G}}_2/G_1\right) = (up_1{\hat{G}}_2/G_1){\hat{G}}_1 + q_1(u{\hat{G}}_2) \in I\), as \({\hat{G}}_1, u{\hat{G}}_2 \in I\).

To show that \(u^2{\hat{G}}_3/(G_1G_2)\) is in I, we proceed as follows. Since \({\hat{G}}_2/G_1\) and \(G_1G_2\) are coprime, there exist \(p_2, q_2 \in {\mathbb {F}}_{q^2}[x]\) such that \(p_2\left( {\hat{G}}_2/G_1\right) + q_2G_1G_2 = 1\). Multiplying both sides of this equation by \({\hat{G}}_3/(G_1G_2)\), we get

$$\begin{aligned}p_2\frac{{\hat{G}}_2}{G_1}\cdot \frac{{\hat{G}}_3}{G_1G_2} + q_2{\hat{G}}_3 = \frac{{\hat{G}}_3}{G_1G_2}~.\end{aligned}$$

Then \(u^2\left( {\hat{G}}_3/(G_1G_2)\right) = \left( up_2{\hat{G}}_3/(G_1G_2)\right) (u{\hat{G}}_2/G_1) + q_1(u^2{\hat{G}}_3) \in I\), as \(u{\hat{G}}_2/G_1, u^2{\hat{G}}_3 \in I\). Similarly, the other elements can also be shown to be in I. We therefore show that the last element \(u^{k-1}\left( {\hat{G}}_k/(G_1G_2\cdots G_{k-1})\right) \) is in I, assuming that we already have \(u^{k-2}\left( {\hat{G}}_{k-1}/(G_1G_2\cdots G_{k-2})\right) \in I\). Since \({\hat{G}}_{k-1}/(G_1G_2\cdots G_{k-2})\) and \(G_1G_2\cdots G_{k-1}\) are coprime, there exist \(p_{k-1}, q_{k-1} \in {\mathbb {F}}_{q^2}[x]\) such that

$$\begin{aligned}p_{k-1}\frac{{\hat{G}}_{k-1}}{G_1G_2\cdots G_{k-2}} + q_{k-1}G_1G_2\cdots G_{k-1} = 1~.\end{aligned}$$

Multiplying both sides of the equation by \({\hat{G}}_k/(G_1G_2\cdots G_{k-1})\), we get

$$\begin{aligned}p_{k-1}\frac{{\hat{G}}_{k-1}}{G_1G_2\cdots G_{k-2}}\cdot \frac{{\hat{G}}_k}{G_1G_2\cdots G_{k-1}} + q_{k-1}{\hat{G}}_k = \frac{{\hat{G}}_k}{G_1G_2\cdots G_{k-1}}~.\end{aligned}$$

Then,

$$\begin{aligned} u^{k-1}\frac{{\hat{G}}_k}{G_1G_2\cdots G_{k-1}}= & {} p_{k-1}\frac{u{\hat{G}}_k}{G_1G_2\cdots G_{k-1}}\left( u^{k-2} \frac{{\hat{G}}_{k-1}}{G_1G_2\cdots G_{k-2}}\right) \\&\quad + q_{k-1}(u^{k-1}{\hat{G}}_k) \in I~, \end{aligned}$$

since \(u^{k-2}\frac{{\hat{G}}_{k-1}}{G_1G_2\cdots G_{k-2}}, u^{k-1}{\hat{G}}_k \in I\).

Thus, all the elements \({\hat{G}}_1, u{\hat{G}}_2/G_1, u^2{\hat{G}}_3/(G_1G_2)\), \(\ldots , u^{k-1}{\hat{G}}_k/(G_1G_2\cdots G_{k-1})\) are in I. Therefore, \(C \subseteq I\), and consequently, we have

$$\begin{aligned}C = I = \left\langle {\hat{G}}_1, u {\hat{G}}_2, u^2 {\hat{G}}_3, \ldots u^{k-1} {\hat{G}}_k\right\rangle ~.\end{aligned}$$

To show the uniqueness of \(G_0,G_1,\cdots ,G_k\), suppose there are monic pairwise coprime polynomials \(H_0,H_1,\cdots ,H_k\) in \({\mathbb {F}}_{q^2}[x]\) such that \(x^n-1 = H_1H_2\cdots H_k\) and \(C=\langle \hat{H_1},u\hat{H_2},\cdots ,u^{k-1}\hat{H_k}\rangle \). Since \({\hat{H}}_1 \in \langle \hat{G_1}, u\hat{G_2}, \cdots , u^{k-1}\hat{G_k}\rangle \), and \({\hat{H}}_1 \in {\mathbb {F}}_{q^{2}}[x]\), we have \({\hat{H}}_1 \in \langle \hat{G_1} \rangle \), so that \(\hat{G_1} \mid \hat{H_1}\). Using the same argument for \(\hat{G_1}\), we get \(\hat{H_1} \mid \hat{G_1}\). Since \(\hat{G_1}\) and \(\hat{H_1}\) are monic polynomials, we must have \(\hat{H_1}=\hat{G_1}\).

Similarly \(u\hat{H_2} \in \langle \hat{G_1}, u\hat{G_2}, \cdots , u^{k-1}\hat{G_k}\rangle \) implies that \(u\hat{H_2} = \langle \hat{G_1}, u\hat{G_2}\rangle \), so that \(u\hat{H_2} = u\ell _2(x)\hat{G_1}+m_2(x)(u\hat{G_2}) = u(\ell _2(x)\hat{G_1}+m_2(x)\hat{G_2})\) for some \(\ell _2(x), m_2(x) \in {\mathbb {F}}_{q^{2}}[x]\). Then we get

$$\begin{aligned} \hat{H_2} = \ell _2(x)\hat{G_1}+m_2(x)\hat{G_2} = \ell _2(x)\hat{H_1}+m_2(x)\hat{G_2}~. \end{aligned}$$
(2)

Now since \(H_1, H_2\) are coprime, there exist \(\ell _2^\prime (x), m_2^\prime (x) \in {\mathbb {F}}_{q^{2}}[x]\) such that \(\ell _2^\prime (x)H_1+m_2^\prime (x)H_2 = 1\). From this, we get \(\ell _2^\prime (x)H_1\hat{H_2} = \hat{H_2}\). Then from (2), we get

$$\begin{aligned}\hat{H_2} = \ell _2^\prime (x)H_1\hat{H_2} = \ell _2^\prime (x)H_1(\ell _2(x)\hat{H_1}+m_2(x)\hat{G_2}) = \ell _2^\prime (x)m_2(x)H_1\hat{G_2}~.\end{aligned}$$

This implies that \(\hat{G_2} | \hat{H_2}\). Similarly, \(\hat{H_2} | \hat{G_2}\), and hence, \(\hat{H_2} = \hat{G_2}\). Now, in general for any \(i \ge 2\), assume that \({\hat{H}}_j = {\hat{G}}_j\) for \(j=1, 2, \ldots , i-1\). Then, as shown above for \({\hat{H}}_1\) and \({\hat{H}}_2\), \({\hat{H}}_i\) can be expressed as

$$\begin{aligned} {\hat{H}}_i = \sum _{j=1}^{i} n_j(x) {\hat{G}}_j = \sum _{j=1}^{i-1} n_j(x) {\hat{H}}_j + n_i(x){\hat{G}}_i~, \end{aligned}$$
(3)

for some \(n_j(x) \in {\mathbb {F}}_{q^2}[x]\). Now since \(H_1H_2 \cdots H_{i-1}\) and \(H_i\) are coprime, there exist \(\ell _i^\prime (x), m_i^\prime (x) \in {\mathbb {F}}_{q^{2}}[x]\) such that \(\ell _i^\prime (x)H_1H_2\cdots H_{i-1} + m_i^\prime (x)H_i = 1\). From this, we get \(\ell _i^\prime (x)H_1H_2 \cdots H_{i-1}{\hat{H}}_i = {\hat{H}}_i\). Then from (3), we get

$$\begin{aligned}{\hat{H}}_i = \ell _i^\prime (x)H_1H_2\cdots H_{i-1}{\hat{H}}_i = \ell _i^\prime (x)n_iH_1H_2\cdots H_{i-1}{\hat{G}}_i~.\end{aligned}$$

This implies that \({\hat{G}}_i | {\hat{H}}_i\). Similarly, \({\hat{H}}_i | {\hat{G}}_i\), and hence, \({\hat{H}}_i = {\hat{G}}_i\). Thus, \({\hat{H}}_i = {\hat{G}}_i\) for all i, \(1 \le i \le k\). Now since \(G_0G_1\cdots G_k = H_0H_1\cdots H_k\) and \(G_i, H_i\) are monic polynomials in \({\mathbb {F}}_{q^{2}}[x]\), we also get \(H_0=G_0\). Thus, \(G_i\), \(0 \le i \le k\), are unique. \(\square \)

Corollary 1

Let \(C=\langle {\hat{G}}_1,u{\hat{G}}_2,\cdots ,u^{k-1}{\hat{G}}_k\rangle \) be a cyclic code of length n over R, where \(G_i\), \(0 \le i \le k\), are as defined above. Then \(|C|={(q^{2})}^{\sum _{j=0}^{k-1}(k-j)deg (G_{j+1})}\).

Proof

From [8, Theorem 3.2], we have \(C=\langle {\hat{G}}_1\rangle \oplus \langle u{\hat{G}}_2\rangle \oplus \cdots \oplus \langle u^{k-1}{\hat{G}}_k\rangle \). Now,

$$\begin{aligned} |\langle u^j{\hat{G}}_{j+1}\rangle |= & {} \left( \frac{|R|}{|\langle u^{k-j}\rangle |}\right) ^{n-\deg {\hat{G}}_{j+1}} \\= & {} \left( \frac{|{\overline{R}}|^k}{|{\overline{R}}|^j}\right) ^{\deg {G}_{j+1}} \\= & {} (|{\overline{R}}|)^{(k-j)\deg {G}_{j+1}}. \end{aligned}$$

Then,

$$\begin{aligned} |C|= & {} |\langle {\hat{G}}_1\rangle |\cdot |\langle u {\hat{G}}_2\rangle |\cdots |\langle u^{k-1} {\hat{G}}_k\rangle | \\= & {} ({\overline{R}})^{k\deg G_1}\cdot ({\overline{R}})^{(k-1)\deg G_2}\cdots ({\overline{R}})^{\deg G_k} \\= & {} ({\overline{R}})^{\sum _{j=0}^{k-1}(k-j)\deg G_{j+1}}~. \end{aligned}$$

Hence, \(|C|={(q^{2})}^{\sum _{j=0}^{k-1}(k-j)\deg G_{j+1}}\). \(\square \)

In Theorem 4, using the generators \(a_0(x), ua_1(x), \ldots , u_{k-1}a_{k-1}(x)\) of a cyclic code C of length n over R we obtained another set of generators \({\hat{G}}_1, u{\hat{G}}_2, \ldots , u^{k-1}{\hat{G}}_{k}\) of C, where \(G_0, G_1, \cdots , G_k\) are monic pairwise coprime polynomials with \(G_0G_1\cdots G_k=x^n-1\). We can reverse this situation as follows. Let \(x^n-1=g_1g_2\cdots g_r\) be the factorization of \(x^n-1\) into monic pairwise coprime basic irreducible polynomials over R. Since \(G_i\) are monic divisors of \(x^n-1\), we can describe them as products of \(g_j\), \(1 \le j \le r\). Set \(s_0=0\), and let \(s_{k+1}\) be a nonnegative integer such that \(s_1+\cdots +s_{k+1}=r\). For \(i=0, 1, \ldots , k\), define

$$\begin{aligned} G_i= & {} g_{s_0+\cdots +s_{i}+1}\cdots g_{s_0+\cdots +s_{i+1}}~. \end{aligned}$$
(4)

Clearly, \({G_i}\) are pairwise coprime polynomials, and

$$\begin{aligned} \prod _{i=0}^{k}G_i=\prod _{j=0}^{r}g_j=x^n-1~. \end{aligned}$$

If we now define \(G_i\) first as above, and C is a cyclic code of length n over R such that \(C = \langle {\hat{G}}_1, u{\hat{G}}_2, \ldots , u^{k-1}{\hat{G}}_k\rangle \), then the generator polynomials \(a_i(x)\), \(0\le i \le k-1\), of C as defined in Theorem 3, can be determined recursively as products of \(g_j\), \(1 \le j \le r\), from the values of \(G_i\) using the relations \(G_0 = a_{k-1}(x), G_1 = (x^n-1)/a_0(x)\) and \(G_i=a_{i-2}(x)/a_{i-1}(x)\) for \(i \ge 2\).

To develop the next theorem, we use [7, Notation 2.4] with slight modifications. Consider the element \(m_0=1+u\) of R. We have \(\overline{x^n-m_0} =x^n-1 \in {\mathbb {F}}_{q^{2}}[x]\). Since \((n, p)=1\), \(x^n-1\) factorizes uniquely into monic pairwise coprime irreducible factors in \({\mathbb {F}}_{q^{2}}[x]\). Let \(x^n-1 = \prod _{i=1}^r h_i\) be such a factorization of \(x^n-1\). From Lemma 3, \(x^n-m_0\) has a unique decomposition as a product \(\prod _{i=1}^r f_i\) of monic pairwise coprime basic irreducible polynomials in R[x] with \({\overline{f}}_i=h_i\) for all \(i = 1, 2, \ldots , r\). Also, from Lemma 3, \(x^n-1\) has a unique decomposition as a product \(\prod _{i=1}^r g_i\) of monic pairwise coprime basic irreducible polynomials in R[x] with \({\overline{g}}_i=h_i\) for all i. With these notations, we give another alternative form for C in the next result.

Theorem 5

Let C be a cyclic code of length n over R. Then there exist polynomials \(b_0, b_1, \ldots , b_{k-1} \in R[x]\) with \(b_{k-1}|b_{k-2}|\cdots |b_0|(x^n-(1+u))\) such that

$$\begin{aligned}C=\left\langle d_1\prod _{j=2}^{k}\left( \frac{b_{j-2}}{b_{j-1}}\right) ^j\right\rangle ~,\end{aligned}$$

where \(d_1= (x^n-(1+u))/b_0\).

Proof

We have \(C = \langle {\hat{G}}_1, u{\hat{G}}_1, \ldots , u^{k-1}{\hat{G}}_k\rangle \), where \(G_0G_1\cdots G_k=x^n-1\) and \(G_i\) are pairwise coprime polynomials, \(0 \le i \le k\). Let \(x^n-1 = g_1g_2\cdots g_r\) be the factorization of \(x^n-1\) into monic basic irreducible polynomials over R. Then, from (4) we have

$$\begin{aligned} G_i= & {} g_{s_0+\cdots +s_i+1}\cdots g_{s_0+\cdots +s_{i+1}}~. \end{aligned}$$
(5)

Further, from Hensel’s lemma, \(x^n-(1+u)\) factors uniquely into monic pairwise coprime basic irreducible polynomials in R[x] as

$$\begin{aligned} x^n-(1+u)= & {} f_1f_2 \cdots f_r~. \end{aligned}$$

Moreover, \({\overline{f}}_i={\overline{g}}_i\) for \(1\le i \le r\). Again setting \(s_0=0\) and \(s_{k+1}\) to be a nonnegative integer such that \(s_1+\cdots +s_{k+1}=r\), define

$$\begin{aligned} F_i= & {} f_{s_0+\cdots +s_{i+1}+1}\cdots f_{s_0+\cdots +s_{i+2}}~\text{ for }~{0\le i \le {k-1}}~, \end{aligned}$$
(6)
$$\begin{aligned} F_k= & {} f_1\cdots f_{s_1}~. \end{aligned}$$
(7)

Then, \({\overline{F}}_i={\overline{G}}_{i+1}\) for \(0\le i \le k-1\) and \({\overline{F}}_k={\overline{G}}_0\). We also get \(F_0F_1\cdots F_k=x^n-(1+u)\) in R[x]. Let \({\hat{F}}_i=\frac{x^n-(1+u)}{F_i}\), \(0\le i \le k\). Now define polynomials \(b_i \in {\mathbb {F}}_{q^{2}}[x]\), \(0 \le i \le k\), recursively as

$$\begin{aligned} F_i = \left\{ \begin{array}{ll} b_{k-1} &{} ~\text{ for }~ i=0~, \\ \frac{x^n-(1+u)}{b_0} = d_1 &{} ~\text{ for }~ i= 1~, \\ \frac{b_{i-2}}{b_{i-1}} &{} ~\text{ for }~ 2\le i \le k~. \\ \end{array} \right. \end{aligned}$$

Now let

$$\begin{aligned} F(x) = d_1\prod _{j=2}^{k}\left( \frac{b_{j-2}}{b_{j-1}}\right) ^j~. \end{aligned}$$

Since for each \(0\le j \le k\), \(G_j\) and \({\hat{G}}_j\) are coprime in R[x], there exist \(\alpha _j,\beta _j \in R[x]\) such that

$$\begin{aligned} \alpha _j G_j+\beta _j {\hat{G}}_j = 1. \end{aligned}$$

Multiplying both sides of this equation by \({\hat{G}}_j\), we get \({\hat{G}}_j = \beta _j{\hat{G}}_j^2\) in \(\frac{R[x]}{\langle x^n-1\rangle }\). From this, we get

$$\begin{aligned} {\hat{G}}_j = \beta _j{\hat{G}}_j^2 = \beta _j^2{\hat{G}}_j^3 = \cdots = \beta _j^{k-1}{\hat{G}}_j^k~. \end{aligned}$$
(8)

Since \({\overline{G}}_{i+1}={\overline{F}}_i\), \(0\le i \le k-1\), it follows that

$$\begin{aligned} {\hat{G}}_{i+1}= & {} {\hat{F}}_i+u V_i(x)~\text{ for } \text{ some }~ V_i(x)\in {\mathbb {F}}_{q^{2}}[x]~. \end{aligned}$$
(9)

Then from (8) and (9), and noting that \(x^n-(1+u) = -u\) in \(\frac{R[x]}{\langle x^n-1\rangle }\), we get

$$\begin{aligned} u^i{\hat{G}}_{i+1}= & {} u^i\beta _{i+1}({\hat{F}}_i+u V_i) \nonumber \\= & {} u^i\beta ^{k-1}_{i+1}({\hat{F}}_i+u V_i)^k \nonumber \\= & {} (-1)^i(x^n-(1+u))^i\beta ^{k-1}_{i+1}({\hat{F}}_i - (x^n-(1+u))V_i)^k \nonumber \\= & {} (-1)^i\left( F_i{\hat{F}}_i\right) ^i\beta ^{k-1}_{i+1}({\hat{F}}_i - F_i{\hat{F}}_iV_i)^k \nonumber \\= & {} (-1)^i\beta ^{k-1}_{i+1}(1-F_iV_i)F_i^i{\hat{F}}_i^{i+k}~. \end{aligned}$$
(10)

Now putting \(i=0\) in (10), we get

$$\begin{aligned}{\hat{G}}_1 = \beta ^{k-1}_{1}(1-F_0V_0){\hat{F}}_0^{k} = \beta ^{k-1}_{1}(1-b_{k-1}V_0)F_1^k\left( \prod _{i=2}^kF_i\right) ^k \\ =\beta ^{k-1}_{1}(1-b_{k-1}V_0)d_1^k\prod _{i=2}^k\left( \frac{b_{i-2}}{b_{i-1}}\right) ^k~. \end{aligned}$$

This implies that \({\hat{G}}_1 \in \langle F(x)\rangle \). Again putting \(i=1\) in (10), we get

$$\begin{aligned} u{\hat{G}}_2 = -\beta ^{k-1}_2(1-F_1V_1)F_1{\hat{F}}_1^{1+k} = -\beta ^{k-1}_2(1-d_1V_1)d_1F_0^{1+k}\left( \prod _{i=2}^kF_i\right) ^{1+k} \\ = \beta ^{k-1}_2(d_1V_1-1)d_1b_{k-1}^{1+k}\prod _{i=2}^k\left( \frac{b_{i-2}}{b_{i-1}}\right) ^{1+k}~. \end{aligned}$$

This implies that \(u{\hat{G}}_2 \in \langle F(x)\rangle \). Now, for \(i \ge 2\), we get

$$\begin{aligned}&u^i{\hat{G}}_{i+1} = (-1)^i\beta ^{k-1}_{i+1}(1-F_iV_i)F_i^i{\hat{F}}_i^{i+k}\\&\quad = (-1)^i\beta ^{k-1}_{i+1}(1-F_iV_i)F_i^i(F_0F_1)^{i+k}\left( \prod _{\begin{array}{c} j=2 \\ j \ne i \end{array}}^kF_j\right) ^{i+k} \\&\quad = (-1)^i\beta ^{k-1}_{i+1}\left( 1-\left( \frac{b_{i-2}}{b_{i-1}}\right) V_i\right) (b_{k-1}d_1)^{i+k}\left( \frac{b_{i-2}}{b_{i-1}}\right) ^i\left( \prod _{\begin{array}{c} j=2 \\ j \ne i \end{array}}^k\left( \frac{b_{j-2}}{b_{j-1}}\right) \right) ^{i+k}~. \end{aligned}$$

Then clearly \(u^i{\hat{G}}_{i+1} \in \langle F(x)\rangle \). Therefore,

$$\begin{aligned}C = \langle {\hat{G}}_1, u{\hat{G}}_2, \ldots , u^{k-1}{\hat{G}}_k\rangle \subseteq \langle F(x)\rangle ~.\end{aligned}$$

Now for any distinct \(i,j\in \{0,1,\cdots ,k\}\), \({\hat{G}}_i {\hat{G}}_j=0\) in \(\frac{R[x]}{\langle x^n-1\rangle }\). Also, for any i, \(1\le i \le k\), \(G^k_i\) and \(\hat{G^k_i}\) are coprime. Hence, there exist \(\alpha _i,\beta _i\in R[x]\) such that \(\alpha _iG^k_i+\beta _i\hat{G^k}_i=1\). Then,

$$\begin{aligned} \prod _{i=1}^{k}(\alpha _iG^k_i+\beta _i\hat{G^k_i})=1~. \end{aligned}$$

Now expanding the above equation, we get

$$\begin{aligned}&t_0(x)(G_1G_2\cdots G_k)^k+t_1(x)(\hat{G_1}G_2\cdots G_k)^k+t_2(x)(G_1\hat{G_2}\cdots G_k)^k+\nonumber \\&\qquad \cdots +t_k(x)(G_1G_2\cdots \hat{G_k})^k = 1 \end{aligned}$$
(11)

for some \(t_0(x),t_1(x),\cdots ,t_{k}(x)\in R[x]\). Multiplying both sides of (11) by F(x), we get

$$\begin{aligned} t'_0(x){\hat{G}}_0^k F(x)+t'_1(x){\hat{G}}_1^kF(x)+t'_2(x){\hat{G}}_2^kF(x)+ \cdots +t'_k(x){\hat{G}}_k^kF(x) =F(x),\qquad \end{aligned}$$
(12)

where \(t'_0(x),t'_1(x),\cdots ,t'_k(x)\in R[x]\). Now since \({\overline{G}}_{i+1}={\overline{F}}_i~\text{ for }~0\le i \le k-1\), we have

$$\begin{aligned} F_i=G_{i+1}+u V_{i+1}~~\text{ for } \text{ some }~~ V_{i+1}\in R[x]~. \end{aligned}$$

Also, noting that \(F_0^0=1\) and \(F_1 = d_1\), we see that

$$\begin{aligned}F(x) = d_1\prod _{j=2}^{k}\left( \frac{b_{j-2}}{b_{j-1}}\right) ^j = \prod _{j=0}^{k}F_j^j~.\end{aligned}$$

Now for each \(0 \le i \le k-1\), computing in \(R[x]/\langle x^n-1\rangle \), we have

$$\begin{aligned}&{\hat{G}}^{i+1}_{i+1}F(x) = {\hat{G}}^{i+1}_{i+1}F_{i+1}\prod _{\begin{array}{c} j=0\\ j\ne i \end{array}}^k F_j^j = {\hat{G}}^{i+1}_{i+1}(G_{i+1}+u V_{i+1})^i\prod _{\begin{array}{c} j=0\\ j\ne i \end{array}}^k F_j^j \nonumber \\&\quad = u^i{\hat{G}}_{i+1}({\hat{G}}_{i+1}V_{i+1})^i\prod _{\begin{array}{c} j=0\\ j\ne i \end{array}}^k F_j^j = l_i(x)(u^i{\hat{G}}_{i+1})~, \end{aligned}$$
(13)

where \(l_i(x) \in R[x]\). Then it follows from (12) and (13) that

$$\begin{aligned}F(x) = \ell _0(x){\hat{G}}_1 + \ell _1(x)u{\hat{G}}_2 + \cdots + \ell _{k-1}(x)u^{k-1}{\hat{G}}_k\end{aligned}$$

for some \(\ell _0(x), \ell _1(x),\ldots , \ell _{k-1}(x)\in R[x]\). Hence, \(F(x)\in C\), and so, \(\langle F(x)\rangle \subseteq C\). Therefore,

$$\begin{aligned} C= \langle F(x) \rangle = \left\langle d_1\prod _{j=2}^{k}\left( \frac{b_{j-2}}{b_{j-1}}\right) ^j\right\rangle ~. \end{aligned}$$

\(\square \)

The next result gives another important characterization of a cyclic code of length n over R.

Theorem 6

Let \(C=\langle {\hat{G}}_1,u{\hat{G}}_2,\cdots ,u^{k-1}{\hat{G}}_{k}\rangle \) be a cyclic code of length n over R as defined in Theorem 4. Let \(x^n-(1+u)=f_1(x)f_2(x)\cdots f_r(x)\) be the unique factorization of \(x^n-(1+u)\) into monic pairwise coprime basic irreducible polynomials in R[x]. Then \(C = \left\langle \prod _{i=1}^{r}f^{k_i}_i(x)\right\rangle \), where \(0\le k_i \le k\).

Proof

Let \(R_n=R[x]/\langle x^n-1\rangle \), and let C be any ideal of \(R_n\). The image \({\overline{C}}\) of C under the map \(^-\) (modulo u reduction) is an ideal of \({\mathbb {F}}_{q^{2}}[x]/\langle x^n-1\rangle \). Let \(x^n-1=h_1(x)h_2(x)\cdots h_r(x)\) be the unique factorization of \(x^n-1\) into monic pairwise coprime irreducible polynomials in \({\mathbb {F}}_{q^{2}}[x]\). Then \({\overline{C}}\) can be written as \(\left\langle \prod _{i=1}^{r}h_i^{\ell _i}(x)\right\rangle \), where \(0\le \ell _i \le k\). Now we have \(x^n-(1+u)=f_1(x)f_2(x)\cdots f_r(x)\), where \(f_i(x)\), \(1\le i \le r\), are monic pairwise coprime basic irreducible polynomials in R[x]. Also, after a rearrangement of \(h_i(x)\), we may assume that \({\overline{f}}_i(x) = h_i(x)\), \(1\le i \le r\). So, for any \(d(x)\in C\), there exist \(s(x),t(x)\in R[x]\) such that \(d(x)=s(x)\prod _{i=1}^{r}f^{\ell _i}_i(x) + ut(x)\). It is clear that \(u t(x)\in \langle u\rangle = \langle -u\rangle = \langle x^n-(1+u)\rangle \) in \(R_n\). So, C is contained in some ideal \(\left\langle \prod _{i=1}^{r}f^{k_i}_i(x)\right\rangle \) of \(R_n\), i.e.,

$$\begin{aligned} C\subseteq & {} \left\langle \prod _{i=1}^{r}f^{k_i}_i(x)\right\rangle ,~0\le k_i\le k. \end{aligned}$$
(14)

Now let \(s_i\) be the largest among \(k_i\) such that \(C \subseteq \left\langle \prod _{i=1}^{r}f^{k_i}_i(x)\right\rangle \). Then there exists an element \(c(x) \in C\) such that \(c(x) = d(x)\prod _{i=1}^{r}f^{s_i}_i(x)\) and \(\gcd (d(x), f_i(x)) = 1\). Then,

$$\begin{aligned}\gcd (d(x), f_1(x)f_2(x)\cdots f_r(x)) = \gcd (d(x), x^n-(1+u))=1~.\end{aligned}$$

So, there exist \(p(x), q(x) \in R[x]\) such that \(p(x)d(x) + q(x)(x^n-(1+u)) = 1\). In \(R_n\), this gives \(p(x)d(x) -uq(x) = 1\). From this, we get \(p(x)d(x) = 1 + uq(x) = 1 - ut\), where \(t = -q(x)\). Then,

$$\begin{aligned} p(x)d(x)(1+ut+\cdots +u^{k-1}t^{k-1})&= (1-ut)(1+ut+\cdots +u^{k-1}t^{k-1}) \\&= 1-u^kt^k = 1~. \end{aligned}$$

Hence, d(x) is invertible in \(R_n\). Then we have

$$\begin{aligned}\prod _{i=1}^{r}f^{s_i}_i(x) = d(x)^{-1}c(x) \in C~.\end{aligned}$$

So, \(\prod _{i=1}^{r}f^{s_i}_i(x) \subseteq C\), and hence,

$$\begin{aligned}C = \left\langle \prod _{i=1}^{r}f^{s_i}_i(x)\right\rangle ~.\end{aligned}$$

The result follows. \(\square \)

Theorem 7

Let \(C = \left\langle \prod _{i=1}^{r}f^{k_i}_i(x)\right\rangle \) be a cyclic code of length n over R, where \(0\le k_i \le k\), and \(f_i\) are as defined above. Then,

$$\begin{aligned} |C| = (q^2)^{\sum _{i=0}^r(k-k_i)\deg f_i} = (q^2)^{kn-\sum _{i=0}^rk_i\deg f_i}~. \end{aligned}$$
(15)

Proof

Let \(x^n-1=g_1g_2\cdots g_r\), where \(g_i\), \(1\le i\le r\), are monic pairwise coprime basic irreducible polynomials in R[x]. Then, by the Chinese Remainder Theorem, we have

$$\begin{aligned} R_n=\frac{R[x]}{\langle x^n-1\rangle }=\frac{R[x]}{\cap _{i=1}^{r}\langle g_i\rangle }\cong \bigoplus \sum _{i=1}^{r}\frac{R[x]}{\langle g_i\rangle }~. \end{aligned}$$

From [8, Theorem 3.2], any ideal of \(R_n\) is sum of ideals of the form \(\langle u^{k_i}+\langle g_i\rangle \rangle \) for some \(0\le k_i \le k\). Also, for each i, the ring \(\frac{R[x]}{\langle g_i\rangle }\) is a chain ring with the maximal ideal \(\left\langle u+\langle g_i\rangle \right\rangle \). The nilpotency index of \(u+\langle g_i\rangle \) is k. Since \(f_i\) is a basic irreducible polynomial in R, the ideal \(\langle f_i +\langle g_i\rangle \rangle \) is a maximal ideal of \(\frac{R[x]}{\langle g_i\rangle }\). Therefore, \(\langle f_i^{k_i}+\langle g_i\rangle \rangle = \langle u^{k_i}+\langle g_i\rangle \rangle \). Then we have

$$\begin{aligned} C = \left\langle \prod _{i=1}^{r}f^{k_i}_i\right\rangle= & {} \bigoplus _{i=1}^r\left\langle \prod _{i=1}^{r}f^{k_i}_i+\langle g_i\rangle \right\rangle = \bigoplus _{i=1}^r\left\langle f^{k_i}_i +\langle g_i\rangle \right\rangle = \bigoplus _{i=1}^r\left\langle u^{k_i} +\langle g_i\rangle \right\rangle ~. \end{aligned}$$

The second last equality holds above because \(\displaystyle {\prod _{\begin{array}{c} i=1 \\ j \ne i \end{array}}^{r}f^{k_j}_j+\langle g_i\rangle }\) is a unit in \(R[x]/\langle g_i\rangle \). Then we have

$$\begin{aligned} |C|= & {} \left| \bigoplus _{i=1}^r\left\langle u^{k_i} + \langle g_i\rangle \right\rangle \right| \\= & {} (q^{2})^{\sum _{i=1}^{r}(k-k_i)\deg f_i} \\= & {} (q^{2})^{kn-\sum _{i=1}^{r}k_i\deg f_i}~. \end{aligned}$$

\(\square \)

5 Dual codes of cyclic codes over \({\mathbb {F}}_{q^2}[u]/\langle u^k\rangle \)

In this section, we present a characterization of the dual codes of cyclic codes of length n over R.

It is well known that in studying the algebraic structure of dual codes of cyclic codes, the reciprocal polynomials play an important role. The reciprocal polynomial of a polynomial f(x) is defined as \(f^\circ (x)=x^{\deg f(x)}f(x^{-1})\). The conjugate of a polynomial \(f(x) = a_0+a_1x+\cdots + a_mx^m \in R[x]\) is defined as \(f^*(x) = a_0^*+a_1^*x+\cdots + a_m^*x^m\), where \(a_i^*\) is the conjugate of \(a_i\) in R. The conjugate of \(f^\circ (x)\) is denoted by \(f^\dag (x)\), i.e., \(f^\dag (x)={(f^\circ (x))}^*\).

In order to determine conditions for self-orthogonality of codes over \(R={\mathbb {F}}_{q^{2}}[u]/\langle u^k\rangle \), we will use the idea of cyclotomic cosets. Recall that if n is a positive integer and i is an integer such that \(0\le i \le n-1\), then the \(q^{2}\)-cyclotomic coset modulo n containing i is defined as \(C_i=\{i,iq^{2},\cdots ,i(q^{2})^{l-1}\}\), where l is the smallest positive integer such that \(i(q^{2})^l\equiv i~(\text{ mod }~n)\).

Let I be a fixed complete set of \(q^{2}\)-cyclotomic coset representatives modulo n. The irreducible factors of \(x^n-1\) over \({\mathbb {F}}_{q^{2}}\) can be described in terms of \(q^{2}\)-cyclotomic cosets modulo n. Therefore, the factorization of \(x^n-1\) into monic pairwise coprime irreducible polynomials over \({\mathbb {F}}_{q^{2}}\) can be given as \(x^n-1=\prod _{i\in I}h_i(x)\). Then \(x^n-(1+u)\) factorizes into pairwise coprime monic basic irreducible polynomials over R as \(\prod _{i\in I}f_i(x)\) such that \({\overline{f}}_i(x) = h_i(x)\) for all \(i \in I\). In this section and in the next section, we will use this representation for the factorization of \(x^n-(1+u)\) into basic irreducible polynomials over R.

To obtain the algebraic structure of the dual code of a cyclic code C over R, we will use the polynomials \(f_i^\dag (x)\), which are the conjugates of the reciprocal polynomials of \(f_i(x)\), \(i\in I\). It is easy to check that \(h^\circ _i(x)\) and hence \(h^\dag _i(x)\) is also a monic divisor of \(x^n-1\) in \({\mathbb {F}}_{q^{2}}[x]\). Now we define a unique map \(\mu :I\rightarrow I\) such that \(h_{\mu (i)}(x) =h^\dag _i(x)\). The map \(\mu \) is a bijection and satisfies \(\mu (\mu (i))=i\) for all \(i\in I\). We need the following lemma to determine the structure of the dual of a cyclic code over R.

Lemma 4

Let \(C=\left\langle \prod _{i\in I}(f_i^\dag )^{k_i}(x)\right\rangle \) be a cyclic code of length n over R, where \(f_i(x)~(i\in I)\) are as defined above and \(0 \le k_i \le k\). Then \(C = \left\langle \prod _{i\in I}f^{k_i}_{\mu (i)}(x)\right\rangle \).

Proof

Since \(\overline{f^\dag _i}={\overline{f}}^\dag _i=h^\dag _i=h_{\mu (i)}=\overline{f_{\mu (i)}}\), there exists \(p_i\in R[x]\) such that

$$\begin{aligned}f_{\mu (i)}=f^\dag _i+up_i~.\end{aligned}$$

Now, in \(R_n=R[x]/\langle x^n-1\rangle \), we have

$$\begin{aligned} \prod _{i\in I}f^\dag _i = (1-(1+u)x^n)^* = (1-(1+u)x^n) = -u~, \end{aligned}$$
(16)

and

$$\begin{aligned} \prod _{i\in I}f_{\mu (i)} = x^n-(1+u) = -u~. \end{aligned}$$
(17)

It follows from (16) and (17) that

$$\begin{aligned} \prod _{i\in I}f^{k_i}_{\mu (i)} = \prod _{i\in I}(f^\dag _i+up_i)^{k_i}=\prod _{i\in I}\left( f^\dag _i-p_i\prod _{j\in I}f^\dag _j\right) ^{k_i} = A(x)\prod _{i\in I}(f^\dag _i)^{k_i}~, \end{aligned}$$

and

$$\begin{aligned} \prod _{i\in I}(f^\dag _i)^{k_i} = \prod _{i\in I}(f_{\mu (i)}-up_i)^{k_i}=\prod _{i\in I}\left( f_{\mu (i)}+p_i\prod _{j\in I}f_{\mu (j)}\right) ^{k_i} = B(x)\prod _{i\in I}f^{k_i}_{\mu (i)}~, \end{aligned}$$

where \(A(x), B(x) \in R[x]\). Hence, \(\prod _{i\in I}(f^\dag _i)^{k_i}\) is a divisor of \(\prod _{i\in I}f^{k_i}_{\mu (i)}\), and \(\prod _{i\in I}f^{k_i}_{\mu (i)}\) is a divisor of \(\prod _{i\in I}(f^\dag _i)^{k_i}\). Therefore,

$$\begin{aligned} C = \left\langle \prod _{i\in I}(f^\dag _i)^{k_i}\right\rangle = \left\langle \prod _{i\in I}f^{k_i}_{\mu (i)}\right\rangle ~. \end{aligned}$$

\(\square \)

Theorem 8

Let \(C=\left\langle \prod _{i\in I}f^{k_i}_i(x)\right\rangle \) be a cyclic code of length n over R, where \(f_i(x)~(i\in I)\) are as defined above and \(0 \le k_i \le k\). Then \(C^\perp =\left\langle \prod _{i\in I}f^{k-k_i}_{\mu (i)}(x)\right\rangle = \left\langle \prod _{i\in I}(f^\dag _i(x))^{k-k_i}\right\rangle \) and \(|C^\perp |=(q^{2})^t\), where \(t=\sum _{i\in I}k_i\deg f_i(x)\).

Proof

Let \(D= \left\langle \prod _{i\in I}f_{\mu _(i)}^{k-k_i}(x)\right\rangle \subseteq R[x]/\langle x^n-1\rangle \). We know that \(|C||C^\perp |=|R|^n\). From (15), we have \(|C|=(q^{2})^{\sum _{i\in I}(k-k_i)\deg f_i(x)}\). Hence,

$$\begin{aligned} \nonumber |C^\perp | = \frac{|R|^n}{|C|}= & {} \frac{(q^{2})^{nk}}{q^{2(nk-\sum _{i\in I}k_i\deg f_i(x))}} \\= & {} (q^{2})^{\sum _{i\in I}k_i\deg f_{\mu (i)}(x)}~, \end{aligned}$$
(18)

since \(\sum _{i \in I} \deg f_i(x) = \sum _{i \in I}\deg f_{\mu (i)}(x)\). Again from (15), we have

$$\begin{aligned} |D|= & {} \left| \left\langle \prod _{i\in I}(f^\dag _{\mu (i)}(x))^{k-k_i}\right\rangle \right| \nonumber \\= & {} (q^{2})^{\sum _{i\in I}k_i\deg f_{\mu (i)}(x)}~. \end{aligned}$$
(19)

From (18) and (19), we get \(|D|=|C^\perp |\).

Now it remains to prove that

$$\begin{aligned} \left\langle \prod _{i\in I}f^{k-k_i}_{\mu (i)} \right\rangle \subseteq C^\perp ~. \end{aligned}$$

From Lemma 4, we have

$$\begin{aligned} \prod _{i\in I}f^{k-k_i}_{\mu (i)}=\prod _{i\in I}(f^\dag _i)^{k-k_i}~. \end{aligned}$$

Therefore, it suffices to show that, in \(R_n\),

$$\begin{aligned} \left( \prod _{i\in I}f^{k_i}_i \right) \cdot \left( \prod _{i\in I}(f^\dag _i)^{k-k_i}\right) ^\dag =0~. \end{aligned}$$

A direct computation shows that

$$\begin{aligned} \left( \prod _{i\in I}f^{k_i}_i\right) \cdot \left( \prod _{i\in I}(f^\dag _i)^{k-k_i}\right) ^\dag = \prod _{i\in I}f^{k}_i = (x^n-(1+u))^k = (-u)^k = 0~. \end{aligned}$$

Hence,

$$\begin{aligned} C^\perp =\left\langle \prod _{i\in I}f^{k-k_i}_{\mu (i)} \right\rangle =\left\langle \prod _{i\in I}(f^\dag _i)^{k-k_i}\right\rangle ~. \end{aligned}$$

\(\square \)

In the next section, we present a necessary and sufficient condition for cyclic codes of length n over R to be Hermitian self-orthogonal. Using this condition, we give a construction of quantum codes over \({\mathbb {F}}_{q}\) from the Gray images of Hermitian self-orthogonal cyclic codes over R.

6 Quantum codes from Hermitian self-orthogonal cyclic codes over R

Let q be a prime power and H be a Hilbert space of dimension q over the field of complex numbers \({\mathbb {C}}\). Let \(H^{\otimes n}\) denote the n-fold tensor product of H. Then \(H^{\otimes n}\) is a Hilbert space of dimension \(q^n\) over \({\mathbb {C}}\). A q-ary quantum code C is subspace of \(H^{\otimes n}\). If the dimension of C is \(q^{\mathcal {k}}\), then C is called an \([[n, {\mathcal {k}}, d]]_q\) quantum code, where d is the minimum distance of C.

Calderbank and Shor [5] and Steane [24] have shown a connection of quantum codes to classical linear codes. We describe it briefly as follows. Let \(C_1\) and \(C_2\) be two linear codes over the finite field \({\mathbb {F}}_q\), with parameters \([n, t_1]\) and \([n, t_2]\), respectively, such that \(C_2^\perp \subseteq C_1\). For any coset \(x+C_2^\perp \) of \(C_2^\perp \), where \(x \in C_1\), define the quantum state \(|x+C_2^\perp \rangle \) by

$$\begin{aligned}|x+C_2^\perp \rangle = \frac{1}{\sqrt{|C_2^\perp |}}\sum _{y \in C_2^\perp } |x+y\rangle ~.\end{aligned}$$

The space spanned by the quantum states \(|x+C_2^\perp \rangle \), \(x \in C_1\), is a quantum code of dimension \(|C_1|/|C_2^\perp |= q^{t_1+t_2-n}\). Thus, we get an \([[n, t_1+t_2-n]]_q\) quantum code from the codes \(C_1\) and \(C_2\). The code \(C_1\) is used for bit flip error correction, while the code \(C_2\) is used for phase flip error correction. This construction of quantum codes is known as the Calderbank–Shor–Steane (CSS) construction. For more about this, we refer the reader to [6, 21, 26]. We have the following important theorem.

Theorem 9

With above notations, let \(C = \left\langle \prod _{i\in I}f^{k_i}_i(x)\right\rangle \), \(0 \le k_i \le k\), be a cyclic code of length n over R. Then \(C\subseteq C^\perp \) if and only if \(k_i+k_{\mu (i)}\ge k\) for all \(i \in I\).

Proof

From Theorem 8, we have

$$\begin{aligned}C^\perp = \left\langle \prod _{i\in I}f^{k-k_i}_{\mu {(i)}}(x)\right\rangle ~.\end{aligned}$$

Recall that \(\mu \) is a bijection on I such that \(\mu (\mu (i))=i\) for all \(i\in I\). Therefore, we have

$$\begin{aligned} C^\perp = \left\langle \prod _{i\in I}f^{k-k_i}_{\mu (i)}(x)\right\rangle = \left\langle \prod _{i\in I}f^{k-k_\mu (i)}_{\mu (\mu (i))}(x)\right\rangle = \left\langle \prod _{i\in I}f^{k-k_\mu (i)}_{i}(x)\right\rangle ~. \end{aligned}$$

Then the code C is self-orthogonal, i.e., \(C\subseteq C^\perp \), if and only if

$$\begin{aligned} \left. \left( \prod _{i\in I}f^{k-k_{\mu (i)}}_i(x)\right) \right| \left( \prod _{i\in I}f^{k_i}_i(x)\right) ~. \end{aligned}$$

This is possible if and only if \(k-k_{\mu (i)}\le k_i\), i.e., \(k_i+k_{\mu (i)}\ge k\) for all \(i \in I\). \(\square \)

One of the most important applications of self-orthogonal codes is in the construction of quantum codes. A quantum code of length n, dimension \({\mathcal {k}}\) and minimum distance d over a field \({\mathbb {F}}_q\) is said to have parameters \([[n,{\mathcal {k}},d]]_q\), and we simply call it an \([[n,{\mathcal {k}},d]]_q\)-quantum code. Any quantum code with parameters \([[n,{\mathcal {k}},d]]_q\) satisfies the quantum Singleton bound \({\mathcal {k}}\le n-2d+2\) [28]. If a quantum code attains this bound, then it is called a quantum maximum-distance-separable (quantum MDS) code. Clearly, quantum MDS codes have optimal parameters.

The next result gives a construction of quantum codes over \({\mathbb {F}}_q\) from self-orthogonal Hermitian codes over \({\mathbb {F}}_{q^2}\).

Theorem 10

(Hermitian construction) [17] Let C be a linear code over \({\mathbb {F}}_{q^2}\) with parameters \([n,{\mathcal {k}},d]_{q^2}\) such that \(C \subseteq C^{\perp }\), where \(C^{\perp }\) is the Hermitian dual of C. Then there exists a q-ary quantum code with parameters \([[n, n-2{\mathcal {k}},d]]_q\), where d is the minimum weight of \(C^{\perp } \setminus C\).

Now we construct a new family of q-ary quantum codes from the self-orthogonal cyclic codes over R using the Hermitian construction and the Gray map. Combining Theorem 9 with Theorem 2, we see that a Hermitian self-orthogonal code of length kn over \({\mathbb {F}}_{q^{2}}\) can be constructed by taking the Gray map of a self-orthogonal cyclic code of length n over R. Then, from Theorem 10, we have the following result.

Theorem 11

Let \(C = \left\langle \prod _{i\in I}f^{k_i}_i(x)\right\rangle \), \((0\le k_i \le k)\), be a Hermitian self-orthogonal cyclic code of length n, type \(\{l_0,l_1,\cdots ,l_{k-1}\}\), and size \(q^{2k'}\) over R, where \(k'\) is a nonnegative integer. Let the minimum Gray weight of \(C^\perp \setminus C\) be \(d_G\). Then there exists a quantum code with parameters \([[kn,kn-2(kl_0+{(k-1)}l_1+\cdots +l_{k-1}),d_G]]_{q}=[[kn,kn-2k',d_G]]_{q}\).

To obtain the minimum distance of a quantum code from a self-orthogonal cyclic code C over R, we need to compute the Gray distance of its dual \(C^\perp \). For this, we have employed two methods. In the first method, we have restricted to the special case \(R'={\mathbb {F}}_{q^2}+u{\mathbb {F}}_{q^2}\) of R, in which the Gray distance of the dual code \(C^\perp \) of a cyclic code C over \(R'\) is computed using the residue and torsion codes of \(C^\perp \). For a cyclic code C of length n over \(R'\), the torsion code and the residue code of C are codes over \({\mathbb {F}}_{q^{2}}\) and are defined as

$$\begin{aligned} \text{ Tor }(C)= & {} \{a\in {\mathbb {F}}_{q^{2}}^n |~ ua\in C\}~, \\ \text{ Res }(C)= & {} \{a\in {\mathbb {F}}_{q^{2}}^n | ~a+ub\in C ~\text {for some}~b\in {\mathbb {F}}_{q^{2}}^n\}~. \end{aligned}$$

The residue and torsion codes for \(C^\perp \) are defined similarly. Under the reduction modulo u map \(^{-}\), we have \(\overline{a+ub}=a\) for any \(a+ub \in R'\). Clearly, for any cyclic code C over \(R'\), \({\overline{C}} =\text{ Res }(C)\). The map \(^{-}\) is a ring homomorphism from \(R'\) to \({\mathbb {F}}_{q^{2}}\) with \(\ker (^{-}) \cong \text{ Tor }(C)\). Hence, we get \(|C|=|\text{ Res }(C)||\text{ Tor }(C)|\).

Theorem 12

Let \(C=\left\langle \prod _{i\in I}f^{k_i}_i(x)\right\rangle \) be a cyclic code of length n over \(R'\), where \(f_i(x)\) are the monic basic irreducible divisors of \(x^n-(1+u)\) in \(R'[x]\) and \(0\le k_i \le 2\). Then,

$$\begin{aligned} 1.~Res (C)=\left\langle \prod _{i\in I}\left( {\overline{f}}_{i}(x)\right) ^{\eta _i}\right\rangle ,where ~\eta _i=k_i~if ~k_i=0~or ~1,~and ~\eta _i=1~if ~k_i=2. \\ 2.~Tor (C)=\left\langle \prod _{i\in I}\left( {\overline{f}}_{i}(x)\right) ^{\zeta _i}\right\rangle ,where ~\zeta _i=0~if ~k_i=0~or ~1,~and ~\zeta _i=1~if ~k_i=2. \end{aligned}$$

Proof

For any \(i \in I\), since \(f_i(x)\) and \({\hat{f}}_i(x) =\frac{x^n-1}{f_i(x)}\) are coprime in \({\mathbb {F}}_{q^{2}}[x]\), there exist \(\alpha (x),\beta (x)\in {\mathbb {F}}_{q^{2}}[x])\) such that \(\alpha _i(x)f_i(x)+\beta _i(x){\hat{f}}_i(x)=1\). Multiplying both sides of this equation by \(f_i(x)\), and noting that \(f_i(x){\hat{f}}_i(x) = 0\) in \({\mathbb {F}}_{q^{2}}[x]/\langle x^n-1\rangle \), we get

$$\begin{aligned} \alpha _i(x)f^2_i(x) = f_i(x)~. \end{aligned}$$

Hence, \(\left\langle f^2_i(x)\right\rangle =\langle f_i(x)\rangle \) for all \(i \in I\). From this, it follows that \(\text{ Res }(C)=\left\langle \prod _{i\in I}\left( {\overline{f}}_i(x)\right) ^{\eta _i}\right\rangle \). Now since \(x^n-(1+u) = \prod _{i\in I}f_i(x)\) and \(x^n-(1+u)=-u\) in \({\mathbb {F}}_{q^{2}}[x]/\langle x^n-1\rangle \), we have

$$\begin{aligned} u\prod _{i\in I}\left( {\overline{f}}_i(x)\right) ^{\zeta _i}= & {} u\prod _{i\in I}\left( f_i(x)\right) ^{\zeta _i} \\= & {} -(x^n-(1+u))\prod _{i\in I}\left( f_i(x)\right) ^{\zeta _{i}}\\= & {} -\prod _{i\in I}\left( f_i(x)\right) ^{\zeta _{i}+1}~. \end{aligned}$$

Now from the definition of \(\zeta _i\) it is clear that \( -\prod _{i\in I}\left( f_i(x)\right) ^{\zeta _{i}+1} \in C\). Therefore,

\(\prod _{i\in I}\left( {\overline{f}}_i(x)\right) ^{\zeta _i} \in \text{ Tor }(C)\), and hence,

$$\begin{aligned}\left\langle \prod _{i\in I}\left( {\overline{f}}_i(x)\right) ^{\zeta _i} \right\rangle \subseteq \text{ Tor }(C)~.\end{aligned}$$

Now from Theorem 7 and the relation \(|C|=|\text{ Res }(C)||\text{ Tor }(C)|\), we get

$$\begin{aligned} \left| \left\langle \left( {\overline{f}}_i(x)\right) ^{\zeta _i}\right\rangle \right| =|\text{ Tor }(C)|~. \end{aligned}$$

Hence, \(\text{ Tor }(C)=\left\langle \prod _{i\in I}\left( {\overline{f}}_i(x)\right) ^{\zeta _i}\right\rangle \). \(\square \)

Theorem 13

Let C be a cyclic code of length n over \(R'\). Let \(Res (C)\) and \(Tor (C)\) have minimum Hamming distances \(d_1\) and \(d_2\), respectively. Then the Gray distance of C is given by \(d_G(C)=min \{d_1,2d_2\}\).

Proof

Let \(c=a_0(x)+ua_1(x)\) be any nonzero codeword in C. Then, by the definition of \(\text{ Res }(C)\), \(a_0(x)\in \text{ Res }(C)\). Therefore, if \(a_0(x) \ne 0\), then \(w_G(c)\ge d_1\). If \(a_0(x) = 0\), then \(c=ua_1(x)\in u\text{ Tor }(C)\), and from the definition of Gray weight, \(w_G(c)\ge 2d_2\). So, \(d_G(c)\ge \text{ min }\{d_1,2d_2\}\).

On the other hand, by the definition of the residue code, \(\text{ Res }(C)\subseteq C\) . Therefore, \(d_G(C) \le d_1\). Also, \(u\text{ Tor }(C)\subseteq C\), which implies that \(d_G(C) \le 2d_2\). Therefore, \(\text{ min }\{d_1,2d_2\}\ge d_G(C)\), and hence, we have \(d_G(C)=\text{ min }\{d_1,2d_2\}\). \(\square \)

The following results directly follow from Theorem 11 by taking the nilpotency index \(k=2\) for \(R'\).

Theorem 14

Let \(C= \left\langle \prod _{i\in I}f^{k_i}_i(x)\right\rangle \), \(0\le k_i \le 2\), be a Hermitian self-orthogonal cyclic code of length n, type \(\{l_0,l_1\}\), and size \(q^{2k'}\) over \(R'\). Let \(d_G\) be the minimum Gray weight of \(C^\perp \setminus C\). Then there exists a quantum code with parameters \([[2n,2n-2k',d_G]]_{q}\).

The second method we have used for computing the Gray distance of \(C^\perp \) is more general, in which the Gray distance of \(C^\perp \) is computed directly from the Gray image \(\phi (C^\perp )\) of \(C^\perp \). We construct a generator matrix for \(\phi (C^\perp )\), and then from this, compute the minimum Gray distance of \(\phi (C^\perp )\) using Magma [4].

The next theorem directly follows from Theorem 11.

Theorem 15

Let \(C= \left\langle \prod _{i\in I}f^{k_i}_i(x)\right\rangle \), \(0\le k_i \le 2\), be a Hermitian self-orthogonal cyclic code of length n, type \(\{l_0,l_1\}\), and size \(q^{2k'}\) over \(R'\). Let \(d_G\) be the minimum Gray weight of \(C^\perp \setminus C\). Then there exists a quantum code with parameters \([[2n,2n-2k',d_G(\phi (C^\perp ))]]_{q}\).

In the next section, we give examples of some new quantum codes and compare them with existing codes.

7 New quantum codes and comparison with existing codes

In this section, we present some new quantum codes over \({\mathbb {F}}_q\) obtained from Hermitian self-orthogonal cyclic codes over R. In our search for new quantum codes, we compared the obtained codes with codes existing in literature. Since some good quantum codes are available in the online database [10], we compare the codes obtained here with the codes in [10]. In some cases, we have also compared our codes with the codes available in some recent articles [2, 3, 11, 14, 19]. It may be noted here that an \([[n,{\mathcal {k}},d]]_q\) quantum code is said to have better parameters than an \([[n',{\mathcal {k}}',d']]_q\) quantum code if any one or both of the conditions given below hold.

  1. 1.

    On keeping minimum distance fixed, if larger code rate is obtained, i.e., when \(d=d',~ {then}~\frac{{\mathcal {k}}}{n}> \frac{{\mathcal {k}}'}{n'}\).

  2. 2.

    On keeping the code rate fixed, if larger minimum distance is obtained, i.e., when \(\frac{{\mathcal {k}}}{n}=\frac{{\mathcal {k}}'}{n'},~ {then}~d>d'\).

In the examples and the table that follow, we have obtained several new codes with better parameters than the existing codes. In constructing these new codes, all the computations are carried out using Magma.

Example 1

Let \(n=5\) and \(R'={\mathbb {F}}_{3^2}+u{\mathbb {F}}_{3^2}\). A complete set of \(3^2\)-cyclotomic coset representatives modulo 5 is \(I=\{0,1,2\}\). For each \(i\in I\), let \(f_i(x)\) be the monic basic irreducible divisors of \(x^5-(1+u)\) in \(R'[x]\). Therefore, in \(R'[x]\), \(x^5-(1+u)=f_0f_1f_2\), where

$$\begin{aligned} f_0(x)= & {} x+(2+u)~,\\ f_1(x)= & {} x^2+w(1+2u)x+(1+u)~,\\ f_2(x)= & {} x^2+w^3(1+2u)x+(1+u)~, \end{aligned}$$

and w is a primitive element of \({\mathbb {F}}_{3^2}\). Let C be the cyclic code \(C=\langle f_1^2f_2\rangle \) of length 5 over \(R'\). The dual code of C is given by \(C^\perp =\langle f_0^2f_2\rangle \). By Theorem 9, C is Hermitian self-orthogonal. Using Theorem 12, \(\text{ Res }(C^\perp )\) is a \([5,2,4]_{3^2}\) code and \(\text{ Tor }(C^\perp )\) is a \([5,4,2]_{3^2}\) code. Therefore, from Theorem 13, the Gray distance of \(C^\perp \) is 4. Then from Theorem 14, a \([[10,2,4]]_3\) quantum code is obtained. This is a new code with larger minimum distance when compared to the best available code \([[10,2,3]]_3\) with the same length and dimension given in [10].

Example 2

Let \(n=8\) and \(R'={\mathbb {F}}_{9^2}+u{\mathbb {F}}_{9^2}\). A complete set of \(9^2\)-cyclotomic coset representatives modulo 8 is \(I=\{0,1,2,3,4,5,6,7\}\). For each \(i\in I\), let \(f_i(x)\) be the monic basic irreducible divisors of \(x^8-(1+u)\) in \(R'[x]\). Therefore, in \(R'[x]\), \(x^8-(1+u)=f_0f_1f_2f_3f_4f_5f_6f_7\), where

$$\begin{aligned} f_0(x)= & {} x+(1+u), \quad f_1(x)=x+w^{10}(1+u), \quad f_2(x)=x+w^{20}(1+u),\\ f_3(x)= & {} x+w^{30}(1+u), \quad f_4(x)=x+2(1+u), \quad f_5(x)=x+w^{50}(1+u),\\ f_6(x)= & {} x+w^{60}(1+u), \quad f_7(x)=x+w^{70}(1+u), \end{aligned}$$

and w is the primitive element of \({\mathbb {F}}_{9^2}\). Let \(C=\langle f_0^2f_1f_2f_3^2f_6^2f_7\rangle \) be the cyclic code of length 8 over \(R'\). The dual code of C is given as \(C^\perp =\langle f_1f_2f_4^2f_5^2f_7\rangle \). By Theorem 9, C is Hermitian self-orthogonal. Using Theorem 12, \(\text{ Res }(C^\perp )\) is a \([8,3,6]_{9^2}\) code and \(\text{ Tor }(C^\perp )\) is a \([8,6,3]_{9^2}\) code. Therefore, from Theorem 13, the Gray distance of \(C^\perp \) is 6. Hence, from Theorem 14, a \([[16,2,6]]_{9}\) quantum code is obtained. This is a new code with larger minimum distance when compared to the best available code \([[16,2,5]]_{9}\) of the same length and dimension available in [10].

Example 3

Let \(n=12\) and \(R'={\mathbb {F}}_{13^2}+u{\mathbb {F}}_{13^2}\). A complete set of \(13^2\)-cyclotomic coset representatives modulo 8 is \(I=\{0,1,2,3,4,5,6,7,8,9,10,11\}\). For each \(i\in I\), let \(f_i(x)\) be the monic basic irreducible divisors of \(x^{12}-(1+u)\) in \(R'[x]\). Therefore, in \(R'[x]\), \(x^{12}-(1+u)=f_0f_1f_2f_3f_4f_5f_6f_7f_8f_9f_{10}f_{11}\), where

$$\begin{aligned} f_0(x)= & {} x +(1+12u), \quad f_1(x)=x+(2+11u), \quad f_2(x)=x+4(1+12u),\\ f_3(x)= & {} x +8(1+12u), \quad f_4(x)=x+3(1+12u), \quad f_5(x)=x+6(1+12u),\\ f_6(x)= & {} x+12(1+12u), \quad f_7(x)=x+11(1+12u), \quad f_8(x)=x + 9(1+12u)\\ f_9(x)= & {} x+5(1+12u), \quad f_{10}(x)=x+10(1+12u), \quad f_{11}(x)=x+7(1+12u), \end{aligned}$$

Let \(C=\langle f_0\prod _{i=4}^{11}f_i\rangle \) be the cyclic code of length 12 over \(R'\). The dual code of C is given as \(C^\perp =\langle f_0f_1^2f_2^2f_3^2\rangle \). By Theorem 9, C is Hermitian self-orthogonal. Using Theorem 12, \(\text{ Res }(C^\perp )\) is a \([12,8,5]_{13^2}\) code and \(\text{ Tor }(C^\perp )\) is a \([12,9,4]_{13^2}\) code. Therefore, from Theorem 13, the Gray distance of \(C^\perp \) is 5. Hence, from Theorem 14, a \([[24,10,5]]_{13}\) quantum code is obtained. This is a new code with larger code rate when compared to the available code \([[24,8,5]]_{13}\) of same length and minimum distance given in [11].

The above three examples of quantum codes from cyclic codes over \(R'= {\mathbb {F}}_{q^2}+u{\mathbb {F}}_{q^2}\) were obtained using Theorem 14. The next two examples of quantum codes from cyclic codes over \(R'\) are constructed using Theorem 15.

Example 4

Let \(n=4\) and \(R'={\mathbb {F}}_{3^2}+u{\mathbb {F}}_{3^2}\). Then \(x^4-(1+u)\) factorizes into monic basic irreducible polynomials in \(R'[x]\) as \(x^4-(1+u)=f_0f_1f_2f_3\), where

$$\begin{aligned} f_0(x)= & {} x+(1+2u),~f_1(x)=x+w^2(1+2u),\\ f_2(x)= & {} x+2(1+2u),~f_3(x)=x+w^{6}(1+2u)), \end{aligned}$$

and w is the primitive element of \({\mathbb {F}}_{3^2}\). Let C be the cyclic code of length 4 over \(R'\) given by \(C=\langle f_0f_1^2f_2^2f_3^2\rangle \). The dual code of C is \(C^\perp =\langle f_0\rangle \). By Theorem 9, C is Hermitian self-orthogonal. Now using the Gray map defined in Sect. 3 we obtain \(\phi (C^\perp )\). Using Magma, we obtain the minimum Gray distance of \(\phi (C^\perp )\) as 3. From Theorem 15, we obtain a \([[8,6,2]]_3\) quantum code. This is a better code when compared to the \([[8,4,2]]_3\) quantum code given in [2].

Example 5

Let \(n=8\) and \(R'={\mathbb {F}}_{3^4}+u{\mathbb {F}}_{3^4}\). Then from Example 2, \(x^8-(1+u)\) factorizes into monic basic irreducible polynomials in \(R'[x]\) as \(x^8-(1+u)=f_0f_1f_2f_3f_4f_5f_6f_7\), where

$$\begin{aligned} f_0(x)= & {} x+(1+u), \quad f_1(x)=x+w^{10}(1+u), \quad f_2(x)=x+w^{20}(1+u),\\ f_3(x)= & {} x+w^{30}(1+u), \quad f_4(x)=x+2(1+u), \quad f_5(x)=x+w^{50}(1+u),\\ f_6(x)= & {} x+w^{60}(1+u), \quad f_7(x)=x+w^{70}(1+u), \end{aligned}$$

and w is the primitive element of \({\mathbb {F}}_{3^4}\). Let \(C=\langle f_1\prod _{i=2}^{7}f_i^2\rangle \) be the cyclic code of length 8 over \(R'\). The dual code of C is given as \(C^\perp =\langle f_0^2f_1\rangle \). By Theorem 9, C is Hermitian self-orthogonal. Now using the Gray map defined in Sect. 3 we obtain \(\phi (C^\perp )\). Using Magma, we obtain the minimum Gray distance of \(\phi (C^\perp )\) as 3. From Theorem 15, we obtain a \([[16,10,3]]_9\) quantum code. This is a better code when compared to the \([[16,8,3]]_9\) quantum code given in [19].

Remark 1

The code \([[16,10,3]]_9\) obtained in Example 5 is also obtained by using the first method and is given in Table 1.

In the next example, we consider the ring R with nilpotency index \(k=4\). This example thus generalizes the case of \(k=2\) given in above examples. The quantum code is obtained by directly using Theorem 11, and the minimum Gray distance of the dual code \(C^\perp \) of the corresponding self-orthogonal cyclic code C is obtained from the generator matrix of the Gray image \(\phi (C^\perp )\) of \(C^\perp \) using Magma. By this approach, quantum codes over \({\mathbb {F}}_q\) can be constructed from cyclic codes over R for any nilpotency index k.

Example 6

Let \(q^2=5^2\) and \(n=8\), taking the nilpotency index of R as \(k=4\). We have \(R={\mathbb {F}}_{5^2}+u{\mathbb {F}}_{5^2}+u^2{\mathbb {F}}_{5^2}+u^3{\mathbb {F}}_{5^2};~ u^4=0\). In R[x], we have \((1+u)^5=1\) and \(x^{8}-(1+u)=f_0f_1f_2f_3f_4f_5f_6f_7\), where

$$\begin{aligned} f_0(x)= & {} x+ (1+u)^4,~f_1(x) = x+w^3(1+u)^4,~f_2(x) = x+2(1+u)^4\\ f_3(x)= & {} x+w^9(1+u)^4,~f_4(x) = x+4(1+u)^4,~f_5(x) = x+w^{15}(1+u)^4\\ f_6(x)= & {} x+3(1+u)^4,~f_7(x) = x+w^{21}(1+u^4), \end{aligned}$$

where w is the primitive element of \({\mathbb {F}}_{5^2}\). Consider cyclic code over R of length 8. Let \(C=\langle f_3^4f_4^4f_5^4f_6^4f_7^4\rangle \) and \(C^\perp =\langle f_0^4f_1^4f_2^4\rangle \). By Theorem 9, C is Hermitian self-orthogonal. Next, by applying the Gray map defined in Sect. 3 over the generator polynomial of \(C^\perp \) we obtain \(\phi (C^\perp )\). Next, by using Magma [4], we obtain the generator matrix and minimum Gray distance of \(\phi (C^\perp )\) as 6. From Theorem 11, we obtain the parameters of the quantum code as \([[32,8,6]]_5\). This code has better parameters in terms of code rate, keeping the minimum distance fixed when compared to the code \([[32,6,6]]_5\) given in [10].

Next, we present two tables. In Table 1, we have presented some new quantum codes over \({\mathbb {F}}_{q}\) obtained from self-orthogonal cyclic codes over \(R'\) by using Theorem 14. The Gray distance of the dual code \(C^\perp \) of a cyclic code C is computed using the first method described above, i. e., by using the torsion and the residue codes of \(C^\perp \). In the last column of the table, the parameters \([[n, {\mathcal {k}}_1, d_1]]_q\) are of that code with which the \([[n, {\mathcal {k}}, d]]_q\) code obtained by our construction has been compared. Also, the factors \(f_i\) in \(x^n-(1+u)=\prod _{i\in I}f_i\) are taken in the same order as obtained from Magma.

In Table 2, we have presented some new quantum codes over \({\mathbb {F}}_{q}\) obtained from self-orthogonal cyclic codes over R by using Theorem 11 and the Gray map given in Sect. 3. The Gray distance of the dual code \(C^\perp \) of a cyclic code C over R is computed by using the second method described above, i. e., the Gray distance is obtained directly from the generator matrix of the Gray image \(\phi (C^\perp )\) of \(C^\perp \) using Magma. This table provides examples of quantum codes over \({\mathbb {F}}_q\) obtained from self-orthogonal cyclic codes over \(R = {\mathbb {F}}_{q^2}[u]/\langle u^k\rangle \), with \(k > 2\). These examples thus present a generalized situation of construction of quantum codes from cyclic codes over R compared to the ones given in Table 1. Similar to Table 1, here also the factors \(f_i\) in \(x^n-(1+u)=\prod _{i\in I}f_i\) are taken in the same order as obtained from Magma. Again, the parameters \([[n, {\mathcal {k}}_1, d_1]]_q\) in the last column of the table are of that code with which the \([[n, {\mathcal {k}}, d]]_q\) code obtained by our construction has been compared.

Table 1 New quantum codes from cyclic codes of length n over \(R'\)
Table 2 New quantum codes from cyclic codes of length n over R

8 Conclusion

In this paper, a construction of quantum codes over \({\mathbb {F}}_{q}\) from cyclic codes over \(R={\mathbb {F}}_{q^{2}}[u]/\langle u^{k}\rangle \) is proposed. We have given different characterizations of cyclic codes over R in terms of their generators. From a special type of generators of these codes, we have determined the structure of their dual codes. A necessary and sufficient condition for these codes to be Hermitian self-orthogonal is presented. The quantum codes over \({\mathbb {F}}_{q}\) are constructed by applying Hermitian construction to the Gray images of self-orthogonal cyclic codes over R. From this construction, some q-ary quantum codes with better parameters than some existing best-known comparable codes in the literature have been obtained.