1 Introduction

Quantum codes were introduced to protect quantum information from decoherence and quantum noise. A main obstacle to complete quantum communication is decoherence of quantum bits caused by inevitable interaction with environments. Quantum codes provide an efficient way to overcome decoherence. After the works of Shor [1] and Steane [2], the theory of quantum codes has been progressed rapidly. Calderbank et al. [3] provided a systematic mathematical scheme to construct quantum codes from classical Hermitian dual-containing codes over \({\mathbb {F}}_{4}\).

Some researches constructed quantum codes by using linear codes over finite rings. In [4], Qian et al. gave a new method to obtain self-orthogonal codes over \({\mathbb {F}}_{2}\). Based on these results, a lot of quantum codes are obtained from cyclic codes over \({\mathbb {F}}_{2} +u{\mathbb {F}}_{2}\), where \(u^{2} = 0\). Tang et al. [5] extend the results in [4] over \({\mathbb {F}}_{2^m} +u{\mathbb {F}}_{2^m}+\cdots +u^{k}{\mathbb {F}}_{2^m}\), where \(u^{2} = 0\), m is a positive integer. In [6], Ashraf and Mohammad constructed quantum codes from cyclic codes over \({\mathbb {F}}_3 + v{\mathbb {F}}_3\), where \(v^{2} = v\). Following this line, we consider that quantum codes are derived from finite chain ring .

Hereafter, p is a prime. The purpose of this paper is to consider liner codes over finite chain rings to obtain good quantum codes. In Sect. 2, we review some concepts and properties about quantum codes over finite fields. In Sect. 3, we first give the necessary background materials on finite chain rings. Then a construction for quantum codes from self-dual codes over finite chain rings is given. In the final section, for special finite chain ring \(R={\mathbb {F}}_{p^{2m}}+u{\mathbb {F}}_{p^{2m}}\), we define a new Gray map \(\Phi \) from \(R^n\) to \({\mathbb {F}}_{p^{2m}}^{2n}\), Gray weights of elements of \(R^n\), Gray distance \(d_\mathrm{G}(C)\) and Hermitian dual \(C^{\perp _{H}}\) with respect to Gray weight and the Hermitian inner product in the linear code C over R. We prove that \(\Phi (C^{\perp _{H}})=\Phi (C)^{\perp _{H}}\) and give a method to derive Hermitian dual-containing codes over \({\mathbb {F}}_{p^{2m}}\) as Gray images of linear codes over \({\mathbb {F}}_{p^{2m}}+u{\mathbb {F}}_{p^{2m}}\). The parameters of quantum codes are obtained from cyclic codes over R.

2 Review of symmetric quantum codes

In this section, we recall some basic concepts and results of symmetric quantum codes, necessary for the development of this work. For more details, we refer to [7, 8].

Let \({\mathbb {F}}_{q}\) be the finite field with \(q=p^{2m}\), where p is a prime number and \(m\ge 1\) is an integer. Let \(V_n\) be the Hilbert space \(V_n={\mathbb {C}}^{q^n}={\mathbb {C}}^{q}\otimes \cdots \otimes {\mathbb {C}}^{q}\). Let \( \mid x\rangle \) be the vectors of an orthonormal basis of \({\mathbb {C}}^{q^n}\), where the labels x are elements of \({\mathbb {F}}_{q}\). Then \(V_n\) has the following orthonormal basis \(\{|c\rangle =|c_1c_2\ldots c_n\rangle =|c_1\rangle \otimes |c_2\rangle \otimes \cdots \otimes | c_n\rangle :~c=(c_1,c_2,\ldots ,c_n) \in {\mathbb {F}}_{q}^{n}\}\).

Consider \(a,b\in {\mathbb {F}}_{q}\), the unitary linear operators X(a) and Z(b) in \({\mathbb {C}}^{q}\) are defined by \(X(a)|x\rangle =|x+a\rangle \) and \(Z(b)|x\rangle =w^{tr(bx)}|x\rangle \), respectively, where \(w=\hbox {exp}(2\pi i/p)\) is a primitive p-th root of unity and tr is the trace map from \({\mathbb {F}}_{q}\) to \({\mathbb {F}}_{p}\).

Let \({\mathbf {a}}=(a_1,\ldots ,a_n)\in {\mathbb {F}}_{q}^n\), we write \(X({\mathbf {a}})=X(a_1)\otimes \cdots \otimes X(a_n)\) and \(Z({\mathbf {a}})=Z(a_1)\otimes \cdots \otimes Z(a_n)\) for the tensor products of n error operators. The set \(E_n=\{X({\mathbf {a}})Z({\mathbf {b}}): {\mathbf {a}},{\mathbf {b}}\in {\mathbb {F}}_{q}^n\}\) is an error basis on the complex vector space \({\mathbb {C}}^{q^n}\) and we set \(G_n=\{w^cX({\mathbf {a}})Z({\mathbf {b}}): {\mathbf {a}},{\mathbf {b}}\in {\mathbb {F}}_{q}^n,c\in {\mathbb {F}}_{p} \}\) is the error group associated with \(E_n\).

Definition 2.1

A q-ary quantum code of length n is a subspace Q of \(V_n\) with dimension \(K>1\). A quantum code Q of dimension \(K>2\) is called symmetric quantum code (SQC) with parameters \(((n,K,d))_q\) or \([[n,k,d]]_q\),where \(k=\text {log}_qK\) if Q detect \(d-1\) quantum digits of errors for \(d\ge 1\). Namely, if for every orthogonal pair \(|u\rangle ,|v\rangle \) in Q with \(<u|v>=0\) and every \(e\in G_n\) with \(W_Q(e)\le d-1\), \(|u\rangle \) and \(e|v\rangle \) are orthogonal, i.e.,\(<u|e|v>=0\). Such a quantum code is called pure if \(<u|e|v>=0\) for any \(|u\rangle \) and \(|v\rangle \) in Q and any \(e\in G_n\) with \(1\le W_Q(e)\le d-1\). A quantum code Q with \(K=1\) is always pure.

Let us recall the SQC construction:

Theorem 2.2

[8, Lemma 20] Let \(C_i \) be a classical linear code with parameters \([n,k_i,d_i]_{q}\) and \(C_{i}^{\perp }\subseteq C_{1+(i~\text {mod}~2)}(i=1,2)\). Then there exists an SQC Q with parameters \([[n,k_1+k_2-n,\ge d]]_{q}\) that is pure to \(\text {min} \{d_1,d_2\}\), where \(d=\text {min}\{wt(c):c\in (C_1\backslash C_2^{\perp })\cup (C_2\backslash C_1^{\perp })\}\).

Corollary 2.3

If C be a classical linear \([n,k,d]_{q}\) code containing its dual \(C^\perp \subseteq C\), then there exists an SQC Q with parameters \([[n,2k-n,\ge d]]_{q}\) that is pure to d.

