1 Introduction

The development of large-scale, reliable quantum computing relies on quantum error correction to guard against the adverse impact of noise and decoherence. Quantum error-correcting codes were first discovered by Shor in 1995 [22]. Soon after that, independent works by Calderbank and Shor [8] and Steane [23] outlined how classical linear codes could be used to construct quantum error-correcting codes, now referred to as CSS codes. The CSS construction uses a pair \((C_1, C_2)\) of classical linear codes, where the code \(C_1\) contains the code \(C_2\), to define a quantum stabilizer code. CSS codes are advantageous because they allow one to combine two appropriate classical codes into a quantum stabilizer code. CSS codes have some nice properties, including propagation rules (see [7, 14, 19] and the survey [13]).

While generally not optimal, CSS codes are optimal among nondegenerate stabilizer codes that support the transversal T gate; indeed, it is demonstrated in [21] that for any non-degenerate stabilizer code that supports a physical transversal T gate, there is a CSS code with the same parameters that also does. CSS-T codes, introduced in [20], are motivated by the need for quantum codes which respect the transversal T gate. Transversal gates are essential in fault-tolerant quantum computation as they mitigate the proliferation of errors. Transversals may be considered the most straightforward fault-tolerant realizations because they split into gates that act on individual qubits.

A CSS-T code is formed using a pair \((C_1, C_2)\) of classical linear codes such that \(C_1\) contains \(C_2\), all codewords of \(C_2\) are of even weight, and the shortening of the dual of \(C_1\) with respect to the support of each codeword c of \(C_2\) is self-dual. In this case, we say that \((C_1, C_2)\) is a CSS-T pair. It is not surprising that it remains an open question to determine asymptotically good families of CSS-T codes [4]. CSS-T codes from Reed–Muller codes have been explored in [2], and some general properties are laid out in [4].

