Quantum Anticodes cover

Quantum Anticodes

ChunJun Cao 1^{1}1
1^{1}1 Virginia Tech, Blacksburg, VA, U.S.A.
Giuseppe Cotardo 1^{1}1
1^{1}1 Virginia Tech, Blacksburg, VA, U.S.A.
Brad Lackey 2^{2}2
2^{2}2 Microsoft Quantum, Redmond, WA, U.S.A.

Abstract

This work introduces a symplectic framework for quantum error correcting codes in which local structure is analyzed through an anticode perspective. In this setting, a code is treated as a symplectic space, and anticodes arise as maximal symplectic subspaces whose elements vanish on a prescribed set of components, providing a natural quantum analogue of their classical counterparts. This framework encompasses several families of quantum codes, including stabilizer and subsystem codes, provides a natural extension of generalized distances in quantum codes, and yields new invariants that capture local algebraic and combinatorial features. The notion of anticodes also naturally leads to operations such as puncturing and shortening for symplectic codes, which in turn provide algebraic interpretations of key phenomena in quantum error correction, such as the cleaning lemma and complementary recovery and yield new descriptions of weight enumerators.

1. Symplectic Spaces

In this section, we recall some definitions and properties of symplectic spaces, following the general reference [20], and we derive several preliminary results that will be used in the subsequent sections. Throughout this section, we let nnn be a non-negative integer and we let VVV be a (2n)(2n)(2n)-dimensional vector space over a field F\mathbb{F}F. We use the term subspace or the symbol ≤\leq≤ to mean F\mathbb{F}F-linear subspace.

Definition

Let ω:V×V→F\omega : V \times V \to \mathbb{F}ω:V×V→F be a bilinear map. We say ω\omegaω is nondegenerate if ω(u,v)=0\omega(u, v) = 0ω(u,v)=0 for all v∈Vv \in Vv∈V implies that u=0u = 0u=0. We say ω\omegaω is skew-symmetric if ω(u,u)=0\omega(u, u) = 0ω(u,u)=0 for all u∈Vu \in Vu∈V and we refer to the pair (V,ω)(V, \omega)(V,ω) as a symplectic space.
Although this is not the usual definition of skew-symmetry, when char⁡(F)≠2\operatorname{char}(\mathbb{F})\neq 2char(F)=2 it is equivalent to the identity ω(u,v)=−ω(v,u)\omega(u,v) = -\omega(v,u)ω(u,v)=−ω(v,u) for all u,v∈Vu,v \in Vu,v∈V; this follows immediately by expanding 0=ω(u+v, u+v)0 = \omega(u+v,\,u+v)0=ω(u+v,u+v). However in characteristic 222 the usual definition of skew-symmetry reduces to symmetry, that does not in general imply ω(u,u)=0\omega(u, u) = 0ω(u,u)=0, which motivates the definition we have adopted. Throughout the paper, we let (V,ω)(V, \omega)(V,ω) be a symplectic space and, by abuse of notation, write VVV to denote the symplectic space (V,ω)(V, \omega)(V,ω).

Definition

Let e,f∈Ve,f\in Ve,f∈V. We say that (e,f)(e,f)(e,f) is a symplectic pair if ω(e,f)=1\omega(e,f) = 1ω(e,f)=1.
For any W≤VW\leq VW≤V, we denote by ω∣W\left.\omega\right|_Wω∣W​ the restriction of ω\omegaω on WWW. We recall that, while ω\omegaω is nondegenerate on VVV, the same is generally not true for ω∣W\left.\omega\right|_Wω∣W​.

Definition

Let WWW be a subspace of VVV. We say that WWW is symplectic if ω∣W\left.\omega\right|_Wω∣W​ is nondegenerate. We say that WWW is isotropic if ω∣W=0\left.\omega\right|_W=0ω∣W​=0.
In other words, WWW is isotropic if every vector in WWW is orthogonal to every other vector in WWW. Note that this definition is not exhaustive; a general subspace WWW will be neither symplectic nor isotropic, but will have a symplectic part and an isotropic part, as we will shortly see.

Remark

Observe that if WWW is isotropic then each of its subspaces is also isotropic. The same does not hold for the symplectic property. However, the symplectic property is stable in that if W≤VW \leq VW≤V is symplectic as a subspace of VVV, then it remains symplectic when viewed as a subspace of UUU, for any W≤U≤VW\leq U \leq VW≤U≤V.
For a subspace W≤VW\leq VW≤V, we denote by W⊥W^\perpW⊥ the orthogonal of WWW in VVV with respect to ω\omegaω. We introduce the following definitions and results, following [20].

Definition

The radical of W≤VW\leq VW≤V is rad(W)=W∩W⊥\textup{rad}(W)=W\cap W^\perprad(W)=W∩W⊥.
It is clear that the radical is an isotropic subspace of WWW. It is worth noting that, in the context of coding theory, the radical is often referred to as the hull. This concept was first introduced in connection with coding theory and combinatorial designs, where it played a key role in determining when a code gives rise to a design and in classifying its structural properties (see [21, 22]). More recently, in [23], the hull was employed to investigate the properties and establish the existence of new optimal entanglement-assisted quantum error-correcting codes.

Theorem 1.1

([20], Theorems 1.3 and 3.3) Let WWW be a subspace of VVV. Then WWW admits an orthogonal decomposition (or splitting) W=rad(W)⊕KW = \textup{rad}(W) \oplus KW=rad(W)⊕K, for some K≤WK \leq WK≤W.
Since rad(W)⊕K\textup{rad}(W) \oplus Krad(W)⊕K is an orthogonal splitting of WWW, the invariants introduced below are well-defined. We denote by dim⁡F(W)\dim_\mathbb{F}(W)dimF​(W) the dimension of WWW as a F\mathbb{F}F-linear space.

Definition 1

Let W≤VW\leq VW≤V and let W=rad(W)⊕KW= \textup{rad}(W)\oplus KW=rad(W)⊕K be an orthogonal splitting of WWW. We define the dimension and the isorank of WWW to be respectively
dim⁡(W)=12dim⁡F(K),  and  irk(W)=12dim⁡F(K)+dim⁡F(rad(W)).\dim(W)=\tfrac{1}{2}\dim_\mathbb{F}(K),\ \textup{ and }\ \textup{irk}(W)=\tfrac{1}{2}\dim_\mathbb{F}(K) + \dim_\mathbb{F}(\textup{rad}(W)).
We acknowledge that defining the dimension of WWW as something other than its vector space dimension may cause some confusion. Nonetheless, this definition of dimension coincides with the dimension of WWW when viewed as a quantum code: the number of encoded logical qubits. Throughout the paper, we will consistently use dim⁡F(⋅)\dim_\mathbb{F}(\cdot)dimF​(⋅) to denote the dimension as a F\mathbb{F}F-linear space, and reserve dim⁡(⋅)\dim(\cdot)dim(⋅) for the dimension as defined above. In particular, VVV satisfies dim⁡F(V)=2n\dim_\mathbb{F}(V)= 2ndimF​(V)=2n and dim⁡(V)=irk(V)=n\dim(V) = \textup{irk}(V)=ndim(V)=irk(V)=n. We introduce the following two examples, which will be used throughout the paper to illustrate and clarify some of the main concepts.

Example 2

Let W=spanF{u,v,w}≤V=F4W = \mathrm{span}_{\mathbb{F}}\{u,v,w\} \leq V=\mathbb{F}^4W=spanF​{u,v,w}≤V=F4, with ω(u,v)=1\omega(u,v) = 1ω(u,v)=1 and ω(u,w)=ω(v,w)=0\omega(u,w) = \omega(v,w) = 0ω(u,w)=ω(v,w)=0. We have rad(W)=spanF{w}\textup{rad}(W) = \mathrm{span}_{\mathbb{F}}\{w\}rad(W)=spanF​{w}, and a simple orthogonal decomposition is
W=K⊕rad(W),K=spanF{u,v}.W = K \oplus \textup{rad}(W), \qquad K = \mathrm{span}_{\mathbb{F}}\{u,v\}.
Hence irk(K)=12dim⁡F(K)=1\textup{irk}(K) = \frac{1}{2}\dim_{\mathbb{F}}(K) = 1irk(K)=21​dimF​(K)=1, and therefore
irk(W)=12dim⁡F(K)+dim⁡F(rad(W))=2.\textup{irk}(W) = \frac{1}{2}\dim_{\mathbb{F}}(K) + \dim_{\mathbb{F}}(\textup{rad}(W)) = 2.
Clearly, spanF{v,w}\mathrm{span}_{\mathbb{F}}\{v,w\}spanF​{v,w} is an example of an isotropic subspace of WWW which, having vector space dimension 222, is maximal.

Lemma 3

Let W≤VW \leq VW≤V, and let W=rad(W)⊕KW = \textup{rad}(W) \oplus KW=rad(W)⊕K be an orthogonal splitting of WWW. Then W⊥W^\perpW⊥ orthogonally splits as W⊥=rad(W)⊕K′W^\perp = \textup{rad}(W) \oplus K'W⊥=rad(W)⊕K′, where K′K'K′ is symplectic. In particular, rad(W)⊥=W+W⊥=rad(W)⊕K⊕K′\textup{rad}(W)^\perp = W + W^\perp = \textup{rad}(W) \oplus K \oplus K'rad(W)⊥=W+W⊥=rad(W)⊕K⊕K′.
Proof: We have rad(W⊥)=W⊥∩(W⊥)⊥=rad(W)\textup{rad}(W^\perp) = W^\perp \cap (W^\perp)^\perp = \textup{rad}(W)rad(W⊥)=W⊥∩(W⊥)⊥=rad(W) and the statement easily follows.
Note that a maximal isotropic subspace WWW of VVV can have at most half the vector space dimension of VVV, that is irk(W)≤12dim⁡F(V)=dim⁡(V)\textup{irk}(W) \le \tfrac{1}{2}\dim_{\mathbb{F}}(V) = \dim(V)irk(W)≤21​dimF​(V)=dim(V). Therefore, by construction, we have dim⁡(W)≤irk(W)≤dim⁡(V)\dim(W) \le \textup{irk}(W) \le \dim(V)dim(W)≤irk(W)≤dim(V). Any symplectic subspace WWW of VVV achieves the lower bound dim⁡(W)=irk(W)\dim(W) = \textup{irk}(W)dim(W)=irk(W). Saturating the upper bound defines a class of subspaces critical to our study.

Definition 4

We say that W≤VW\leq VW≤V is a stabilizer subspace if irk(W)=dim⁡(V)\textup{irk}(W)=\dim(V)irk(W)=dim(V).
One can observe that WWW is a stabilizer subspace if it contains a maximal isotropic subspace of VVV. As one would expect, quantum stabilizer codes correspond to stabilizer subspaces, where the stabilizer of the code is precisely the radical of the associated subspace.

Example 5

Let W=spanF{r,s,t,u}<V=F8W = \mathrm{span}_\mathbb{F}\{r,s,t,u\} < V = \mathbb{F}^8W=spanF​{r,s,t,u}<V=F8, with ω(r,s)=ω(r,u)=ω(t,s)=ω(t,u)=1\omega(r,s) = \omega(r,u) = \omega(t,s) = \omega(t,u) = 1ω(r,s)=ω(r,u)=ω(t,s)=ω(t,u)=1 and ω(r,t)=ω(s,u)=0\omega(r,t) = \omega(s,u) = 0ω(r,t)=ω(s,u)=0. In coordinates defined by (r,s,t,u)(r,s,t,u)(r,s,t,u), we have
[ω∣W]=(0101−10−100101−10−10).\left[\left.\omega\right|_W\right] = \begin{pmatrix} 0 & 1 & 0 & 1\\ -1 & 0 & -1 & 0\\ 0 & 1 & 0 & 1\\ -1 & 0 & -1 & 0\end{pmatrix}.
It is not immediately clear how such a WWW can be realized. We have rad(W)=spanF{r+t,s+u}\textup{rad}(W) = \mathrm{span}_\mathbb{F}\{r+t, s+u\}rad(W)=spanF​{r+t,s+u}, and the orthogonal decomposition W=K⊕rad(W)W = K\oplus \textup{rad}(W)W=K⊕rad(W) with K=spanF{r,s}K=\mathrm{span}_\mathbb{F}\{r,s\}K=spanF​{r,s}. Hence dim⁡(W)=1\dim(W) = 1dim(W)=1 and irk(W)=3\textup{irk}(W) = 3irk(W)=3. However, WWW is not a stabilizer subspace as dim⁡(V)=4\dim(V) = 4dim(V)=4.

Theorem 2

For any W≤VW \leq VW≤V, we have rad(W)≤W⊥\textup{rad}(W) \leq W^\perprad(W)≤W⊥, with equality if and only if WWW is a stabilizer subspace.
Proof: Clearly, we have rad(W)=W∩W⊥≤W⊥\textup{rad}(W) = W \cap W^\perp \leq W^\perprad(W)=W∩W⊥≤W⊥. Let n=dim⁡F(V)n = \dim_\mathbb{F}(V)n=dimF​(V), k=dim⁡F(W)k = \dim_\mathbb{F}(W)k=dimF​(W), and s=irk(W)s = \textup{irk}(W)s=irk(W). Then dim⁡F(W⊥)=2n−k−s\dim_\mathbb{F}(W^\perp) = 2n - k - sdimF​(W⊥)=2n−k−s and dim⁡F(rad(W))=s−k\dim_\mathbb{F}(\textup{rad}(W)) = s - kdimF​(rad(W))=s−k. Therefore, dim⁡F(W⊥)−dim⁡F(rad(W))=2n−k−s−(s−k)=2(n−s)\dim_\mathbb{F}(W^\perp) - \dim_\mathbb{F}(\textup{rad}(W)) = 2n - k - s - (s - k) = 2(n - s)dimF​(W⊥)−dimF​(rad(W))=2n−k−s−(s−k)=2(n−s). In particular, this quantity is zero if and only if s=ns = ns=n.
As an immediate consequence, we have the following result.

Corollary 6

We have that W≤VW \leq VW≤V is a stabilizer subspace if and only if W⊥W^\perpW⊥ is isotropic.

Example 7

Consider the same setting as Example 2, that is V=F4V = \mathbb{F}^4V=F4 and W=spanF{u,v,w}W = \mathrm{span}_{\mathbb{F}}\{u,v,w\}W=spanF​{u,v,w}, with ω(u,v)=1\omega(u,v) = 1ω(u,v)=1 and ω(u,w)=ω(v,w)=0\omega(u,w) = \omega(v,w) = 0ω(u,w)=ω(v,w)=0. We have dim⁡(V)=2=irk(W)\dim(V) = 2 = \textup{irk}(W)dim(V)=2=irk(W), and hence WWW is a stabilizer subspace. Indeed, spanF{v,w}\mathrm{span}_{\mathbb{F}}\{v,w\}spanF​{v,w} is a maximal isotropic subspace of WWW, which is also maximal isotropic in VVV. Moreover, since ω(u,v)≠0\omega(u,v) \neq 0ω(u,v)=0, one sees that W⊥=spanF{w}W^\perp = \mathrm{span}_{\mathbb{F}}\{w\}W⊥=spanF​{w}, which coincides with rad(W)\textup{rad}(W)rad(W).
The following result establishes relations between the dimension and isorank of any subspace of VVV and those of its dual.

Proposition 8