To see that an SQC is good in terms of its parameters, we have to introduce the quantum Singleton bound ( See [7]).

Theorem 2.4

Let C be an SQC with parameters \([[n,k,d]]_{q}\). Then \(k\le n-2d+2\).

If an SQC Q with parameters \([[n,k,d]]_{q}\) attains the quantum Singleton bound \(k\le n-2d+2\), then it is called an SQC maximum distance separable (SQCMDS) code.

Definition 2.5

An SQC Q with parameters \([[n,k,d]]_{q}\) is called a near quantum maximum distance separable (SQCNMDS) code if it satisfies \(2d \ge n - k\).

Corollary 2.6

Let C be an \([n,k,d]_{q}\) classical code containing its dual, \(C^\perp \subseteq C\). Then

  1. 1.

    \(k\ge \lceil \frac{n}{2}\rceil .\)

  2. 2.

    If C is an MDS code, then there exists an \([[n,2k-n,d]]_{q}\) SQCMDS code.

Proof

  1. 1.

    Since C is a k-dimensional subspace of \({\mathbb {F}}_{q}^n\), \(C^\perp \) is a \((n-k)\)-dimensional subspace of \({\mathbb {F}}_{q}^n\). It follows that \(n-k\le k\) by \(C^\perp \subseteq C\). Therefore, \(k\ge \lceil \frac{n}{2}\rceil .\)

  2. 2.

    If C is an \([n,k,d]_{q}\) classical MDS codes containing its dual, \(C^\perp \subseteq C\), then Corollary 2.3 implies the existence of a quantum \([[n,2k-n,\ge d]]_{q}\) code Q. Theorem 2.4 shows that the minimum distance of Q is \(\le \) \(\frac{n-(2k-n)+2}{2}=n-k+1\), so Q is an \([[n,2k-n,d]]_{q}\) SQCMDS code.

Corollary 2.7

Let C be an \([n,k,d]_{q}\) classical code containing its dual, \(C^\perp \subseteq C\) and \(d\ge n-k \). Then there exists an \([[n,2k-n,\ge d]]_{q}\) SQCNMDS code.

Proof

If C is an \([n,k,d]_{q}\) classical codes containing its dual, i.e., \(C^\perp \subseteq C\), then Corollary 2.3 implies the existence of a quantum \([[n,2k-n,d_1]]_{q}\) code Q, where \(d_1\ge d\). So Q is an \([[n,2k-n,\ge d]]_{q}\) SQCNMDS code.

3 SQC from linear codes over finite chain rings

Constructions of quantum codes are exhaustively investigated in the literature. As mentioned in Sect. 1, some authors have exhibited families of optimal codes. However, many of these techniques are based on the construction of classical codes over finite fields.

In this section, we use self-dual codes over finite chain rings to construct SQC.

We begin with some definitions and properties about finite chain rings (see [9, 10]). Let R be a finite commutative ring with identity. A nonempty subset \(C\subseteq R^{n}\) is called a linear code of length n over R if it is an R-submodule of \(R^{n}\). Throughout this section, all codes are assumed to be linear.

A commutative ring is called a chain ring if the lattice of all its ideals is a chain. It is well known that if R is a finite chain ring, then R is a principal ideal ring and has a unique maximal ideal \(\langle \gamma \rangle =R\gamma =\{r\gamma \,|\,r\in R\}\). Its chain of ideals is

$$\begin{aligned} R=\langle \gamma ^{0}\rangle \supset \langle \gamma ^{1}\rangle \supset \cdots \langle \gamma ^{t-1}\rangle \supset \langle \gamma ^{t}\rangle =\{0\}. \end{aligned}$$

The integer t is called the nilpotency index of \(\gamma \). Note that the quotient \(R/{\langle \gamma \rangle }\) is a finite field \({\mathbb {F}}_q\), where q is a power of a prime p. There is a natural homomorphism from R onto \({\mathbb {F}}_q=R/\langle \gamma \rangle \), i.e.,

$$\begin{aligned} ^{-}:R\longrightarrow {\mathbb {F}}_q=R/\langle \gamma \rangle ,\quad r\mapsto r+\langle \gamma \rangle =\overline{r}, \quad \,\,\text {for any} r\in R. \end{aligned}$$

We need the following lemma (see [10]).

Lemma 3.1

Let R be a finite chain ring with maximal ideal \(\langle \gamma \rangle \). Let \(V\subset R\) be a set of representatives for the equivalence classes of R under congruence modulo \(\gamma \). Then

  1. 1.

    For any \(v\in R\) there exist unique \(v_{0},\ldots ,v_{t-1}\in V\) such that \(v=\sum _{i=0}^{t-1}v_{i}\gamma ^{i}.\)

  2. 2.

    \(|V|=|R/\gamma |=|{\mathbb {F}}_q|\).

The natural homomorphism from R onto \({\mathbb {F}}_q=R/\langle \gamma \rangle \) can be extended naturally to a projection from \(R^{n}\) onto \({\mathbb {F}}_q^{n}\). For an element \(c\in R^{n}\), let \(\overline{c}\) be its image under this projection. Given \(r\in R\) and \(c\in R^n\), we denote by rc the usual multiplication of a vector by a scalar. Let C be a code of length n over R. We define \(\overline{C}=\big \{\overline{c}\,|\,c\in C\big \}\) and \((C:r)=\big \{e\in R^{n}\,|\,re\in C\big \}\), where r is an element of R.

Definition 3.2

To any code C over R, we associate the tower of codes

$$\begin{aligned} C=(C:\gamma ^{0})\subseteq (C:\gamma )\subseteq \cdots \subseteq (C:\gamma ^{t-1}) \end{aligned}$$

over R and its projection to \({\mathbb {F}}_q\),

$$\begin{aligned} \overline{C}=\overline{(C:\gamma ^{0})}\subseteq \overline{(C:\gamma )}\subseteq \cdots \subseteq \overline{(C:\gamma ^{t-1})}. \end{aligned}$$

The following definitions and results can be found in [10].

Definition 3.3

Let C be a linear code over R. A generator matrix G for C is said to be in standard form if after a suitable permutation of the coordinates,

$$\begin{aligned} G=\begin{pmatrix}I_{k_{0}} &{} A_{0,1} &{} A_{0,2} &{} A_{0,3} &{} \cdots &{} A_{0,t-1} &{} A_{0,t} \\ 0 &{} \gamma I_{k_{1}} &{}\gamma A_{1,2} &{}\gamma A_{1,3} &{} \cdots &{} \gamma A_{1,t-1} &{} \gamma A_{1,t} \\ 0 &{} 0 &{} \gamma ^2 I_{k_{2}} &{} \gamma ^2 A_{2,3} &{} \cdots &{} \gamma ^2 A_{2,t-1} &{} \gamma ^2 A_{2,t} \\ \cdots &{} \cdots &{} \cdots &{} \cdots &{} \cdots &{} \cdots &{} \cdots \\ 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} \gamma ^{t-1} I_{k_{t-1}} &{} \gamma ^{t-1} A_{t-1,t} \\ \end{pmatrix} =\begin{pmatrix} A_{0}\\ \gamma A_{1}\\ \vdots \\ \gamma ^{t-1} A_{t-1} \end{pmatrix}.\nonumber \\ \end{aligned}$$
(3.1)