In this paper, we study binary CSS-T pairs. Section 2 introduces the basic properties of CSS-T pairs. We give in Theorem 2.3 several conditions to determine if a pair of codes \((C_1, C_2)\) is a CSS-T pair. The equivalences of Theorem 2.3 allow us to see that the minimum distance of a CSS-T code associated with \((C_1, C_2)\) is lower bounded by the minimum distance of \(C_2^\perp \). In Sect. 3, Corollary 3.1 allows us to define a poset \({\mathcal {P}}\) of CSS-T pairs relative to the order \((C_1, C_2) \le (C_1',C_2')\) if and only if \(C_i\subset C_i'\) for \(i=1,2\). We determine the minimal elements of \({\mathcal {P}}\) in Corollary 3.3. Using a sequence of results on properties of CSS-T pairs, we provide in Corollary 3.9 a propagation rule for nondegenerate CSS-T codes and characterize the maximal elements of \({\mathcal {P}}\) in Theorem 3.11. In Corollary 3.13, we collect special cases when the conditions of Theorem 3.11 can be relaxed. As an application, we apply some results of Sect. 3 to Reed–Muller codes. In Sect. 4, we restrict our attention to cyclic and extended cyclic codes. Theorem 4.8 provides a characterization of cyclic CSS-T pairs in terms of the defining cyclotomic cosets, and Corollary 4.11 characterizes those that are maximal. We find cyclic and extended cyclic codes that outperform binary Reed–Muller codes. In Sect. 5 we compare our codes with triorthogonal codes [6, 17]. A summary and open problems are included in Sect. 6. Examples are provided throughout the paper. We conclude this section with a summary of results and a motivating example.

1.1 Summary of major results

In this subsection, we provide a guide to the major results of this paper.

  • A primary contribution of this paper is the following more straightforward characterization of CSS-T pairs, found in Theorem 2.3: Given binary linear codes \(C_1\) and \(C_2\) of length n,

    $$\begin{aligned} (C_1, C_2) \text { is a CSS-T pair if and only if } C_2\subset C_1\cap (C_1^{\star 2})^\perp . \end{aligned}$$

    Among the consequences are the fact that

    $$\begin{aligned} C_2 \text { is self-orthogonal for all CSS-T pairs }(C_1, C_2). \end{aligned}$$
  • Another key result is that CSS-T pairs form a poset \({\mathcal {P}}\). According to Corollary 3.1, given a CSS-T pair \((C_1, C_2)\)

    $$\begin{aligned} (C_1',C_2) \text { is a CSS-T pair } \forall \ C_2\subset C_1'\subset C_1 \end{aligned}$$

    and

    $$\begin{aligned} (C_1,C_2') \text { is a CSS-T pair } \forall \ C_2'\subset C_2. \end{aligned}$$
  • We demonstrate in Theorem 3.11 that

    $$\begin{aligned} (C_1, C_2) \text { is a maximal CSS-T pair } \Leftrightarrow C_1^\perp =C_1\star C_2 \text { and } C_2^\perp =C_1^{\star 2}. \end{aligned}$$

    Moreover, we determine minimal (Corollary 3.3) and maximal (Proposition 3.5 and Corollary 3.10) elements of the poset \({\mathcal {P}}\): \((C_1,C_2)\) is a maximal CSS-T pair

    • with respect to \(C_2\) if and only if

      $$\begin{aligned} C_2=C_1\cap (C_1^{\star 2})^\perp . \end{aligned}$$
    • with respect to \(C_1\) if and only if

      $$\begin{aligned} C_1=C_2^\perp \cap (C_1\star C_2)^\perp . \end{aligned}$$
  • Corollary 3.9 contains a propagation rule for nondegenerate CSS-T codes: Given a nondegenerate [[nkd]] CSS-T code from a CSS-T pair \((C_1,C_2)\), for any \(y\in C_2^\perp \cap (C_1\star C_2)^\perp \text { and } y\not \in C_1\), we have that \((C_1+\langle y\rangle ,C_2)\) is a nondegenerate CSS-T pair with parameters \( [[n,k+1,d]]\).

  • In Theorem 4.8, we prove that for cyclotomic cosets \(I_1, I_2\subset {\mathbb {Z}_{n}}\),

    $$\begin{aligned} (C(I_1),C(I_2)) \text { is a CSS-T pair if and only if } I_2\subset I_1 \text { and } n\not \in (I_1+I_1+I_2). \end{aligned}$$

    The corresponding quantum code is a \([[n,\Vert {I_1}\Vert -\Vert {I_2}\Vert ,\ge n-{{\,\textrm{Amp}\,}}(J_2)+1]]\) code.

1.2 Motivating example

We conclude this section with an example to demonstrate the utility of some of the results in the paper. In particular, we show how to apply them to the well-known [[15, 1, 3]] (punctured) quantum Reed–Muller code [1, 18]. Let \(m\ge 1\) and \(0\le d \le m-1\). Then the d-th order binary Reed–Muller code is defined as

$$\begin{aligned} {{\,\textrm{RM}\,}}_m(d):=\left\{ (f(v))_{v \in {{\mathbb {F}}}_2^m}: f \in {{\mathbb {F}}}_2[x_1, \dots , x_m], \deg f \le d \right\} . \end{aligned}$$

Moreover, it is known that its dual code is \({{\,\textrm{RM}\,}}_m(d)^\perp ={{\,\textrm{RM}\,}}_m(m-1-d)\). Let \(m=4\) and assume that we order the points in \({{\mathbb {F}}}_2^4\) so that (0, 0, 0, 0) corresponds to the first coordinate of the corresponding Reed–Muller codes. We consider \(C_1={{\,\textrm{RM}\,}}_4(1)^{\{1\}}\), that is, the puncturing of the code \({{\,\textrm{RM}\,}}_4(1)\) in the coordinate corresponding to (0, 0, 0, 0). For \(C_2\), we consider the simplex code of length 15. This corresponds to taking \(C_2={{\,\textrm{RM}\,}}_4(1)_{\{ 1\}}\), the shortening of \({{\,\textrm{RM}\,}}_4(1)\) in the first coordinate. The sets of monomials whose evaluation over \({{\mathbb {F}}}_2^4\setminus \{ (0,0,0,0)\}\) generates \(C_1\) and \(C_2\) are \(\{ 1,x_1,x_2,x_3,x_4\}\) and \(\{x_1,x_2,x_3,x_4\}\), respectively, and we have \(C_2\subset C_1\). If we prove that \(C_2\subset (C_1^{\star 2})^\perp \), then \(C_2\subset C_1\cap (C_1^{\star 2})^\perp \), and, by Theorem 2.3, we would have that \((C_1,C_2)\) is a CSS-T pair. The Schur product \({{\,\textrm{RM}\,}}_m(d_1)\star {{\,\textrm{RM}\,}}_m(d_2)\), for some \(0\le d_1,d_2\le m-1\), corresponds to taking the code generated by the evaluation of the products of the corresponding monomials. In this example, \(C_1^{\star 2}=C_1\star C_1\) is the code generated by the evaluation over \({{\mathbb {F}}}_2^4\setminus \{ (0,0,0,0)\}\) of

$$\begin{aligned} \{1, x_1,x_2,x_3,x_4,x_1x_2,x_1x_3,x_1x_4,x_2x_3,x_2x_4,x_3x_4\}. \end{aligned}$$

This actually corresponds to the puncturing in the first position of \({{\,\textrm{RM}\,}}_4(2)\), that is, \(C_1^{\star 2}={{\,\textrm{RM}\,}}_4(2)^{\{1\}}\). Since the dual of a puncturing is the corresponding shortening of the dual, we obtain \((C_1^{\star 2})^\perp ={{\,\textrm{RM}\,}}_4(1)_{\{1\}}=C_2\). Thus, \((C_1,C_2)\) is a CSS-T pair. Analogously, one can prove that \(C_1\star C_2\) is generated by

$$\begin{aligned} \{x_1,x_2,x_3,x_4,x_1x_2,x_1x_3,x_1x_4,x_2x_3,x_2x_4,x_3x_4\}, \end{aligned}$$

that is, \(C_1\star C_2={{\,\textrm{RM}\,}}_4(2)_{\{1\}}=C_1^\perp \). We proved before that \((C_1^{\star 2})^\perp =C_2\), which implies \(C_1^{\star 2}=C_2^\perp \). By Theorem 3.11, we have that the [[15, 1, 3]] (punctured) quantum Reed–Muller code is maximal with respect to the CSS-T poset \({\mathcal {P}}\).

2 Equivalent definitions

In this section, we give equivalent conditions for a pair of binary codes \((C_1, C_2)\) to be a CSS-T pair.

We start by fixing some notations for the rest of the paper. For a positive integer n, we write \([n]:=\{1, \dots , n \}\). We denote by \(\mathbbm {1}\) the element \((1,\ldots ,1)\), where the number of entries depends on the context. We say a binary code C of length n, dimension k and minimum Hamming distance d is an [nkd] code. Let \(C\subset {{\mathbb {F}}}_2^n\) be a code and \(i\in [n]\). The dual of C with respect to the Euclidean inner product is denoted by \(C^\perp \). The shortening of C in \(\{i\}\), denoted by \(C_{\{i\}}\), is the binary code

$$\begin{aligned} C_{\{i\}}:= \{ (c_1,\dots ,c_{i-1},c_{i+1},\dots ,c_n): (c_1,\dots ,c_{i-1},0,c_{i+1},\dots ,n)\in C\}. \end{aligned}$$

The puncturing of C in \(\{i\}\), denoted by \(C^{\{i\}}\), is the binary code

$$\begin{aligned}{} & {} C^{\{i\}}:= \{ (c_1,\dots ,c_{i-1},c_{i+1},\dots ,c_n): (c_1,\dots ,c_{i-1},c_i,c_{i+1},\dots ,c_n)\\{} & {} \qquad \in C, \text {for some } c_i \in {{\mathbb {F}}}_2 \}. \end{aligned}$$

For \(S\subset [n]\), we write \(C_S\) (resp. \(C^S\)) for the successive shortening (resp. puncturing) of C in the coordinates indexed by the elements in S.

The Schur product of two vectors \(x=(x_1,\ldots ,x_n)\) and \(y=(y_1,\ldots ,y_n)\) in \({{\mathbb {F}}}_2^n\) is denoted and defined by

$$\begin{aligned} x \star y:= (x_1y_1,\ldots , x_ny_n). \end{aligned}$$

The Schur product of two binary codes \(C_1\) and \(C_2\), denoted by \(C_1\star C_2\), is defined as the binary code generated by the vectors

$$\begin{aligned} \left\{ c_1 \star c_2: c_i \in C_i \right\} . \end{aligned}$$

The t-fold Schur product of C with itself is \(C^{\star t}:=\underbrace{C\star \cdots \star C}_{t}\), the t-th Schur power of C. Note that for a binary code C, we always have \(C\subset C^{\star 2}\) since \(x\star x=x\) for any binary vector \(x \in {{\mathbb {F}}}_2^n\).

Recall that a code is of even weight, or even-weighted, provided all of its codewords have even Hamming weight. For \(x\in C\), we use Z(x) to denote the set of positions of the zero coordinates of x, i.e., \(Z(x)=[n]\setminus {{\,\textrm{supp}\,}}(x)\), where \({{\,\textrm{supp}\,}}(x)\) is the support of x (set of nonzero entries of x).

We use [[nkd]] to denote a quantum code that encodes k logical qubits into n physical qubits and can correct up to \(d - 1\) erasures. We recall the CSS construction [8, 23].

Theorem 2.1

(CSS construction) Let \(C_i\subset {{\mathbb {F}}}_{2}^n\) be linear codes of dimension \(k_i\), for \(i=1,2\), such that \(C_2\subset C_1\). Then, there is an \([[n,k_1-k_2,d]]\) quantum code with

$$\begin{aligned} d=\min \left\{ {{\,\textrm{wt}\,}}\left( C_1\setminus C_2 \right) , {{\,\textrm{wt}\,}}\left( C_2^\perp \setminus C_1^\perp \right) \right\} . \end{aligned}$$

Let \(d^*:=\min \{ {{\,\textrm{wt}\,}}(C_1),{{\,\textrm{wt}\,}}(C_2^\perp )\}\). If \(d=d^*\), the corresponding quantum code is said to be nondegenerate, and it is called degenerate if \(d>d^*\).

The following definition was given in [20].

Definition 2.2

Let \(C_2\subset C_1\) be binary codes. Then \((C_1, C_2)\) is a CSS-T pair if \(C_2\) is even-weighted and for any \(x\in C_2\), the shortening \((C_1^\perp )_{Z(x)}\) contains a self-dual code.

Theorem 2.3

Let \(C_1\) and \(C_2\) be binary codes of length n. The following are equivalent.

  1. (1)

    \((C_1, C_2)\) is a CSS-T pair.

  2. (2)

    \(C_2\subset C_1\), \(C_2\) is even-weighted, and for any \(x\in C_2\) the code \(C_1^{Z(x)}\) is self-orthogonal.

  3. (3)

    \(C_2\subset C_1\cap (C_1^{\star 2})^\perp \).

  4. (4)

    \(C_1^\perp +C_1^{\star 2}\subset C_2^\perp \).

Moreover, if \((C_1, C_2)\) is a CSS-T pair, then \(C_2\) is self-orthogonal.

Proof

The equivalence of (1) and (2) was proved in [2]. (See also [4] for the case of arbitrary fields of characteristic 2.) Also, (3) and (4) are equivalent by taking the duals.

To show the equivalence of (2) and (3), note that for any \(x\in C_2\), the code \(C_1^{Z(x)}\) is self-orthogonal if and only if \(x\in (C_1^{\star 2})^\perp \). Indeed, \(x\in (C_1^{\star 2})^\perp \) if and only if \(\sum _{i=1}^n x_iu_iv_i=0\) for any \(u,v\in C_1\). As x is a binary vector, we can write this as \(\displaystyle \sum _{i\in {{\,\textrm{supp}\,}}(x)} u_iv_i=0\), i.e., \(u'\cdot v'=0\) for any \(u',v'\in C_1^{Z(x)}\), that is \(C_1^{Z(x)}\) is self-orthogonal. On the other hand, if \(C_2\subset C_1\cap (C_1^{\star 2})^\perp \), then we have

$$\begin{aligned} C_2\subset C_1\subset C_1^{\star 2}\subset C_2^\perp . \end{aligned}$$

Thus, \(C_2\) is even-weighted because it is self-orthogonal. \(\square \)

Remark 2.4

Note that if \((C_1, C_2)\) is a CSS-T pair then, by part (4) of Theorem 2.3, \(C_1^{\star 2}\subset C_2^\perp \), which is equivalent to \(C_1\star C_2\subset C_1^\perp \). This observation previously appeared in [20, Remark 3].

A CSS-T code is a code obtained via a CSS-T pair and Theorem 2.1. The equivalences of Theorem 2.3 allow us to see some structural properties of CSS-T codes. In particular, the minimum distance of a CSS-T code associated with \((C_1, C_2)\) is lower bounded by the minimum distance of \(C_2^\perp \).

Corollary 2.5

Let \((C_1, C_2)\) be a CSS-T pair. Then

$$\begin{aligned} \min \{{{\,\textrm{wt}\,}}(C_1),{{\,\textrm{wt}\,}}(C_2^\perp )\}={{\,\textrm{wt}\,}}(C_2^\perp ), \end{aligned}$$

and the parameters of the corresponding CSS-T code are

$$\begin{aligned}{}[[n,k_1-k_2,\ge {{\,\textrm{wt}\,}}(C_2^\perp )]]. \end{aligned}$$

Moreover, if the code is nondegenerate, we have equality in the minimum distance.

Proof

From Theorem 2.3 (4), we see that

$$\begin{aligned} {{\,\textrm{wt}\,}}(C_2^\perp )\le {{\,\textrm{wt}\,}}(C_1^\perp +C_1^{\star 2})\le {{\,\textrm{wt}\,}}(C_1^{\star 2})\le {{\,\textrm{wt}\,}}(C_1). \end{aligned}$$

\(\square \)

3 The poset of CSS-T pairs

Let \((C_1, C_2)\) be a CSS-T pair. By Corollary 2.5, the CSS-T code associated with the pair \((C_1, C_2)\) has parameters \([[n,k_1-k_2,\ge {{\,\textrm{wt}\,}}(C_2^\perp )]]\). Thus, increasing the dimension of \(C_1\) will increase the dimension of the associated CSS-T code, and the minimum distance is still bounded by \({{\,\textrm{wt}\,}}(C_2^\perp )\). In particular, if the associated CSS-T code is nondegenerate, then increasing the dimension of \(C_1\) does not change the minimum distance (see Corollary 2.5). On the other hand, increasing the dimension of \(C_2\) could improve the minimum distance but decrease the dimension of the resulting CSS-T code.

The following corollary allows us to define a partial order on the set of CSS-T pairs. The result shows that all the CSS-T pairs are determined by those CSS-T pairs \((C_1, C_2)\) that cannot be extended to another CSS-T pair \((C_1^\prime , C_2^\prime )\), where \(C_1=C_1^\prime \) or \(C_2=C_2^\prime \).

Corollary 3.1

Let \((C_1, C_2)\) be a CSS-T pair. Then, the following hold.

  1. (1)

    \((C_1',C_2)\) is a CSS-T pair for any \(C_2\subset C_1'\subset C_1\).

  2. (2)

    \((C_1,C_2')\) is a CSS-T pair for any \(C_2'\subset C_2\).

Proof

(1) As \(C_1'\subset C_1\), then \((C_1'^\perp )_{Z(x)}\supset (C_1^\perp )_{Z(x)}\) for any \(x\in C_2\). Hence, if \((C_1^\perp )_{Z(x)}\) contains a self-dual code, then \((C_1'^\perp )_{Z(x)}\) also contains a self-dual code.

(2) It is a direct consequence of Theorem 2.3 (2). \(\square \)

We are ready to define a partial order in the set of CSS-T pairs.

Definition 3.2

We denote by \({\mathcal {P}}\) the poset of CSS-T pairs relative to the order \((C_1, C_2) \le (C_1',C_2')\) if and only if \(C_i\subset C_i'\) for \(i=1,2\).

From now on, we discard the trivial pairs \((C_1,\{0\})\) from \({\mathcal {P}}\). Denote by \(\langle x\rangle \) the code generated by an element \(x \in {{\mathbb {F}}}_2^n\).

Corollary 3.3

The set of minimal elements of \({\mathcal {P}}\) is

$$\begin{aligned} \left\{ (\langle u\rangle , \langle u\rangle ): u \text { even }, u \in {{\mathbb {F}}}_2^n \right\} . \end{aligned}$$

Proof

This is a consequence of Corollary 3.1. \(\square \)

We are interested in the set of maximal elements of \({\mathcal {P}}\).

Definition 3.4

We say that \((C_1, C_2)\in {\mathcal {P}}\) is maximal in \(C_1\) if \((C_1, C_2)\le (C_1',C_2)\) implies \(C_1=C_1'\). Similarly, \((C_1, C_2)\) is maximal in \(C_2\) if \((C_1, C_2)\le (C_1,C_2')\) implies \(C_2=C_2'\).

Note that a pair \((C_1, C_2)\) is a maximal element of \({\mathcal {P}}\) if and only if \((C_1, C_2)\) is maximal in both \(C_1\) and \(C_2\). Some maximal elements in \({\mathcal {P}}\) are given by the pairs \((C_1, C_2)\) where \(C_1\) has codimension one. Indeed, by Theorem 2.3 (4), \(C_1^{\star 2}\subset C_2^\perp \). Since we assume that \(C_2\) is nontrivial, we see that \(C_1^{\star 2}\) is a proper subspace of \({{\mathbb {F}}}_2^n\), obtaining thus that \(C_1=C_1^{\star 2}=C_2^\perp \). Hence, \(C_2\) is a one-dimensional subspace of \(C_1\) generated by an even-weight vector. In fact, we show in Theorem 3.11 that the property \(C_1^{\star 2}=C_2^\perp \) holds for any maximal pair \((C_1, C_2)\).

We start by describing pairs that are maximal in \(C_2\).

Proposition 3.5

A pair \((C_1, C_2)\in {\mathcal {P}}\) is maximal in \(C_2\) if and only if \(C_2=C_1\cap (C_1^{\star 2})^\perp \).

Proof

This is provided by Theorem 2.3 (3). \(\square \)

The following proposition gives a criterion for extending a CSS-T pair \((C_1, C_2)\) to a pair \((C_1', C_2)\) with \(\dim C_1'=\dim C_1+1\).

Proposition 3.6

Let \((C_1, C_2)\) be a CSS-T pair and \(y \in {{\mathbb {F}}}_2^n\). Then \((C_1+\langle y\rangle ,C_2)\) is a CSS-T pair if and only if \(C_1\star y+\langle y\rangle \subset C_2^\perp \), or equivalently, \(y\in C_2^\perp \cap (C_1\star C_2)^\perp \).

Proof

Define \(C_1':= C_1+\langle y\rangle \). Note that \(C_1'^\perp \subset C_1^\perp \). Since \((C_1, C_2)\) is a CSS-T pair, we have \(C_1^\perp +C_1^{\star 2}\subset C_2^\perp \) by Theorem 2.3 (4). Thus,

$$\begin{aligned} C_1'^\perp \subset C_1^\perp \subset C_1^\perp +C_1^{\star 2}\subset C_2^\perp . \end{aligned}$$

By Theorem 2.3 (4), \((C_1',C_2)\) is a CSS-T pair if and only if \(C_1'^\perp +C_1'^{\star 2}\subset C_2^\perp \). So, it is enough to verify \(C_1'^{\star 2}\subset C_2^\perp \) if and only if \(C_1\star y+\langle y\rangle \subset C_2^\perp \). It remains to notice that \(C_1'^{\star 2}=C_1^{\star 2}+C_1\star y+\langle y\rangle \), as \(y\star y=y\). \(\square \)

Unlike Proposition 3.5, Proposition 3.6 does not allow us to find the maximal \(C_1\) for a given \(C_2\) to get a CSS-T pair as the next example shows.

Example 3.7

Let \(C=\langle (1,1,1,1,1,1)\rangle \). By Proposition 3.3, \((C,C)\in {\mathcal {P}}\) and it is a minimal element. We have \(C^\perp \cap (C^{\star 2})^\perp =C^\perp \). Let \(v=(1,1,1,1,0,0), w=(1,0,0,0,0,1)\in C^\perp \). Thus, \((C+\langle v\rangle , C)\in {\mathcal {P}}\), but \((C+\langle v,w\rangle ,C)\notin {\mathcal {P}}\), despite \(v,w\in C^\perp \).

We have:

$$\begin{aligned}{} & {} C^\perp \cap ((C+\langle v\rangle )\star C)^\perp \\{} & {} \qquad =\langle (1,1,0,0,0,0),(1,0,1,0,0,0),(1,0,0,1,0,0),(0,0,0,0,1,1)\rangle . \end{aligned}$$

We can take any nonzero element \(v'\) different from (1, 1, 1, 1, 1, 1, 1) in this intersection and we get that \((C+\langle v,v'\rangle , C)\) is a CSS-T pair. Note that for \(v'\) equal to (1, 1, 0, 0, 0, 0), (1, 0, 1, 0, 0, 0), or (1, 0, 0, 1, 0, 0), we get a new CSS-T pair. However, we do not obtain a new CSS-T for \(v' = (0,0,0,0,1,1)\) since \(v' \in C + \langle v\rangle \).

Remark 3.8

Note that, if \((C_1, C_2)\) is a CSS-T pair, then so is \((C_1+\langle \mathbbm {1}\rangle , C_2)\). This follows from Theorem 2.3 (3), the previous result, and the observation that \(C_2\subset \langle \mathbbm {1}\rangle ^\perp \), as \(C_2\) is even-weighted.

Proposition 3.6 also provides the following propagation rule for nondegenerate CSS-T codes.

Corollary 3.9

Let \((C_1, C_2)\) be a CSS-T pair such that the associated [[nkd]] CSS-T code is nondegenerate. For any \(y\in C_2^\perp \cap (C_1\star C_2)^\perp \) and \(y\not \in C_1\), the pair \((C_1+\langle y\rangle ,C_2)\) is a nondegenerate CSS-T pair with parameters

$$\begin{aligned}{}[[n,k+1,d]]. \end{aligned}$$

Proof

By Proposition 3.6, \((C_1+\langle y\rangle , C_2)\) is a CSS-T pair, and the parameters follow from Corollary 2.5. \(\square \)

Corollary 3.10

A pair \((C_1, C_2)\in {\mathcal {P}}\) is maximal in \(C_1\) if and only if \(C_1=C_2^\perp \cap (C_1\star C_2)^\perp \).

Proof

By Proposition 3.6, \((C_1, C_2)\in {\mathcal {P}}\) is maximal in \(C_1\) if and only \(C_2^\perp \cap (C_1\star C_2)^\perp \subset C_1\). On the other hand, the pair \((C_1+\langle y\rangle ,C_2)\) is CSS-T for each \(y\in C_1\), so by Proposition 3.6, \(C_1\subset C_2^\perp \cap (C_1\star C_2)^\perp \) as well. \(\square \)

We obtain the following theorem by combining the previous results on maximality in \(C_1\) and \(C_2\).

Theorem 3.11

Let \(C_2\subset C_1\subset \mathbb {F}_2^n\) be linear codes. The pair \((C_1, C_2)\) is maximal in \({\mathcal {P}}\) if and only if

  1. (1)

    \(C_1^\perp =C_1\star C_2\) and

  2. (2)

    \(C_2^\perp =C_1^{\star 2}\).

Proof

Assume \((C_1, C_2)\) is a maximal CSS-T pair. Note that we can assume \(\mathbbm {1} \in C_1\) by Remark 3.8, and we have \(C_2=\langle \mathbbm {1}\rangle \star C_2\subset C_1\star C_2\). Now, by Corollary 3.10, we have

$$\begin{aligned} C_1^\perp =C_2+C_1\star C_2=C_1\star C_2, \end{aligned}$$

which shows (1).

As \(C_2=C_1\cap (C_1^{\star 2})^\perp \) by Proposition 3.5, we only need to show that \((C_1^{\star 2})^\perp \subset C_1\) in order to prove (2). Since \(C_2\subset C_1\), we have \(C_1\star C_2\subset C_1^{\star 2}\) and \((C_1^{\star 2})^\perp \subset (C_1\star C_2)^\perp \). Also, \(C_2\subset C_1\subset C_1^{\star 2}\) implies that \((C_1^{\star 2})^\perp \subset C_2^\perp \). Therefore, by Corollary 3.10, we get

$$\begin{aligned} (C_1^{\star 2})^\perp \subset C_2^\perp \cap (C_1\star C_2)^\perp = C_1. \end{aligned}$$

Theorem 2.3 (2) implies that \((C_1,C_2)\) is a CSS-T pair. The maximality follows directly from Proposition 3.5 and Corollary 3.10, using both (1) and (2). \(\square \)

The following example illustrates that the necessary condition (2) of Theorem 3.11 for \((C_1, C_2)\) to be maximal is not sufficient.

Example 3.12

Define \(C_2:= \langle (1, 1, 0,0,0,0)\rangle \) and \(C_1\) as the code whose generator matrix is given by

$$\begin{aligned} \left( \begin{matrix} 1 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 1\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 1 \end{matrix}\right) . \end{aligned}$$

It is not difficult to see using [3, 15] that a generator matrix for \(C_1^{\star 2}\) is given by

$$\begin{aligned} \left( \begin{matrix} 1 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \end{matrix}\right) . \end{aligned}$$

Hence, \((C_1^{\star 2})^\perp =\langle (1, 1, 0,0,0,0)\rangle =C_2\), meaning that the pair \((C_1, C_2)\) satisfies condition (2) of Theorem 3.11. But the pair \((C_1, C_2)\) is not maximal in \(C_1\) because the extension \((C_1+\langle \mathbbm {1}\rangle ,C_2)\) satisfies (1)–(2) of Theorem 3.11, meaning that it is maximal.

In the following corollary, we collect special cases when the conditions of Theorem 3.11 can be relaxed.

Corollary 3.13

Let C be a binary code.

  1. (1)

    The pair (CC) is maximal in \({\mathcal {P}}\) if and only if \(C^{\star 2}=C^\perp \).

  2. (2)

    If \(C^\perp \subset C\), the pair \((C,C^\perp )\) is maximal in \({\mathcal {P}}\) if and only if \(C^{\star 2}=C\). Equivalently, C is generated by vectors with pair-wise disjoint support.

Proof

(1) If the pair (CC) is maximal in \({\mathcal {P}}\), then \(C^{\star 2}=C^\perp \) by Theorem 3.11 (2). If \(C^{\star 2}=C^\perp \), then (CC) is a CSS-T pair by Theorem 2.3 (3). Also, the pair (CC) is maximal in \({\mathcal {P}}\) by Theorem 3.11.

(2) If \((C,C^\perp )\) is a maximal CSS-T pair, then \(C=C^{\star 2}\) by Theorem 3.11 (2). Conversely, assume that \(C=C^{\star 2}\). Theorem 2.3 (3) verifies that \((C, C^\perp )\) is a CSS-T pair. Proposition 3.5 verifies that \((C, C^\perp )\) is maximal in \(C^\perp \). If \((C +\langle y\rangle , C^\perp )\) is a CSS-T pair for some \(y\in {{\mathbb {F}}}_2^n\), then \(y\in C\) by Proposition 3.6, meaning that \((C, C^\perp )\) is maximal in C. \(\square \)

Example 3.14

Assume \(3d=m-1\) for some \(d,m\in {{\mathbb {N}}}\). For the binary Reed–Muller code \(C:= {{\,\textrm{RM}\,}}_m(d)\), we have

$$\begin{aligned} C^\perp ={{\,\textrm{RM}\,}}_m(d)^\perp ={{\,\textrm{RM}\,}}_m(m-d-1)={{\,\textrm{RM}\,}}_m(2d)=C^{\star 2}. \end{aligned}$$

Thus, (CC) is a maximal pair by Corollary 3.13 (1).

Observe that even if \((C_1,C_2)\) is maximal in \({\mathcal {P}}\), in principle, there can be a pair \((D_1,D_2)\in {\mathcal {P}}\) such that \(C_2\subset D_2\) or \(C_1\subset D_1\). We can give a complete characterization of such spaces. First, we need a lemma.

Lemma 3.15

Let \(C\subsetneq \mathbb {F}_2^n\) such that for any \(x\in C\cap (C^{\star 2})^\perp \) we have \(C\star x=C^\perp \). Then \((C^{\star 2})^\perp =\langle y\rangle \), for some \(y\in C\), or \(C=C^\perp \) and \(C^{\star 2}=\langle \mathbbm {1}\rangle ^\perp \).

Proof

First, observe that \(C\star x = C^\perp \subset C^{\star 2}\) implies \((C^{\star 2})^\perp \subset C\) and thus \(C\cap (C^{\star 2})^\perp =(C^{\star 2})^\perp \). Let \(y\in (C^{\star 2})^\perp \) be a minimal support codeword. If \(y=\mathbbm {1}\), then \(C\star y=C=C^\perp \) and \(C^{\star 2}=\langle \mathbbm {1}\rangle ^\perp \).

Assume now that \({{\,\textrm{wt}\,}}(y)<n\). Since \(C\star y=C^\perp \) then \(\langle e_i\,\ i\notin \textrm{supp}(y)\rangle \subseteq C\). If there is another minimal codeword \(y\ne x\in (C^{\star 2})^\perp \), the same arguments lead to the existence of \(i\in \textrm{supp}(y){\setminus }\textrm{supp}(x)\) such that \(e_i\in C^{\star 2}\) and thus \(z_i=0\) for any \(z\in (C^{\star 2})^\perp \), which contradicts that \(y_i\ne 0\). Thus, there are no more minimal codewords in \((C^{\star 2})^\perp \) and we have the conclusion. \(\square \)

The next example shows that the converse of the last lemma is not true.

Example 3.16

Let \(C=\langle (1,1,0,0,0),(0,1,1,0,0),(0,0,0,1,1)\rangle \). We have

$$\begin{aligned} C^{\star 2}=\langle (1,0,0,0,0),(0,1,0,0,0),(0,0,1,0,0),(0,0,0,1,1)\rangle , \end{aligned}$$

and \((C^{\star 2})^\perp =\langle (0,0,0,1,1)\rangle \). However,

$$\begin{aligned} C\star (0,0,0,1,1)=(0,0,0,1,1)\subsetneq C^\perp =\langle (1,1,1,0,0),(0,0,0,1,1)\rangle . \end{aligned}$$

Proposition 3.17

Let \((C_1,C_2)\in {\mathcal {P}}\). Then

  1. (1)

    There is no \((D_1,D_2)\in {\mathcal {P}}\) with \(C_1\subsetneq D_1\) if and only if \(C_1^\perp =C_1\star y\) for any \(y\in C_1\cap (C_1^{\star 2})^\perp \).

  2. (2)

    There is no \((D_1,D_2)\in {\mathcal {P}}\) with \(C_2\subsetneq D_2\) if and only if \((C_2,C_2)\) is maximal.

Proof

If there is no such \(D_1\), since for any \(y\in C_1\cap (C_1^{\star 2})^\perp \), \((C_1,\langle y\rangle )\in {\mathcal {P}}\) but \(C_1\) cannot be extended, then \(C_1=\langle y\rangle ^\perp \cap (C_1\star y)^\perp =(C_1\star y)^\perp \) by Corollary 3.10 (note that \(y \in C_1\) implies \(y\in C_1\star y\)). On the other hand, assume \(C_1^\perp =C_1\star y\) for any \(y\in C_1\cap (C_1^{\star 2})^\perp \), and let \(C_1\subset D_1\) such that \(D_1\) is the largest code containing \(C_1\) with \((D_1,D)\in {\mathcal {P}}\) for some D. By the first part of this proof, the hypothesis and Lemma 3.15, we have \((D_1^{\star 2})^\perp \subseteq (C_1^{\star 2})^\perp =\langle y\rangle \) for some \(y\in C_1\). This implies \(D_1\cap (D_1^{\star 2})^\perp =\langle y\rangle \) because \((D_1,D)\in {\mathcal {P}}\). By the choice of \(D_1\) and the first part of the proof, \(D_1\star y =D_1^\perp \), and we also have \(C_1\star y=C_1^\perp \). Thus,

$$\begin{aligned} C_1\star y\subset D_1\star y = D_1^\perp \subset C_1^\perp \Rightarrow D_1^\perp =C_1^\perp , \end{aligned}$$

and we get \(D_1=C_1\).

To prove (2), observe that \((D_1,D_2)\in {\mathcal {P}}\) is such that \(C_2\subset D_2\) if and only if there is \(y\notin C_2\) such that \((C_2+\langle y\rangle ,C_2)\in {\mathcal {P}}\) by Corollary 3.1. This happens if and only if \(y\in (C_2^\perp \cap (C_2^{\star 2})^\perp ){\setminus } C_2\) by Proposition 3.6. However, \((C_2^{\star 2})^\perp \subset C_2^\perp \) and thus, \(y\in (C_2^{\star 2})^\perp {\setminus } C_2\). If there is not such y, it means that \((C_2^{\star 2})^\perp = C_2\) and by Corollary 3.13 we have the conclusion. \(\square \)

Example 3.18

Let

$$\begin{aligned} G=\begin{pmatrix} 1&{}\quad 1&{}\quad 1&{}\quad 1&{}\quad 1&{}\quad 1&{}\quad 1&{}\quad 1\\ 1&{}\quad 1&{}\quad 1&{}\quad 1&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 0\\ 1&{}\quad 1&{}\quad 0&{}\quad 0&{}\quad 1&{}\quad 1&{}\quad 0&{}\quad 0\\ 1&{}\quad 0&{}\quad 1&{}\quad 0&{}\quad 1&{}\quad 0&{}\quad 1&{}\quad 0\end{pmatrix} \end{aligned}$$

and C be the code generated by G. We can check that \(C^{\star 2}=\langle \mathbbm {1}\rangle ^\perp \), \(C=C^\perp \) and, thus, \((C,\langle \mathbbm {1}\rangle )\in {\mathcal {P}}\) and there is no other CSS-T pair \((D_1,D_2)\) with \(C_1\subsetneq D_1\).

Corollary 3.19

If \((C_1,C_2)\in {\mathcal {P}}\) and there is no \(D_1\supsetneq C_1\) and \(D_2\) such that \((D_1,D_2)\in {\mathcal {P}}\), then for some \(y\in C_1\), \(C_2=\langle y\rangle \) and \((C_1,C_2)\) is maximal.

4 Cyclic codes

We now illustrate the results from the previous sections using cyclic codes (and extended cyclic codes). We will review cyclic codes over \({{\mathbb {F}}}_q\), but note that we restrict to the case \(q=2\) whenever we refer to CSS-T codes.

Take an integer \(s>1\) and consider the field extension \(\mathbb {F}_{q^s} / \mathbb {F}_q\). We set n with \(n\mid q^s-1\) and \(g\in \mathbb {F}_q[x]\) such that g divides \(x^n-1\). We denote by \(C_g\) the cyclic code with g as its generator polynomial. Let \(\beta \in {{\mathbb {F}}}_{q^s}\) be a primitive n-th root of unity. For the set \({\mathbb {Z}_{n}}:=\mathbb {Z}/n\mathbb {Z}\), we will consider the representatives between 1 and n, i.e., \({\mathbb {Z}_{n}}=\{1,2,\dots ,n\}\).

Definition 4.1

The defining set is given by \(J:= \{j\in {\mathbb {Z}_{n}}: g(\beta ^j)=0\}\) and the generating set by \(I:=\{i\in {\mathbb {Z}_{n}}: g(\beta ^i)\ne 0\}\).

Note that \(J=[n]\setminus I\), and

$$\begin{aligned} g=\prod _{j\in J}(x-\beta ^j)=\frac{x^n-1}{\prod _{i\in I}(x-\beta ^i)}. \end{aligned}$$

Define \(-I:=\{n-i: i \in I\}\subset {\mathbb {Z}_{n}}.\) Let \({\mathcal {M}}\subset \mathbb {Z}_{\ge 0}\) be a finite set. We consider the \({{\mathbb {F}}}_{q^s}\)-linear subspace

$$\begin{aligned} {\mathcal {L}}({\mathcal {M}}):=\langle x^i: i\in {\mathcal {M}} \rangle \subset \mathbb {F}_{q^s}[x]. \end{aligned}$$

Take a set of points \(X=\{P_1,\dots ,P_{\Vert {X}\Vert }\}\subset {{\mathbb {F}}}_{q^s}\). We can define the following evaluation map associated to X:

$$\begin{aligned} \begin{array}{cccl} {\text {ev}}_X :&{}{{\mathbb {F}}}_{q^s}[x]&{}\rightarrow &{} {{\mathbb {F}}}_{q^s}^{\Vert {X}\Vert } \\ &{}f &{}\mapsto &{} \left( f(P_1),\dots ,f(P_{\Vert {X}\Vert })\right) . \end{array} \end{aligned}$$

Let \(X_n:=\{1,\beta ,\dots ,\beta ^{n-1}\}\), i.e., \(X_n\) is the zero locus of \(x^{n}-1\) in \({{\mathbb {F}}}_{q^s}\). We now consider the associated evaluation code

$$\begin{aligned} B({\mathcal {M}}):={\text {ev}}_{X_n}({\mathcal {L}}({\mathcal {M}}))=\{(f(1),f(\beta ),\dots ,f(\beta ^{n-1})): f\in {\mathcal {L}}({\mathcal {M}})\}\subset \mathbb {F}_{q^s}^n, \end{aligned}$$

and we define

$$\begin{aligned} C(I):=B(-I)\cap \mathbb {F}_{q}^n. \end{aligned}$$

From [5], we obtain that \(C_g=C(I)\), i.e., we have a description of cyclic codes in terms of subfield subcodes of evaluation codes.

The definitions clearly show that J and I are closed under multiplication by q, which leads to the following definition.

Definition 4.2

Given a subset \(I\subset {\mathbb {Z}_{n}}\), denote \(q\cdot I: =\{q\cdot i: i \in I\}\). We say that I is a cyclotomic coset if \(I=q\cdot I\). Let \(a\in {\mathbb {Z}_{n}}\), the set \({\mathfrak {I}}_a:=\{q^j \cdot a: j\ge 0 \}\subset {\mathbb {Z}_{n}}\) is the minimal cyclotomic coset associated to a.

Example 4.3

Let \(q=2\), \(s=4\), and \(n=15\). Then, the minimal cyclotomic cosets are

$$\begin{aligned} {\mathfrak {I}}_1=\{1,2,4,8\},\; {\mathfrak {I}}_3=\{3,6,12,9\},\; {\mathfrak {I}}_5=\{5,10\}, \; {\mathfrak {I}}_7=\{7,14,13,11\},\; {\mathfrak {I}}_{15}=\{15\}. \end{aligned}$$

From [5], we have the following result about the dual of a cyclic code.

Theorem 4.4

Let \(I\subset {\mathbb {Z}_{n}}\) be a cyclotomic coset. We have that

$$\begin{aligned} C(I)^\perp =C(-J). \end{aligned}$$

This last result can be seen as a consequence of the following fact from [5]: If I is a cyclotomic coset, then

$$\begin{aligned} (B(-I)\cap {{\mathbb {F}}}_{q}^n )^\perp = (B(-I)^\perp )\cap {{\mathbb {F}}}_{q}^n. \end{aligned}$$
(1)

The length of C(I) is n, and its dimension is \(\Vert {I}\Vert \). For the minimum distance, we need the following definition.

Definition 4.5

The amplitude of a nonempty subset \(I\subset {\mathbb {Z}_{n}}\) is

$$\begin{aligned} {{\,\textrm{Amp}\,}}(I):=\min \{i\in {{\mathbb {N}}}: \exists c\in {\mathbb {Z}_{n}}\text { such that } I\subset \{c,c+1,\dots ,c+i-1 \} \}. \end{aligned}$$

Then, the minimum distance of C(I) is greater than or equal to \(n-{{\,\textrm{Amp}\,}}(I)+1\); for example, see [10]. Summarizing, C(I) has parameters

$$\begin{aligned}{}[n,\,\Vert {I}\Vert ,\,\ge n-{{\,\textrm{Amp}\,}}(I)+1]. \end{aligned}$$

Since \({{\,\textrm{Amp}\,}}(-J)={{\,\textrm{Amp}\,}}(J)\), we see that \(C(I)^\perp \) has parameters \([n,\,\Vert {J}\Vert ,\,\ge n-{{\,\textrm{Amp}\,}}(J)+1]\). Note that \(n-{{\,\textrm{Amp}\,}}(J)+1\) is equal to the usual BCH bound, i.e., it is equal to \(\delta (I)+1\), where \(\delta (I)\) is the maximum number of consecutive elements in I.

Given \(I_1,I_2\subset {\mathbb {Z}_{n}}\), we consider their Minkowski sum

$$\begin{aligned} I_1+I_2:=\{ i_1+i_2: i_1\in I_1,\; i_2\in I_2 \}\subset {\mathbb {Z}_{n}}. \end{aligned}$$
(2)

It is easy to check that if \(I_1, I_2\subset {\mathbb {Z}_{n}}\) are cyclotomic cosets, then \(I_1+I_2\) is also a cyclotomic coset. Following the previous notation, we will denote \(J_i=[n]\setminus I_i\), for \(i=1,2\).

Example 4.6

Continuing with Example 4.3, we consider

$$\begin{aligned} I_1=\{1,2,4,8,15\},\; I_2=\{1,2,4,8\}. \end{aligned}$$

We compute the following Minkowski sums, which we will use in the following examples:

$$\begin{aligned} I_1+I_2=\{1,2,3,4,5,6,8,9,10,12\}, \; I_1+I_1=(I_1+I_2)\cup \{15\}. \end{aligned}$$

Note that \(I_1+I_2={\mathfrak {I}}_1\cup {\mathfrak {I}}_3\cup {\mathfrak {I}}_5\), i.e., \(I_1+I_2\) is also a cyclotomic coset.

The following result from [11] shows that the sum and the Schur product of cyclic codes is also a cyclic code.

Lemma 4.7

Let \(I_1\) and \(I_2\) be cyclotomic cosets. Then

$$\begin{aligned} \begin{aligned}&C(I_1)+C(I_2)=C(I_1 \cup I_2),\\&C(I_1)\star C(I_2)= C(I_1+I_2). \end{aligned} \end{aligned}$$

As an application of Theorem 2.3, we obtain the following criterion for a pair of cyclic codes to be a CSS-T pair.

Theorem 4.8

Let \(I_1, I_2\subset {\mathbb {Z}_{n}}\) be cyclotomic cosets. Then \((C(I_1),C(I_2))\) is a CSS-T pair if and only if:

  1. (1)

    \(I_2\subset I_1\) and

  2. (2)

    \(n\not \in (I_1+I_1+I_2)\).

The parameters of the corresponding quantum code are \([[n,\Vert {I_1}\Vert -\Vert {I_2}\Vert ,\ge n-{{\,\textrm{Amp}\,}}(J_2)+1]]\).

Proof

We use the third equivalent condition from Theorem 2.3 with \(C_1=C(I_1)\) and \(C_2=C(I_2)\). We have

$$\begin{aligned} C(I_2)\subset C(I_1)\iff I_2\subset I_1, \end{aligned}$$

and

$$\begin{aligned} \begin{aligned} C(I_2)\subset (C(I_1)^{\star 2})^\perp&\iff \mathbbm {1} \in (C(I_1)^{\star 2}\star C(I_2))^\perp =C(I_1+I_1+I_2)^\perp \\&\iff \mathbbm {1} \in B(-(I_1+I_1+I_2))^\perp \iff n\not \in I_1+I_1+I_2, \end{aligned} \end{aligned}$$

as follows from (1) and Lemma 4.7. Also, the last equivalence follows from [12, Prop. 1]. We use Corollary 2.5 for the parameters of the quantum code. \(\square \)

Remark 4.9

Theorem 4.8 also holds if we substitute condition (2) with

  1. (2’)

    \(I_1+I_1\subset -J_2\).

This is because

$$\begin{aligned} C(I_2)\subset (C(I_1)^{\star 2})^\perp =C(I_1+I_1)^\perp \iff I_1+I_1\subset -J_2. \end{aligned}$$

As \(I_2\subset I_1\), from Theorem 4.8, we obtain the necessary condition \(n\not \in I_2\) for \((C(I_1),C(I_2))\) to be a CSS-T pair. This happens if and only if \(n\in -J_2\). Hence, if the pair \(I_1, I_2\) satisfies the conditions from Theorem 4.8, then the pair \(I_1\cup \{n\}, I_2\) also satisfies those conditions. This is a translation of the following fact that we have seen in the previous section: If \((C_1, C_2)\) is a CSS-T pair, then \((C_1+\langle \mathbbm {1}\rangle , C_2)\) is also a CSS-T pair.

Example 4.10

We consider \(I_1,I_2\) as in Example 4.6. Clearly \(I_2\subset I_1\). From the computation of \(I_1+I_2\) in Example 4.6, we obtain

$$\begin{aligned} I_1+I_1+I_2=[n-1]=\{1,2,\dots ,14\}. \end{aligned}$$

By Theorem 4.8, we have that \((C(I_1),C(I_2))\) is a CSS-T pair with parameters [[15, 1, 3]]. Note that we have recovered the (punctured) quantum Reed–Muller code mentioned in the introduction.

In Sect. 3, we studied conditions for a CSS-T pair to be maximal in each component. The following result shows how we can translate those conditions to cyclic codes.

Corollary 4.11

Let \(I_1,I_2\subset {\mathbb {Z}_{n}}\) be cyclotomic cosets such that \((C(I_1),C(I_2))\) is a CSS-T pair. Then the pair \((C(I_1),C(I_2))\) is maximal in \(C_1\) if and only if

$$\begin{aligned} -J_1=I_2\cup (I_1+I_2), \end{aligned}$$

is maximal in \(C_2\) if and only if

$$\begin{aligned} -J_2=(-J_1)\cup (I_1+I_1), \end{aligned}$$

and is maximal if and only if

$$\begin{aligned} -J_1=I_1+I_2 \text {~and~} -J_2=I_1+I_1. \end{aligned}$$

Proof

The conditions for maximality in \(C_1\) and \(C_2\) follow from Corollary 3.10 and Proposition 3.5, respectively, taking into account Theorem 4.4 and Lemma 4.7. The condition for maximality follows similarly from Theorem 3.11. \(\square \)

Example 4.12

Continuing with the setting from Example 4.10, it is easy to check, using Example 4.6, that \(-J_1=I_1+I_2\) and \(-J_2=I_1+I_1\). Therefore, by Corollary 4.11, the CSS-T pair \((C(I_1),C(I_2))\) is maximal.

From Corollary 2.5, we see that it is desirable to find CSS-T pairs \((C_1, C_2)\) such that \(C_1^{\star 2}\) has a large minimum distance. In [10], it is shown that the construction of cyclic codes based on the notion of restricted weight can give rise to codes C such that both C and \(C^{\star 2}\) have excellent parameters. It is, therefore, interesting to study when we can use these codes for constructing CSS-T pairs. We briefly explain the construction from [10] and then obtain CSS-T codes from this construction. In what follows, we assume that \(n=q^s-1\).

Definition 4.13

Let \(a\in [n]\) have q-ary representation \((a_{s-1},a_{s-2},\dots ,a_{0})_q\), and let \(1\le t\le s\). The t-restricted weight of a is defined as

$$\begin{aligned} w_q^{(t)}(a):=\max _{i\in \{0,\dots ,s-1\}}\sum _{j=0}^{t-1}a_{i+j}, \end{aligned}$$

where we consider the sum \(i+j\) modulo s. In other words, it is the maximum number of nonzero elements for any sequence of t (cyclically) consecutive digits of the q-ary representation of a.

The t-restricted weight is invariant under multiplication by q, and we can speak about the t-restricted weight of a minimal cyclotomic coset. It is shown in [10, Prop. 11] that

$$\begin{aligned} w_q^{(t)}(a)\le w_q^{(t)}(b)+ w_q^{(t)}(c), \end{aligned}$$

for \(b,c\in [n]\) and \(a=b+c\bmod n\). Therefore, given cyclotomic cosets \(I_1,I_2\subset {\mathbb {Z}_{n}}\) whose elements have t-restricted weight at most \(\mu _1,\mu _2\), respectively, the cyclotomic coset \(I_1+I_2\) will have t-restricted weight at most \(\mu _1+\mu _2\). Let \(I^t_{\le \mu }:=\{a\in {\mathbb {Z}_{n}}: w_q^{(t)}(a)\le \mu \}\). In [10, Prop. 13], it is proven that for \(a\in I^t_{\le \mu }\), we have \(w_q^{(s)}(a)\le \lfloor (\mu s)/t\rfloor \). This motivates the following construction.

Corollary 4.14

Take \(1\le t\le s\) and \(1\le \mu _1,\mu _2\le t\). If \(\mu _2\le \mu _1\) and \(2\lfloor (\mu _1 s)/t\rfloor +\lfloor (\mu _2 s)/t\rfloor \le s-1\), then \((C(I^t_{\le \mu _1}),C(I^t_{\le \mu _2}))\) is a CSS-T pair.

Proof

We use Theorem 4.8 with \(I_i=I^t_{\le \mu _i}\), for \(i=1,2\). As \(\mu _2\le \mu _1\), we have \(I_2\subset I_1\). We claim that \(n\not \in I_1+I_1+I_2\). Indeed, let \(z=a+b+c \bmod n\), with \(a,b\in I_1\), \(c\in I_2\). By the previous discussion,

$$\begin{aligned} w_2^{(s)}(z)= & {} w_2^{(s)}(a+b+c)\le w_2^{(s)}(a)+w_2^{(s)}(b)+w_2^{(s)}(c)\\\le & {} 2\lfloor (\mu _1 s)/t\rfloor +\lfloor (\mu _2 s)/t\rfloor \le s-1. \end{aligned}$$

Since \(w_2^{(s)}(n)=s\), we conclude that \(n\not \in I_1+I_1+I_2\), and the result follows from Theorem 4.8. \(\square \)

Note that, by Remark 4.9, we can also consider \(C_1=C(I^t_{\le \mu _1}\cup \{n\})\) for the previous result. For the parameters of the corresponding CSS-T code, in [10], there are formulas for the parameters of \(C(I^t_{\le \mu })\) in some cases, and we can also use the usual bounds for cyclic codes.

Example 4.15

It is easy to check that \(I_1\) and \(I_2\) from Example 4.6 are precisely

$$\begin{aligned} I_1=I^4_{\le \mu _1}\cup \{15\} \qquad \text {and} \qquad I_2=I^4_{\le \mu _2} \end{aligned}$$

with \(\mu _1=\mu _2=1\). Note that, for \(t=s=4\), the conditions from Corollary 4.14 are satisfied. Therefore, \((C(I^4_{\le \mu _1}), C(I^4_{\le \mu _2}))\) is a CSS-T pair, which implies that \((C(I_1), C(I_2))\) is a CSS-T pair (which we already knew by Example 4.10).

4.1 Extended cyclic codes

We define \({\hat{\mathbb {Z}}_{n}}:=\{0\}\cup {\mathbb {Z}_{n}}\). We will adapt the definitions from the previous section for this setting. Let \(I\subset {\hat{\mathbb {Z}}_{n}}\). We say that I is a cyclotomic coset if \(I=q\cdot I\). For \(I_1, I_2\subset {\hat{\mathbb {Z}}_{n}}\), we define \(I_1+I_2\) as in (2), where we understand that \(i_1+i_2=0\) if and only if \(i_1=i_2=0\), for \(i_1\in I_1\) and \(i_2\in I_2\), and the rest of the sums are computed as usual in \({\mathbb {Z}_{n}}=\{1,\dots ,n\}\). We denote by \(J:={\hat{\mathbb {Z}}_{n}}\setminus I\).

For \({\mathcal {M}}\subset \{0,\dots ,n\}\), we consider \({\hat{X}}_n:=\{0\}\cup X_n\), the zero locus of \(x^{n+1}-x\), and we define

$$\begin{aligned} {\hat{B}}({\mathcal {M}}):={\text {ev}}_{{\hat{X}}_n}({\mathcal {L}}({\mathcal {M}}))= \{(f(0),f(1),f(\beta ),\dots ,f(\beta ^{n-1})): f\in {\mathcal {L}}({\mathcal {M}})\}\subset \mathbb {F}_{q^s}^{n+1}. \end{aligned}$$

For \(I\subset {\hat{\mathbb {Z}}_{n}}\) a cyclotomic coset, the extended cyclic code associated with I is

$$\begin{aligned} {\hat{C}}(I):={\hat{B}}(I)\cap \mathbb {F}_{q}^{n+1}. \end{aligned}$$

Note that in this case, we are not considering \(-I\). With respect to the parameters, \({\hat{C}}(I)\) has parameters \([n+1,\Vert {I}\Vert ,\ge n-\max (I)+1]\), and \({\hat{C}}(I)^\perp \) has parameters \([n+1,n+1-\Vert {I}\Vert ,\ge \delta (I)+1]\), where \(\delta (I)\) is the maximum number of consecutive elements in I as before. (It is a BCH-type bound for extended cyclic codes.)

Although these codes are no longer cyclic, they still preserve some of the properties of cyclic codes. The proof of the following result is analogous to the one in [10, Thm. 1].

Lemma 4.16

Let \(I_1, I_2\subset {\hat{\mathbb {Z}}_{n}}\) be cyclotomic cosets. Then

$$\begin{aligned} \begin{aligned}&{\hat{C}}(I_1)\star {\hat{C}}(I_2) ={\hat{C}}(I_1+I_2). \end{aligned} \end{aligned}$$

As a consequence, one can check that Theorem 4.8 and Corollary 4.14 also hold when we consider extended cyclic codes. Moreover, for extended cyclic codes, one may also allow \(\mu _1=0\) or \(\mu _2=0\) in Corollary 4.14. When considering the s-restricted weight, in [10, Prop. 10], it is shown that Corollary 4.14 for extended cyclic codes corresponds to the family of CSS-T pairs obtained by using binary Reed–Muller codes from [2]. Nevertheless, by considering the t-restricted weight, with \(t<s\), we obtain different families of CSS-T codes. Moreover, considering the general case from Theorem 4.8, it is clear that we obtain a much larger family of CSS-T pairs than by using binary Reed–Muller codes, thus obtaining a wider range of parameters. In the following example, we show that we can improve the parameters of the CSS-T codes obtained with binary Reed–Muller codes in some cases. All the computations from the following examples were done using SageMath [24].

Example 4.17

We use a greedy construction to obtain CSS-T codes with cyclic codes, and we compare them with the CSS-T codes obtained with binary Reed–Muller codes. Let \(s>1\), \(n=2^s-1\), and we consider the cyclotomic cosets associated with the extension \({{\mathbb {F}}}_{2^s}/{{\mathbb {F}}}_2\). Assume that \({\mathbb {Z}_{n}}={\mathfrak {I}}_{a_1}\cup {\mathfrak {I}}_{a_2}\cup \cdots \cup {\mathfrak {I}}_{a_\ell }\), with \(1=a_1<a_2<\cdots a_\ell \). We consider the following greedy construction: let \(I_2:= {\mathfrak {I}}_{a_1}\cup {\mathfrak {I}}_{a_2}\cup \cdots \cup {\mathfrak {I}}_{a_t}\), for some \(t< \ell \) such that \(n\not \in I_2+I_2+I_2\), and let \(I_1^{(0)}:= I_2\). If \(I'_1:= I_1^{(0)}\cup {\mathfrak {I}}_{a_{t+1}}\) satisfies \(n\not \in I'_1+I'_1+I_2\), we set \(I_1^{(1)}:= I'_1\), and we set \(I_1^{(1)}:= I_1^{(0)}\) otherwise. Following this procedure until we cannot add any more minimal cyclotomic cosets, we will get a cyclotomic coset \(I_1^{(u)}\), for some \(t\le u <\ell \), such that \(n\not \in I_1^{(u)}+I_1^{(u)}+I_2\). Therefore, by Theorem 4.8 and Remark 4.9, we get that \((C(I_1^{(u)}\cup \{n\}),C(I_2))\) is a CSS-T pair. Moreover, we have the BCH bound

$$\begin{aligned} {{\,\textrm{wt}\,}}(C(I_2)^\perp )\ge n-{{\,\textrm{Amp}\,}}(J_2)+1=\delta (I_2)+1=a_{t+1}, \end{aligned}$$

which bounds the minimum distance of the corresponding quantum code by Corollary 2.5. Note that this construction can be easily generalized to extended cyclic codes.

For \(s\le 6\), the CSS-T codes obtained with the previous construction do not improve the parameters of the CSS-T codes obtained with binary Reed–Muller codes. Nevertheless, for \(s=7,8,9,10\), we show in Table 1 that we can obtain a broader range of parameters using cyclic and extended cyclic codes, and some of these codes outperform the ones derived from binary Reed–Muller codes. For all the codes in Tables 1 and 2, we have checked that the bound for the minimum distance is sharp.

Table 1 Parameters of the CSS-T codes obtained with binary Reed–Muller, cyclic and extended cyclic codes (using the greedy construction)

Using Remark 3.13 from [4], it is easy to see that, for n even, if we consider \(e_i\), \(1\le i\le n\), the standard basis vectors in \({{\mathbb {F}}}_{2}^n\), and the code

$$\begin{aligned} C=\langle e_{2i-1}+e_{2i},\; 1\le i\le n/2 \rangle , \end{aligned}$$

then \((C,\langle \mathbbm {1}\rangle )\) is a CSS-T pair with parameters

$$\begin{aligned}{}[[n,n/2-1,2]]. \end{aligned}$$
(3)

This code has better parameters than the CSS-T codes with minimum distance 2 derived from binary Reed–Muller, cyclic, or extended cyclic codes in the cases we have checked. Therefore, we have omitted the codes with minimum distance 2 from Table 1 and the ones with dimension 0.

For a direct comparison, we can see that the CSS-T codes obtained from binary Reed–Muller codes with parameters [[128, 21, 4]], [[512, 120, 4]], [[512, 84, 8]] and [[1024, 120, 8]] are outperformed by the CSS-T codes derived from extended cyclic codes with parameters [[128, 28, 4]], [[512, 147, 4]], [[512, 102, 8]] and [[1024, 190, 8]], respectively.

Example 4.18

Not all the codes from the previous example are maximal with respect to \(C_1\). Therefore, it is possible to use our Corollary 3.9 to increase the dimension of the corresponding quantum code in some cases. For example, one can check that the CSS-T code with parameters [[255, 21, 7]] from Table 1 is not maximal with respect to the first component using Corollary 3.10. By Proposition 3.6, this means that there is some vector \(y\in C_2^\perp \cap (C_1\star C_2)^\perp \) such that \(y\not \in C_1\) and \((C_1+\langle y \rangle , C_2)\) is a CSS-T pair. The parameters of the corresponding quantum code are [[255, 22, 7]] by Corollary 3.9, increasing the dimension of the quantum code by 1. By computer search, we have found a vector y such that \((C_1+\langle y \rangle , C_2)\) is still not maximal with respect to the first component. Hence, there is a vector \(y'\) such that \((C_1+\langle y,y' \rangle , C_2)\) is a CSS-T pair with parameters [[255, 23, 7]], increasing the dimension of the original quantum code by 2. In the cases where we have found such \(y,y'\), the pair \((C_1+\langle y,y' \rangle , C_2)\) is maximal with respect to the first component, and we cannot continue to increase the dimension using Corollary 3.9.

In Table 2, we show the codes that can be derived from CSS-T codes using binary Reed–Muller codes, cyclic codes and extended cyclic codes (with the greedy construction from Example 4.17) by applying Corollary 3.9 for length \(2^s\), \(s=4,\dots ,10\) (\(2^s-1\) for cyclic codes). All the codes in Table 2 are maximal with respect to the first component of the CSS-T pair, although it might be possible to improve them further since there are many choices for the vectors that we add to \(C_1\) in Corollary 3.9. We note that the CSS-T codes derived from cyclic and extended cyclic codes still outperform the improved CSS-T codes arising from Reed–Muller codes. The parity check matrices of the classical codes used to construct the quantum codes from Tables 1 and 2 can be found in the GitHub repository RodrigoSanJose/Cyclic-CSS-T [9].

Table 2 Parameters of improved CSS-T codes obtained with binary Reed–Muller, cyclic and extended cyclic codes (using the greedy construction)

5 Relation to triorthogonal codes

Another family of codes that is usually studied for fault-tolerant computation, and, in particular, for magic state distillation, are triorthogonal codes [6, 17]. A binary matrix G of size \(m\times n\) is called triorthogonal if \({{\,\textrm{wt}\,}}(G_a\star G_b)=0 \bmod 2\), for all pairs of rows \(1\le a < b \le m\), and \({{\,\textrm{wt}\,}}(G_a\star G_b\star G_c)=0\bmod 2\), for all triples of rows \(1\le a<b <c \le m\). With such a matrix, by taking \(C_1\) to be the linear span of G and \(C_2\) the linear span of the even-weighted rows of G, one can construct a quantum code (which we will call triorthogonal code) such that, when a transversal T gate is applied to it, it induces a transversal T gate on the logical qubits, up to Clifford corrections. This is stronger than having a CSS-T code, since the definition of CSS-T only requires the physical transversal T to induce some logical operation on the logical qubits. If one wants to avoid the Clifford corrections, some weight conditions have to be imposed on the classical codes used (see [21, Thm. 4]). From our results, we can obtain the following.

Corollary 5.1

If \((C_1, C_2)\) is a CSS-T pair, then \(\mathbbm {1} \in (C_2^{\star 3})^\perp \).

Proof

As \(C_2\subseteq C_1\), Corollary 3.1 implies that \((C_2,C_2)\) is a CSS-T pair. Thus, \(C_2^{\star 2}\subset C_2^\perp \) by Theorem 2.3, meaning that \(\mathbbm {1} \in (C_2^{\star 3})^\perp \). \(\square \)

Having \(\mathbbm {1} \in (C_2^{\star 3})^\perp \) implies that \(C_2\) has a triorthogonal generator matrix, which is also the case for triorthogonal codes due to the fact that, in that setting, the generator matrix for \(C_2\) is a submatrix of a triorthogonal matrix.

Since the triorthogonality condition is stronger than being CSS-T, it may be possible that CSS-T codes achieve better parameters than triorthogonal codes. To see this, we consider the scaling exponent of the distillation protocol presented in [6]. They obtain that

$$\begin{aligned} \gamma =\frac{\log _2(n/k)}{\log _2(d)}, \end{aligned}$$

for an [[nkd]] triorthogonal code. Since the distillation overhead scales as \(O(\log ^\gamma (1/\epsilon ))\), where \(\epsilon \) is the output accuracy (see [6] for details), codes with lower \(\gamma \) are preferred. We will use this value for CSS-T codes to compare the goodness of their parameters with some of the triorthogonal codes in the literature. In [6], the authors find a family of triorthogonal codes with parameters \([[3k+8,k,\ge 2]]\), where k is even. The CSS-T codes from (3) have strictly better parameters. In particular, the scaling exponent \(\gamma \) tends to 1 for the codes in (3), while the family from [6] has scaling exponent tending to \(\log _2(3) \approx 1.585\). In [6] they also obtain a code with parameters [[49, 1, 5]], and \(\gamma =2.418\). If we compare with the codes in our tables, in particular, the codes [[32, 4, 4]] and [[1024, 192, 8]] (to take an example of a short code and a long code), we obtain for \(\gamma \) the values 1.5 and 0.805, respectively.

In [17], the authors find triorthogonal codes with parameters [[35, 3, 3]] and [28, 2, 3]], with scaling exponent equal to 2.236 and 2.402, respectively, which are higher values than the one we obtained for [[32, 4, 4]]. Moreover, the authors in [17] prove that there is no triorthogonal quantum code with minimum distance larger than 3 when \(n+k\le 38\), while [[32, 4, 4]] satisfies these last two conditions (but it is not triorthogonal, only CSS-T). Furthermore, in [16], triorthogonal codes with \(\gamma < 1\) are found, but they require at least \(\approx 2^{58}\) qubits. With CSS-T, codes it is possible to find codes with \(\gamma <1\) and a much lower number of qubits, for example the code [[1024, 192, 8]] we showed before. The shorter CSS-T code that we find with \(\gamma <1\) is the code with parameters [[256, 84, 4]], which has \(\gamma =0.804\). This shows that one can indeed obtain better parameters by relaxing the conditions on the classical codes and requiring them to be CSS-T instead of triorthogonal. We reiterate that this discussion is purely in terms of parameters, since triorthogonal codes implement the logical T gate, while for CSS-T codes we only require that they support a transversal T gate.

6 Conclusion

In this paper, we considered binary CSS-T codes, which are quantum stabilizer codes that respect a transversal gate. We provided a straightforward characterization of binary CSS-T codes and used it to demonstrate that CSS-T codes form a poset. We determined maximal and minimal elements of this poset as well as elements which are maximal with respect to one code in a CSS-T pair. We demonstrated a propagation rule for nondegenerate CSS-T codes. We used cyclotomic cosets to characterize CSS-T pairs from cyclic codes. Moreover, we obtained quantum codes with better parameters than those in the literature, using cyclic and extended cyclic codes. A number of related open problems remain, such as determining a similar characterizations of q-ary CSS-T codes and considering other families of classical codes to construct CSS-T codes.