For any W≤VW\leq VW≤V, we have
dim⁡(W⊥)=dim⁡(V)−irk(W) and irk(W⊥)=dim⁡(V)−dim⁡(W).\dim(W^\perp)= \dim(V) - \textup{irk}(W)\qquad\textup{ and }\qquad \textup{irk}(W^\perp)= \dim(V) - \dim(W).
Proof: By Lemma 3, dim⁡F(rad(W)⊥)=dim⁡F(rad(W))+dim⁡F(K)+dim⁡F(K′)\dim_\mathbb{F}(\textup{rad}(W)^\perp) = \dim_\mathbb{F}(\textup{rad}(W)) + \dim_\mathbb{F}(K) + \dim_\mathbb{F}(K')dimF​(rad(W)⊥)=dimF​(rad(W))+dimF​(K)+dimF​(K′), for some symplectic subspaces K,K′≤rad(W)⊥K, K' \leq \textup{rad}(W)^\perpK,K′≤rad(W)⊥. This implies that
dim⁡F(V)=2dim⁡F(rad(W))+dim⁡F(K)+dim⁡F(K′).\dim_\mathbb{F}(V) = 2\dim_\mathbb{F}(\textup{rad}(W)) + \dim_\mathbb{F}(K) + \dim_\mathbb{F}(K').
and we recall that the following hold:
  • (i) dim⁡F(V)=2dim⁡(V)\dim_\mathbb{F}(V) = 2\dim(V)dimF​(V)=2dim(V),
  • (ii) dim⁡(W⊥)=12dim⁡F(K′)\dim(W^\perp) = \frac{1}{2} \dim_\mathbb{F}(K')dim(W⊥)=21​dimF​(K′),
  • (iii) irk(W)=12dim⁡F(K)+dim⁡F(rad(W))\textup{irk}(W) = \frac{1}{2} \dim_\mathbb{F}(K) + \dim_\mathbb{F}(\textup{rad}(W))irk(W)=21​dimF​(K)+dimF​(rad(W)).
By substituting these expressions into equation 1, we obtain
dim⁡F(V)=2dim⁡(W⊥)+dim⁡F(K)+2dim⁡F(rad(W))=2(dim⁡(W⊥)+irk(W)),\dim_\mathbb{F}(V) = 2\dim(W^\perp) + \dim_\mathbb{F}(K) + 2\dim_\mathbb{F}(\textup{rad}(W)) = 2(\dim(W^\perp) + \textup{irk}(W)),
which proves the first part of the statement. The second part easily follows by replacing WWW with W⊥W^\perpW⊥.
Note that, for any W1≤W2≤VW_1\leq W_2\leq VW1​≤W2​≤V, we have
dim⁡F(W2)−dim⁡F(W1)=(dim⁡(W2)−dim⁡(W1))+(irk(W2)−irk(W1)).\dim_\mathbb{F}(W_2)- \dim_\mathbb{F}(W_1)= (\dim (W_2) - \dim(W_1))+ (\textup{irk}(W_2) - \textup{irk}(W_1)).
It is not hard to check that dim⁡(W1)≤dim⁡(W2)\dim (W_1) \leq \dim(W_2)dim(W1​)≤dim(W2​). In particular, let W1=rad(W1)⊕K1W_1= \textup{rad}(W_1)\oplus K_1W1​=rad(W1​)⊕K1​ and W2=rad(W2)⊕K2W_2= \textup{rad}(W_2)\oplus K_2W2​=rad(W2​)⊕K2​ be orthogonal splittings with K1≤K2K_1\leq K_2K1​≤K2​. Then
dim⁡(W1)=12dim⁡F(K1)≤12dim⁡F(K2)=dim⁡(W2).\dim(W_1)= \frac{1}{2}\dim_\mathbb{F}(K_1)\leq \frac{1}{2}\dim_\mathbb{F}(K_2)= \dim(W_2).
The following result shows that both parenthetical terms on the right-hand side of Equation 2 are non-negative, and therefore the entire quantity is non-negative as well.

Theorem 1.3

Let W1≤W2≤VW_1 \leq W_2 \leq VW1​≤W2​≤V be symplectic subspaces. We have dim⁡(W1)≤dim⁡(W2)\dim(W_1) \leq \dim(W_2)dim(W1​)≤dim(W2​) and irk(W1)≤irk(W2)\textup{irk}(W_1) \leq \textup{irk}(W_2)irk(W1​)≤irk(W2​).
Proof: Let W1=rad(W1)⊕K1W_1= \textup{rad}(W_1)\oplus K_1W1​=rad(W1​)⊕K1​ and W2=rad(W2)⊕K2W_2= \textup{rad}(W_2)\oplus K_2W2​=rad(W2​)⊕K2​ be orthogonal splittings for some K1,K2≤VK_1,K_2\leq VK1​,K2​≤V with K1≤K2K_1\leq K_2K1​≤K2​. Let k=dim⁡(W1)k=\dim(W_1)k=dim(W1​) and K1=span{e(1),f(1),…,e(k),f(k)}K_1= \textup{span}\{e^{(1)},f^{(1)},\ldots,e^{(k)},f^{(k)}\}K1​=span{e(1),f(1),…,e(k),f(k)} for some symplectic pairs e(j),f(j)∈Ve^{(j)},f^{(j)}\in Ve(j),f(j)∈V. Notice that, in general, rad(W1)\textup{rad}(W_1)rad(W1​) is not contained in rad(W2)\textup{rad}(W_2)rad(W2​). In fact, we have
W1∩rad(W2)=W1∩W2∩W2⊥⊆W1∩W2∩W1⊥=rad(W1),W_1 \cap \textup{rad}(W_2) = W_1 \cap W_2 \cap W_2^\perp \subseteq W_1 \cap W_2 \cap W_1^\perp = \textup{rad}(W_1),
and therefore we do not expect rad(W1)\textup{rad}(W_1)rad(W1​) to be fully contained in rad(W2)\textup{rad}(W_2)rad(W2​). More specifically, if e∈rad(W1)∖(W1∩rad(W2))e \in \textup{rad}(W_1) \setminus (W_1 \cap \textup{rad}(W_2))e∈rad(W1​)∖(W1​∩rad(W2​)), then eee is orthogonal to all elements of W1W_1W1​. Since e∉rad(W2)e \notin \textup{rad}(W_2)e∈/rad(W2​), there exists f∈W2∖W1f \in W_2 \setminus W_1f∈W2​∖W1​ such that the pair (e,f)(e,f)(e,f) is symplectic. Suppose we can construct d1d_1d1​ such independent symplectic pairs (e(k+j),f(k+j))(e^{(k+j)}, f^{(k+j)})(e(k+j),f(k+j)) with the property that span{e(k+1),f(k+1),…,e(k+d1),f(k+d1)}\textup{span}\{ e^{(k+1)}, f^{(k+1)}, \ldots, e^{(k+d_1)}, f^{(k+d_1)} \}span{e(k+1),f(k+1),…,e(k+d1​),f(k+d1​)} is orthogonal to K1K_1K1​. We can choose
rad(W1)=span{e(k+1),…,e(k+d1),e(k+d1+1),…,e(s)}\textup{rad}(W_1) = \textup{span}\{ e^{(k+1)}, \ldots, e^{(k+d_1)}, e^{(k+d_1+1)}, \ldots, e^{(s)} \}
for some e(k+d1+1),…,e(s)∈rad(W2)e^{(k+d_1+1)}, \ldots, e^{(s)} \in \textup{rad}(W_2)e(k+d1​+1),…,e(s)∈rad(W2​) linearly independent, with s=irk(W2)s = \textup{irk}(W_2)s=irk(W2​). We can then choose any symplectic space
K2⊇K1⊕span{e(k+1),f(k+1),…,e(k+d1),f(k+d1)},K_2 \supseteq K_1 \oplus \mathrm{span}\{e^{(k+1)}, f^{(k+1)}, \dots, e^{(k+d_1)}, f^{(k+d_1)}\},
which provides a third component contributing to the dimension of W2W_2W2​: those symplectic pairs that lie outside of W1W_1W1​ altogether. If there exist ddd such independent pairs, then
dim⁡(W2)=dim⁡(W1)+d1+d.\dim(W_2)=\dim(W_1)+d_1+d.
Similarly, in general, not all elements in rad(W2)\textup{rad}(W_2)rad(W2​) lie in W1∩rad(W2)W_1 \cap \textup{rad}(W_2)W1​∩rad(W2​). From the above argument, we have independent isotropic vectors e(k+d1+1),…,e(s)∈rad(W2)e^{(k+d_1+1)}, \dots, e^{(s)} \in \textup{rad}(W_2)e(k+d1​+1),…,e(s)∈rad(W2​). We can extend this basis so that
rad(W2)=span{e(k+d1+1),…,e(s),e(s+1),…,e(s+d2)}.\textup{rad}(W_2) = \textup{span}\{e^{(k+d_1+1)}, \dots, e^{(s)}, e^{(s+1)}, \dots, e^{(s+d_2)}\}.
Therefore, we have dim⁡FS2=s−d1−k+d2\dim_\mathbb{F} S_2 = s - d_1 - k + d_2dimF​S2​=s−d1​−k+d2​, which may be larger or smaller than dim⁡F(S1)\dim_\mathbb{F} (S_1)dimF​(S1​). Nonetheless,
irk(W2)=dim⁡(W1)+d1+d+s−d1−k+d2=irk(W1)+d2+d.\textup{irk}(W_2) = \dim (W_1) + d_1 + d + s - d_1 - k + d_2 = \textup{irk}(W_1) + d_2 + d.
This concludes the proof.
Recall that the vector space dimension, when seen as a map, is monotone and modular. That is, it is increasing and satisfies
dim⁡F(W1+W2)+dim⁡F(W1∩W2)=dim⁡F(W1)+dim⁡F(W2).\dim_\mathbb{F} (W_1 + W_2) + \dim_\mathbb{F} (W_1 \cap W_2) = \dim_\mathbb{F}(W_1) + \dim_\mathbb{F}(W_2).
We have shown that dim⁡\dimdim and irk\textup{irk}irk, as maps, are monotone on the subspaces of a symplectic space. The following result shows that they are supermodular and submodular respectively.

Proposition 9

Let W1,W2≤VW_1,W_2\leq VW1​,W2​≤V. Then we have
dim⁡(W1+W2)+dim⁡(W1∩W2)≥dim⁡(W1)+dim⁡(W2)\dim(W_1 + W_2) + \dim(W_1\cap W_2)\geq \dim(W_1) + \dim(W_2)
and
irk(W1+W2)+irk(W1∩W2)≤irk(W1)+irk(W2).\textup{irk}(W_1 + W_2) + \textup{irk}(W_1\cap W_2) \leq \textup{irk}(W_1) + \textup{irk}(W_2).
Proof: Let W1∩W2=K⊕SW_1\cap W_2=K\oplus SW1​∩W2​=K⊕S be an orthogonal splitting, and write
K=span{e(1),f(1),…,e(k),f(k)}K= \textup{span}\{e^{(1)},f^{(1)},\ldots,e^{(k)},f^{(k)}\}
with k=dim⁡(W1∩W2)k=\dim(W_1\cap W_2)k=dim(W1​∩W2​). We have that KKK is also symplectic in W1W_1W1​, since W1∩W2⊆W1W_1\cap W_2\subseteq W_1W1​∩W2​⊆W1​, and we can consider the orthogonal splitting W1=K1⊕rad(W1)W_1=K_1\oplus \textup{rad}(W_1)W1​=K1​⊕rad(W1​), with K⊆K1K\subseteq K_1K⊆K1​. This shows that dim⁡(W1)=k+k1\dim(W_1)=k+k_1dim(W1​)=k+k1​ and there are k1k_1k1​ additional symplectic pairs in W1∖(W1∩W2)W_1\setminus(W_1\cap W_2)W1​∖(W1​∩W2​). Analogously, we get dim⁡(W2)=k+k2\dim(W_2)=k+k_2dim(W2​)=k+k2​. Combining these together, we get k+k1+k2k+k_1+k_2k+k1​+k2​ independent symplectic pairs in W1∪W2⊆W1+W2W_1\cup W_2\subseteq W_1+W_2W1​∪W2​⊆W1​+W2​. This implies dim⁡(W1+W2)≥k+k1+k2\dim(W_1+W_2)\geq k+k_1+k_2dim(W1​+W2​)≥k+k1​+k2​ and proves Equation 4. The second inequality Equation 5 follows from Proposition 8 and 4.
We recall that in a symplectic space VVV, subspaces W1,W2≤VW_1,W_2\leq VW1​,W2​≤V, we can have W1⊥W2W_1 \perp W_2W1​⊥W2​ without W1∩W2={0}W_1\cap W_2=\{0\}W1​∩W2​={0}. The following result shows that when restricted to orthogonal subspaces, then dim⁡\dimdim and irk\textup{irk}irk are in fact modular.

Proposition 10

Let W1,W2≤VW_1,W_2\leq VW1​,W2​≤V be orthogonal subspaces. Then we have
dim⁡(W1+W2)+dim⁡(W1∩W2)=dim⁡(W1)+dim⁡(W2)\dim(W_1 + W_2) + \dim(W_1\cap W_2)= \dim(W_1) + \dim(W_2)
and
irk(W1+W2)+irk(W1∩W2)=irk(W1)+irk(W2)\textup{irk}(W_1 + W_2) + \textup{irk}(W_1\cap W_2)= \textup{irk}(W_1) + \textup{irk}(W_2)
Proof: As in the proof of Proposition 9, let W1∩W2=K⊕SW_1\cap W_2=K\oplus SW1​∩W2​=K⊕S be an orthogonal splitting, but now consider S=span{e(1),…,e(s)}S= \textup{span}\{e^{(1)},\ldots,e^{(s)}\}S=span{e(1),…,e(s)} with s=irk(W1∩W2)s= \textup{irk}(W_1\cap W_2)s=irk(W1​∩W2​). As each e(j)∈W2⊆W2⊥e^{(j)}\in W_2\subseteq W_2^\perpe(j)∈W2​⊆W2⊥​ we have e(j)e^{(j)}e(j) is isotropic in W1W_1W1​ as well. This implies S⊆rad(W1)S\subseteq \textup{rad}(W_1)S⊆rad(W1​) and we can extend the basis of SSS so that
S1=span{e(1),…,e(s),e(s+1),…,e(s+d1)},S_1 = \mathrm{span}\{e^{(1)}, \dots, e^{(s)}, e^{(s+1)}, \dots, e^{(s+d_1)}\},
which shows that irk(rad(S1))=s+d1\textup{irk}(\textup{rad}(S_1))=s+d_1irk(rad(S1​))=s+d1​. Analogously, we have
S2=rad(W2)=span{e(1),…,e(s),ε(s+1),…,ε(s+d2)}S_2 = \textup{rad}(W_2) = \mathrm{span}\{e^{(1)}, \dots, e^{(s)}, \varepsilon^{(s+1)}, \dots, \varepsilon^{(s+d_2)}\}
and hence irk(rad(W2))=s+d2\textup{irk}(\textup{rad}(W_2)) = s + d_2irk(rad(W2​))=s+d2​. We claim that
{e(1),…,e(s),e(s+1),…,e(s+d1),ε(s+1),…,ε(s+d2)}\{e^{(1)}, \dots, e^{(s)}, e^{(s+1)}, \dots, e^{(s+d_1)}, \varepsilon^{(s+1)}, \dots, \varepsilon^{(s+d_2)}\}
is a maximal independent set of isotropic vectors in W1+W2W_1 + W_2W1​+W2​, which implies irk(W1+W2)=s+d1+d2\textup{irk}(W_1 + W_2) = s + d_1 + d_2irk(W1​+W2​)=s+d1​+d2​. First, notice that the set in Equation 8 is independent by construction. Then, each eje_jej​ is isotropic in W1W_1W1​ and, since W1⊆W2⊥W_1\subseteq W_2^\perpW1​⊆W2⊥​, it is orthogonal to W2W_2W2​. It follows that eje_jej​ is isotropic in W1+W2W_1+W_2W1​+W2​. Analogously, each ej′e_j'ej′​ is isotropic in W1+W2W_1+W_2W1​+W2​, and therefore the set in Equation 8 is isotropic. Finally, note that if w1∈W1w_1\in W_1w1​∈W1​ and w2∈W2w_2\in W_2w2​∈W2​ are such that w1+w2w_1+w_2w1​+w2​ is isotropic in W1+W2W_1+W_2W1​+W2​, then for every v∈W1v\in W_1v∈W1​ we have
0=ω(v,w1+w2)=ω(v,w1)+ω(v,w2)=ω(v,w1).0 = \omega(v,w_1+w_2)= \omega(v,w_1) + \omega(v,w_2)= \omega(v,w_1).
Hence w1w_1w1​ is isotropic in W1W_1W1​ and, analogously, w2w_2w2​ is isotropic in W2W_2W2​. This means that w1+w2w_1+w_2w1​+w2​ is in the span of the set in Equation 8, and hence such a set is maximal. The second inequality Equation 7 follows from Proposition 8 and 6.

2. Error Correcting Codes

In this section, we introduce the notion of symplectic codes and characterize their fundamental coding-theoretic parameters. We further define the analogue of an anticode in the symplectic setting and demonstrate how this framework aligns with the theories developed in [18] and [19]. Moreover, we show that anticodes naturally give rise to code operations such as puncturing and shortening, and that these operations provide a way to translate and generalize results and properties of quantum codes within an algebraic–combinatorial framework. In the reminder, we assume that VVV is a symplectic space with dim⁡(V)=1\dim(V)=1dim(V)=1, that is V=span{e,f}V= \textup{span}\{e,f\}V=span{e,f} with ω(e,f)=1\omega(e,f)=1ω(e,f)=1.

2.1 Codes in a Symplectic Space

We define the symplectic space Vn=V⊗⋯⊗VV^n = V \otimes \cdots \otimes VVn=V⊗⋯⊗V, and notice that dim⁡(Vn)=n\dim(V^n)=ndim(Vn)=n. For an element v∈Vnv\in V^nv∈Vn, we write v=(v1,…,vn)v=(v_1,\ldots,v_n)v=(v1​,…,vn​), with vj∈Vv_j\in Vvj​∈V.

Definition

The Hamming weight wt(v)\textup{wt}(v)wt(v) of v∈Vnv\in V^nv∈Vn is the number of nonzero components of vvv, that is wt(v)=∣{j∈{1,…,n}:vj≠0}∣\textup{wt}(v)=|\{j\in\{1,\ldots, n\}:v_j\neq 0\}|wt(v)=∣{j∈{1,…,n}:vj​=0}∣.
It is worth noting that other weight functions could also be of interest in this setting. For instance, when F=F2\mathbb{F}= \mathbb{F}_2F=F2​, one might consider the complete weight of a vector v∈Vnv\in V^nv∈Vn, defined as wt‾(v)=(wt0(v),wte(v),wtf(v),wte+f(v))\overline{\textup{wt}}(v) = (\textup{wt}_0(v), \textup{wt}_e(v), \textup{wt}_f(v), \textup{wt}_{e+f}(v))wt(v)=(wt0​(v),wte​(v),wtf​(v),wte+f​(v)), where wtx(v)\textup{wt}_x(v)wtx​(v) denotes the number of components of vvv equal to xxx. However, in this work, we restrict our attention to the Hamming weight.

Definition 11

A (symplectic) code is a linear subspace C≤VnC \leq V^nC≤Vn. The length of CCC is n=dim⁡(Vn)n=\dim(V^n)n=dim(Vn), its dimension is k=dim⁡(C)k=\dim(C)k=dim(C), and its isorank is s=irk(C)s= \textup{irk}(C)s=irk(C). The minimum distance of CCC is d=min⁡{wt(v):v∈C∖rad(C)}d = \min\{\textup{wt}(v) : v \in C \setminus \textup{rad}(C)\}d=min{wt(v):v∈C∖rad(C)}. The maximum weight of CCC is maxwt(C)=max⁡{wt(v):v∈C}\textup{maxwt}(C)=\max\{\textup{wt}(v):v\in C\}maxwt(C)=max{wt(v):v∈C}.
In the following, we use traditional notation and denote by CCC a code whose length is nnn, dimension is kkk, and minimum distance is ddd, and we write [[n,k,d]]q[[n,k,d]]_q[[n,k,d]]q​ where q=1/2dim⁡F(V)q=1/2\dim_{\mathbb{F}}(V)q=1/2dimF​(V). The next definition follows from Definition 4, Theorem 2, and Corollary 6.

Definition 12

A stabilizer code is a stabilizer subspace C≤VnC \leq V^nC≤Vn. In particular, its radical satisfies rad(C)=C⊥\textup{rad}(C)=C^\perprad(C)=C⊥ and C⊥C^\perpC⊥ is isotropic.
Isotropic vectors play a distinct role in these codes, their contribution is captured by the isorank, and they do not affect the minimum distance of the code.

Remark 13

One can easily verify that this definition recovers the notion of stabilizer codes introduced by Gottesman [11]. On the other hand, from a coding-theoretic perspective, one can check that stabilizer codes are precisely self-orthogonal symplectic codes. In this setting, the assumption that VVV is spanned by a symplectic pair (e,f)(e,f)(e,f) is necessary, since eee and fff are naturally associated with the Pauli operators XXX and ZZZ (see also Example 14).

Example 14

Let H=(C2)⊗2\mathfrak{H} = (\mathbb{C}^2)^{\otimes 2}H=(C2)⊗2 be a Hilbert space, and let C\mathfrak{C}C denote the quantum repetition code. That is, C\mathfrak{C}C is a stabilizer code with stabilizer S(C)=⟨Z⊗Z⟩\mathcal{S}(\mathfrak{C}) = \langle Z \otimes Z \rangleS(C)=⟨Z⊗Z⟩, and normalizer N(C)=⟨Z⊗Z, X⊗X, Z⊗I⟩\mathcal{N}(\mathfrak{C}) = \langle Z \otimes Z,\, X \otimes X,\, Z \otimes I \rangleN(C)=⟨Z⊗Z,X⊗X,Z⊗I⟩. The logical operators are Xˉ=X⊗X\bar{X} = X \otimes XXˉ=X⊗X, Zˉ=Z⊗I\bar{Z} = Z \otimes IZˉ=Z⊗I. This is a [[2,1,1]]2[[2,1,1]]_2[[2,1,1]]2​ quantum code. We identify X↔eX \leftrightarrow eX↔e, Z↔fZ \leftrightarrow fZ↔f, N(C)↔C\mathcal{N}(\mathfrak{C}) \leftrightarrow CN(C)↔C and S(C)↔C⊥\mathcal{S}(\mathfrak{C}) \leftrightarrow C^\perpS(C)↔C⊥. We get
C={(e,e),(f,f),(f,0)} and C⊥={(f,f)}C=\{(e,e),(f,f),(f,0)\}\qquad\textup{ and }\qquad C^\perp=\{(f,f)\}
Thus, the quantum repetition code is a realization of the subspace described in Example 2 and Example 7, with underlying field F2\mathbb{F}_2F2​. The length, dimension, and minimum distance of CCC coincide with those of the quantum code C\mathfrak{C}C, its isorank is 222, and we have C⊥=rad(C)C^{\perp} = \textup{rad}(C)C⊥=rad(C), in accordance with Remark 13 and Definition 12.

Remark 15

It is interesting to observe that the symplectic setting provides a general and flexible framework for studying quantum error-correcting codes. A further example is given by subsystem codes, introduced by Poulin [24], which naturally arise from a pair of symplectic codes CCC and DDD satisfying C⊥≤D≤CC^{\perp} \le D \le CC⊥≤D≤C and C⊥=rad(D)C^{\perp} = \textup{rad}(D)C⊥=rad(D). In this framework, we continue to assume dim⁡(V)=1\dim(V)=1dim(V)=1, as in Remark 13. Under this assumption, C⊥C^{\perp}C⊥, DDD, and CCC identify the stabilizer, gauge group, and normalizer of the subsystem code, respectively. We illustrate this correspondence in Example 16, where we consider the 2×22\times 22×2 Bacon-Shor code, a family of subsystem codes introduced by Bacon in [25]. Other examples of quantum codes that can be recovered from Definition 11 include entanglement-assisted quantum codes [26], where VVV is a finitely generated symplectic space, not necessarily of dimension one, and the amount of entanglement can be measured by dim⁡(C)−dim⁡(rad(C))\dim(C) - \dim(\textup{rad}(C))dim(C)−dim(rad(C)), and nonadditive quantum codes [27], which can be viewed as unions of cosets of symplectic codes with relaxed constraints on VVV.

Example 16

Let H=(C2)⊗4\mathfrak{H} = (\mathbb{C}^2)^{\otimes 4}H=(C2)⊗4 be a Hilbert space, and let C\mathfrak{C}C denote the 2×22\times 22×2 Bacon-Shor code. That is, C\mathfrak{C}C is the subsystem code with gauge group
G(C)=⟨X⊗X⊗I⊗I, I⊗I⊗X⊗X, Z⊗I⊗Z⊗I, I⊗Z⊗I⊗Z⟩,\mathcal{G}(\mathfrak{C}) = \langle X\otimes X\otimes I\otimes I,\, I\otimes I\otimes X\otimes X,\, Z\otimes I\otimes Z\otimes I,\, I\otimes Z\otimes I\otimes Z \rangle,
and stabilizer S(C)=⟨X⊗X⊗X⊗X, Z⊗Z⊗Z⊗Z⟩\mathcal{S}(\mathfrak{C}) = \langle X\otimes X\otimes X\otimes X,\, Z\otimes Z\otimes Z\otimes Z \rangleS(C)=⟨X⊗X⊗X⊗X,Z⊗Z⊗Z⊗Z⟩. The logical operators are Xˉ=X⊗I⊗X⊗I\bar{X} = X\otimes I\otimes X\otimes IXˉ=X⊗I⊗X⊗I and Zˉ=Z⊗Z⊗I⊗I\bar{Z} = Z\otimes Z\otimes I\otimes IZˉ=Z⊗Z⊗I⊗I. This is a [[4,1,2]]2[[4,1,2]]_2[[4,1,2]]2​ quantum code. We identify X↔eX \leftrightarrow eX↔e, Z↔fZ \leftrightarrow fZ↔f, G(C)↔D\mathcal{G}(\mathfrak{C}) \leftrightarrow DG(C)↔D, and S(C)↔C⊥\mathcal{S}(\mathfrak{C}) \leftrightarrow C^{\perp}S(C)↔C⊥. Hence, we obtain
D=spanF2{(e,e,0,0),(0,0,e,e),(f,0,f,0),(0,f,0,f)},D = \mathrm{span}_{\mathbb{F}_2}\{(e,e,0,0), (0,0,e,e), (f,0,f,0), (0,f,0,f)\},
C⊥=rad(D)=spanF2{(e,e,e,e),(f,f,f,f)}C^{\perp} = \textup{rad}(D) = \mathrm{span}_{\mathbb{F}_2}\{(e,e,e,e), (f,f,f,f)\}C⊥=rad(D)=spanF2​​{(e,e,e,e),(f,f,f,f)} and
C=spanF2{(e,e,0,0),(0,0,e,e),(f,f,0,0),(0,0,f,f),(e,0,e,0),(f,0,f,0)}.C = \mathrm{span}_{\mathbb{F}_2}\{(e,e,0,0), (0,0,e,e), (f,f,0,0), (0,0,f,f), (e,0,e,0), (f,0,f,0)\}.
Finally, one can readily verify that C⊥⊊D⊊CC^{\perp} \subsetneq D \subsetneq CC⊥⊊D⊊C, in line with Remark 15.
Next we establish a relationship between the dimension and the maximum weight of a code in a symplectic space (cf. ([18], Proposition 6)). We recall that in this context, the dimension refers to the number of independent symplectic pairs rather than the underlying vector-space dimension. We begin with a simple technical lemma, analogous to Gaussian reduction for codes over a field.

Lemma 17

There exist (vˉ(1),wˉ(1)),…,(vˉ(k),wˉ(k))(\bar{v}^{(1)}, \bar{w}^{(1)}), \ldots, (\bar{v}^{(k)}, \bar{w}^{(k)})(vˉ(1),wˉ(1)),…,(vˉ(k),wˉ(k)) independent symplectic pairs in CCC and a set of distinct indices {i1,…,ik}\{i_1,\dots, i_k\}{i1​,…,ik​} such that the following hold for each j∈{1,…,k}j\in\{1, \dots, k\}j∈{1,…,k}.
  1. ω(vˉij(j),wˉij(j))≠0\omega(\bar{v}^{(j)}_{i_j}, \bar{w}^{(j)}_{i_j}) \not= 0ω(vˉij​(j)​,wˉij​(j)​)=0 (and hence vˉ(j),wˉ(j)\bar{v}^{(j)}, \bar{w}^{(j)}vˉ(j),wˉ(j) span VVV at coordinate iji_jij​),
  2. vˉij(ℓ)=wˉij(ℓ)=0\bar{v}^{(\ell)}_{i_j} = \bar{w}^{(\ell)}_{i_j} = 0vˉij​(ℓ)​=wˉij​(ℓ)​=0 for each ℓ∈{1,…,k}∖{j}\ell \in\{1, \dots, k\}\setminus\{j\}ℓ∈{1,…,k}∖{j}.
Proof: Let (v(1),w(1)),…,(v(k),w(k))(v^{(1)},w^{(1)}), \ldots, (v^{(k)},w^{(k)})(v(1),w(1)),…,(v(k),w(k)) be independent orthogonal symplectic pairs in CCC. Since v(1),w(1)v^{(1)},w^{(1)}v(1),w(1) are not orthogonal, there exists an index i1i_1i1​ such that ω(v(1)i1,w(1)i1)≠0\omega(v^{(1)}{i_1}, w^{(1)}{i_1}) \not = 0ω(v(1)i1​,w(1)i1​)=0 and therefore v(1)i1,w(1)i1v^{(1)}{i_1}, w^{(1)}{i_1}v(1)i1​,w(1)i1​ span VVV in this coordinate. Now consider the pair (v(2),w(2))(v^{(2)},w^{(2)})(v(2),w(2)) and assume ω(v(2),w(2))=1\omega(v^{(2)},w^{(2)}) = 1ω(v(2),w(2))=1, without loss of generality. Suppose v(2)i1≠0v^{(2)}{i_1} \not= 0v(2)i1​=0, write v(2)i1=αv(1)i1+βw(1)i1v^{(2)}{i_1} = \alpha v^{(1)}{i_1} + \beta w^{(1)}{i_1}v(2)i1​=αv(1)i1​+βw(1)i1​ and let vˉ(2)=v(2)−αv(1)−βw(1)\bar{v}^{(2)} = v^{(2)} - \alpha v^{(1)} - \beta w^{(1)}vˉ(2)=v(2)−αv(1)−βw(1). Also set vˉ(1)=v(1)−βw(2)\bar{v}^{(1)} = v^{(1)} - \beta w^{(2)}vˉ(1)=v(1)−βw(2) and wˉ(1)=w(1)−αw(2)\bar{w}^{(1)} = w^{(1)} - \alpha w^{(2)}wˉ(1)=w(1)−αw(2). We have
ω(vˉ(1),wˉ(1))=ω(v(1),w(1))≠0,ω(vˉ(2),w(2))=ω(v(2),w(2))=1,ω(vˉ(1),vˉ(2))=−β+β=0,ω(vˉ(1),w(2))=0,ω(wˉ(1),vˉ(2))=−α+α=0,ω(wˉ(1),w(2))=0.\begin{aligned} \omega(\bar{v}^{(1)}, \bar{w}^{(1)}) &= \omega(v^{(1)}, w^{(1)}) \not= 0, & \omega(\bar{v}^{(2)}, w^{(2)}) &= \omega(v^{(2)}, w^{(2)}) = 1,\\ \omega(\bar{v}^{(1)}, \bar{v}^{(2)}) &= -\beta + \beta = 0, & \omega(\bar{v}^{(1)}, w^{(2)}) &= 0,\\ \omega(\bar{w}^{(1)}, \bar{v}^{(2)}) &= -\alpha + \alpha = 0, & \omega(\bar{w}^{(1)}, w^{(2)}) &= 0. \end{aligned}
It follows that (vˉ(1),wˉ(1)),(vˉ(2),w(2)),…,(v(k),w(k)){(\bar{v}^{(1)}, \bar{w}^{(1)}), (\bar{v}^{(2)}, w^{(2)}), \ldots, (v^{(k)},w^{(k)})}(vˉ(1),wˉ(1)),(vˉ(2),w(2)),…,(v(k),w(k)) has the same properties as the original set of symplectic pairs, and vi1(2)=0v^{(2)}_{i_1} = 0vi1​(2)​=0. Iterating this same process through w(2),…,v(k),w(k)w^{(2)}, \ldots, v^{(k)}, w^{(k)}w(2),…,v(k),w(k) proves the j=1j = 1j=1 case. Using an induction argument, we assume that the lemma holds for 1,…,j−1{1,\dots, j-1}1,…,j−1. Then for jjj, we claim that we can find an index ij∉i1,…,ij−1i_j \not\in {i_1, \ldots, i_{j-1}}ij​∈i1​,…,ij−1​, with ω(v(j)ij,w(j)ij)≠0\omega(v^{(j)}{i_j}, w^{(j)}{i_j}) \not = 0ω(v(j)ij​,w(j)ij​)=0. This is clear. Indeed, we have that v(j)v^{(j)}v(j) and w(j)w^{(j)}w(j) are not orthogonal, but viℓ(j)=wiℓ(j)=0v^{(j)}_{i_\ell} = w^{(j)}_{i_\ell} = 0viℓ​(j)​=wiℓ​(j)​=0 for ℓ∈{1,…,j−1}\ell\in\{1, \ldots, j-1\}ℓ∈{1,…,j−1}, so there must be an index with ω(v(j)ij,w(j)ij)≠0\omega(v^{(j)}{i_j}, w^{(j)}{i_j}) \not = 0ω(v(j)ij​,w(j)ij​)=0, and any such iji_jij​ cannot lie in i1,…,ij−1{i_1, \ldots, i_{j-1}}i1​,…,ij−1​. The rest of the proof follows as above.
The following is an immediate consequence of this lemma.

Corollary 18

We have k≤maxwt(C)k\leq \textup{maxwt}(C)k≤maxwt(C).
Proof: The result is trivial for k=0k = 0k=0. For k>0k > 0k>0, let (v(1),w(1)),…,(v(k),w(k))∈C(v^{(1)}, w^{(1)}), \ldots, (v^{(k)}, w^{(k)}) \in C(v(1),w(1)),…,(v(k),w(k))∈C be symplectic pairs. Observe that, in the positions i1,…,iki_1, \dots, i_ki1​,…,ik​, the vector  v(1)+⋯+v(k)∈C \,v^{(1)} + \cdots + v^{(k)} \in C\,v(1)+⋯+v(k)∈C has a nonzero entry in each such coordinate. Therefore, its weight is at least kkk.

2.2 Anticodes in a Symplectic Space

In this section, we introduce and investigate the notion of anticodes in symplectic spaces, inspired by the work in [18] and [19].

Definition

We say that CCC is a (symplectic) anticode if it attains the bound in Corollary 18, that is if k=maxwt(C)k= \textup{maxwt}(C)k=maxwt(C). We denote the set of all anticodes in VnV^nVn by A(n)\mathcal{A}(n)A(n).
Let J⊆{1,…,n}J \subseteq \{1, \dots, n\}J⊆{1,…,n}. A free code in VnV^nVn supported on JJJ is defined as
{v∈Vn:vj=0 for all j∉J}.\{v \in V^n : v_j = 0 \textup{ for all } j \notin J\}.
It is immediate that for any such free code DDD, we have dim⁡(D)=maxwt(D)=∣J∣\dim(D) = \textup{maxwt}(D) = |J|dim(D)=maxwt(D)=∣J∣. Therefore, every free code is an anticode. The next result shows that the converse also holds.

Proposition

A code CCC is an anticode if and only if CCC is a free code.
Proof: One implication is trivial, it remains to show that every anticode is a free code. Let AAA be an anticode with dim⁡(A)=k=maxwt(A)\dim(A) = k = \mathrm{maxwt}(A)dim(A)=k=maxwt(A), and let (v(1),w(1)),…,(v(k),w(k))(v^{(1)}, w^{(1)}), \ldots, (v^{(k)}, w^{(k)})(v(1),w(1)),…,(v(k),w(k)) be independent, orthogonal symplectic pairs in AAA (and hence a basis of AAA). As in the proof of Lemma 17, we can reduce these to a set of vectors (for which we use the same notation) such that there exists a set of "pivots" J={j1,…,jk}J = \{j_1, \dots, j_k\}J={j1​,…,jk​} with the property that, for each i∈{1,…,k}i\in\{1, \dots, k\}i∈{1,…,k}, we normalize so vji(i)=ev^{(i)}_{j_i} = evji​(i)​=e, wji(i)=fw^{(i)}_{j_i} = fwji​(i)​=f, and vji(ℓ)=wji(ℓ)=0v^{(\ell)}_{j_i} = w^{(\ell)}_{j_i} = 0vji​(ℓ)​=wji​(ℓ)​=0 for all ℓ≠i\ell\not = iℓ=i. Now suppose there is an index r∉Jr \not \in Jr∈J such that not all vr(i)v^{(i)}_rvr(i)​ and wr(i)w^{(i)}_rwr(i)​ are zero. Consider the vector v=v(1)+⋯+v(k)∈Av = v^{(1)} + \cdots + v^{(k)} \in Av=v(1)+⋯+v(k)∈A. Then for each j∈Jj \in Jj∈J, we have vj=ev_j = evj​=e, and hence wt(v)≥k\mathrm{wt}(v) \geq kwt(v)≥k. If vr=vr(1)+⋯+vr(k)≠0v_r = v^{(1)}_r + \cdots + v^{(k)}_r \not= 0vr​=vr(1)​+⋯+vr(k)​=0 then wt(v)≥k+1>maxwt(A)\mathrm{wt}(v) \geq k+1 > \mathrm{maxwt}(A)wt(v)≥k+1>maxwt(A), leading to a contradiction. Hence vr=vr(1)+⋯+vr(k)=0v_r = v^{(1)}_r + \cdots + v^{(k)}_r = 0vr​=vr(1)​+⋯+vr(k)​=0. By assumption, however, there exists an index i∈Ji \in Ji∈J such that at least one of vr(i)v^{(i)}_rvr(i)​ and wr(i)w^{(i)}_rwr(i)​ is nonzero. We claim that either wr(i)≠vr(i)w^{(i)}_r \not= v^{(i)}_rwr(i)​=vr(i)​ or vr(i)−wr(i)≠vr(i)v^{(i)}_r - w^{(i)}_r \not= v^{(i)}_rvr(i)​−wr(i)​=vr(i)​. This is immediate since if wr(i)=vr(i)w^{(i)}_r = v^{(i)}_rwr(i)​=vr(i)​, then, as this element is nonzero, we must have vr(i)−wr(i)≠vr(i)v^{(i)}_r - w^{(i)}_r \not= v^{(i)}_rvr(i)​−wr(i)​=vr(i)​ as required. In the case where wr(i)≠vr(i)w^{(i)}_r \not= v^{(i)}_rwr(i)​=vr(i)​, since vr(1)+⋯+vr(k)=0v^{(1)}_r + \cdots + v^{(k)}_r = 0vr(1)​+⋯+vr(k)​=0, we have vr(1)+⋯+wr(i)+⋯vr(k)≠0v^{(1)}_r + \cdots + w^{(i)}_r + \cdots v^{(k)}_r \not= 0vr(1)​+⋯+wr(i)​+⋯vr(k)​=0 and hence the vector v(1)+⋯+w(i)+⋯+v(k)∈Av^{(1)} + \cdots + w^{(i)} + \cdots + v^{(k)}\in Av(1)+⋯+w(i)+⋯+v(k)∈A has nonzero coefficients in each index of JJJ and at rrr. Hence, wt(v(1)+⋯+w(i)+⋯+v(k))≥k+1\mathrm{wt}(v^{(1)} + \cdots + w^{(i)} + \cdots + v^{(k)}) \geq k+1wt(v(1)+⋯+w(i)+⋯+v(k))≥k+1, leading to a contradiction. Analogously, in the case where vr(i)−wr(i)≠vr(i)v^{(i)}_r - w^{(i)}_r \not= v^{(i)}_rvr(i)​−wr(i)​=vr(i)​, we obtain wt(v(1)+⋯+(v(i)−w(i))+⋯+v(k))≥k+1\mathrm{wt}(v^{(1)} + \cdots + (v^{(i)} - w^{(i)}) + \cdots + v^{(k)}) \geq k+1wt(v(1)+⋯+(v(i)−w(i))+⋯+v(k))≥k+1 which again yields a contradiction. Thus, in either case we obtain a contraction, and therefore we conclude that no such r∉Jr\not\in Jr∈J can exist. It follows that supp(A)⊆J\mathrm{supp}(A) \subseteq Jsupp(A)⊆J, and by a dimension argument we have AAA is the free code supported on JJJ.
As a consequence, every anticode is uniquely determined by its support. In what follows, for any subset J⊆{1,…,n}J \subseteq \{1, \dots, n\}J⊆{1,…,n}, we denote by AJA_JAJ​ the anticode supported on JJJ. It is interesting to observe that the set of anticodes A(n)\mathcal{A}(n)A(n) inherits a Boolean algebra structure from the power set of {1,…,n}\{1,\ldots,n\}{1,…,n}. In particular, the meet of anticodes A1,A2∈A(n)A_1, A_2 \in \mathcal{A}(n)A1​,A2​∈A(n) is given by A1∩A2A_1 \cap A_2A1​∩A2​, while their join is A1+A2A_1 + A_2A1​+A2​. The smallest and largest anticodes are {0}\{0\}{0} and VnV^nVn, respectively. Finally, the following is easy to check.

Proposition 19

Let J⊆{1,…,n}J \subseteq \{1, \dots, n\}J⊆{1,…,n}. We have A⊥=AJcA^\perp=A_{J^c}A⊥=AJc​, where JcJ^cJc denotes the complement of JJJ in {1,…,n}\{1,\ldots,n\}{1,…,n}.
As we will see later, studying the intersections of a code with anticodes provides a powerful tool to capture its combinatorial and structural properties. We begin by establishing the following duality result, which is the analogue of ([28], Lemma 28) and ([19], Lemma 6.5), and can be interpreted as a form of MacWilliams identity.

Theorem 1

For any A∈A(n)A\in \mathcal{A}(n)A∈A(n), we have
dim⁡F(A∩C)=dim⁡F(C)−dim⁡F(A⊥)+dim⁡F(A⊥∩C⊥).\dim_\mathbb{F} (A \cap C)= \dim_\mathbb{F} (C) - \dim_\mathbb{F} (A^\perp) + \dim_\mathbb{F} (A^\perp \cap C^\perp).
Moreover, if CCC is a stabilizer code then
dim⁡(A⊥)−dim⁡(A⊥∩C)−irk(A⊥∩C)=dim⁡A−irk(A∩rad(C))−dim⁡C.\dim (A^\perp) - \dim(A^\perp\cap C) - \textup{irk}(A^\perp\cap C)= \dim A - \textup{irk}(A\cap \textup{rad}(C)) - \dim C.
Proof: Recall that, by Equation 3, we have
dim⁡F(A⊥∩C⊥)+dim⁡F(A⊥+C⊥)=dim⁡FA⊥+dim⁡FC⊥.\dim_\mathbb{F}(A^\perp \cap C^\perp) + \dim_\mathbb{F}(A^\perp + C^\perp) = \dim_\mathbb{F} A^\perp + \dim_\mathbb{F} C^\perp.
Additionally, we have that dim⁡FC⊥=dim⁡FV−dim⁡FC\dim_\mathbb{F} C^\perp = \dim_\mathbb{F} V - \dim_\mathbb{F} CdimF​C⊥=dimF​V−dimF​C and
dim⁡F(A⊥+C⊥)=dim⁡FV−dim⁡F((A⊥+C⊥)⊥)=dim⁡FV−dim⁡F(A∩C).\dim_\mathbb{F}(A^\perp + C^\perp) = \dim_\mathbb{F} V - \dim_\mathbb{F}((A^\perp + C^\perp)^\perp)=\dim_\mathbb{F} V - \dim_\mathbb{F}(A \cap C).
Combining these with Equation 12 establishes Equation 10. On the other hand, if CCC is a stabilizer code, we have rad(C)=C⊥\textup{rad}(C)=C^\perprad(C)=C⊥, and 11 follows directly from Definition 1 by interchanging the roles of AAA and A⊥A^\perpA⊥ in Equation 10.

2.3 Duality of Puncturing and Shortening

In this section, let AAA be the anticode supported on JJJ, for some J⊆{1,…,n}J \subseteq \{1, \ldots, n\}J⊆{1,…,n}. Consider the projection map πJ:Vn→V∣J∣\pi_J : V^n \to V^{|J|}πJ​:Vn→V∣J∣, which projects onto the coordinates indexed by JJJ. It is straightforward to verify that V∣J∣V^{|J|}V∣J∣ is isomorphic to the anticode AAA. Consequently, we may view an anticode either as a subspace of VnV^nVn or as an independent symplectic space, with the symplectic form and basis naturally inherited from VnV^nVn.

Definition

We define the puncturing of CCC on AAA as ΠAC=πJ(C)\Pi_A C = \pi_J(C)ΠA​C=πJ​(C). We define the shortening of CCC on AAA as ΣAC=πJ(C∩A)\Sigma_A C = \pi_J(C \cap A)ΣA​C=πJ​(C∩A).
The shortening can be seen as the puncturing of the restriction of CCC to AAA. We recall the following fundamental result in quantum error correction ([29], Lemma 1)

Theorem 2.2: Cleaning Lemma

Let CCC be a stabilizer code with radical S=C⊥S = C^\perpS=C⊥. Then one of the following holds.
  1. There exists an element of (A∩C)∖(A∩S)(A\cap C) \setminus (A\cap S)(A∩C)∖(A∩S).
  2. For any c∈Cc \in Cc∈C there exists an s∈Ss \in Ss∈S so that πJ(c)=πJ(s)\pi_J(c) = \pi_J(s)πJ​(c)=πJ​(s).
The use of "cleaning" in this result is based on case (2) of the theorem: given a c∈Cc \in Cc∈C we can shift it by an element of the radical s∈Ss\in Ss∈S so that the support of c−sc-sc−s is cleaned off of the indices JJJ. The exceptional case (1) is that supp(c)⊆J\mathrm{supp}(c)\subseteq Jsupp(c)⊆J already and c∉Sc \not\in Sc∈S. We claim that the cleaning lemma is just a special case of a much more general duality relation between the operations of puncturing and shortening, namely the analogue of ([30], Theorem 1.5.7(1)) in the symplectic setting. Hence we refer to this result as the Generalized Cleaning Lemma.

Theorem 3: Generalized Cleaning Lemma

For any code C≤VnC \leq V^nC≤Vn and any anticode A∈A(n)A \in \mathcal{A}(n)A∈A(n), we have
ΣAC⊥=(ΠAC)⊥ and ΠAC⊥=(ΣAC)⊥.\Sigma_A C^\perp = (\Pi_A C)^\perp\quad\textup{ and }\quad \Pi_A C^\perp = (\Sigma_A C)^\perp.
Proof: Without loss of generality, let J={1,…,j}J = \{1, \ldots, j\}J={1,…,j} for some j∈{1,…,n}j \in \{1, \ldots, n\}j∈{1,…,n}, and let A=AJA = A_JA=AJ​. Then we have the decomposition Vn=A⊕A⊥V^n = A \oplus A^\perpVn=A⊕A⊥. By Proposition 19, every element v∈Vnv \in V^nv∈Vn can be written as v=(v1,v2)v = (v_1, v_2)v=(v1​,v2​) with (v1,0)∈A(v_1, 0) \in A(v1​,0)∈A and (0,v2)∈A⊥(0, v_2) \in A^\perp(0,v2​)∈A⊥. Let u∈ΣAC⊥u \in \Sigma_A C^\perpu∈ΣA​C⊥ so that (u,0)∈C⊥(u,0) \in C^\perp(u,0)∈C⊥. Then for any (v,w)∈C(v,w) \in C(v,w)∈C we have
ω∣A(u,v)=ω((u,0),(v,w))=0.\omega|_A(u,v) = \omega((u,0), (v,w)) = 0.
In particular, any v∈ΠACv \in \Pi_A Cv∈ΠA​C has this form, and thus ΣAC⊥⊆(ΠA(C))⊥\Sigma_A C^\perp \subseteq (\Pi_A(C))^\perpΣA​C⊥⊆(ΠA​(C))⊥. Conversely, let (v,w)∈C(v,w)\in C(v,w)∈C. As above, for any u∈ΣAC⊥u\in \Sigma_A C^\perpu∈ΣA​C⊥, we have
0=ω∣A(u,v)=ω((u,0),(v,w)).0=\omega|_A(u,v)=\omega((u,0),(v,w)).
This implies (ΠA(C))⊥⊆ΣAC⊥(\Pi_A(C))^\perp\subseteq \Sigma_A C^\perp(ΠA​(C))⊥⊆ΣA​C⊥ and thus ΣAC⊥=(ΠAC)⊥\Sigma_A C^\perp = (\Pi_A C)^\perpΣA​C⊥=(ΠA​C)⊥. The second equality easily follows by replacing CCC with C⊥C^\perpC⊥.
We will often use the next result, which is an immediate consequence of the theorem above. Recall that ddd denotes the minimum distance of the code CCC.

Corollary 20

Let CCC be a stabilizer code (i.e., rad(C)=C⊥\textup{rad}(C)=C^\perprad(C)=C⊥) and let A∈A(n)A \in \mathcal{A}(n)A∈A(n). If dim⁡(A)<d\dim(A) < ddim(A)<d then ΠAC=ΠArad(C)\Pi_A C = \Pi_A \textup{rad}(C)ΠA​C=ΠA​rad(C).

2.4 Complementarity

As in the previous section, let J⊆{1,…,n}J \subseteq \{1, \ldots, n\}J⊆{1,…,n} and let AAA be the anticode supported on JJJ. Recall that VnV^nVn decomposes orthogonally as Vn=A⊕A⊥V^n = A \oplus A^\perpVn=A⊕A⊥. We consider the orthogonal splitting
rad(C)=(rad⁡(C)∩A)⊕(rad(C)∩A⊥)⊕S′\textup{rad}(C) = (\operatorname{rad}(C) \cap A) \oplus (\textup{rad}(C) \cap A^\perp) \oplus S'
for some S′⊆VnS' \subseteq V^nS′⊆Vn. We also recall that all of these spaces are isotropic.

Lemma 21

The map πJ:S′→A\pi_J:S'\rightarrow AπJ​:S′→A is injective.
Proof: It is straightforward to verify that, for any v∈rad(C)v \in \textup{rad}(C)v∈rad(C), we have πJ(v)=0\pi_J(v) = 0πJ​(v)=0 if and only if v∈rad(C)∩A⊥v \in \textup{rad}(C) \cap A^\perpv∈rad(C)∩A⊥. Therefore, for any v∈S′v \in S'v∈S′, we have πJ(v)=0\pi_J(v) = 0πJ​(v)=0 if and only if v=0v = 0v=0. This concludes the proof.
It follows from this lemma that ΠAS=ΣAS⊕ΠAS′\Pi_A S = \Sigma_A S \oplus \Pi_A S'ΠA​S=ΣA​S⊕ΠA​S′ and ΠA⊥(S)=ΣA⊥(S)⊕ΠA⊥(S′)\Pi_{A^\perp} (S) = \Sigma_{A^\perp} (S) \oplus \Pi_{A^\perp} (S')ΠA⊥​(S)=ΣA⊥​(S)⊕ΠA⊥​(S′). Moreover, the puncturing of S′S'S′ has complementarity properties, as shown in the next result.

Proposition 22

We have ΠAS′≅ΠA⊥S′\Pi_A S' \cong \Pi_{A^\perp} S'ΠA​S′≅ΠA⊥​S′, and in particular
dim⁡(ΠAS′)=dim⁡(ΠA⊥S′)andirk(ΠAS′)=irk(ΠA⊥S′).\dim(\Pi_A S') = \dim(\Pi_{A^\perp} S') \quad \text{and} \quad \textup{irk}(\Pi_A S') = \textup{irk}(\Pi_{A^\perp} S').
Proof: Let e1,f1∈ΠAS′e_1,f_1\in \Pi_A S'e1​,f1​∈ΠA​S′ be a symplectic pair and let e,f∈S′e,f\in S'e,f∈S′ with πJ(e)=e1\pi_J(e) = e_1πJ​(e)=e1​ and πJ(f)=f1\pi_J(f) = f_1πJ​(f)=f1​. Recall that, eee and fff are uniquely determined by Lemma 21. We define e2=πJc(e)e_2=\pi_{J^c}(e)e2​=πJc​(e) and f2=−πJc(f)f_2=-\pi_{J^c}(f)f2​=−πJc​(f) and observe that e2,f2∈ΠA⊥S′e_2,f_2\in \Pi_{A^\perp} S'e2​,f2​∈ΠA⊥​S′, by Proposition 19. One can verify that
ω∣A⊥(e2,f2)=−ω(e,f)+ω∣A(e1,f1)=1,\omega|_{A^\perp}(e_2, f_2) = -\omega(e, f) + \omega|_A(e_1, f_1) = 1,
since ω(e,f)=0\omega(e, f) = 0ω(e,f)=0 as e,f∈S′⊆rad(C)e, f \in S' \subseteq \textup{rad}(C)e,f∈S′⊆rad(C), and e1,f1e_1, f_1e1​,f1​ form a symplectic pair. Since the argument is symmetric under the exchange of AAA and A⊥A^\perpA⊥, we have a bijective correspondence between the symplectic pairs in ΠAS′\Pi_A S'ΠA​S′ and those in ΠA⊥S′\Pi_{A^\perp} S'ΠA⊥​S′. In particular, dim⁡(ΠAS′)=dim⁡(ΠA⊥S′)\dim(\Pi_A S')= \dim(\Pi_{A^\perp} S')dim(ΠA​S′)=dim(ΠA⊥​S′). Similarly, if e1∈ΠAS′e_1 \in \Pi_A S'e1​∈ΠA​S′ is isotropic (in ΠAS′\Pi_A S'ΠA​S′), then we can uniquely extend this to e∈S′e \in S'e∈S′ and puncture to obtain e2∈ΠA⊥S′e_2 \in \Pi_{A^\perp} S'e2​∈ΠA⊥​S′. Since S′S'S′ is itself isotropic, the vector e=(e1,e2)e = (e_1, e_2)e=(e1​,e2​) is isotropic, and hence so is e2e_2e2​. Therefore, there is also a bijective correspondence between isotropic vectors of ΠAS′\Pi_A S'ΠA​S′ and those of ΠA⊥S′\Pi_{A^\perp} S'ΠA⊥​S′, and in particular irk(ΠAS′)=irk(ΠA⊥S′)\textup{irk}(\Pi_A S')= \textup{irk}(\Pi_{A^\perp} S')irk(ΠA​S′)=irk(ΠA⊥​S′).

Example

Let H=(C2)⊗9\mathfrak{H} = (\mathbb{C}^2)^{\otimes 9}H=(C2)⊗9 be a Hilbert space, and let C\mathfrak{C}C denote the [[9,1,3]]2[[9,1,3]]_2[[9,1,3]]2​ Shor code. That is, C\mathfrak{C}C is the stabilizer code with stabilizer S(C)=⟨s1,…,s8⟩\mathcal{S}(\mathfrak{C})=\langle s_1,\ldots,s_8\rangleS(C)=⟨s1​,…,s8​⟩, where
s1=Z⊗Z⊗I⊗I⊗I⊗I⊗I⊗I⊗I,s2=I⊗Z⊗Z⊗I⊗I⊗I⊗I⊗I⊗I,s3=I⊗I⊗I⊗Z⊗Z⊗I⊗I⊗I⊗I,s4=I⊗I⊗I⊗I⊗Z⊗Z⊗I⊗I⊗I,s5=I⊗I⊗I⊗I⊗I⊗I⊗Z⊗Z⊗I,s6=I⊗I⊗I⊗I⊗I⊗I⊗I⊗Z⊗Z,s7=X⊗X⊗X⊗X⊗X⊗X⊗I⊗I⊗I,s8=I⊗I⊗I⊗X⊗X⊗X⊗X⊗X⊗X.\begin{array}{ll} s_1=Z\otimes Z \otimes I \otimes I\otimes I\otimes I\otimes I\otimes I\otimes I, & s_2= I\otimes Z \otimes Z \otimes I\otimes I\otimes I\otimes I\otimes I\otimes I, \\ s_3= I\otimes I \otimes I \otimes Z\otimes Z\otimes I\otimes I\otimes I\otimes I, & s_4=I\otimes I \otimes I \otimes I\otimes Z\otimes Z\otimes I\otimes I\otimes I,\\ s_5= I\otimes I \otimes I \otimes I\otimes I\otimes I\otimes Z\otimes Z\otimes I, & s_6=I\otimes I \otimes I \otimes I\otimes I\otimes I\otimes I\otimes Z\otimes Z,\\ s_7= X\otimes X \otimes X \otimes X\otimes X\otimes X\otimes I\otimes I\otimes I, & s_8=I\otimes I \otimes I \otimes X\otimes X\otimes X\otimes X\otimes X\otimes X. \end{array}
Identifying X↔eX \leftrightarrow eX↔e, Z↔fZ \leftrightarrow fZ↔f, S(C)↔C⊥\mathcal{S}(\mathfrak{C}) \leftrightarrow C^\perpS(C)↔C⊥, and N(C)↔C\mathcal{N}(\mathfrak{C}) \leftrightarrow CN(C)↔C, we obtain that si↔cis_i\leftrightarrow c_isi​↔ci​ for all i∈{1,…,8}i\in\{1,\ldots,8\}i∈{1,…,8}, where
c1=(f,f,0,0,0,0,0,0,0),c2=(0,f,f,0,0,0,0,0,0),c3=(0,0,0,f,f,0,0,0,0),c4=(0,0,0,0,f,f,0,0,0),c5=(0,0,0,0,0,0,f,f,0),c6=(0,0,0,0,0,0,0,f,f),c7=(e,e,e,e,e,e,0,0,0),c8=(0,0,0,e,e,e,e,e,e).\begin{array}{lll} c_1=(f,f,0,0,0,0,0,0,0), & &c_2=(0,f,f,0,0,0,0,0,0),\\ c_3=(0,0,0,f,f,0,0,0,0), && c_4=(0,0,0,0,f,f,0,0,0),\\ c_5=(0,0,0,0,0,0,f,f,0), && c_6=(0,0,0,0,0,0,0,f,f),\\ c_7=(e,e,e,e,e,e,0,0,0), && c_8=(0,0,0,e,e,e,e,e,e).\\ \end{array}
Hence rad(C)=C⊥=spanF2{c1,…,c8}\textup{rad}(C)=C^\perp=\text{span}_{\mathbb{F}_2}\{c_1,\ldots,c_8\}rad(C)=C⊥=spanF2​​{c1​,…,c8​}. Let A=A{1,2,3,4}A=A_{\{1,2,3,4\}}A=A{1,2,3,4}​ be the anticode supported on {1,2,3,4}\{1,2,3,4\}{1,2,3,4}, and recall that A⊥=A{5,6,7,8,9}A^\perp=A_{\{5,6,7,8,9\}}A⊥=A{5,6,7,8,9}​ by Proposition 19. Then
rad(C)∩A=spanF2{c1,c2} and rad(C)∩A⊥=spanF2{c4,c5,c6}.\textup{rad}(C)\cap A=\text{span}_{\mathbb{F}_2}\{c_1,c_2\}\qquad \textup{ and }\qquad \textup{rad}(C)\cap A^\perp=\text{span}_{\mathbb{F}_2}\{c_4,c_5,c_6\}.
This leads to the orthogonal decomposition rad(C)=(rad(C)∩A)⊕(rad(C)∩A⊥)⊕S′\textup{rad}(C)=(\textup{rad}(C)\cap A)\oplus(\textup{rad}(C)\cap A^\perp)\oplus S'rad(C)=(rad(C)∩A)⊕(rad(C)∩A⊥)⊕S′, where S′=spanF2{c3,c7,c8}S'=\text{span}_{\mathbb{F}_2}\{c_3,c_7,c_8\}S′=spanF2​​{c3​,c7​,c8​}. Puncturing S′S'S′ on AAA and A⊥A^\perpA⊥ yields
ΠA(S′)=spanF2{(0,0,0,f),(e,e,e,e),(0,0,0,e)},ΠA⊥(S′)=spanF2{(f,0,0,0,0),(e,e,0,0,0),(e,e,e,e,e)}.\begin{aligned} \Pi_A(S')&=\text{span}_{\mathbb{F}_2}\{(0,0,0,f),(e,e,e,e),(0,0,0,e)\},\\ \Pi_{A^\perp}(S')&=\text{span}_{\mathbb{F}_2}\{(f,0,0,0,0),(e,e,0,0,0),(e,e,e,e,e)\}. \end{aligned}
One can easily verify that these spaces are isomorphic, and each contains a symplectic pair, namely ((0,0,0,f),(0,0,0,e))((0,0,0,f),(0,0,0,e))((0,0,0,f),(0,0,0,e)) in ΠA(S′)\Pi_A(S')ΠA​(S′) and ((f,0,0,0,0),(e,e,0,0,0))((f,0,0,0,0),(e,e,0,0,0))((f,0,0,0,0),(e,e,0,0,0)) in ΠA⊥(S′)\Pi_{A^\perp}(S')ΠA⊥​(S′). Moreover, we have
rad(ΠA(S′))=spanF2{(e,e,e,0)} and rad(ΠA⊥(S′))=spanF2{(0,0,e,e,e)}.\textup{rad}(\Pi_A(S'))=\text{span}_{\mathbb{F}_2}\{(e,e,e,0)\}\qquad\textup{ and }\qquad \textup{rad}(\Pi_{A^\perp}(S'))=\text{span}_{\mathbb{F}_2}\{(0,0,e,e,e)\}.
This implies dim⁡(ΠA(S′))=dim⁡(ΠA⊥(S′))=1\dim(\Pi_A(S'))=\dim(\Pi_{A^\perp}(S'))=1dim(ΠA​(S′))=dim(ΠA⊥​(S′))=1 and irk(ΠA(S′))=irk(ΠA⊥(S′))=1\textup{irk}(\Pi_A(S'))= \textup{irk}(\Pi_{A^\perp}(S'))=1irk(ΠA​(S′))=irk(ΠA⊥​(S′))=1, in line with Proposition 22.
We conclude this section with some consequences of this proposition.

Corollary 23

Let A∈A(n)A\in \mathcal{A}(n)A∈A(n) and write S=rad(C)=C∩C⊥S = \textup{rad}(C)=C\cap C^\perpS=rad(C)=C∩C⊥. We have
dim⁡(ΠAS)=dim⁡(ΠA⊥S),\dim(\Pi_A S)= \dim(\Pi_{A^\perp} S),
and
irk(ΠAS)−irk(ΣAS)=irk(ΠA⊥S)−irk(ΣA⊥S).\textup{irk}(\Pi_A S) - \textup{irk}(\Sigma_A S)= \textup{irk}(\Pi_{A^\perp} S) - \textup{irk}(\Sigma_{A^\perp} S).
Proof: Recall that, by the discussion above, we have ΠAS=ΣAS⊕ΠAS′\Pi_A S = \Sigma_A S \oplus \Pi_A S'ΠA​S=ΣA​S⊕ΠA​S′, and similarly for ΠA⊥S\Pi_{A^\perp} SΠA⊥​S. Since ΣAS\Sigma_A SΣA​S is isotropic, any symplectic pairs in ΠAS\Pi_A SΠA​S must lie in ΠAS′\Pi_A S'ΠA​S′, and therefore dim⁡(ΠAS)=dim⁡(ΠAS′)\dim (\Pi_A S) = \dim(\Pi_A S')dim(ΠA​S)=dim(ΠA​S′). Moreover, as these summands are orthogonal, we have irk(ΠAS)=irk(ΣAS)+irk(ΠAS′)\textup{irk}(\Pi_A S) = \textup{irk}(\Sigma_A S) + \textup{irk}(\Pi_A S')irk(ΠA​S)=irk(ΣA​S)+irk(ΠA​S′). The result now follows from Proposition 22.

Corollary 24

Let A∈A(n)A\in \mathcal{A}(n)A∈A(n) and suppose S=rad(C)=C⊥S = \textup{rad}(C)=C^\perpS=rad(C)=C⊥. We have
dim⁡(A)−irk(ΣAC)=dim⁡(A⊥)−irk(ΣA⊥C),\dim(A) - \textup{irk}(\Sigma_A C) = \dim (A^\perp) - \textup{irk} (\Sigma_{A^\perp} C),
and
dim⁡(A)−dim⁡(ΣAC)−irk(ΣAS)=dim⁡(A⊥)−dim⁡(ΣA⊥C)−irk(ΣA⊥S).\dim (A) - \dim (\Sigma_A C) - \textup{irk} (\Sigma_A S) = \dim (A^\perp) - \dim (\Sigma_{A^\perp} C) - \textup{irk} (\Sigma_{A^\perp} S).
In particular,
irk(ΣAC)−irk(ΣAS)−dim⁡(ΣAC)=irk(ΣA⊥C)−irk(ΣA⊥S)−dim⁡(ΣA⊥C).\textup{irk}(\Sigma_A C) - \textup{irk}(\Sigma_A S) - \dim(\Sigma_A C) = \textup{irk}(\Sigma_{A^\perp} C) - \textup{irk}(\Sigma_{A^\perp} S) - \dim(\Sigma_{A^\perp} C).
Proof: From Theorem 3, we have ΠAS=ΠAC⊥=(ΣAC)⊥\Pi_A S = \Pi_A C^\perp = (\Sigma_A C)^\perpΠA​S=ΠA​C⊥=(ΣA​C)⊥, and similarly for A⊥A^\perpA⊥. Hence, Equation 15 follows immediately from Equation 13, and 16 from Equation 14.
Note that a special form of the corollary above is known in the context of stabilizer states, where Equation (16) follows from the fact that entanglement entropies of complementary subsystems in a pure state are equal. In particular, the values of both sides of the equation quantify the amount of bipartite entanglement in the system [31].

3. Invariants for Symplectic Codes

Invariants for codes defined using an anticode approach have been studied in coding theory since the seminal paper [18]; see also [19]. These invariants form a Galois collection, as shown in [32]. In this section, we introduce and investigate new invariants for symplectic codes. Throughout this section, we let C⊆VnC \subseteq V^nC⊆Vn be a code with dim⁡(C)=k\dim(C)=kdim(C)=k and minimum distance ddd. We introduce the maps αC,βC:A(n)→Z≥0\alpha_C,\beta_C: \mathcal{A}(n)\rightarrow\mathbb{Z}_{\geq 0}αC​,βC​:A(n)→Z≥0​ defined by
  1. αC(A)=dim⁡(C∩A)\alpha_C(A)=\dim(C\cap A)αC​(A)=dim(C∩A),
  2. βC(A)=irk(C∩A)−irk(rad(C)∩A)\beta_C(A)= \textup{irk}(C\cap A)-\textup{irk}(\textup{rad}(C)\cap A)βC​(A)=irk(C∩A)−irk(rad(C)∩A).
It is not hard to check that, by Equation 17, we have βC(A)−αC(A)=βC(A⊥)−αC(A⊥)\beta_C(A)-\alpha_C(A)=\beta_C(A^\perp)-\alpha_C(A^\perp)βC​(A)−αC​(A)=βC​(A⊥)−αC​(A⊥).

Lemma 25

We have βC(A)+αC(A⊥)=dim⁡(C)\beta_C(A)+\alpha_C(A^\perp) = \dim (C)βC​(A)+αC​(A⊥)=dim(C).
Proof: The result follows by swapping the roles of AAA and A⊥A^\perpA⊥ in Equation 11 and applying Equation 15. Recall that ΣAC≅C∩A\Sigma_A C \cong C \cap AΣA​C≅C∩A. In particular, we have
dim⁡(C)=dim⁡(A)−irk(rad(C)∩A)−dim⁡(A⊥)+dim⁡(C∩A⊥)+irk(C∩A⊥)=dim⁡(A)−irk(rad(C)∩A)−dim⁡(A)+dim⁡(C∩A⊥)+irk(C∩A)=irk(C∩A)−irk(rad(C)∩A)+dim⁡(C∩A⊥)\begin{aligned} \dim(C) &= \dim(A) - \textup{irk}(\textup{rad}(C) \cap A) - \dim(A^\perp) + \dim(C \cap A^\perp) + \textup{irk}(C\cap A^\perp) \\ &= \dim(A) - \textup{irk}(\textup{rad}(C) \cap A) - \dim(A) + \dim(C \cap A^\perp) + \textup{irk}(C \cap A) \\ &= \textup{irk}(C \cap A) - \textup{irk}(\textup{rad}(C) \cap A) + \dim(C \cap A^\perp) \end{aligned}
which implies the statement.
The following result establishes a relation between the maps αC\alpha_CαC​ and βC\beta_CβC​.

Proposition 26

We have αC(A)≤βC(A)\alpha_C(A)\leq \beta_C(A)αC​(A)≤βC​(A).
Proof: Observe that C=C∩(A+A⊥)⊇(C∩A)+(C∩A⊥)C = C \cap (A + A^\perp) \supseteq (C \cap A) + (C \cap A^\perp)C=C∩(A+A⊥)⊇(C∩A)+(C∩A⊥). Hence, we have dim⁡(C)≥dim⁡(ΣAC)+dim⁡(ΣA⊥C)\dim(C) \geq \dim(\Sigma_A C) + \dim(\Sigma_{A^\perp} C)dim(C)≥dim(ΣA​C)+dim(ΣA⊥​C). Finally, by Lemma 25, we obtain βC(A)+αC(A⊥)=dim⁡(C)≥αC(A)+αC(A⊥)\beta_C(A) + \alpha_C(A^\perp) = \dim(C) \geq \alpha_C(A) + \alpha_C(A^\perp)βC​(A)+αC​(A⊥)=dim(C)≥αC​(A)+αC​(A⊥), which implies the result.
We introduce the following notions of generalized weights and profiles for a symplectic code.

Definition

For any a∈{1,…,k}a\in\{1,\ldots,k\}a∈{1,…,k}, the aaa-generalized weights are
  1. ϑa(C)=min⁡{dim⁡(A):A∈A(n), αC(A)≥a}\vartheta_a(C)=\min\{\dim(A):A\in \mathcal{A}(n),\ \alpha_C(A)\geq a\}ϑa​(C)=min{dim(A):A∈A(n), αC​(A)≥a},
  2. φa(C)=min⁡{dim⁡(A):A∈A(n), βC(A)≥a}\varphi_a(C)=\min\{\dim(A):A\in \mathcal{A}(n),\ \beta_C(A)\geq a\}φa​(C)=min{dim(A):A∈A(n), βC​(A)≥a}.
For any b∈{1,…,n}b\in\{1,\ldots,n\}b∈{1,…,n}, the bbb-generalized profiles are
  1. θb(C)=max⁡{αC(A):A∈A(n), dim⁡(A)=b}\theta_b(C)=\max\{\alpha_C(A):A\in \mathcal{A}(n),\ \dim(A)=b\}θb​(C)=max{αC​(A):A∈A(n), dim(A)=b},
  2. ϕb(C)=max⁡{βC(A):A∈A(n), dim⁡(A)=b}\phi_b(C)=\max\{\beta_C(A):A\in \mathcal{A}(n),\ \dim(A)=b\}ϕb​(C)=max{βC​(A):A∈A(n), dim(A)=b}.
The following is a consequence of Proposition 26.

Corollary 27

If C⊥≤CC^\perp\leq CC⊥≤C then d=φ1(C)d = \varphi_1(C)d=φ1​(C).
Proof: Let A∈A(n)A \in \mathcal{A}(n)A∈A(n) with βC(A)≥1\beta_C(A) \geq 1βC​(A)≥1. Then there exists v∈Av \in Av∈A such that v∈C∖rad(C)v \in C \setminus \textup{rad}(C)v∈C∖rad(C). Hence, by the definition of minimum distance, we have d≤wt(v)≤dim⁡(A)d \leq \textup{wt}(v) \leq \dim(A)d≤wt(v)≤dim(A), and since AAA was arbitrary, ddd is at most the minimum over all such AAA. Conversely, let v∈C∖rad(C)v \in C \setminus \textup{rad}(C)v∈C∖rad(C) and set A=Asupp(v)A = A_{\mathrm{supp}(v)}A=Asupp(v)​. We claim that
irk(A∩C)>irk(A∩rad(C)).\textup{irk}(A \cap C) > \textup{irk}(A \cap \textup{rad}(C)).
First, if dim⁡(A∩C)>0\dim(A \cap C) > 0dim(A∩C)>0, then this follows immediately from Proposition 26. On the other hand, if dim⁡(A∩C)=0\dim(A \cap C) = 0dim(A∩C)=0, then
irk(A∩C)=dim⁡F(A∩C)>dim⁡F(A∩rad(C))=irk(A∩rad(C)).\textup{irk}(A \cap C) = \dim_\mathbb{F}(A \cap C) > \dim_\mathbb{F}(A \cap \textup{rad}(C)) = \textup{irk}(A \cap \textup{rad}(C)).
Therefore, d=wt(v)=dim⁡(A)d = \textup{wt}(v) = \dim(A)d=wt(v)=dim(A), and hence ddd is at least the minimum over all such AAA.

Remark

One can easily verify that, by Corollary 27, we have A∩C=rad(C)∩AA \cap C = \textup{rad}(C) \cap AA∩C=rad(C)∩A whenever dim⁡(A)<d\dim(A) < ddim(A)<d, and therefore φb(C)=ϑb(C)=0\varphi_b(C) = \vartheta_b(C) = 0φb​(C)=ϑb​(C)=0 for all b<db < db<d.

Example 28

Let C≤V2C \leq V^2C≤V2 be the code defined in Example 14, and recall that we have C=spanF2{(e,e),(f,f),(f,0)}C = \mathrm{span}_{\mathbb{F}_2}\{(e,e), (f,f), (f,0)\}C=spanF2​​{(e,e),(f,f),(f,0)} and C⊥=spanF2{(f,f)}C^{\perp} = \mathrm{span}_{\mathbb{F}_2}\{(f,f)\}C⊥=spanF2​​{(f,f)}. We have already observed that dim⁡(C)=1\dim(C) = 1dim(C)=1, irk(C)=2\textup{irk}(C) = 2irk(C)=2, and irk(rad(C))=1\textup{irk}(\textup{rad}(C)) = 1irk(rad(C))=1. One can verify that the set of anticodes A(2)\mathcal{A}(2)A(2) contains the zero subspace, V2V^2V2 and the spaces below.
A1=spanF2{(e,0),(f,0)},A2=spanF2{(0,e),(0,f)},A3=spanF2{(e,e),(f,f)}.A_1 = \mathrm{span}_{\mathbb{F}_2}\{(e,0),(f,0)\}, \quad A_2 = \mathrm{span}_{\mathbb{F}_2}\{(0,e),(0,f)\}, \quad A_3 = \mathrm{span}_{\mathbb{F}_2}\{(e,e),(f,f)\}.
The following hold.
  • θ1(C)=θ2(C)=1.\theta_1(C) = \theta_2(C) = 1.θ1​(C)=θ2​(C)=1. The only 1-dimensional anticodes that intersect CCC nontrivially are A1A_1A1​, A3A_3A3​, and V2V^2V2. We have dim⁡(A1∩C)=dim⁡(spanF2{(f,0)})=0\dim(A_1 \cap C) = \dim(\mathrm{span}_{\mathbb{F}_2}\{(f,0)\}) = 0dim(A1​∩C)=dim(spanF2​​{(f,0)})=0, dim⁡(A3∩C)=dim⁡(spanF2{(e,e),(f,f)})=1\dim(A_3 \cap C) = \dim(\mathrm{span}_{\mathbb{F}_2}\{(e,e),(f,f)\}) = 1dim(A3​∩C)=dim(spanF2​​{(e,e),(f,f)})=1, and dim⁡(V2∩C)=dim⁡(C)=1\dim(V^2 \cap C) = \dim(C) = 1dim(V2∩C)=dim(C)=1.
  • ϕ1(C)=ϕ2(C)=1.\phi_1(C) = \phi_2(C) = 1.ϕ1​(C)=ϕ2​(C)=1. This follows from the argument above, together with the fact that irk(A∩C)=dim⁡(A∩C)\textup{irk}(A \cap C) = \dim(A \cap C)irk(A∩C)=dim(A∩C) in this case. The latter holds because dim⁡(A∩C⊥)=0\dim(A \cap C^{\perp}) = 0dim(A∩C⊥)=0 for any A∈A(2)A \in \mathcal{A}(2)A∈A(2), since C⊥C^{\perp}C⊥ is isotropic.
  • φ1(C)=1\varphi_1(C)=1φ1​(C)=1. This can be attained for the anticode A1A_1A1​. In particular, we have C∩A1=spanF2{(f,0)}C\cap A_1=\mathrm{span}_{\mathbb{F}_2}\{(f,0)\}C∩A1​=spanF2​​{(f,0)} and rad(C)∩A1=spanF2{(0,0)}\textup{rad}(C)\cap A_1=\mathrm{span}_{\mathbb{F}_2}\{(0,0)\}rad(C)∩A1​=spanF2​​{(0,0)}, which implies
irk(C∩A1)−irk(rad(C)∩A1)=irk(C∩A1)=1.\textup{irk}(C\cap A_1)-\textup{irk}(\textup{rad}(C)\cap A_1)= \textup{irk}(C\cap A_1)=1.
Moreover, we have φ1(C)=1=d\varphi_1(C)=1=dφ1​(C)=1=d since C⊥≤CC^\perp\leq CC⊥≤C, in line with Corollary 27.

Remark 29

Observe that, by Proposition 26, we have that θb(C)≤ϕb(C)\theta_b(C)\leq \phi_b(C)θb​(C)≤ϕb​(C) for any b∈{1,…,n}b\in\{1,\ldots,n\}b∈{1,…,n}. As a consequence of ([32], Theorem 3.2), we have that (ϑa,θb)(\vartheta_a, \theta_b)(ϑa​,θb​) and (φa,ϕb)(\varphi_a, \phi_b)(φa​,ϕb​) form Galois connections between the sets {1,…,k}\{1, \ldots, k\}{1,…,k} and {1,…,n}\{1, \ldots, n\}{1,…,n}. In particular, we have
  1. a≤θb(C)a\leq \theta_b(C)a≤θb​(C) if and only if ϑa(C)≤b\vartheta_a(C)\leq bϑa​(C)≤b,
  2. a≤ϕb(C)a\leq \phi_b(C)a≤ϕb​(C) if and only if φa(C)≤b\varphi_a(C)\leq bφa​(C)≤b.
The following results hold by ([32], Proposition 3.1 and Theorem 3.2). For completeness, we include a proof in the appendix.

Proposition 30

The following hold for any b∈{1,…,n−1}b \in \{1, \ldots, n-1\}b∈{1,…,n−1}.
  1. θb+1(C)≤θb(C)+2\theta_{b+1}(C) \leq \theta_b(C) + 2θb+1​(C)≤θb​(C)+2.
  2. ϕb+1(C)≤ϕb(C)+2\phi_{b+1}(C) \leq \phi_b(C) + 2ϕb+1​(C)≤ϕb​(C)+2.
  3. If θb+1(C)=θb(C)+2\theta_{b+1}(C) = \theta_b(C) + 2θb+1​(C)=θb​(C)+2, then ϕb+1(C)=ϕb(C)\phi_{b+1}(C) = \phi_b(C)ϕb+1​(C)=ϕb​(C).
  4. If ϕb+1(C)=ϕb(C)+2\phi_{b+1}(C) = \phi_b(C) + 2ϕb+1​(C)=ϕb​(C)+2, then θb+1(C)=θb(C)\theta_{b+1}(C) = \theta_b(C)θb+1​(C)=θb​(C).
In particular,
θb+1(C)+ϕb+1(C)≤θb(C)+ϕb(C)+2.\theta_{b+1}(C) + \phi_{b+1}(C) \leq \theta_b(C) + \phi_b(C) + 2.
Proof: 1. Let A≤VnA\leq V^nA≤Vn be an anticode with dim⁡(A)=b+1\dim(A)=b+1dim(A)=b+1 and dim⁡(C∩A)=θb+1(C)\dim(C\cap A)=\theta_{b+1}(C)dim(C∩A)=θb+1​(C), and let A′⊆AA'\subseteq AA′⊆A be an anticode with dim⁡(A′)=b\dim(A')=bdim(A′)=b. Notice that A′A'A′ can be obtained from AAA by removing a symplectic pair. It easily follows that
dim⁡F(A∩C)≤dim⁡F(A′∩C)+2.\dim_\mathbb{F}(A\cap C)\leq \dim_\mathbb{F}(A'\cap C)+2.
One can check that this implies that the number of independent symplectic pairs in A∩CA\cap CA∩C is at most two more than in A′∩CA'\cap CA′∩C, that is,
dim⁡(A∩C)≤dim⁡(A′∩C)+2,\dim(A\cap C)\leq \dim(A'\cap C)+2,
which proves the statement.
  1. Let A≤VnA\leq V^nA≤Vn be an anticode with dim⁡(A)=b+1\dim(A)=b+1dim(A)=b+1 and irk(C∩A)−irk(rad(C)∩A)=ϕb+1(C)\textup{irk}(C\cap A)-\textup{irk}(\textup{rad}(C)\cap A)=\phi_{b+1}(C)irk(C∩A)−irk(rad(C)∩A)=ϕb+1​(C), and let A′⊆AA'\subseteq AA′⊆A be an anticode with dim⁡(A′)=b\dim(A')=bdim(A′)=b. From the proof of 1, we already know that dim⁡(A∩C)≤dim⁡(A′∩C)+2\dim(A\cap C)\leq \dim(A'\cap C)+2dim(A∩C)≤dim(A′∩C)+2. One can also check that
irk(C∩A)≤irk(C∩A′)+2andirk(rad(C)∩A′)≤irk(rad(C)∩A).\textup{irk}(C\cap A)\leq \textup{irk}(C\cap A')+2\qquad\textup{and}\qquad \textup{irk}(\textup{rad}(C)\cap A')\leq \textup{irk}(\textup{rad}(C)\cap A).
Hence, we obtain
irk(C∩A)−irk(rad(C)∩A)≤irk(C∩A′)+2−irk(rad(C)∩A′),\textup{irk}(C\cap A)-\textup{irk}(\textup{rad}(C)\cap A)\leq \textup{irk}(C\cap A')+2-\textup{irk}(\textup{rad}(C)\cap A'),
which proves the statement.
  1. Suppose θb+1(C)=θb(C)+2\theta_{b+1}(C) = \theta_b(C) + 2θb+1​(C)=θb​(C)+2, and let A,A′A,A'A,A′ be anticodes with A′⊆AA'\subseteq AA′⊆A, dim⁡(A)=b+1\dim(A)=b+1dim(A)=b+1, dim⁡(A′)=b\dim(A')=bdim(A′)=b, dim⁡(C∩A)=θb+1(C)\dim(C\cap A)=\theta_{b+1}(C)dim(C∩A)=θb+1​(C), and dim⁡(C∩A′)=θb(C)\dim(C\cap A')=\theta_b(C)dim(C∩A′)=θb​(C). This implies that there exist v1,v2∈C∩A′v_1,v_2\in C\cap A'v1​,v2​∈C∩A′ that do not correspond to a symplectic pair, and the extension C∩AC\cap AC∩A adds the corresponding elements u1,u2∈Vnu_1,u_2\in V^nu1​,u2​∈Vn with ω(v1,u1)=ω(v2,u2)=1\omega(v_1,u_1)=\omega(v_2,u_2)=1ω(v1​,u1​)=ω(v2​,u2​)=1. Therefore, the couples (v1,u1)(v_1,u_1)(v1​,u1​) and (v2,u2)(v_2,u_2)(v2​,u2​) form new symplectic pairs in C∩AC\cap AC∩A. Note that this does not increase the isorank. In particular, the same pairing mechanism applies inside rad(C)∩A′⊆rad(C)∩A\textup{rad}(C)\cap A'\subseteq \textup{rad}(C)\cap Arad(C)∩A′⊆rad(C)∩A, that is, the increase in irk(C∩A)\textup{irk}(C\cap A)irk(C∩A) is exactly matched by the increase in irk(rad(C)∩A)\textup{irk}(\textup{rad}(C)\cap A)irk(rad(C)∩A), respectively for irk(C∩A′)\textup{irk}(C\cap A')irk(C∩A′) and irk(rad(C)∩A′)\textup{irk}(\textup{rad}(C)\cap A')irk(rad(C)∩A′). Finally, we have
irk(C∩A)−irk(rad(C)∩A)=irk(C∩A′)−irk(rad(C)∩A′),\textup{irk}(C\cap A)-\textup{irk}(\textup{rad}(C)\cap A)= \textup{irk}(C\cap A')-\textup{irk}(\textup{rad}(C)\cap A'),
which implies ϕb+1(C)=ϕb(C)\phi_{b+1}(C)=\phi_b(C)ϕb+1​(C)=ϕb​(C).
  1. This follows from a similar argument as in the proof of 3.
Finally, as a consequence of the points above, we have that for any pair of anticodes A′⊆AA'\subseteq AA′⊆A with dim⁡(A)=dim⁡(A′)+1\dim(A)=\dim(A')+1dim(A)=dim(A′)+1, the pair (αC(A),βC(A))(\alpha_C(A),\beta_C(A))(αC​(A),βC​(A)) must be in the set
{(αC(A′),βC(A′)),(αC(A′)+2,βC(A′)),(αC(A′),βC(A′)+2),(αC(A′)+1,βC(A′)+1)}.\{(\alpha_C(A'),\beta_C(A')),(\alpha_C(A')+2,\beta_C(A')) ,(\alpha_C(A'),\beta_C(A')+2),(\alpha_C(A')+1,\beta_C(A')+1)\}.
This immediately implies Equation 18.

Example

Let C≤V4C\leq V^4C≤V4 be the code as in Example 16, that is
C=spanF2{(e,e,0,0),(f,f,0,0),(0,0,e,e),(0,0,f,f),(e,0,e,0),(f,0,f,0)},C = \mathrm{span}_{\mathbb{F}_2}\{(e,e,0,0), (f,f,0,0), (0,0,e,e), (0,0,f,f), (e,0,e,0), (f,0,f,0)\},
and observe that CCC admits the orthogonal decomposition C=rad(C)⊕KC= \textup{rad}(C)\oplus KC=rad(C)⊕K, with
K=spanF2{(e,e,0,0),(f,f,0,0),(e,0,e,0),(f,0,f,0)},andrad(C)=C⊥.K=\mathrm{span}_{\mathbb{F}_2}\{(e,e,0,0), (f,f,0,0), (e,0,e,0), (f,0,f,0)\},\qquad\textup{and}\qquad \textup{rad}(C)=C^\perp.
Let A(4)\mathcal{A}(4)A(4) denote the family of anticodes in V4V^4V4. One can check that the following hold.
  1. θ1(C)=ϕ1(C)=0\theta_1(C)=\phi_1(C)=0θ1​(C)=ϕ1​(C)=0. This follows from the fact that the codewords of CCC have weight at least 222. Hence, no 111-dimensional anticode intersects CCC nontrivially.
  2. θ2(C)=0\theta_2(C)=0θ2​(C)=0. This follows from the fact that C∩A=rad(C∩A)C\cap A= \textup{rad}(C\cap A)C∩A=rad(C∩A) for any A∈A(4)A\in \mathcal{A}(4)A∈A(4) with dim⁡(A)=2\dim(A)=2dim(A)=2.
  3. θ3(C)=2\theta_3(C)=2θ3​(C)=2. This value is attained, for example, by intersecting CCC with the 333-dimensional anticode spanF2{(e,0,0,0),(f,0,0,0),(0,e,0,0),(0,f,0,0),(0,0,e,0),(0,0,f,0)}\mathrm{span}_{\mathbb{F}_2}\{(e,0,0,0),(f,0,0,0),(0,e,0,0),(0,f,0,0),(0,0,e,0),(0,0,f,0)\}spanF2​​{(e,0,0,0),(f,0,0,0),(0,e,0,0),(0,f,0,0),(0,0,e,0),(0,0,f,0)}, which leads to the 111-dimensional space spanF2{(e,e,0,0),(f,f,0,0),(e,0,e,0),(f,0,f,0)}\mathrm{span}_{\mathbb{F}_2}\{(e,e,0,0),(f,f,0,0),(e,0,e,0),(f,0,f,0)\}spanF2​​{(e,e,0,0),(f,f,0,0),(e,0,e,0),(f,0,f,0)}. One can also observe that, for any A∈A(4)A\in \mathcal{A}(4)A∈A(4) with dim⁡(A)=3\dim(A)=3dim(A)=3, we have dim⁡(C∩A)=2\dim(C\cap A)=2dim(C∩A)=2 and rad(C∩A)=∅\textup{rad}(C\cap A)=\emptysetrad(C∩A)=∅.
  4. θ4(C)=2\theta_4(C)=2θ4​(C)=2. This follows from the fact that the only anticode of dimension 444 is V4V^4V4. In particular, dim⁡(C∩V4)=dim⁡(C)=12dim⁡(K)\dim(C\cap V^4)=\dim(C)=\frac{1}{2}\dim(K)dim(C∩V4)=dim(C)=21​dim(K).
  5. ϕ2(C)=ϕ3(C)=2\phi_2(C)=\phi_3(C)=2ϕ2​(C)=ϕ3​(C)=2. Note that, for any A∈A(n)A\in\mathcal{A}(n)A∈A(n) with dim⁡(A)∈{2,3}\dim(A)\in\{2,3\}dim(A)∈{2,3}, we have that C∩AC\cap AC∩A is an isotropic space with dim⁡(C∩A)=2\dim(C\cap A)=2dim(C∩A)=2, and the support of rad(C)\textup{rad}(C)rad(C) is {1,2,3,4}\{1,2,3,4\}{1,2,3,4}. Therefore, it intersects AAA trivially.
  6. ϕ4(C)=2\phi_4(C)=2ϕ4​(C)=2. This is a consequence of the fact that irk(C∩V4)=irk(C)=4\textup{irk}(C\cap V^4)= \textup{irk}(C)=4irk(C∩V4)=irk(C)=4 and irk(rad(C)∩V4)=irk(rad(C))=2\textup{irk}(\textup{rad}(C)\cap V^4)= \textup{irk}(\textup{rad}(C))=2irk(rad(C)∩V4)=irk(rad(C))=2.
One can easily check that this is in line with Proposition 30 . In particular, one observes that ϕ2(C)=ϕ1(C)+2\phi_2(C)=\phi_1(C)+2ϕ2​(C)=ϕ1​(C)+2 and θ2(C)=θ1(C)\theta_2(C)=\theta_1(C)θ2​(C)=θ1​(C), as well as θ3(C)=θ2(C)+2\theta_3(C)=\theta_2(C)+2θ3​(C)=θ2​(C)+2 and ϕ3(C)=ϕ2(C)\phi_3(C)=\phi_2(C)ϕ3​(C)=ϕ2​(C), in line with parts 3 and 4.

Proposition 31

For any a∈{1,…,k−2}a\in\{1,\ldots,k-2\}a∈{1,…,k−2}, we have
  1. ϑa(C)+1≤ϑa+2(C)\vartheta_{a}(C)+ 1 \leq \vartheta_{a+2}(C)ϑa​(C)+1≤ϑa+2​(C),
  2. φa(C)+1≤φa+2(C)\varphi_{a}(C) + 1 \leq \varphi_{a+2}(C)φa​(C)+1≤φa+2​(C).
Proof: This is an immediate consequence of ([32], Proposition 3.1) applied to Proposition 30 and Remark 29.

Definition 32

For any a∈{1,…,k}a\in\{1,\ldots,k\}a∈{1,…,k}, we let
δa(C)=min⁡{dim⁡(A):A∈A(n), αC(A)+βC(A)≥2a}.\delta_a(C) = \min\{\dim(A) : A\in \mathcal{A}(n),\ \alpha_C(A)+\beta_C(A) \geq 2a\}.

Proposition 33

For any a∈{1,…,k−1}a\in\{1,\ldots,k-1\}a∈{1,…,k−1}, we have δa(C)+1≤δa+1(C)\delta_a(C) +1 \leq \delta_{a+1}(C)δa​(C)+1≤δa+1​(C).
Proof: Let A∈A(n)A \in \mathcal{A}(n)A∈A(n) be an anticode such that dim⁡(A)=δa+1(C)\dim(A)=\delta_{a+1}(C)dim(A)=δa+1​(C) and αC(A)+βC(A)≥2(a+1)\alpha_C(A)+\beta_C(A)\ge 2(a+1)αC​(A)+βC​(A)≥2(a+1). Let A′∈A(n)A' \in \mathcal{A}(n)A′∈A(n) be any anticode with A′≤AA' \le AA′≤A and dim⁡(A′)=dim⁡(A)−1=δa+1(C)−1\dim(A')=\dim(A)-1=\delta_{a+1}(C)-1dim(A′)=dim(A)−1=δa+1​(C)−1. Note that we can obtain A′A'A′ from AAA by removing a single symplectic pair. By the same argument used in Proposition 30, we have
αC(A′)+βC(A′)≥αC(A)+βC(A)−2≥2(a+1)−2=2a.\alpha_C(A') + \beta_C(A') \ge \alpha_C(A) + \beta_C(A) - 2 \ge 2(a+1)-2 =2a.
Finally, we have that δa(C)≤dim⁡(A′)=δa+1(C)−1\delta_a(C)\le \dim(A')=\delta_{a+1}(C)-1δa​(C)≤dim(A′)=δa+1​(C)−1. □\square□
We obtain the following bounds.

Theorem 1

The following hold for any a∈{1,…,k}a\in\{1,\ldots,k\}a∈{1,…,k}.
  1. δa(C)≤n−d−k+a+1\delta_a(C)\leq n-d-k+a+1δa​(C)≤n−d−k+a+1.
  2. If C⊥≤CC^\perp\leq CC⊥≤C then φa(C)≤n−d−⌊(k−a)/2⌋+1\varphi_a(C)\leq n-d-\lfloor(k-a)/2\rfloor+1φa​(C)≤n−d−⌊(k−a)/2⌋+1.
Proof: First, take any A∈A(n)A \in \mathcal{A}(n)A∈A(n) with dim⁡(A⊥)<d\dim(A^\perp) < ddim(A⊥)<d. Corollary 27 and Proposition 26 imply that βC(A⊥)=αC(A⊥)=0\beta_C(A^\perp) = \alpha_C(A^\perp) = 0βC​(A⊥)=αC​(A⊥)=0. Hence, by Lemma 25, we have αC(A)=βC(A)=k\alpha_C(A) = \beta_C(A) = kαC​(A)=βC​(A)=k. Since dim⁡(A)≥n−d+1\dim(A) \geq n - d + 1dim(A)≥n−d+1, by Equation 19 we obtain δk(C)≤n−d+1\delta_k(C) \leq n - d + 1δk​(C)≤n−d+1. Moreover, if dim⁡(A)<d\dim(A) < ddim(A)<d, then βC(A)=αC(A)=0\beta_C(A) = \alpha_C(A) = 0βC​(A)=αC​(A)=0. Finally, Proposition 33 implies
δa(C)≤δa+1(C)−1≤⋯≤δk(C)−k+1,\delta_a(C) \leq \delta_{a+1}(C) - 1 \leq \cdots \leq \delta_k(C) - k + 1,
and therefore d≤n−k−d+2d \leq n - k - d + 2d≤n−k−d+2, as claimed. The second part of the statement follows by appling a similar argument to Proposition 31.
The result above can be seen as a generalization of the quantum Singleton bound [33, 34, 35], which is recovered by taking a=1a = 1a=1.

Theorem 3.2: Quantum Singleton Bound

We have 2(d−1)≤n−k2(d-1)\leq n-k2(d−1)≤n−k.
Proof: It follows by setting a=1a = 1a=1 in Theorem 1.1 and observing that, by Equation 19, we have d≤δ1(C)d \leq \delta_1(C)d≤δ1​(C). Alternatively, the result can be recovered by setting a=1a = 1a=1 in Theorem 1.2 and recalling that, by Corollary 27, d=φ1(C)d = \varphi_1(C)d=φ1​(C) if C⊥≤CC^\perp \leq CC⊥≤C.
The following can be seen as a lower Singleton-type bound.

Proposition

For any a∈{1,…,k}a\in\{1,\ldots,k\}a∈{1,…,k}, we have φa(C)≥a\varphi_a(C)\geq aφa​(C)≥a.
Proof: Let AJA_JAJ​ be the quantum anticode supported on JJJ, for some J⊆{1,…,n}J\subseteq\{1,\ldots,n\}J⊆{1,…,n}, with βC≥a\beta_C\geq aβC​≥a. Then, in particular, dim⁡(AJ)≥a\dim(A_J)\geq adim(AJ​)≥a which implies φA(C)≥a\varphi_A(C)\geq aφA​(C)≥a.

4. Bilinear Moments and Enumerators

In this section, we introduce and study further invariants defined through anticodes, namely the binomial moments and the weight distribution of a code. These notions are direct analogues of classical invariants that have been extensively studied for several metrics (see, for example, [18, 36, 19, 37]). We also introduce the corresponding weight enumerators and show how they can be expressed in terms of the binomial moments and the weight distribution. These invariants naturally fit within the framework of [38]; the binomial moments we define below are related to enumerators A′A'A′ and B′B'B′ of that work. Throughout this section, we assume that qqq is a prime power and that VVV is a 222-dimensional symplectic space over the finite field Fq\mathbb{F}_qFq​. In particular, ∣V∣=q2|V| = q^2∣V∣=q2.

Definition

The weight distribution of CCC is the tuple of length n+1n+1n+1 whose aaa-th component is
Wa(C)=∑A∈A(n)dim⁡(A)=aWA(C), where WA(C)=∣{c∈C∣supp(c)=supp(A)}∣.\mathcal{W}_a(C)=\sum_{\substack{A\in\mathcal{A}(n)\\\dim(A)=a}}\mathcal{W}_A(C),\quad\textup{ where }\quad \mathcal{W}_A(C)=|\{c\in C\mid\textup{supp}(c)=\textup{supp}(A)\}|.
For any b∈{1,…,n}b\in\{1,\ldots,n\}b∈{1,…,n}, the bbb-th binomial moment of CCC is
Bb(C)=∑A∈A(n)dim⁡(A)=bBA(C), where BA(C)=∣C∩A∣.\mathcal{B}_b(C)=\sum_{\substack{A\in\mathcal{A}(n)\\\dim(A)=b}}\mathcal{B}_A(C),\quad\textup{ where }\quad \mathcal{B}_A(C)=|C\cap A|.
Clearly, we have BA(C)=qdim⁡F(C∩A)\mathcal{B}_A(C) = q^{\dim_\mathbb{F}(C \cap A)}BA​(C)=qdimF​(C∩A). The following result establishes a correspondence between weight distribution and binomial moments of a code. In particular, it shows that these two invariants are equivalent in the sense that they encode the same information. This result can be viewed as the quantum analogue of ([19], Theorem 6.4) (see also ([28], Lemma 30) and ([36], Theorem 3.8)).

Lemma 34

The following hold for any A∈A(n)A\in\mathcal{A}(n)A∈A(n) and a,b∈{1,…,n}a,b\in\{1,\ldots,n\}a,b∈{1,…,n}.
  1. BA(C)=∑A′∈A(n)A′≤AWA′(C)\displaystyle \mathcal{B}_A(C)=\sum_{\substack{A'\in\mathcal{A}(n)\\A'\leq A}}\mathcal{W}_{A'}(C)BA​(C)=A′∈A(n)A′≤A​∑​WA′​(C).
  2. WA(C)=∑A′∈A(n)A′≤A(−1)dim⁡(A)−dim⁡(A′)BA′(C)\displaystyle \mathcal{W}_A(C)=\sum_{\substack{A'\in\mathcal{A}(n)\\A'\leq A}}(-1)^{\dim(A)-\dim(A')}\mathcal{B}_{A'}(C)WA​(C)=A′∈A(n)A′≤A​∑​(−1)dim(A)−dim(A′)BA′​(C).
  3. Bb(C)=∑a=0b(n−ab−a)Wa(C)\displaystyle \mathcal{B}_b(C)=\sum_{a=0}^b\binom{n-a}{b-a}\mathcal{W}_{a}(C)Bb​(C)=a=0∑b​(b−an−a​)Wa​(C).
  4. Wa(C)=∑b=0a(−1)a−b(n−ba−b)Bb(C)\displaystyle \mathcal{W}_a(C)=\sum_{b=0}^a(-1)^{a-b}\binom{n-b}{a-b}\mathcal{B}_{b}(C)Wa​(C)=b=0∑a​(−1)a−b(a−bn−b​)Bb​(C).
Proof: The first two equalities follow directly from the definitions of weight distribution and binomial moments, together with the fact that the poset A(n)\mathcal{A}(n)A(n) of anticodes ordered by inclusion forms a lattice isomorphic to the subset lattice of {1,…,n}\{1, \ldots, n\}{1,…,n}. Now, by 1. we have
Bb(C)=∑a=0b∑A′∈A(n)A′≤AWA′(C)=∑a=0b∑A′∈A(n)dim⁡(A′)=aWA′(C)∣{A∈A(n):dim⁡(A)=b,A′≤A}∣=∑a=0b(n−ab−a)Wa(C),\begin{aligned} \mathcal{B}_b(C)&=\sum_{a=0}^b\sum_{\substack{A'\in\mathcal{A}(n)\\A'\leq A}}\mathcal{W}_{A'}(C)\\ &=\sum_{a=0}^b\sum_{\substack{A'\in\mathcal{A}(n)\\\dim(A')=a}}\mathcal{W}_{A'}(C)|\{A\in\mathcal{A}(n):\dim(A)=b, A'\leq A\}|\\ &=\sum_{a=0}^b\binom{n-a}{b-a}\mathcal{W}_{a}(C), \end{aligned}
since there are exactly (n−ab−a)\binom{n - a}{b - a}(b−an−a​) anticodes of dimension bbb that contain a fixed anticode A′A'A′ of dimension aaa. Finally, a similar argument applied to 1. and 2. establishes 4.
The duality relation established in Theorem 1 leads to the following MacWilliams identities for binomial moments. One can observe that the next result is the quantum analogue of ([19], Theorem 6.7) (see also ([36], Theorem 7.1) and ([28], Lemma 28)).

Theorem 4.1

The following hold.
  1. BA(C⊥)=q2(dim⁡(A)−k)BA⊥(C)\displaystyle \mathcal{B}_A(C^\perp) = q^{2(\dim(A) - k)} \mathcal{B}_{A^\perp}(C)BA​(C⊥)=q2(dim(A)−k)BA⊥​(C) for any A∈A(n)A\in\mathcal{A}(n)A∈A(n).
  2. Bb(C⊥)=q2(b−k)Bn−b(C)\displaystyle \mathcal{B}_b(C^\perp) = q^{2(b-k)} \mathcal{B}_{n-b}(C)Bb​(C⊥)=q2(b−k)Bn−b​(C) for any b∈{0,…,n}b\in\{0,\ldots,n\}b∈{0,…,n}.
Proof: The first equation follows immediately from Equation 10. For the second, we observe that the map A↦A⊥A \mapsto A^\perpA↦A⊥ naturally induces a bijection between anticodes of dimension bbb and those of dimension n−bn - bn−b.
We introduce the following notions of homogeneous polynomials that encode structural properties of a code.

Definition

Let xxx and yyy be indeterminate. The weight enumerators of CCC are
A(x,y;C)=∑c∈rad(C)xwt(c)yn−wt(c) and B(x,y;C)=∑c∈Cxwt(c)yn−wt(c).\mathcal{A}(x,y;C) = \sum_{c\in \textup{rad}(C)} x^{\textup{wt}(c)}y^{n-\textup{wt}(c)}\qquad\textup{ and }\qquad \mathcal{B}(x,y;C) = \sum_{c\in C} x^{\textup{wt}(c)}y^{n-\textup{wt}(c)}.
One can observe that B(x,y;C)\mathcal{B}(x,y;C)B(x,y;C) corresponds to the classical weight enumerator of a code. However, as for the minimum distance, isotropic vectors in the code CCC require separate consideration. Therefore, we introduce a second enumerator, A(x,y;C)\mathcal{A}(x,y;C)A(x,y;C), which counts specifically the weights of isotropic vectors. This approach aligns with the conventional definition of quantum weight enumerators as in [39]. Note that our normalization (or lack thereof) conforms to convention in [39] as opposed to that of [38]. We omit the proof of the next result, as it follows directly from the definitions of weight enumerators and minimum distance.

Proposition

The minimum distance of CCC is the trailing degree of B(x,1;C)−A(x,1;C)\mathcal{B}(x,1;C)-\mathcal{A}(x,1;C)B(x,1;C)−A(x,1;C).
As a consequence of Lemma 34, we can express the weight enumerator B(x,y;C)\mathcal{B}(x,y;C)B(x,y;C) in terms of the weight distribution and the binomial moments of the code, as shown in the next result.

Proposition 35

The following holds.
B(x,y;C)=∑a=0nWa(C)xayn−a=∑b=0nBb(C)xb(y−x)n−b.\mathcal{B}(x, y; C)=\sum_{a=0}^n\mathcal{W}_a(C)x^ay^{n-a}=\sum_{b=0}^n\mathcal{B}_b(C)x^b(y-x)^{n-b}.
Proof: By definition of weight enumerator, we get
B(x,y;C)=∑a=0n∑c∈Cwt(c)=axayn−a=∑a=0n∣{c∈C∣wt(c)=a}∣xayn−a=∑a=0nWa(C)xayn−a.\begin{aligned} \mathcal{B}(x, y; C)=\sum_{a=0}^n\sum_{\substack{c\in C\\ \textup{wt}(c)=a}}x^ay^{n-a}=\sum_{a=0}^n|\{c\in C\mid \textup{wt}(c)=a\}|x^ay^{n-a}=\sum_{a=0}^n\mathcal{W}_a(C)x^ay^{n-a}. \end{aligned}
Combining this with Lemma 34, we get
B(x,y;C)=∑a=0n∑b=0a(−1)a−b(n−ba−b)Bb(C)xayn−a=∑b=0n(∑a=bn(−1)a−b(n−ba−b)xayn−a)Bb(C)=∑b=0n(∑a=0n−b(−1)a(n−ba)xa+byn−a−b)Bb(C)=∑b=0nxb(∑a=0n−b(−1)a(n−ba)xayn−b−a)Bb(C)=∑b=0nBb(C)xb(y−x)n−b,\begin{aligned} \mathcal{B}(x, y; C)&=\sum_{a=0}^n\sum_{b=0}^a(-1)^{a-b}\binom{n-b}{a-b}\mathcal{B}_{b}(C)x^ay^{n-a}\\ &=\sum_{b=0}^n\left(\sum_{a=b}^n(-1)^{a-b}\binom{n-b}{a-b}x^ay^{n-a}\right)\mathcal{B}_{b}(C)\\ &=\sum_{b=0}^n\left(\sum_{a=0}^{n-b}(-1)^{a}\binom{n-b}{a}x^{a+b}y^{n-a-b}\right)\mathcal{B}_{b}(C)\\ &=\sum_{b=0}^nx^b\left(\sum_{a=0}^{n-b}(-1)^{a}\binom{n-b}{a}x^{a}y^{n-b-a}\right)\mathcal{B}_{b}(C)\\ &=\sum_{b=0}^n\mathcal{B}_{b}(C)x^b(y-x)^{n-b}, \end{aligned}
which concludes the proof.
We conclude this section with the following example.

Example 36

Let CCC and C⊥C^\perpC⊥ be as in Example 28, that is C=spanF2{(e,e),(f,f),(f,0)}C = \mathrm{span}_{\mathbb{F}_2}\{(e,e), (f,f), (f,0)\}C=spanF2​​{(e,e),(f,f),(f,0)} and C⊥=spanF2{(f,f)}C^{\perp} = \mathrm{span}_{\mathbb{F}_2}\{(f,f)\}C⊥=spanF2​​{(f,f)}. Listing all codewords, we get
C=spanF2{(0,0),(e,e),(f,f),(e+f,e+f),(f,0),(e+f,e),(0,f),(e,e+f)},rad(C)=C⊥=spanF2{(0,0),(e,e),(f,f),(e+f,e+f)}.\begin{aligned} C &= \mathrm{span}_{\mathbb{F}_2}\{(0,0), (e,e), (f,f), (e+f,e+f), (f,0), (e+f,e), (0,f), (e,e+f)\},\\ \textup{rad}(C) &= C^\perp = \mathrm{span}_{\mathbb{F}_2}\{(0,0), (e,e), (f,f), (e+f,e+f)\}. \end{aligned}
From this description, the weight enumerators follow immediately. The code CCC has one codeword of weight 000, two of weight 111, and five of weight 222, hence B(x,y;C)=y2+2xy+5x2\mathcal{B}(x,y;C) = y^2 + 2xy + 5x^2B(x,y;C)=y2+2xy+5x2. Similarly, C⊥C^\perpC⊥ has one codeword of weight 000 and three of weight 222, and therefore we have B(x,y;C⊥)=A(x,y;C)=y2+3x2\mathcal{B}(x,y;C^\perp) = \mathcal{A}(x,y;C) = y^2 + 3x^2B(x,y;C⊥)=A(x,y;C)=y2+3x2, since C⊥=rad(C)C^\perp = \textup{rad}(C)C⊥=rad(C). On the other hand, from Example 28 we know that dim⁡F2(C∩A)=1\dim_{\mathbb{F}_2}(C \cap A) = 1dimF2​​(C∩A)=1 for each anticode A∈{A{1},A{2}}A \in \{A_{\{1\}}, A_{\{2\}}\}A∈{A{1}​,A{2}​}, and that C∩A{3}=∅C \cap A_{\{3\}} = \emptysetC∩A{3}​=∅. Therefore,
B1(C)=4,B2(C)=∣C∩V2∣=∣C∣=8,B1(C⊥)=1,B2(C⊥)=∣C⊥∩V2∣=4.\mathcal{B}_1(C) = 4, \qquad \mathcal{B}_2(C) = |C\cap V^2|= |C| = 8,\qquad \mathcal{B}_1(C^\perp) = 1, \qquad \mathcal{B}_2(C^\perp) =|C^\perp\cap V^2|= 4.
Simple algebraic computations lead to
B(x,y;C)=(y−x)2+4x(y−x)+8x2=y2+2xy+5x2,A(x,y;C)=B(x,y;C⊥)=(y−x)2+x(y−x)+4x2=y2+3x2.\begin{aligned} \mathcal{B}(x,y;C) &= (y-x)^2 + 4x(y-x) + 8x^2 = y^2 + 2xy + 5x^2,\\ \mathcal{A}(x,y;C)&=\mathcal{B}(x,y;C^\perp)= (y-x)^2 + x(y-x) + 4x^2= y^2 + 3x^2. \end{aligned}
as expected, in line with Proposition 35.

References

[1] Alexei Yurievich Kitaev. Fault-tolerant quantum computation by anyons. Annals of physics, 303(1):2–30, 2003.
[2] Austin G. Fowler, Matteo Mariantoni, John M. Martinis, and Andrew N. Cleland. Surface codes: Towards practical large-scale quantum computation. Physical Review A—Atomic, Molecular, and Optical Physics, 86(3):032324, 2012.
[3] Fernando Pastawski, Beni Yoshida, Daniel Harlow, and John Preskill. Holographic quantum error-correcting codes: Toy models for the bulk/boundary correspondence. Journal of High Energy Physics, 2015(6):1–55, 2015.
[4] Ahmed Almheiri, Xi Dong, and Daniel Harlow. Bulk locality and quantum error correction in AdS/CFT. Journal of High Energy Physics, 2015(4):1–34, 2015.
[5] ChunJun Cao and Brad Lackey. Approximate Bacon-Shor code and holography. Journal of High Energy Physics, 2021(5):1–110, 2021.
[6] Matthew Steinberg, Junyu Fan, Robert J. Harris, David Elkouss, Sebastian Feld, and Alexander Jahn. Far from perfect: Quantum error correction with (hyperinvariant) evenbly codes. Quantum, 9:1826, August 2025.
[7] Daniel Harlow. The ryu–takayanagi formula from quantum error correction. Communications in Mathematical Physics, 354(3):865–912, May 2017.
[8] Jason Pollack, Patrick Rall, and Andrea Rocchetto. Understanding holographic error correction via unique algebras and atomic examples. Journal of High Energy Physics, 2022(6), June 2022.
[9] A. Robert Calderbank, Eric M. Rains, Peter M. Shor, and Neil J. A. Sloane. Quantum error correction via codes over GF(4). IEEE Transactions on Information Theory, 44(4):1369–1387, 1998.
[10] Daniel Gottesman. Class of quantum error-correcting codes saturating the quantum hamming bound. Physical Review A, 54(3):1862, 1996.
[11] Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology, 1997.
[12] Michael A. Nielsen and Isaac L. Chuang. Quantum computation and quantum information. Cambridge university press, 2010.
[13] Andrew J. Ferris and David Poulin. Tensor networks and quantum error correction. Physical Review Letters, 113(3), July 2014.
[14] Terry Farrelly, Robert J. Harris, Nathan A. McMahon, and Thomas M. Stace. Tensor-network codes. Physical Review Letters, 127(4), July 2021.
[15] ChunJun Cao and Brad Lackey. Quantum lego: Building quantum error correction codes from tensor networks. PRX Quantum, 3(2), May 2022.
[16] ChunJun Cao and Brad Lackey. Quantum Weight Enumerators and Tensor Networks. IEEE Trans. Info. Theor., 70(5):3512–3528, 2024.
[17] ChunJun Cao, Michael J. Gullans, Brad Lackey, and Zitao Wang. Quantum Lego Expansion Pack: Enumerators from Tensor Networks. PRX Quantum, 5(3):030313, 2024.
[18] Alberto Ravagnani. Generalized weights: an anticode approach. Journal of Pure and Applied Algebra, 220(5):1946–1962, 2016.
[19] Eimear Byrne and Giuseppe Cotardo. Tensor codes and their invariants. SIAM Journal on Discrete Mathematics, 37(3):1988–2015, 2023.
[20] Emil Artin. Geometric Algebra. Courier Dover Publications, 2016.
[21] Edward F. Assmus and Jennifer D. Key. Affine and projective planes. Discrete Mathematics, 83(2-3):161–187, 1990.
[22] Edward F. Assmus and Jennifer D. Key. Designs and their Codes. Number 103. Cambridge University Press, 1994.
[23] Sarah E. Anderson, Eduardo Camps-Moreno, Hiram H. López, Gretchen L. Matthews, Diego Ruano, and Ivan Soprunov. Relative hulls and quantum codes. IEEE Transactions on Information Theory, 70(5):3190–3201, 2024.
[24] David Poulin. Stabilizer formalism for operator quantum error correction. Physical review letters, 95(23):230504, 2005.
[25] Dave Bacon. Operator quantum error-correcting subsystems for self-correcting quantum memories. Physical Review A - Atomic, Molecular, and Optical Physics, 73(1):012340, 2006.
[26] Todd Brun, Igor Devetak, and Min-Hsiu Hsieh. Correcting quantum errors with entanglement. science, 314(5798):436–439, 2006.
[27] Eric M. Rains, R. H. Hardin, Peter W. Shor, and Neil J. A. Sloane. A nonadditive quantum code. Physical Review Letters, 79(5):953, 1997.
[28] Alberto Ravagnani. Rank-metric codes and their duality theory. Designs, codes and Cryptography, 80(1):197–216, 2016.
[29] Sergey Bravyi and Barbara Terhal. A no-go theorem for a two-dimensional self-correcting quantum memory based on stabilizer codes. New Journal of Physics, 11(4):043029, 2009.
[30] W. Cary Huffman and Vera Pless. Fundamentals of error-correcting codes. Cambridge university press, 2003.
[31] David Fattal, Toby S Cubitt, Yoshihisa Yamamoto, Sergey Bravyi, and Isaac L Chuang. Entanglement in the stabilizer formalism. arXiv preprint quant-ph/0406168, 2004.
[32] Yang Xu, Haibin Kan, and Guangyue Han. A Galois connection approach to Wei-type duality theorems. IEEE Transactions on Information Theory, 68(8):5133–5144, 2022.
[33] Emanuel Knill and Raymond Laflamme. Theory of quantum error-correcting codes. Physical Review A, 55(2):900, 1997.
[34] Eric M. Rains. Nonbinary quantum codes. IEEE Transactions on Information Theory, 45(6):1827–1832, 2002.
[35] John Preskill. Lecture notes for physics 229: Quantum information and computation. California institute of technology, 16(1):1–8, 1998.
[36] Eimear Byrne, Giuseppe Cotardo, and Alberto Ravagnani. Rank-metric codes, generalized binomial moments and their zeta functions. Linear Algebra and its Applications, 604:92–128, 2020.
[37] Giuseppe Cotardo. Zeta functions for tensor codes. Journal of Algebra and Its Applications, 24(03):2550074, 2025.
[38] Eric M. Rains. Quantum weight enumerators. IEEE Transactions on Information Theory, 44(4):1388–1394, 2002.
[39] Peter Shor and Raymond Laflamme. Quantum analog of the macwilliams identities for classical coding theory. Physical review letters, 78(8):1600, 1997.