We associate with G the matrix

$$\begin{aligned} A=\begin{pmatrix} A_{0}\\ A_{1}\\ \vdots \\ A_{t-1} \end{pmatrix}. \end{aligned}$$
(3.2)

For a code C, we define the rank of C, denoted by rank(C), to be the minimum number of generators of C and the free rank of C, denoted by free rank(C), to be the maximum of the ranks of free R-submodules of C. Codes where the rank is equal to the free rank are called free codes.

Let C be a linear code over R. We denote by k(C) the number of rows of a generating matrix G in standard form for C, and for \(i=0,1,\ldots ,t-1\) we denote by \(k_{i}(C)\) the number of rows of G that are divisible by \(\gamma ^{i}\) but not by \(\gamma ^{i+1}\).

Clearly, rank\(C=k(C)=\sum _{i=0}^{t-1}k_{i}(C).\)

The Hamming weight \(W_\mathrm{H}({\mathbf {x}})\) of a codeword \({\mathbf {x}}\) is the number of nonzero components in \({\mathbf {x}}\). The Hamming distance \(d_\mathrm{H}({\mathbf {x}},{\mathbf {y}})\) between two codewords \({\mathbf {x}}\) and \({\mathbf {y}}\) is the Hamming weight of the codeword \({\mathbf {x}}-{\mathbf {y}}\). The minimum Hamming distance \(d_\mathrm{H}\) of C is defined as min\(\{d_\mathrm{H}({\mathbf {x}},{\mathbf {y}})|{\mathbf {x}}, {\mathbf {y}}\in C, {\mathbf {x}}\ne {\mathbf {y}}\}.\)

It is well known (see [11]) that for codes C of length n over any alphabet of size m

$$\begin{aligned} d_\mathrm{H}(C)\le n -\text {log}_{m}(|C|) + 1. \end{aligned}$$

Codes meeting this bound are called maximum distance separable (MDS) codes.

Further if C is linear, then

$$\begin{aligned} d_\mathrm{H}(C) \le n-\text {rank}(C) + 1. \end{aligned}$$

Codes meeting this bound are called maximum distance with respect to rank (MDR) codes.

Lemma 3.4

Let C be a linear code over R with a generator matrix G in standard form and let A be as in (3.2).

  1. 1.

    For \(0\le i\le t-1\), \(\overline{(C:\gamma ^{i})}\) has generator matrix

    $$\begin{aligned} \overline{G_{i}}=\left( \begin{array}{c} \overline{A_{0}} \\ \vdots \\ \overline{A_{i}} \end{array} \right) \end{aligned}$$

    and \({\mathrm {dim}}\overline{(C:\gamma ^{i})}=k_{0}(C)+\cdots +k_{i}(C)\).

  2. 2.

    For \(0\le i\le t-1\), \(\overline{(C^{\perp }:\gamma ^{i})}=\overline{(C:\gamma ^{t-1-i})}^{\perp }\). We have \(k(C^{\perp })=n-k_{0}(C),k_{0}(C^{\perp })=n-k(C)\) and \(k_{i}(C^{\perp })=k_{t-i}(C)\), for \(i=1,\ldots ,t-1\).

  3. 3.

    \(d_\mathrm{H}(C)=d_\mathrm{H}\overline{(C^{\perp }:\gamma ^{t-1})}\).

  4. 4.

    If C is an MDR code over R, then \(\overline{(C^{\perp }:\gamma ^{t-1})}\) is an MDS code over \({\mathbb {F}}_q=R/\langle \gamma \rangle \).

We have an important observation that proves to be rather useful to construct SQC.

Lemma 3.5

Let C be a self-dual code of length n over finite chain ring R. Then

$$\begin{aligned} \overline{(C:\gamma ^{t-1-i})}^{\perp }\subseteq \overline{(C:\gamma ^{i+j})}, \end{aligned}$$

where \(0\le i\le t-1,~0\le j\le t-1-i\). In particular,

$$\begin{aligned} \overline{(C:\gamma ^{t-1})}^{\perp }\subseteq \overline{(C:\gamma ^{t-1})}. \end{aligned}$$

Proof

For \(1\le i\le t-1,~0\le j\le t-1-i\), by Definition 3.2 and Lemma 3.4, we have

$$\begin{aligned} \overline{(C:\gamma ^{t-1-i})}^{\perp }=\overline{(C^{\perp }:\gamma ^{i})}=\overline{(C:\gamma ^{i})}\subseteq \overline{(C:\gamma ^{i+j})}. \end{aligned}$$

In case \(i=0\), obviously, \(\overline{(C:\gamma ^{t-1})}^{\perp }\subseteq \overline{(C:\gamma ^{t-1})}\).

Theorem 3.6

Let C be a self-dual code of length n and minimum distance \(d_\mathrm{H}(C)\) over finite chain ring R with a generator matrix G in standard form. Then

  1. 1.

    There exists a quantum code with parameters \([[n, 2k(C)-n,\ge d_\mathrm{H}(C)]]_{q}\). In particular, if C is an MDR code, then there exists an SQCMDS code with parameters \([[n, 2k(C)-n, d_\mathrm{H}(C)]]_{q}\).

  2. 2.

    There exists a quantum code with parameters \([[n, l+2s-n,\ge d_1]]_{q}\), where \( d_1={\mathrm {min}}\{d_\mathrm{H}\overline{(C:\gamma ^{t-1-i})}, d_\mathrm{H}\overline{(C:\gamma ^{i+j})}\}\), \(s=k_{0}(C)+k_{1}(C)+\cdots +k_{i}(C)\), \(l=k_{i+1}(C)+\cdots +k_{i+j}(C)\) and \( 0\le i\le t-1, ~0\le j \le t-1-i\).

Proof

By Lemma 3.4 (1), We know that \({\mathrm {dim}}\overline{(C:\gamma ^{t-1})}=k(C)\). Thus, there exists a \([n,k(C),d_\mathrm{H}(C)]_q \) code with \(\overline{(C:\gamma ^{t-1})}^{\perp }\subseteq \overline{(C:\gamma ^{t-1})}\). According Corollary 2.3, the part (1) is proved.

For (2), by Lemma 3.4 (2), \({\mathrm {dim}}\overline{(C:\gamma ^{t-1-i})}^{\perp }=k_0(C)+k_{1}(C)+\cdots +k_{i}(C)\), and \({\mathrm {dim}}\overline{(C:\gamma ^{i+j})}=k_{0}(C)+k_{1}(C)+\cdots +k_{i}(C)+\cdots +k_{i+j}(C)\). Using Theorem 2.2 and Lemma 3.5, there exists a quantum code with parameters \([[n, l+2s-n,\ge d_1]]_{q}\), which is the required result.

In the rest of this section, we aim to obtain good quantum codes by cyclic codes over a finite chain ring \(\widetilde{R}\) with maximal ideal \({\mathfrak {m}}=\widetilde{R}\gamma \), where \(\gamma \) is a generator of \({\mathfrak {m}}\) with nilpotency index 2.

The following result is well known (see [12]).

Theorem 3.7

Let C be a cyclic code of length n over finite chain ring \(\widetilde{R}\) with characteristic \(p^a\), where \((p,n)=1\). Then

  1. 1.

    \(C=\langle f(x)h(x),\gamma f(x)g(x)\rangle \), where \(f(x)g(x)h(x)=x^n-1\).

  2. 2.

    \(C^{\perp }=\langle g^{*}(x)h^{*}(x),\gamma g^{*}(x)f^{*}(x)\rangle \), where \(g^{*}(x)=x^{{\mathrm {deg}}g(x)}g(\frac{1}{x})\), i.e., \(g^{*}(x)\) is the reciprocal of g(x).

  3. 3.

    \(\overline{C}=\langle \overline{fh}\rangle \) and \(\overline{(C:\gamma )}=\langle \overline{f}\rangle \).

Theorem 3.8

Let C be a cyclic code of length n over finite chain ring \(\widetilde{R}\) with characteristic \(p^a\), where \((p,n)=1\). If \(C=\langle f(x)h(x),\gamma f(x)g(x)\rangle \) with \(f(x)g(x)h(x)=x^n-1\), then C is self-dual if and only if \(g(x)= \epsilon f^{*}(x)\) and \(h(x)= \varepsilon h^{*}(x)\), where \(\epsilon \) and \(\varepsilon \) are units.

Proof

The sufficiency is obvious since \(C^{\perp }=\langle g^{*}(x)h^{*}(x),\gamma g^{*}(x)f^{*}(x)\rangle \).

Now, if C is self-dual, by Theorem 3.7 (2) we know that \(\langle f(x)h(x),\gamma f(x)g(x)\rangle =\langle g^{*}(x)h^{*}(x),\gamma g^{*}(x)f^{*}(x)\rangle \). But these generators are the unique generators of this form. Hence,

$$\begin{aligned} f(x)h(x)= g^{*}(x)h^{*}(x). \end{aligned}$$

and

$$\begin{aligned} f(x)h(x)g(x)= g^{*}(x)h^{*}(x)g(x)=-g^{*}(x)h^{*}(x)f^{*}(x)=x^n-1. \end{aligned}$$

Since \(f^{*}(x)\) and \(g^{*}(x)h^{*}(x)\) are coprime, \(f^{*}(x)\mid g(x)\). Similarly, since

$$\begin{aligned} f(x)h(x)f^{*}(x)= g^{*}(x)h^{*}(x)f^{*}(x)=-f(x)g(x)h(x). \end{aligned}$$

and g(x) and f(x)h(x) are coprime, \(g(x)\mid f^{*}(x) \). That means that \(g(x)=\epsilon f^{*}(x)\). Now, \(f(x)h(x)=g^{*}(x)h^{*}(x)=\epsilon f(x)h^{*}(x)\) where \(h^{*}(x)\) and f(x) are coprime. This implies that \(h(x)\mid h^{*}(x)\). Similarly, since \(f^{*}(x)h^{*}(x)=g(x)h(x)=\epsilon f^{*}(x)h(x)\) where \(h^{*}(x)\) and \(f^{*}(x)\) are coprime, \(h^{*}(x)\mid h(x)\). Therefore, \(h(x)= \varepsilon h^{*}(x)\).

Now combining Theorems 3.6 , 3.7 and 3.8, the following result is obtained.

Theorem 3.9

Let \(C=\langle f(x)h(x),\gamma f(x)g(x)\rangle \) be a cyclic self-dual code of length n over finite chain ring \(\widetilde{R}\) with characteristic \(p^a\), where \((p,n)=1\) and \(f(x)g(x)h(x)=x^n-1\). Then

  1. 1.

    There exists a quantum code with parameters \([[n,n-2{\mathrm {deg}}\overline{f(x)}, \ge d_\mathrm{H}\overline{(C:\gamma )}~]]_q\).

  2. 2.

    There exists a quantum code with parameters \([[n,n-2{\mathrm {deg}}\overline{f(x)}-{\mathrm {deg}}\overline{h(x)}, \ge d_\mathrm{H}\overline{(C:\gamma )}~]]_q\).

Example 1

We list some quantum codes which can be constructed starting from self-dual cyclic codes over \({\mathbb {F}}_2+u{\mathbb {F}}_2\) in Table 1. Compared the parameters of quantum codes available in (Refs.[13]), we find that our obtained quantum codes have good parameters and parts of them are new.

Table 1 Quantum codes comparison

Example 2

Taking some special values of p, we obtain the following new good quantum codes by non-trivial cyclic self-dual codes over the chain ring \({\mathbb {Z}}_{p^{2}}\) in Table 2.

Table 2 Quantum codes comparison

Remark 3.10

By Theorem 3.9, we obtain some new quantum codes with good parameters in Tables 1 and 2, which are compared to known quantum codes in [13]. Note that in Refs. [4,5,6], the authors all constructed quantum codes with even length from finite ring, we propose a new way to construct quantum codes with odd length from finite ring. Moreover, by Theorem 3.9, the algorithm of finding new quantum codes is more effective than proposed in Refs.[4,5,6].

4 SQC from cyclic codes over chain rings \({\mathbb {F}}_{p^{2m}}+u{\mathbb {F}}_{p^{2m}}\)

Throughout this section, p denotes a prime number and \({\mathbb {F}}_{p^{2m}}\) denotes the finite field with \(p^{2m}\) elements for a positive integer m. We always assume that n is a positive integer.

The ring \(R= {\mathbb {F}}_{p^{2m}}+u{\mathbb {F}}_{p^{2m}}\) consists of all \(p^{2m}\)-ary polynomials of degree 0 and 1 in an indeterminate u, and it is closed under \(p^{2m}\)-ary polynomial addition and multiplication modulo \(u^2\). Thus, \(R=\frac{ {\mathbb {F}}_{p^{2m}}[u]}{\langle u^2\rangle }=\{a+ub|a,b\in {\mathbb {F}}_{p^{2m}}\}\) is a local ring with maximal ideal \(u{\mathbb {F}}_{p^{2m}}\). Therefore, it is a chain ring. The ring R has precisely \(p^{2m}(p^{2m}-1)\) units, which are of the forms \(\alpha +u\beta \) and \(\gamma \), where \(\alpha ,\beta \) and \(\gamma \) are nonzero elements of the field \({\mathbb {F}}_{p^{2m}}\).

Let \(\widehat{a+ub}:=\widehat{a}+u\widehat{b}\), where \(\widehat{a}=a^{p^m}\) and \(\widehat{b}=b^{p^m}\). The Hermitian inner product over \({\mathbb {F}}_{p^{2m}}+u{\mathbb {F}}_{p^{2m}}\) is defined as follows:

$$\begin{aligned}{}[{\mathbf {x}},{\mathbf {y}}]_H=\sum _{i=1}^{n}x_i\widehat{y_i}. \end{aligned}$$

where \({\mathbf {x}},{\mathbf {y}}\in R^n\), \({\mathbf {x}}=(x_1,\ldots ,x_n)\) and \({\mathbf {y}}=(y_1,\ldots ,y_n)\). The Hermitian dual code \(C^{\perp _H} \) of C is defined by

$$\begin{aligned} C^{\perp _H}=\left\{ {\mathbf {x}}\in R^n~|~[{\mathbf {x}},{\mathbf {y}}]_H=0 \quad {\mathrm {for~all}}~~{\mathbf {y}}~\in C\right\} . \end{aligned}$$

It is evident that \(C^{\perp _H}\) is linear. We say that a code C is Hermitian dual-containing code if \(C^{\perp _H}\subset C\) and \(C\ne R^n\) and Hermitian self-dual if \(C^{\perp _H}=C\).

It is easy to prove that

$$\begin{aligned} \mid C\mid \cdot \mid C^{\perp _H}\mid =\mid R\mid ^{n}. \end{aligned}$$
(4.1)

The following lemma can be found in [14].

Lemma 4.1

[14, Corollary 4.2] Assume the notations given above. Then there exist \(\alpha \in R\) such that \(\alpha ^2=-1\) if and only if \(p^{2m}\equiv 1~({\mathrm {mod}}~4)\).

Remark 4.2

Since \(\alpha \in R\), there exist \(s,t\in {\mathbb {F}}_{p^{2m}}\) such that \(\alpha =s+{\textit{ut}}\). Hence, computing in R, we have \(\alpha ^2=s^2+2{\textit{stu}}=-1\), which implies that \(s^2=-1,2{\textit{st}}=0\). If \(p=2\), then take \(s=1\in {\mathbb {F}}_{p^{2m}},t=0\) we have \(\alpha ^2=-1\); if \(p\ne 2\), then \(t=0\) since \(2{\textit{st}}=0\). Therefore, \(\alpha =s\in {\mathbb {F}}_{p^{2m}}\).

From now on, we always assume that \(p^{m}\equiv 1~({\mathrm {mod}}~4)\), then \(p^{2m}\equiv 1~({\mathrm {mod}}~4)\). So there exist \(\alpha \in {\mathbb {F}}_{p^{2m}}\) such that \(\alpha ^2=-1\) in R.

We first give the definition of the Gray map on \(R^n\). The Gray map \(\Phi _1:~R\rightarrow {\mathbb {F}}_{p^{2m}}^{2}\) is given by \(\Phi _1(a+bu)=(\alpha b,a+b)\), where \(\alpha ^2=-1\). This map can be extended to \(R^n\) in a natural way:

$$\begin{aligned}\begin{array}{lc} \Phi :&{}R^n\longrightarrow {\mathbb {F}}_{p^{2m}}^{2n}\\ &{}(a_1+ub_1,\ldots ,a_{n}+ub_{n})\longmapsto (\alpha b_{1},a_1+b_1,\ldots ,\alpha b_n,a_n+b_{n}). \end{array} \end{aligned}$$

Next, we define a Gray weight for codes over R as follows.

Definition 4.3

The Gray weight over R is a weight function on R defined as:

$$\begin{aligned} w_{G}(a+bu)=\left\{ \begin{array}{ll} 0 &{}\quad \text {if}~a=0,~b=0,\\ 1 &{}\quad \text {if}~a\ne 0,~b=0,\\ 1 &{}\quad \text {if}~b\ne 0,a+b\equiv 0~({\mathrm {mod~}}p),\\ 2 &{}\quad \text {if}~b\ne 0,a+b\not \equiv 0~({\mathrm {mod~}}p). \end{array}\right. \end{aligned}$$

Define the Gray weight of a codeword \({\mathbf {c}}=(c_1,\ldots ,c_n)\in R^n\) to be the rational sum of the Gray weight of its components is, \(w_\mathrm{G}({\mathbf {c}})=\sum _{i=1}^{n}w_\mathrm{G}(c_i)\). For any \({\mathbf {c}}_1,{\mathbf {c}}_2\in R^n\), the Gray distance \(d_\mathrm{G}\) is given by \(d_\mathrm{G}({\mathbf {c}}_1,{\mathbf {c}}_2)=w_\mathrm{G}({\mathbf {c}}_1-{\mathbf {c}}_2)\). The minimum Gray distance of C is the smallest nonzero Gray distance between all pairs of distinct codewords of C. The minimum Gray weight of C is the smallest nonzero Gray weight among all codewords of C. If C is linear, then the minimum Gray distance is same as the minimum Gray weight.

The following proposition is easily checked.

Proposition 4.4

The Gray map \(\Phi \) is a distance-preserving map from \((R^n,~{\mathrm {Gray~}}\) distance) to \(({\mathbb {F}}_{p^{2m}}^{2n},~{\mathrm {Hamming~distance}})\), and it is also \({\mathbb {F}}_{p^{2m}}\)-linear.

Corollary 4.5

If C is a linear code over R of length n, size \((p^{2m})^k \) and minimum Gray weight \(d_\mathrm{G}\), then \(\Phi (C)\) is a linear code over \({\mathbb {F}}_{p^{2m}}\) with parameters \([2n,k,d_\mathrm{G}]\).

The Hermitian inner product over \({\mathbb {F}}_{p^{2m}}\) is defined as follows:

$$\begin{aligned}{}[{\mathbf {a}},{\mathbf {b}}]_H={\mathbf {a}}\cdot \widehat{\mathbf {b}}=\sum _{i=1}^{n}a_{i}b_{i}^{p^m}, \end{aligned}$$

where \({\mathbf {a}},{\mathbf {b}}\in {\mathbb {F}}_{p^{2m}}^{n},{\mathbf {a}}=(a_1,\ldots ,a_n),{\mathbf {b}}=(b_1,\ldots ,b_n)\) and \(\cdot \) is the usual Euclidean inner product.

An important connection that we want to investigate is the relation between the Hermitian dual and the Gray image of a code. We have the following theorem.

Theorem 4.6

Let C be a linear code over R of length n. Then \(\Phi (C^{\perp _H})=\Phi (C)^{\perp _H}\).

Proof

To prove the theorem, we first show \(\Phi (C^{\perp _H})\subset \Phi (C)^{\perp _H}\), i.e.,

$$\begin{aligned}{}[{\mathbf {x}},{\mathbf {y}}]_{H}=0~\Rightarrow ~[\Phi ({\mathbf {x}}),\Phi ({\mathbf {y}})]_H=0\quad {\mathrm {for~all}}~{\mathbf {x}},{\mathbf {y}}\in R^n. \end{aligned}$$
(4.2)

To this extent, let us assume that \({\mathbf {x}}=(a_{1}+ub_1,\ldots ,a_n+ub_n)\) and \({\mathbf {y}}=(c_{1}+ud_1,\ldots ,c_n+ud_n)\), where \(a_i,b_i,c_i,d_i\in {\mathbb {F}}_{p^{2m}}\). Then by

$$\begin{aligned}{}[{\mathbf {x}},{\mathbf {y}}]_{H}=\sum _{i=1}^{n}a_i\widehat{c_i}+\sum _{i=1}^{n}(b_i\widehat{c_i}+a_i\widehat{d_i})u, \end{aligned}$$

we see that \([{\mathbf {x}},{\mathbf {y}}]_{H}=0\) if and only if

$$\begin{aligned} \sum _{i=1}^{n}a_i\widehat{c_i}=0, \end{aligned}$$
(4.3)

and

$$\begin{aligned} \sum _{i=1}^{n}(b_i\widehat{c_i}+a_i\widehat{d_i})=0. \end{aligned}$$
(4.4)

Note that \( p^m\equiv 1~({\mathrm {mod}}~4)\) we can assume that \(p^m=4k+1\) for some \(k \in {\mathbb {N}}\); hence, \( p^m+1=4k+2=2(2k+1)\). According to \(\alpha ^2=-1\), we have

$$\begin{aligned} \alpha ^{p^m+1}=(\alpha ^2)^{2k+1}=-1. \end{aligned}$$
(4.5)

Now, since \(\Phi ({\mathbf {x}})=(\alpha b_1,a_1+b_1,\ldots ,\alpha b_n,a_n+b_n)\) and \(\Phi ({\mathbf {y}})=(\alpha d_1,c_1+d_1,\ldots ,\alpha d_n,c_n+d_n)\), we get

$$\begin{aligned} \left[ \Phi ({\mathbf {x}}),\Phi ({\mathbf {y}})\right] _H= & {} \sum _{i=1}^{n}\alpha ^{p^m+1}b_i\widehat{d_i}+\sum _{i=1}^{n}(a_i+b_i)(\widehat{c_i+d_i})\\= & {} \sum _{i=1}^{n}\alpha ^{p^m+1}b_i{\widehat{d_i}}+\sum _{i=1}^{n}\left( a_i{\widehat{c_i}}+a_i\widehat{d_i}+b_i\widehat{c_i}+b_i\widehat{d_i}\right) \\= & {} \sum _{i=1}^{n}\left( \alpha ^{p^m+1}+1\right) b_i\widehat{d_i}+\sum _{i=1}^{n}a_i\widehat{c_i}+\sum _{i=1}^{n}\left( b_i\widehat{c_i}+a_i\widehat{d_i}\right) , \end{aligned}$$

by (4.3-4.5) which finishes the of (4.2), i.e.,

$$\begin{aligned} \Phi (C^{\perp _H})\subset \Phi (C)^{\perp _H}. \end{aligned}$$
(4.6)

In light of Corollary 4.5, \(\Phi (C)\) is a linear code of length 2n of size |C| over \({\mathbb {F}}_{p^{2m}}\). So, by Corollary 4.5, we know that

$$\begin{aligned} |\Phi (C)^{\perp _{H}}|=\frac{(p^{2m})^{2n}}{|\Phi (C)|}=\frac{(p^{2m})^{2n}}{|C|}. \end{aligned}$$

Since R is a finite chain ring, i.e., Frobenius ring, we have

$$\begin{aligned} |C^{\perp _{H}}|\cdot |C|=|R|^{n}=(p^{2m})^{2n}. \end{aligned}$$

Hence, this implies that

$$\begin{aligned} |\Phi (C^{\perp _{H}})|=|\Phi (C)^{\perp _{H}}|. \end{aligned}$$
(4.7)

Combining (4.6) with (4.7), we get the desired equality.

The following corollary is an immediate result to this:

Corollary 4.7

  1. 1.

    If C is a Hermitian self-dual code of length n over R, then \(\Phi (C)\) is a Hermitian self-dual code of length 2n over \({\mathbb {F}}_{p^{2m}}\);

  2. 2.

    If C is a Hermitian dual-containing code of length n over R, then \(\Phi (C)\) is a Hermitian dual-containing code of length 2n over \({\mathbb {F}}_{p^{2m}}\).

In the following, we always assume that n is a positive integer and \((n,p)=1\). Let \({\mathcal {R}}_{n}=\frac{R[x]}{<x^n-1>}\). We denote by \( \mu \) the natural surjective ring morphism from R to \({\mathbb {F}}_{p^{2m}}\), which can be extended naturally to a surjective ring morphism from R[x] to \({\mathbb {F}}_{p^{2m}}[x]\).

For a polynomial f(x) of degree k in R[x], its reciprocal polynomial \(x^kf(x^{-1})\) is denoted by \(f^{*}(x)\). Note that the roots of \(f^{*}(x)\) are the reciprocal of the corresponding roots of f(x). Set \(f(x)=a_{0}+a_{1}x+\cdots +a_{k}x^{k}\), we define

$$\begin{aligned} \widehat{f(x)}=\widehat{a}_{0}+\widehat{a}_{1}x+\cdots +\widehat{a}_{k}x^{k}. \end{aligned}$$

The following result is easy to obtain, we omit the proof.

Lemma 4.8

Let \(f(x)=(t_{0}+us_{0})+(t_{1}+us_{1})x+\cdots +(t_{n-1}+us_{n-1})x^{n-1}\in R[x]\) and \(\eta \) be a primitive nth root of unity in some extension ring of R. If \(\eta ^{s}\) is a root of f(x), there \(\widehat{f^{*}(x)}\) has \(\eta ^{-p^{m}s}\) as a root.

Let i be an integer such that \(0\le i\le n-1\), and let l be the smallest positive integer such that \(i(p^{2m})^{l}\equiv i~({\mathrm {mod}}~n)\). Then \(C_i=\{i,ip^{2m},\ldots ,i(p^{2m})^{l-1}\}\) is the \(p^{2m}-\)cyclotomic coset module n containing i. A cyclotomic coset \(C_i\) is called symmetric if \(n-p^mi\in C_i\) and asymmetric otherwise. Let \(I_1\) and \(I_2\) be sets of symmetric and asymmetric coset representatives modulo n, respectively. Since p is coprime with n, the irreducible factors of \(x^n-1\) in \({\mathbb {F}}_{p^{2m}}[x]\) can be described by the \(p^{2m}-\)cyclotomic cosets. Suppose that \(\zeta \) be a primitive nth root of unity over some extension field of \({\mathbb {F}}_{p^{2m}}\). Then \(\zeta \) is also a primitive nth root of unity over some extension ring of R. Let \( m_{j}(x)\) be the minimal polynomial of \(\zeta ^j\) with respect to \({\mathbb {F}}_{p^{2m}}\). Then \( m_{j}(x)=\Pi _{i\in C_{j}}(x-\zeta ^{i})\), and \( \widehat{m_{j}^{*}(x)}=\Pi _{i\in C_{-p^{m}j}}(x-\zeta ^{i})\) by Lemma 4.8. Therefore, polynomial \(x^n-1\) factors are uniquely into monic irreducible polynomial in \({\mathbb {F}}_{p^{2m}}[x]\) as \(x^n-1=\Pi _{j\in I_1}m_{j}(x)\Pi _{j\in I_2}m_{j}(x)m_{-p^{m}j}(x)\). By \({\mathrm {Hensel}}^{,}\)s lemma (See [10, Theorem 4.1.1]), \(x^n-(1+u)\) has a unique decomposition as a product \(\Pi _{j\in I_1}M_{j}(x)\Pi _{j\in I_2}M_{j}(x)M_{-p^{m}j}(x)\) of pairwise coprime monic basic irreducible polynomials in R[x] with \(\mu (M_{j}(x))=m_{j}(x)\) for each \(j\in I_{1} \cup I_{2}\).

The following two lemmas can be found in [15].

Lemma 4.9

[15, Theorem 3.4] Let \(x^n-(1+u)=\Pi _{j\in I_1\cup I_2}M_{j}(x)\) be the unique factorization of \(x^n-(1+u)\) into a product of monic basic irreducible pairwise coprime polynomials in R[x]. If C is a cyclic code of length n over R, then \(C=\langle \Pi _{j\in I_1\cup I_2}M_{j}^{k_{j}}(x)\rangle \), where \(0\le k_j\le 2\). In this case, \(\mid C \mid =(p^{2m})^{\sum _{j\in I_1\cup I_2}(2-k_{j})~deg~M_{j}}\).

Lemma 4.10

[15,  Lemma 4.2] Let \(C=\langle \Pi _{j\in I_1\cup I_2}M_{j}^{k_{j}}(x)\rangle \) be a cyclic code of length n over R, where the polynomials \(M_j(x)\) are the pairwise coprime monic basic irreducible factors of \(x^n-(1+u)\) in R[x] and \(0\le k_j\le 2\) for each \(j\in I_1\cup I_2\). Then \(C^{\perp _H}=\langle \Pi _{j\in I_1\cup I_2}\widehat{M^{*}_{j}(x)}^{2-k_{j}}(x)\rangle \) and \(\mid C^{\perp _H} \mid =(p^{2m})^{\sum _{j\in I_1\cup I_2}k_{j}~deg~M_{j}}\).

Theorem 4.11

Let C be a cyclic code of length n over R. If

$$\begin{aligned} C=\left\langle \Pi _{j\in I_{1}}M_{j}^{k_{j}}(x)\Pi _{j\in I_{2}}M_{j}^{i_{j}}(x)M_{-p^{m}j}^{l_{j}}(x)\right\rangle , \end{aligned}$$

then \(C^{\perp _H}\subset C\) if and only if \(k_j=0\) or \(k_j=1\) for \(j\in I_1\) and \(i_j+l_j\le 2\) for \(j\in I_2\).

Proof

According to Lemma 4.10, we have

$$\begin{aligned} C^{\perp _H}=\left\langle \Pi _{j\in I_{1}}M_{j}^{2-k_{j}}(x)\Pi _{j\in I_{2}}M_{j}^{2-l_{j}}(x)M_{-p^{m}j}^{2-i_{j}}(x)\right\rangle . \end{aligned}$$

Comparing with \(C=\langle \Pi _{j\in I_{1}}M_{j}^{k_{j}}(x)\Pi _{j\in I_{2}}M_{j}^{i_{j}}(x)M_{-p^{m}j}^{l_{j}}(x)\rangle \), it follows that \(C^{\perp _H}\subset C\) if and only if \(k_j=0\) or \(k_j=1\) for \(j\in I_1\) and \(i_j+l_j\le 2\) for \(j\in I_2\).\(\square \)

From now on, we always assume that \(n=sp^t-1\). Obviously, \((n,p)=1\). In this case, we give a method to decompose \(x^n-(1+u)\) into monic basic irreducible polynomials in R(x). Let \(g_{1}(x),g_{2}(x),\ldots ,g_{r}(x)\) be monic basic irreducible polynomials in R[x] such that \(x^n-1=g_{1}(x)g_{2}(x)\ldots g_{r}(x)\). Note that \((1+u)^p=1\) and \((1+u)^{sp^t}=1\). Let \(f_{i}(x)=(1+u)^{p-{\textit{deg}}~g_{i}}g_{i}((1+u)x)\) for \(1\le i\le r\). Then the polynomial \(x^n-(1+u)\) factor is uniquely into monic basic irreducible polynomials in R[x] as \(f_{1}(x)f_2(x)\ldots f_r(x)\).

For a code C of length n over R, their torsion and residue codes are codes over \({\mathbb {F}}_{p^{2m}}\), defined as follows.

$$\begin{aligned} {\mathrm {Tor}}(C) =\left\{ a\in {\mathbb {F}}_{p^{2m}}^{n}\mid {\textit{ua}}\in C\right\} ,\quad {\mathrm { Res}}(C) =\left\{ a\in {\mathbb {F}}_{p^{2m}}^{n}\mid \exists b\in {\mathbb {F}}_{p^{2m}}^{n}:a+{\textit{ub}}\in C\right\} . \end{aligned}$$

It is easy to prove that \(|C|=|{\mathrm {Res}}(C)|| {\mathrm {Tor}}(C)|\).

Theorem 4.12

Let \(C=\langle \Pi _{j\in I} M_{j}^{k_{j}}(x)\rangle \) be a cyclic code of length n over R where \(x^n-(1+u)=\Pi _{j\in I_1}M_{j}(x)\Pi _{j\in I_2}M_{j}(x)M_{-p^{m}j}(x)\), \(0\le k_j\le 2\) and \(I=I_1\cup I_2\). Then

  1. 1.

    \( {\mathrm { Res}}(C) =\langle \Pi _{j\in I} [\mu (M_{j}(x))]^{\delta _{j}}\rangle \), where \(\delta _{j}=k_j\) if \(k_j=1\) or 0, and \(\delta _{j}=1\) if \(k_j=2\);

  2. 2.

    \( {\mathrm { Tor}}(C) =\langle \Pi _{j\in I} [(\mu M_{j}(x))]^{\eta _{j}}\rangle \), where \(\eta _{j}=0\) if \(k_j=1\) or 0, and \(\eta _{j}=1\) if \(k_j=2\).

Proof

According to the definition of \( { \mathrm { Res}}(C)\), we have \( {\mathrm { Res}}(C) =\langle \Pi _{j\in I} [(\mu M_{j}(x))]^{k_{j}}\rangle \). Note that if f(x) is a monic irreducible divisor of \(x^n-1\) in \({\mathbb {F}}_{p^{2m}}\) and \(g(x)=\frac{x^n-1}{f(x)}\), then \((f(x),g(x))=1\). So there exist \(a(x),b(x) \in {\mathbb {F}}_{p^{2m}}[x]\) such that \(a(x)f(x)+b(x)g(x)=1\) in \({\mathbb {F}}_{p^{2m}}[x]\). Computing in \(\frac{ {\mathbb {F}}_{p^{2m}}[x]}{\langle x^n-1\rangle }\), we get

$$\begin{aligned} a(x)f^{2}(x)= & {} (1-b(x)g(x))f(x)=f(x)-b(x)f(x)g(x)=f(x)\\&-b(x)(x^n-1)=f(x). \end{aligned}$$

Consequently, \(\langle f^2(x)\rangle =\langle f(x)\rangle \). This proves the (1).

For (2), since \(u \Pi _{j\in I} [(\mu M_{j}(x))]^{\eta _{j}}=u \Pi _{j\in I} [ M_{j}(x)]^{\eta _{j}}=-\Pi _{j\in I} [ M_{j}(x)]^{\eta _{j}+1}\in C\), we have \(\langle \Pi _{j\in I} [(\mu M_{j}(x))]^{\eta _{j}}\rangle \subset {\mathrm { Tor}}(C)\). By Lemma 4.9 and \(|C|=|{\mathrm {Res}}(C)|| {\mathrm {Tor}}(C)|\), we imply

$$\begin{aligned} | \langle \Pi _{j\in I} [(\mu M_{j}(x))]^{\eta _{j}}\rangle \mid =\mid {\mathrm {Tor}}(C)|. \end{aligned}$$

Thus, \( {\mathrm { Tor}}(C) =\langle \Pi _{j\in I} [(\mu M_{j}(x))]^{\eta _{j}}\rangle \).

Theorem 4.13

Let C be a cyclic code of length n over R, and let \(d_1\) and \(d_2\) be the minimum Hamming distances of the \({\mathrm { Res}}(C)\) and \( {\mathrm { Tor}}(C)\), respectively. Then \(d_\mathrm{G}(C)={\mathrm {min}}\{d_1,2d_2\}\).

Proof

For any nonzero codeword \(c=a(x)+ub(x)\in C\), if \(a(x)\ne 0\), then \(a(x)\in {\mathrm { Res}}(C)\). Thus, \(w_\mathrm{G}(c)\ge d_1\). Otherwise, \(c=ub(x)\in u{\mathrm { Tor}}(C)\); hence, \(w_\mathrm{G}(c)\ge 2d_2\). So \(d_\mathrm{G}(C)\ge {\mathrm {min}}\{d_1,2d_2\}\). On the other hand, since \(u{\mathrm { Tor}}(C)\) is contained in C, we can obtain \(d _G(C)\le 2d_2\). Obviously, \({\mathrm { Res}}(C)\subset C\); hence, \(d_1\ge d _G(C)\). It follows that \({\mathrm {min}}\{d_1,2d_2\}\ge d_\mathrm{G}(C)\). This proves the expected result.

Combining Corollary 2.3, 4.5, 4.7 and Theorem 4.13, we have the following result.

Theorem 4.14

Let C be a Hermitian dual-containing cyclic code over R of length n size \((p^{2m})^k \), and let \(d_1\) and \(d_2\) be the minimum Hamming distances of the \({\mathrm { Res}}(C)\) and \( {\mathrm { Tor}}(C)\).Then there exists a quantum code with parameters \([[2n, 2k-2n,\ge {\mathrm {min}}\{d_1,2d_2\}]]_{p^m}\).

Example 3

Consider cyclic codes of length 25 over \({\mathbb {F}}_{13^2}+u{\mathbb {F}}_{13^2}\). In \({\mathbb {F}}_{13^2}+u{\mathbb {F}}_{13^2}\),

$$\begin{aligned} x^{25}-(1+u)=M_0(X)M_1(x)M_2(x)M_5(x)M_{10}(x), \end{aligned}$$

where

$$\begin{aligned} M_0(x)= & {} x-(1-u),\\ M_1(X)= & {} x^{10}+w^{30}(1+8u)x^5+(1+3u),\\ M_2(X)= & {} x^{10}+w^{54}(1+8u)x^5+(1+3u),\\ M_5(X)= & {} x^2+w^{30}(1-u)x+(1-2u),\\ M_{10}(X)= & {} x^2+w^{54}(1-u)x+(1-2u). \end{aligned}$$

Let \(C=\langle M_0(x)M_1(X)^2M_{10}(X)^2\rangle \). By Theorem 4.11, \(C^{\perp _{H}}\subset C\). Using Theorem 4.13, we find that the Gray distance of C is equal to 4. By Theorem 4.14, a \([[50,42,\ge 4]]_{13}\) quantum code may be obtained from Gray image of this code. This code is a SQCNMDS code.

Example 4

Consider cyclic codes of length 8 over \({\mathbb {F}}_{3^4}+u{\mathbb {F}}_{3^4}\). In \({\mathbb {F}}_{3^4}+u{\mathbb {F}} _{3^4}\),

$$\begin{aligned} x^{8}-(1+u)=M_0(X)M_1(x)M_2(x)M_3(x)M_{4}(x)M_{5}(X)M_{6}(X)M_{7}(X), \end{aligned}$$

where

$$\begin{aligned} M_0(x)= & {} x-(1-u),\\ M_1(x)= & {} x+(1-u)w^{10},\\ M_2(X)= & {} x+(1-u)w^{20},\\ M_3(X)= & {} x+w^{30}(1-u),\\ M_4(X)= & {} x-(1-u),\\ M_{5}(X)= & {} x+w^{50}(1-u),\\ M_{6}(X)= & {} x+w^{60}(1-u),\\ M_{7}(X)= & {} x+w^{70}(1-u). \end{aligned}$$

Let \(C=\langle M_0(x)M_1(X)^2\rangle \). By Theorem 4.11 , \(C^{\perp _{H}}\subset C\). Using Theorem 4.13, we find that the Gray distance of C is equal to 3. By Theorem 4.14, a \([[16,10,\ge 3]]_{9}\) quantum code may be obtained from Gray image of this code. This code is a SQCNMDS code.

5 Conclusion

We give two methods to construct quantum codes from cyclic codes over finite chain rings. Furthermore, the results show that cyclic codes over finite chain rings are also a good resource of constructing quantum codes. We believe that more good quantum codes can be obtained from cyclic codes over finite chain rings. In the future work, we will use the computer algebra system MAGMA to find more new good quantum codes.