Fermionic CFTs from classical codes over finite fields

We construct a class of chiral fermionic CFTs from classical codes over finite fields whose order is a prime number. We exploit the relationship between classical codes and Euclidean lattices to provide the Neveu-Schwarz sector of fermionic CFTs. On the other hand, we construct the Ramond sector using the shadow theory of classical codes and Euclidean lattices. We give various examples of chiral fermionic CFTs through our construction. We also explore supersymmetric CFTs in terms of classical codes by requiring the resulting fermionic CFTs to satisfy some necessary conditions for supersymmetry.


Introduction
In this paper, we construct a class of chiral fermionic CFTs from classical codes. The construction of CFTs from error-correcting codes has a long history, which started with chiral bosonic CFTs from a specific class of classical binary codes [1][2][3]. 1 Recently, another type of classical code called ternary codes, which are based on the finite field F 3 = {0, 1, 2}, have been exploited to construct chiral fermionic CFTs [17]. This paper generalizes the construction of fermionic CFTs to classical p-ary codes. Classical p-ary codes are a natural generalization of binary and ternary codes corresponding to p = 2 and p = 3, respectively. For a prime number p, classical p-ary codes are based on the finite field F p = {0, 1, 2, · · · , p − 1} and can be formulated in the same manner as the binary and ternary case. The goal is to extend the construction from ternary codes to classical codes over F p where p is a prime number.
In analogy with the ternary case [17], one of the main tools for building up chiral fermionic CFTs is the relationship between classical codes and Euclidean lattices [18,19]. We exploit the relationship to construct Euclidean lattices from classical codes. Each Euclidean lattice can be associated with a set of vertex operators and provides the Neveu-Schwarz (NS) sector of the corresponding fermionic CFT. On the other hand, constructing the Ramond (R) sector requires us to introduce the shadow of a lattice [20], which is a kind of half-shifts of a Euclidean lattice. The shadow of a lattice can be uniquely determined for each Euclidean lattice constructed from classical codes. Although the shadow has been defined purely in coding theory, it helps us to yield the R sector of our fermionic CFTs. In fact, we endow with the R sector by associating each element of the shadow with a vertex operator as in the NS sector (see the left panel of Fig.1).
In particular, the binary case allows us to construct the R sector more directly from classical codes. While some classical binary codes have been known to provide chiral bosonic CFTs [1][2][3], we employ a different type of binary code to construct chiral fermionic CFTs. For that class of binary codes, one can introduce the shadow of a code [21], which is the analogous notion with the shadow of a lattice. It is known that the shadow of a binary code can be lifted to the shadow of the lattice constructed from a code [22]. Combining this relationship with the one between the shadow of a lattice and the R sector, we can endow with the R sector from the shadow of a binary code (see the right panel of Fig.1).
Our construction of fermionic CFTs establishes the relation between the spectrum of classical codes, Euclidean lattices, and fermionic CFTs. While the spectrum of a lattice and a CFT are captured by the lattice theta function and torus partition function, its counterpart for a classical code C is the complete weight enumerator W C ({x a }). Let us construct a fermionic CFT from a classical code C through our construction. Then the torus partition . We employ the relationship between classical codes and Euclidean lattices to provide the NS sector of fermionic CFTs. Each Euclidean lattice can be associated with a unique shadow, which helps us to provide the R sector. In particular, for the binary case (p = 2), we can introduce the shadow of a code and make use of it to yield the shadow of a lattice and the R sector.
functions depending on the choice of spin structures (α, β) ∈ Z 2 × Z 2 can be written as where τ is the modulus of the torus, η(τ ) is the Dedekind eta function, and f α,β a (τ ) are functions of τ depending on spin structures (α, β). Regardless of the choice of spin structures, the partition functions with four sectors can be expressed in terms of the complete weight enumerator. From the property of the complete weight enumerator, the torus partition functions show the expected modular transformations. A dictionary between codes, lattices, and CFTs for an odd prime p = 2 and p = 2 can be found in Table 2 and 4, respectively.
To figure out the profiles of our class of fermionic CFTs, we explore fermionic CFTs with supersymmetry. Instead of constructing supercurrents explicitly, we consider some necessary conditions to be supersymmetric. Along the lines of [23,24], we impose the three supersymmetry conditions: One requires the NS sector to contain a spin- 3 2 primary operator. Another requires the energy of the Ramond sector to be positive. The other requires the Ramond-Ramond torus partition function to be constant. These conditions are insufficient to guarantee the existence of supersymmetry, but they strongly suggest it. Our fermionic CFTs enable us to rewrite the supersymmetry conditions in the language of classical codes and verify them easily. We apply the supersymmetry conditions to various classical codes and obtain non-trivial CFTs likely to be supersymmetric in our construction.
The paper is organized as follows. In section 2, we review the fundamentals of classical linear codes over F p focusing on the mathematical framework of coding theory. We also define an important class of linear codes called self-dual codes underlying our construction. In section 3, we start with reviewing the construction of odd self-dual lattices from selfdual codes, which can be leveraged to the NS sector. We also explicitly demonstrate the construction of the R sector using a characteristic vector and the shadow of a lattice. When computing the torus partition functions, we give a canonical choice of characteristic vectors for an odd prime p and p = 2. In particular, for p = 2, we can exploit the shadow of a code to provide the shadow of a lattice and the R sector. Then, we illustrate our construction using some simple examples of self-dual codes. In section 4, we explore fermionic CFTs with supersymmetry. After reviewing supersymmetric CFTs, we rewrite the supersymmetry conditions for our fermionic CFTs and reduce them to some simple constraints on classical codes. Using various examples of self-dual codes, we find fermionic CFTs satisfying all the conditions. Section 5 concludes with discussions and future directions. Appendix A shows the list of our notations used throughout this paper. In Appendix B, we discuss non-constant Ramond-Ramond partition functions focusing on binary self-dual codes.
2 Classical linear codes over F p In this paper, we focus on classical codes over the finite field, especially F p = {0, 1, · · · , p − 1} where p is a prime number. This section introduces mathematical fundamentals of classical codes, such as self-duality, the complete weight enumerator, and the MacWilliams identity following [25,26] (see [19,[27][28][29][30] for more details).
Mathematically, a classical linear code can be formulated as a vector space over a finite field. For a prime number p, a p-ary linear code C of length n is a subspace of F n p . Each element c ∈ C is called a codeword of C. We denote the dimension of C by k ≤ n. The standard inner product of codewords taking values in F p can be introduced by g = diag (1, 1, · · · , 1) . (2.1) We denote the inner product between elements x, x ′ ∈ F n p by x · x ′ . Then, for a pair of elements One can define a linear code C in terms of a generator matrix G and a parity check matrix H. We assume that they satisfy the relation where the generator matrix G and parity check matrix H are a full rank k × n matrix over F p and full rank (n − k) × n matrix over F p , respectively. A generator matrix G generates all codewords c ∈ C: where x is a k-dimensional row vector. Then, a linear code C can be written as Note that a generator matrix G is not uniquely determined by a linear code C. Each generator matrix corresponds to a different choice of a basis of a linear subspace C.
Alternatively, we can use a parity check matrix to characterize a linear code C. From the condition (2.2), a parity check matrix H vanishes all codewords c: c H T = 0 mod p. Since a parity check matrix H is full rank, its kernel space is k-dimensional. Then, a parity check matrix determines a linear code C by As well as a generator matrix, a parity check matrix H is also not unique to a linear code.
Let us consider a linear code C ⊥ generated by a parity check matrix H of C: From the relation (2.2), the codewords c ′ ∈ C ⊥ satisfy c ′ G T = 0 mod p. Since the matrix G is full rank, the linear code C ⊥ can be written as Therefore, while the original code C has the generator matrix G and the parity check matrix H, the linear code C ⊥ has the generator matrix H and the parity check matrix G. We call a linear code C ⊥ the dual code of C. For a linear code C ⊂ F n p with the dimension k, the dual code C ⊥ has length n and the dimension n − k.
We can introduce dual codes without the help of generator matrices and parity check matrices. Generally, codewords of the dual code C ⊥ are orthogonal to ones of C: c · c ′ = 0 mod p for c ∈ C and c ′ ∈ C ⊥ . For each linear code C, we can define its dual code C ⊥ by (2.8) In this formulation, it is obvious that the dual code C ⊥ does not depend on a choice of a generator matrix and parity check matrix.
Let us introduce some important classes of linear codes. We call a linear code C to be self-orthogonal if C ⊂ C ⊥ and self-dual if C = C ⊥ . As explained above, for a linear code C ⊂ F n p with the dimension k, its dual code has the dimension n − k. Then, the dimension of a self-orthogonal code should be k ≤ n 2 , and the dimension of a self-dual code must be k = n/2, which also implies that the length of self-dual codes should be even: n ∈ 2Z.
In the binary case (p = 2), we can classify self-orthogonal codes further. All codewords of a binary self-orthogonal code satisfy c · c ∈ 2Z. If C satisfies c · c ∈ 4Z for c ∈ C, C ⊂ F n 2 is called doubly-even. If a self-orthogonal code C ⊂ F n 2 is not doubly-even, C is called singly-even.
To measure the error-correcting ability of a classical code, it is useful to define the Hamming distance on F n p . The Hamming distance between elements x = (x 1 , · · · , x n ), y = (y 1 , · · · , y n ) ∈ F n p is defined as The minimum distance d(C) of a code C ⊂ F n p is (2.10) A classical code C with the minimum distance d(C) = d can correct up to ⌊(d − 1)/2⌋, so the minimum distance can capture the error-correcting property. It is customary to call a k-dimensional linear code C ⊂ F n p with the minimum distance d an [n, k, d] p code.
If a linear code C contains x, y ∈ F n p , then it also has x − y ∈ C due to linearity. Thus, for linear codes, the minimum distance d(C) reduces to Then it is useful to define which is called the Hamming weight of x ∈ F n p . Of course, the minimum Hamming weight of a linear code C gives the minimum distance of C.
More generally, for a ∈ F p , we define wt a (c) = |{i | c i = a}| , (2.13) which is called the composition of c ∈ C in [25,27]. Then we have wt(c) = n − wt 0 (c).
Furthermore, we introduce the Lee weight and Euclidean norm [25] for later convenience. For a ∈ F p , the Lee weight and Euclidean norm are Norm(a) = (Lee(a)) 2 .
• The Lee weight is Lee From this example, these weights generally have different values for an element c ∈ F n p . Note that, for the binary case (p = 2), the Lee weight and Euclidean norm reduce to the Hamming weight: Lee(c) = Norm(c) = wt(c).
Let us define the complete weight enumerator of a classical code C by where x a (a ∈ F p ) are formal variables and wt a (c) are given in (2.13). The complete weight enumerator of the dual code C ⊥ is uniquely determined by the one of C. The relation between them is given by the MacWilliams identity [31,32] (see Theorem 10 of Chapter 5 in [27]) We have an alternative representation For a self-dual code C = C ⊥ , the MacWilliams identity implies W C ({x a }) = 1 |C| W C ({x a }). Then the complete weight enumerator of a self-dual code is invariant under the change of variables x a →x a followed by dividing |C| = p n 2 .
Finally, we give some examples of p-ary linear codes. Let us take a classical binary code C ⊂ F 2 2 generated by the generator matrix We can choose a parity check matrix of the code as H = G since it satisfies G H T = 0 mod 2. The linear code consists of only two codewords: C = {(0, 0), (1, 1)}. The dual code C ⊥ , which is generated by H, is also C = {(0, 0), (1, 1)} because G = H. Then, the linear code is self-dual. Furthermore, since c · c ∈ 2Z for c = (1, 1), it is a singly-even self-dual code.
The minimum distance d(C) is obviously d(C) = 2. Then the linear code is an [2, 1, 2] 2 code. The complete weight enumerator is Under the transformation x 0 →x 0 = x 0 +x 1 and x 1 →x 1 = x 0 −x 1 , the complete weight enumerator becomes W C ({x a }) = 2(x 2 0 +x 2 1 ) = |C| W C ({x a }), which reproduces the MacWilliams identity for a self-dual code C ⊂ F 2 2 .
Next, let us consider a ternary code C ⊂ F 4 3 generated by We can verify G G T = 0 mod 3, so a parity check matrix can be chosen as H = G, which means that the linear code is self-dual C = C ⊥ . The complete weight enumerator is From the complete weight enumerator, we can easily know that the minimum distance of the code is d(C) = 3. Then the linear code is an [4, 2, 3] 3 code. By the transformation x a →x a = 2 b=0 e 2πi ab 3 x b , the complete weight enumerator behaves as , which is the MacWilliams identity for a self-dual code C ⊂ F 4 3 .

Fermionic code CFTs
In this section, we give a systematic construction of fermionic CFTs from self-dual codes over F p . In section 3.1, we construct self-dual lattices from self-dual codes over F p for a prime p via Construction A [18,20]. Using the Euclidean lattices and their shadows, we define both the Neveu-Schwarz (NS) sector and the Ramond (R) sector of fermionic CFTs in section 3.2. In section 3.3, we provide a canonical construction of the shadow of the Construction A lattice.
In particular, we construct the shadow of a lattice from the shadow of a code for p = 2. We compute the partition functions depending on the choice of spin structures. Our construction gives an explicit relation between the spectrum of classical codes and fermionic code CFTs.

Odd self-dual lattices via Construction A
In this section, we review the construction of odd self-dual lattices from classical self-dual codes over F p following [25,30] (refer to Section 3 of Chapter 8 in [19] for more general construction). Let C be a classical code over F p of length n where p is a prime number. The construction of lattices from classical codes has been studied to seek dense sphere packings, and the simplest construction is called Construction A [18]. It defines the Construction A lattice Λ(C) as follows: The Construction A lattice Λ(C) is a Euclidean lattice with respect to the standard Euclidean metric g given in (2.1). We simply denote the inner product with respect to the metric g by ·.
While we use the same symbol for the inner product on classical codes, it would be clear from the context which one is being used.
This construction ensures that Λ(C) = Λ(C ′ ) if and only if C = C ′ . This follows from that the Construction A lattice Λ(C) returns to the classical code C by identifying λ ∼ λ + √ p Z n where λ ∈ Λ(C).
By analogy with classical linear codes, we can define the dual lattice. For each lattice Λ ⊂ R n , one can associate its dual Λ * : for λ ∈ Λ. Note that every even lattice is integral. A lattice Λ is called odd if it is integral but not even. This implies that an odd lattice Λ contains a vector λ whose norm is odd: λ · λ ∈ 2Z + 1. Also, a self-dual lattice that contains a vector with an odd norm is called an odd self-dual lattice.
The following proposition guarantees the construction of self-dual lattices from self-dual codes over F p for a prime number p (including p = 2).

Proposition 3.1
For a prime number p, the Construction A lattice Λ(C) is self-dual if and only if a classical code C over F p is self-dual.
The following propositions clarify the conditions to construct odd lattices from linear codes over F p . Note that there is a subtle difference between the binary case (p = 2) and the other cases. Proof. From the construction, λ ∈ Λ(C) can be written as λ = c √ p + √ p m where c ∈ C and m ∈ Z n . The norm of λ is given by Suppose that the Construction A lattice Λ(C) is odd. Then the norm λ · λ should be an integer and there must exist an element λ ∈ Λ(C) whose norm is odd. The first condition reduces to c · c = 0 mod p for any c ∈ C, which implies that C is self-orthogonal. Then the second condition is automatically satisfied for an odd prime p since the Construction A lattice Λ(C) contains λ = √ p e i where e i is an n-dimensional unit vector with 1 at the i-th component and with 0s elsewhere. On the other hand, suppose that c · c = 0 mod p for any c ∈ C. Then Λ(C) is integral and contains an element whose norm is odd. Thus the Construction A lattice Λ(C) is odd.

Proposition 3.3
For p = 2, the Construction A lattice Λ(C) is odd if and only if a linear code C ⊂ F n 2 is singly-even self-orthogonal.
Proof. We prove this proposition along the same line as the previous one. An element λ ∈ Λ(C) can be written as λ = c √ 2 + √ 2 m where c ∈ C and m ∈ Z n . The norm of λ is given by Suppose that the Construction A lattice Λ(C) is odd. Then the norm λ · λ has to be an integer and there must exist an element λ ∈ Λ(C) whose norm is odd. The first condition leads to c · c = 0 mod 2 for any c ∈ C. This means that C is a self-orthogonal code over F 2 .
The second condition requires that there exists a codeword c ∈ C such that c · c ∈ 4Z + 2, which concludes that C is singly-even self-orthogonal. On the other hand, let C be a singlyeven self-orthogonal code. Then, the Construction A lattice Λ(C) is integral and contains an element λ with an odd norm, which is the definition of an odd lattice.
Combining Proposition 3.1 and Proposition 3.2 or 3.3, we arrive at the following theorems. These theorems ensure that a class of p-ary linear codes provides odd self-dual lattices in both the binary and the other cases.

Theorem 3.4
For an odd prime p, the Construction A lattice Λ(C) is odd self-dual if and only if a linear code C ⊂ F n p is self-dual.

Theorem 3.5
For p = 2, the Construction A lattice Λ(C) is odd self-dual if and only if a linear code C ⊂ F n 2 is singly-even self-dual.

Construction of fermionic CFTs
We have described the construction of odd self-dual lattices from linear codes over F p for a prime p. In this section, we associate the odd self-dual lattices with fermionic CFTs and define the fermionic code CFTs. We also illustrate that while an odd self-dual lattice directly gives the Neveu-Schwarz (NS) sector of fermionic CFTs, the Ramond (R) sector can be provided by the shadow of the lattice. This is the generalization of the work [17], which focuses on the ternary case (p = 3). Let Λ be an odd self-dual lattice. A lattice vector χ ∈ Λ is called characteristic [19,33,34] if, for all λ ∈ Λ, it satisfies λ · λ = χ · λ mod 2. (3.9) Then, the following proposition follows immediately.
The choice of a characteristic vector is not unique to Λ. In what follows, we choose a specific one for the Construction A lattice and denote it by χ ∈ Λ(C). While we do not explicitly write down the characteristic vector in this section, we will give a canonical choice for the Construction A lattice later.
Using the characteristic vector χ ∈ Λ(C), we can divide the Construction A lattice Λ(C) into two disjoint subsets: Λ(C) = Λ 0 ∪ Λ 2 (following the notation of [19]) where From the definition of characteristic vectors, the subset Λ 0 consists of lattice vectors with even norms in Λ(C) and Λ 2 contains only lattice vectors with odd norms in Λ(C).
Let us introduce the following half-shifted subsets: where χ 2 / ∈ Λ(C) by Proposition 3.6. The union set S(Λ(C)) := Λ 1 ∪ Λ 3 is called the shadow of the lattice Λ(C) (originally introduced in [20]). It can also be written as The shadow S(Λ(C)) is not a lattice because it does not contain the origin. Also, it is not closed under addition. In fact, a sum of two shadow vectors λ + χ 2 , λ ′ + χ 2 ∈ S(Λ(C)) is in the original lattice Λ(C): λ + λ ′ + χ ∈ Λ(C). Note that the shadow does not depend on the choice of a characteristic vector χ.
These four subsets Λ i (i = 0, 1, 2, 3) provide the corresponding Hilbert spaces of fermionic CFTs. Let X(z) be an n-dimensional chiral free boson. We construct the Neveu-Schwarz (NS) sector of fermionic CFTs by lifting an odd self-dual lattice to a set of vertex operators [35]. For the Construction A lattice Λ(C), the vertex operators are given by where we omit the cocycle factors because it does not matter for our purpose. The correlation functions of the vertex operators are given by (3.14) The amplitude is a meromorphic function and does not have a branch cut since the Construc- The vertex operators V λ (z) are mapped to the momentum states |λ via the state-operator isomorphism. These states provide the Hilbert space of the NS sector: where α i k (i = 1, 2, · · · , n) are the bosonic oscillators that satisfy the algebra The conformal weight of α i 1 −k 1 · · · α ir −kr |λ is given by h = λ 2 2 + r j=1 k j andh = 0. Then its spin s = h −h is an integer (s ∈ Z) for λ ∈ Λ 0 and a half-integer (s ∈ Z + 1 2 ) for λ ∈ Λ 2 . Then the resulting Hilbert space H NS (C) contains not only bosonic states with λ ∈ Λ 0 but also fermionic ones with λ ∈ Λ 2 : . Thus Λ 0 and Λ 2 provide bosonic and fermionic states in the NS sector, respectively. This means that the Z 2 grading fixed by the characteristic vector χ ∈ Λ(C) gives the one by the fermion parity (−1) F .
On the other hand, the Ramond sector can be built from the vertex operators associated with the shadow S(Λ(C)) These vertex operators have the following correlation function: where λ, λ ′ ∈ Λ(C). Note that the NS sector operator appears on the right-hand side. This reflects the fact that the product of two R sector operators returns an NS sector operator.
The operators in the Ramond sector change the periodicity of fermions, while they preserve the one of bosons [36,37]. To see this property, consider the following operator product (a similar discussion has been done in [38]): where V λ (z) and V λ ′ + χ 2 (w) (λ, λ ′ ∈ Λ(C)) are in the NS and R sector, respectively. Let us pick up one of them and move it around the other as in Fig.2. Under the rotation z − w → e 2πi (z − w), the amplitude acquires the phase e πi χ·λ = (−1) χ·λ . It tells us that while bosonic operators V λ (z) (λ ∈ Λ 0 ) are periodic under the rotation, fermionic ones V λ (z) (λ ∈ Λ 2 ) are anti-periodic. This can be understood from that R sector operators are non-local operators w z Figure 2: The operator product between the NS sector operator at the position z and the R sector operator at w. Under the rotation around w, the NS sector operator is subject to the action of the fermion parity (−1) F , which extends from the R sector operator.
attached to the (−1) F line [39] (see Fig.2). Therefore, the NS operator V λ (z) receives the action of (−1) F as it goes around an operator in the Ramond sector.
Using the state-operator isomorphism, the Hilbert space H R (C) of the Ramond sector is given by where α i k are the bosonic oscillators as in the NS sector.
We propose to define the Z 2 grading in the Ramond sector in analogy with the NS sector. As in Fig.2, we consider the product of two R sector operators and rotate an operator around the other. The Ramond sector of the fermionic CFTs is well-defined only up to an overall fermion parity. We fix the ambiguity by considering the operator product Under the rotation z − w → e 2πi (z − w), the Z 2 line, which extends from V χ 2 (w), acts on the R sector operator V λ+ χ 2 (z) and the above amplitude obtains the phase γ = (−1) χ·(λ+ χ 2 ) . It is straightforward to know γ = +1 if λ + χ 2 ∈ Λ 1 and γ = −1 if λ + χ 2 ∈ Λ 3 . Therefore, the Z 2 grading of the Ramond sector is given by Combining (3.17) and (3.23), we see that the only difference between the four sectors is the underlying subset Λ i . Then we can interpret the four sectors of the Hilbert space as the four subsets Λ i defined in terms of lattices. Along these lines, we show the Hilbert spaces of the fermionic CFTs (including the NS and R sectors) in Table 1. In the next section, we verify that the resulting partition functions exhibit the expected modular transformations. Table 1: Each NS and R sector of fermionic code CFTs is divided into two sectors by the fermion parity (the left panel). The Z 2 grading (3.17) and (3.23) tell us that each sector of fermionic code CFTs corresponds to a subset Λ i in terms of the lattice (the right panel).

Torus partition functions
Let us consider fermionic code CFTs living on the torus with modulus τ = τ 1 + iτ 2 . The torus has two cycles, which we will call the spacial and timelike periodicity where w = σ 1 + iσ 2 is the cylindrical coordinate. In analogy with the spacelike case, we call the timelike periodicity NS if fermion operators are antiperiodic, and R if fermions are periodic. The torus has four sectors specified by (spatial, timelike) boundary conditions and we denote them by where χ is a characteristic vector of Λ(C) and η(τ ) is the Dedekind eta function Alternatively, we can write down the partition functions in terms of the four subsets Λ i (i = 0, 1, 2, 3). Let us denote the associated partition functions by 2 λ 2 is the theta function associated with Λ i . Our construction of fermionic CFTs naturally relates the Z 2 grading of the Hilbert space to four subsets Λ i as in Table 1. Then, the partition functions of each sector are given by In the rest of this section, we explicitly check the modular transformations of the partition functions. While partition functions of bosonic CFTs should be modular invariant, we do not require modular invariance for fermionic CFTs. Instead, we ask that partition functions associated with different spacial and timelike periodicity transform covariantly. For this purpose, we denote the partition functions collectively as where (α, β) corresponds to each sector by

For odd prime p = 2
For an odd prime p, the canonical choice of a characteristic vector χ is given by the following proposition. In what follows, we fix the choice of a characteristic vector by χ = √ p (1, 1, · · · , 1) for an odd prime case.

Proposition 3.7
Let p be an odd prime and C ⊂ F n p a self-dual code. Then χ = √ p (1, 1, · · · , 1) is a characteristic vector of the Construction A lattice Λ(C).
Proof. From the construction of Λ(C), χ = √ p (1, 1, · · · , 1) ∈ Λ(C) and λ ∈ Λ(C) can be On the other hand, for any integer s i ≡ s 2 i mod 2, thus which is the definition of a characteristic vector.
The above choice of a characteristic vector χ = √ p (1, 1, · · · , 1) reduces the partition functions (3.30) to the complete weight enumerator of a classical linear code C as follows: Let p be an odd prime and C ⊂ F n p a self-dual code. Then the partition functions of each sector can be written by the complete weight enumerator W C ({x a }) as Proof. The proof is given by a straightforward computation. For χ = √ p (1, 1, · · · , 1), the partition functions Z α,β (τ ; Λ(C)), excluding the Dedekind eta functions, are Combining with (3.29), Proposition 3.8 endows with the relationship between the spectrum of codes, lattices, and CFTs, which can be measured by the complete weight enumerator, the theta functions, and the partition functions, respectively.
We can use Proposition 3.8 to calculate the modular transformations of the partition functions. Under T : τ → τ + 1 and S : This can be shown by direct computation using the Poisson summation formula.
Let us see the modular T transformations of the partition functions by using (3.38). Since all terms in the complete weight enumerator have the even degree n, the phase (−1) is canceled in the partition functions. In addition, the contribution of e iπ p+1 since c · c ∈ p Z from self-duality and p + 1 ∈ 2Z. Then For the last equality, we used the fact that the length of a self-dual code over F p is n ∈ 2Z if p ∈ 4Z + 1 and n ∈ 4Z if p ∈ 4Z + 3. Then, the phase depends on n, which is the central charge of our fermionic CFTs, but not on an odd prime p.
Similarly, the modular S transformation can be given by For the third equality we used the MacWilliams identity (2.19) for a self-dual code C = C ⊥ .
Let us couple holomorphic fermionic code CFTs with anti-holomorphic Majorana-Weyl fermions and probe a gravitational anomaly of our fermionic code CFTs by implementing the modular transformations. The torus partition functions of a single Majorana-Weyl fermion with (c L , c R ) = 1 2 , 0 are where θ i (τ ) (i = 2, 3, 4) are the Jacobi theta functions. Following the notation (3.31), we denote the partition functions by Z α,β (τ ; ψ). The modular transformations of these partition functions are well known (see for example [36]) where we formally write down the modular transformations for (α, β) = (1, 1), which is the R sector, because Z R (τ ; ψ) is vanishing.
The modular T transformation of the partition functions is where we use Z 1,1 (τ,τ ) = 0. These modular transformation laws exactly match modular covariance without a gravitational anomaly, which tells us that the gravitational anomaly of fermionic code CFTs can be canceled by one of the Majorana-Weyl fermions. In this sense, our fermionic CFTs behave as properly as Majorana-Weyl fermions under modular transformation.
Note that the above discussion does not allow us to understand the modular property of Z R (τ ; Λ(C)) because Z R (τ ; ψ) = 0. We need an additional discussion for the R sector. According to [40], the modular S transformation of fermionic CFTs with ν = 2(c R − c L ) mod 8 should behave as For our fermionic CFTs with (c L , c R ) = (n, 0), ν = −2n mod 8. Then we have e −iπ ν 4 = (−1) n 2 , which agrees with the transformation law (3.42). This suggests that while our fermionic CFTs have a gravitational anomaly, their partition functions show the expected modular transformation laws.
For an odd prime p, we have formulated the construction of fermionic CFTs from selfdual codes over F p , which relates linear codes, lattices, and CFTs. In Table 2, we show a dictionary between them. This tells us that, for example, the complete weight enumerator C determines the lattice theta function and the partition functions of fermionic code CFTs.

For p = 2
In the previous section, we have canonically chosen a characteristic vector χ = √ p (1, 1, · · · , 1) for an odd prime p. For p = 2, however, the vector √ 2 (1, 1, · · · , 1) is not characteristic for any Construction A lattice. To make a clear choice of a characteristic vector and define the shadow of Λ(C), it is useful to introduce the shadow of a binary self-dual code [21,41].
Let C ⊂ F n 2 be a singly-even self-dual code. We divide C into two subsets C 0 and C 2 . The subset C 0 (C 2 ) consists of doubly-even (singly-even) codewords of C: where C = C 0 ∪ C 2 . Note that C 0 is a linear code, in particular, doubly-even self-orthogonal. This is because for c, c ′ ∈ C 0 , wt 1 (c + c ′ ) = wt 1 (c) + wt 1 (c ′ ) − 2c · c ′ ∈ 4Z and thus c + c ′ ∈ C 0 . In addition, we have C 0 ⊂ C ⊂ C ⊥ 0 from the self-duality of C. Then the shadow S(C) of a self-dual code C is defined by From linearity and the dimension of the codes, any t ∈ C 2 and s ∈ S(C) satisfy Moreover, their inner products are s · s = 0 (n ∈ 4Z) , where we have done the mod 2 computation. The first equation (3.53) follows from the fact that if t · s = 0, then s is orthogonal to C 0 ∪ (C 0 + t) = C and thus s ∈ C ⊥ = C, which is contradict with s ∈ S(C). For (3.54), we consider a = (1, 1, · · · , 1) ∈ F n 2 , which all self-dual codes contain. If n ∈ 4Z, s · s = s · a = 0 from a ∈ C 0 and if n ∈ 4Z + 2, s · s = s · a = 1 from a ∈ C 2 .
Then, the elements s ∈ S(C) in the shadow automatically satisfies where we have used s ∈ C ⊥ 0 and (3.53). This is analogous to the shadow of a lattice, where a characteristic vector χ divides a lattice Λ by the mod 2 value of χ · λ for λ ∈ Λ as in (3.10). The following proposition tells us that s ∈ S(C) gives the canonical choice of a characteristic vector χ ∈ Λ(C) for a singly-even self-dual code C ⊂ F n 2 .

Proposition 3.9
Let C ⊂ F n 2 be a singly-even self-dual code. Then, for any s ∈ S(C), χ = √ 2s ∈ R n is a characteristic vector of Λ(C).
Proof. From the construction of the lattice Λ(C), any λ ∈ Λ(C) can be written as λ = 1 √ 2 (c + 2m) where c ∈ C, m ∈ Z n . The inner product is On the other hand, where we used (3.55) in the last equation. Combining these, we get λ · λ ≡ χ · λ mod 2, (3.58) which is the definition of a characteristic vector.
Let us define the Construction A subsets for later convenience. By applying Construction A to a subset K ⊂ F n 2 , we obtain the following subset Λ(K) ⊂ R n (rather than a lattice): The following corollary guarantees the relationship between the shadow of a code and the shadow of the Construction A lattice.

Corollary 3.10 ([22])
Let C ⊂ F n 2 be a singly-even self-dual code. Then the shadow of Λ(C) is identical to a subset constructed from the shadow of C: S(Λ(C)) = Λ(S(C)) .
(3.60) Proof. Let s ∈ S(C) and χ = √ 2 s be a characteristic vector. Suppose k ∈ S(Λ(C)), then it can be written as k = 1 In what follows, we take a specific element s ∈ S(C) and fix a characteristic vector by χ = √ 2s. Let us define C 1 , C 3 ⊂ F n 2 by (3.61) Note that C 1 and C 3 can be exchanged depending on the choice of s ∈ S(C). For Λ(C), the subsets Λ i ⊂ R n corresponding to each sector can be written as where we apply Construction A to the subsets C i (i = 0, 1, 2, 3). We can prove this from (3.55) for Λ 0 , Λ 2 and (3.54) for Λ 1 , Λ 3 .
In section 3.2, the Z 2 grading of the Hilbert space can be understood from underlying subsets Λ i as in Table 1. In particular, the binary case allows us to relate Λ i to a subset C i ⊂ F n 2 as in (3.62). Therefore, we can go back further than lattices and give the Z 2 grading directly from classical codes C. For example, we start with the subset C 1 , which gives us Λ(C 1 ) = Λ 1 via Construction A. Then, from Table 1, the associated vertex operator : e iλ·X(z) : where λ ∈ Λ 1 is in the R sector and even under the action of the fermion parity. In this sense, we show the Z 2 grading of the Hilbert space in terms of the subsets C i ⊂ F n 2 , in Table 3.
For the modular S transformation, the following proposition is useful.

Proposition 3.11
Let C be a binary linear code C ⊂ F n 2 (not necessarily self-dual). Then, under the modular S transformation: τ → −1/τ , the partition function (3.63) of C behaves Proof. Using the transformation law of the Jacobi theta functions and MacWilliams identity (2.19), we get (3.70) For a singly-even self-dual code C ⊂ F n 2 , we already know C ⊥ = C and C ⊥ 0 = C 0 ∪ C 1 ∪ C 2 ∪ C 3 . In addition, from (3.53) and (3.54), From Proposition 3.11, the S transformation acts for the partition function as where we take the upper sign when n ∈ 4Z and the lower sign when n ∈ 4Z + 2. Rearranging these equations, we get (3.73) In similar to the modular T transformation, these obey the same transformation law as the case where p is an odd prime.
Therefore, the modular T and S transformations of the partition functions for p = 2 are the same as an odd prime p = 2. Along the lines of an odd prime p, this suggests that our fermionic code CFTs exhibit the expected modular transformation while they have a gravitational anomaly. A dictionary between codes, lattices, and CFTs is shown in Table 4. Unlike the case with an odd prime p = 2, the shadow of the Construction A lattice Λ(C) is related to the shadow of a linear code C, which gives the interpretation of the Ramond sector from a linear code.

Spectral gap
In the construction of chiral bosonic CFTs from linear codes [3], a distance of codewords is related to a conformal weight of the corresponding states. For CFTs from linear codes with a large minimum distance, a spectral gap, which is the energy gap between the vacuum and the first excited state, tends to be large. In this section, we explore a similar relation between the spectral gap of fermionic code CFTs and the distance of linear codes.
As we have seen, the operators that appear in our fermionic code CFTs are the vertex operators : e ik·X(z) : and their descendants, which have the conformal weights h = 1 2 k 2 + N where N is the level for the Virasoro algebra.
Let us consider the minimum weight of the vertex operators in the NS sector, other than the identity operator. The minimum squared norm of the lattice Λ(C) is Since 1 p Norm(c) ∈ Z for a self-dual code, ∆ NS only takes 1 2 or 1. Note that, for p = 2, the Euclidean norm reduces to the Hamming weight: Norm(c) = wt(c). Using the minimum distance d(C), we can rewrite the spectral gap for p = 2 as The R sector has no identity operator, thus the minimum weight in the R sector does not depend on whether we include descendants or not. For an odd prime p, a characteristic vector is chosen to be χ = √ p (1, 1, · · · , 1) and the minimum weight h min of the R sector can be calculated by (3.78) In the last line, we used that m i = −1 always gives the minimum value for 0 ≤ c i < p.  Thus, the minimum conformal weight h min in the R sector is proportional to the minimum Hamming weight in the shadow of the underlying code.

Examples
We have shown the construction of fermionic CFTs from self-dual codes over F p in general.
In this section, we take some examples of self-dual codes and demonstrate the construction of fermionic code CFTs in detail. A large list of self-dual codes can be found in [42].  The Construction A lattice of the linear code C ⊂ F 2 5 is given by We show the Construction A lattice in Fig.3 as the black dots, which is just the 2-dimensional square lattice Λ square = Z 2 rotated by the angle − arctan(1/2). Choosing a characteristic vector by χ = √ 5 (1, 1), the shadow of Λ(C) is (3.83) In Fig.3, the shadow of Λ(C) is depicted with the red dots, which can be obtained by a half shift of the black dots. It is easy to see the addition of shadow elements (red dots) returns to a black dot representing an element of the original Construction A lattice.
Following Section 3.2, we construct a fermionic code CFT from C. Although the resulting partition functions are determined by the complete weight enumerator of C, it is useful to choose an appropriate basis of Λ(C). In this case, we take v 1 = 1 √ 5 (1, 2) and v 2 = 1 √ 5 (2, −1), which provide an orthonormal basis of Λ(C). As suggested in Fig.3, the Construction A lattice can be decomposed into Z ⊕ Z. Then a characteristic vector is χ = √ 5 (1, 1) = 3v 1 + v 2 , so the shadow of Λ(C) consists of λ = m ′ Finally, we obtain the partition functions of each sector (3.84) The above partition functions agree with Z α,β (τ ; ψ) 4 where Z α,β (τ ; ψ) is the torus partition functions of a single Majorana-Weyl fermion in (3.43). This implies that the fermionic CFT consists of four chiral fermions. Of course, the spectral gap of the NS sector is ∆ NS = 1 2 by (3.76). On the other hand, the conformal weight of the R sector ground states is h min = 1 4 .
3.5.2 n = 2 , p = 2 Let us take the simplest self-dual code C ⊂ F 2 2 , which is generated by The codewords are C = {(0, 0), (1, 1)}, then the complete weight enumerator of C is To construct the shadow of C, we divide C into two subsets with respect to the weight. Since codewords (0, 0) and (1, 1) are doubly-even and singly-even, respectively, we have C 0 = {(0, 0)} and C 2 = {(1, 1)}. Then C ⊥ 0 = F 2 2 . The shadow of C is given by We choose an element of the shadow S(C) by s = (0, 1) ∈ S(C). Following (3.61), for n = 2, we set On the other hand, the shadow of Λ(C) is As shown in Fig.4, the Construction A lattice forms the square lattice Z ⊕ Z rotated by the angle π/4, while the elements of the shadow S(Λ(C)) take place in each center of the squares.

n = 4 , p = 7
For an odd prime p ∈ 4Z + 3, a self-dual code C ⊂ F n p exists only when n ∈ 4Z. For p = 7, the unique self-dual code C of length 4 is generated by Then the Construction A lattice Λ(C) is isomorphic to Z 4 , which is consistent with the fact that an n-dimensional odd self-dual lattice is isomorphic to Z n for n ≤ 8 [19]. The partition functions of each sector are  Note that Z NS (τ ) does not contain the q 0 term, which implies the absence of NS primary fields of the conformal weight 1/2. This can be thought of as a fermionic analog of the Monster CFT [1,2], which does not have any bosonic excitation of weight 1.
There is a notion generalizing the Monster CFT called the extremal CFT. For a bosonic CFT with the central charge c = 24k (k ∈ Z >0 ), it is called extremal if it does not include primary fields other than the identity of weight less than k [43,44]. The Monster CFT is a prominent example of bosonic extremal CFT with k = 1.
For a fermionic CFT with the central charge c = 12k * (k * ∈ Z >0 ), an extremal CFT is defined to be one with no primary fields other than the identity of weight less than k * /2 [45]. An extremal fermionic CFT of k * = 1 is known to admit an action of a large discrete group related to the Conway group and have an N = 1 supersymmetry. Furthermore, there are results about uniqueness [46,47].
From (3.97), the fermionic code CFT with n = 12 has no primary fields other than the identity of weight less than 1/2. In particular, Z NS (τ ) and Z R (τ ) coincide with (3.35) and (3.48) in [45] respectively, which means the extremal CFT with k * = 1.
In 24 dimensions, an odd self-dual lattice of minimum norm 3 is known to be unique and called the odd Leech lattice [19,49] with the lattice theta function Θ Λ odd Leech (τ ) = 1 + 4096q 3/2 + 98256q 2 + 1130496q 5/2 + 8384512q 3 + · · · . (3.100) Thus, we can conclude that Λ(C) is the odd Leech lattice. This is consistent with the fact that the odd Leech lattice can be constructed using some self-dual codes over Z k by Construction A for any k ≥ 3 [50]. For a binary self-dual code C ⊂ F 24 2 , the Construction A lattice always contains an element λ = (2, 0, · · · , 0)/ √ 2 with λ 2 = 2. Then, any binary code cannot generate the odd Leech lattice since it does not have any element with λ 2 = 1, 2.

Finding supersymmetric CFTs
We have constructed chiral fermionic CFTs from self-dual codes over F p and illustrated the construction using various examples. For the ternary case (p = 3), all fermionic code CFTs have been known to possess supersymmetry [17]. On the other hand, supersymmetry does not necessarily emerge for the other cases (p = 3). To figure out profiles of our class of fermionic CFTs, we search for supersymmetric CFTs for a prime number p. Instead of giving an explicit form of supercurrent, we require some necessary (not sufficient) conditions that strongly suggest the existence of supersymmetry following [23,24]. Recasting the conditions in terms of classical codes, we apply them to examples of self-dual codes and construct CFTs likely to be supersymmetric.

Supersymmetry conditions
Let us start with reviewing the fundamentals of supersymmetric CFTs following [37]. In this section, we only care about the existence of supersymmetry. Then we focus on N = 1 supersymmetry, in particular, N ,N = (1, 0) since our fermionic CFTs are chiral. The energy-momentum tensor T (z) and the supercurrent G(z) satisfy the following OPEs: where n ∈ Z >0 is a central charge. From this relation, G(z) has conformal weight h = 3 2 . The Laurent expansions are where ν = 0 for the NS sector and ν = 1/2 for the R sector. The operators {L m } and {G r } form the superconformal algebra: Since [L 0 , G 0 ] = 0, for a state |k in the R sector such that L 0 |k = h |k , G 0 |k has the same eigenvalue h of L 0 and the opposite statistics unless G 0 |k = 0. The norm is thus G 0 |k = 0 if and only if h = n 24 and the condition h ≥ n 24 is necessary for the representation to be unitary.
For a unitary supersymmetric theory, we have the partition function of the R sector: where F is the fermion parity.
• For h > n 24 , |k and G 0 |k contribute as the opposite signs and thus vanish.
Therefore, Z R (τ ) becomes constant and counts the signed number of states with h = n 24 , which is called the Witten index [51,52].
In this section, we aim to find fermionic code CFTs with supersymmetry. Our fermionic CFTs have been defined by a set of vertex operators associated with the underlying momentum lattices. We can show the existence of supersymmetry by giving a supercurrent satisfying the OPEs (4.1). However, in general, it is hard to construct an explicit supercurrent from vertex operators because it requires careful treatment of cocycle factors. 2 Instead, we check the following three necessary conditions derived from the above discussion: 1. The Neveu-Schwarz sector contains a spin- 3 2 Virasoro primary field.
2. Any primary operator in the Ramond sector satisfies h ≥ n 24 .

The Ramond-Ramond partition function
Recently, it has been proved that the second condition implies the third one [54]. The above three conditions do not guarantee supersymmetry, but they strongly suggest the existence of supersymmetry. In what follows, we call them the supersymmetry (SUSY) conditions.
In particular, the third condition is highly nontrivial because bosonic and fermionic excitations cancel each other. It is natural to require supersymmetry as a mechanism for the cancellation. Note that Z R (τ ) = 0 if a fermionic CFT contains a free fermion. In that case, the third condition does not provide nontrivial evidence of supersymmetry. In the rest of this section, we further comment on free fermions in our fermionic CFTs.
In general, it is known that a holomorphic CFT can be decomposed into free fermions (including h = 1 2 operators) and a sector without h = 1 2 operators [55]. For fermionic code CFTs, we can rephrase it as the decomposition of momentum lattices. From the following discussion, an odd self-dual lattice Λ ⊂ R n can be decomposed into an integer lattice Z r (0 ≤ r ≤ n) corresponding to r pairs of free fermions and a lattice orthogonal to it.
Let Λ ⊂ R n be a self-dual lattice including a norm 1 vector λ 1 ∈ Λ: λ 1 · λ 1 = 1. Then we can decompose any λ ∈ Λ into λ 1 direction and its orthogonal component by λ = mλ 1 + λ ⊥ where m = λ 1 · λ ∈ Z from self-duality. Thus, Λ can be decomposed into the 1-dimensional integer lattice in λ 1 direction and its orthogonal component: In this case, the partition function of the NS sector can be written as The equivalence between two Majorana-Weyl fermions ψ 1 , ψ 2 and one chiral boson X(z) tells us that the left part of Z NS (τ ; Λ) is the same as the partition function of a pair of free fermions [37]. Therefore, we can conclude that a pair of free fermions corresponds to λ 1 direction in the lattice. Since Λ ⊥ can be regarded as a self-dual lattice in R n−1 , we can repeat this procedure until no h = 1 2 operators are left.

Constraints on codes
In the previous section, we have declared the three necessary conditions for supersymmetry. Our construction of fermionic CFTs enables us to rewrite them simply in terms of classical codes. In this section, we reduce the supersymmetry conditions to some constraints on underlying p-ary codes for an odd prime p and p = 2.

For odd prime p = 2
Let us start with the supersymmetry condition 1, which imposes the existence of a spin-3 2 primary field in the NS sector. As we have seen, the Virasoro primaries in our fermionic CFTs are only V k (z) = : e ik·X(z) : with the conformal weight h = 1 2 k 2 . Then the first condition is equivalent to the existence of λ ∈ Λ(C) with λ 2 = 3. Since the Construction A lattice satisfies λ 2 = 1 p (c + p m) 2 for c ∈ C, m ∈ Z n and 0 ≤ c i < p, it is sufficient to calculate λ 2 explicitly for all c ∈ C and m ∈ {−1, 0} n when p > 3. The contribution of i-th element to λ 2 is c 2 i /p or (p − c i ) 2 /p. Thus, the condition can be reduced by substituting into the complete weight enumerator W C ({x a }).
The coefficient of x 3p represents the number of spin-3/2 primaries. Note that for p = 3 we have to consider where the term 2x 9 comes from m i = ±1. Thus the corresponding CFT always contains spin-3/2 primaries from (0, · · · , 0) ∈ C. For p > 3, we do not have to include x m s.t. m > 3p. For example, when p = 5 it is enough to consider W C (1, x 1 , x 4 + x 9 , x 4 + x 9 , x 1 ). (4.9) The second condition requires the positive energy of any operator in the R sector. From (3.78), the second condition becomes SUSY condition 2: (4.10) To reduce the third condition, we prepare a refined version of the complete weight enumerator W C ({x a }).
We can check this by numerical computation or formulas for theta functions. In some cases, RW C (x 1 , · · · , x (p−1)/2 ) = 0 before substituting the concrete form f 1,1 a,p .
Finally, we deal with the number of free fermions in a fermionic code CFT. As in the previous section, the number of free fermions is equal to that of norm 1 vectors in the Construction A lattice Λ(C). Therefore, from a similar discussion for the first condition, the coefficient of is the number of free fermions.

For p = 2
From the same discussion as when p is an odd prime, the first condition becomes SUSY condition 1: W C (1 + 2x 4 , 2x) contains x 6 .
Equivalently, for n = 2, the SUSY condition 1 requires the existence of a codeword c ∈ C with wt 1 (c) = 2 or 6. Note that, in the complete weight enumerator W C (1 + 2x 4 , 2x), the coefficient of x 6 counts the number of primary operators with the spin s = 3 2 .
From (3.79), the second condition becomes SUSY condition 2: Regarding the third condition, to simplify the discussion, we define the complete weight enumerator corresponding to the R sector by (4.17) From (3.66), the partition function of the R sector can be written as Then the third condition becomes SUSY condition 3: is constant with respect to τ .
In some cases, W R (x 0 , x 1 ) = 0 before substituting the Jacobi theta functions.
The number of free fermions is the coefficient of x 2 in W C (1, 2x 1 ), which is equal to four times the number of codewords with wt 1 (c) = 2.

Examples
In this section, we explore supersymmetric CFTs by applying the supersymmetry conditions to several examples of classical codes. We summarize the properties of the self-dual codes related to the SUSY conditions in Table 5. We demonstrate the SUSY conditions for six self-dual codes with various lengths and finite fields. The first column characterizes the type of self-dual code. The second column represents the number of spin-3 2 primary fields. The third column shows the minimum energy of operators in the R sector. The fourth column gives the RR partition function. Finally, the fifth column counts the number of free fermions. Excluding fermionic CFTs with free fermions, two self-dual codes with n = 12, p = 2, and n = 36, p = 2 satisfy all the SUSY conditions.  As we have seen in section 3.5.1, the complete weight enumerator of C is Substituting x a 2 + x (5−a) 2 for x a , we obtain Since there is no x 15 term, C does not satisfy the condition 1. Therefore, we can conclude that the fermionic CFT does not have supersymmetry. In addition, the coefficient of x 5 is 4, thus the corresponding CFT consists of 4 free fermions. This is consistent with the discussion about the partition functions in section 3.5.1.
The minimum value of 2 i=1 c i − 5 2 2 is 5 2 for c = (1, 2) and then the SUSY condition 2 is satisfied: Then, the resulting fermionic code CFT only contains operators with positive energy in the R sector.
For the self-dual code C, the refined weight enumerator is vanishing: Then the RR partition function becomes 0, and the SUSY condition 3 is immediately satisfied. The vanishing RR partition function follows from the inclusion of free fermions.

n = 4 , p = 3
Let C ⊂ F 4 3 be a self-dual code generated by which is Example 2.2 in [17].
The complete weight enumerator of C is which can be expanded as From the existence of the x 9 term, the fermionic code CFT contains 32 primaries with the spin s = 3 2 . Then the SUSY condition 1 is satisfied. In addition, the CFT consists of 8 free fermions from the coefficient 8 of the x 3 term, which agrees with the discussion in [17].
The refined weight enumerator is thus the condition 3 is immediately satisfied.
Therefore, the code C satisfies all the SUSY conditions and indeed the CFT consisting of 8 free fermions is supersymmetric [56]. which is the bottom matrix for F 5 and n = 10 in [42].
The refined weight enumerator is which is the bottom matrix for F 2 , n = 12 in [42].
The complete weight enumerator is Since W C (1 + 2x 4 , 2x) = 1 + 264x 4 + 2048x 6 + 7944x 8 + · · · , (4.36) the condition 1 is satisfied from the existence of x 6 term and the CFT does not include free fermions from the absence of the x 2 term. We can reach the same conclusion based on whether or not the term with x 2 1 , x 6 1 corresponding wt 1 (c) = 2, 6 exists in (4.35).
The complete weight enumerator for the R sector is It consists of the terms corresponding to wt 1 (c) = 2, 6, 10, which reflects the fact that wt 1 (κ) = n 2 mod 4 for κ ∈ S(C) as discussed in 3.3.2. From the property of the Jacobi theta functions, the partition function of the R sector is a nonzero constant as Z R (τ ) = 1 η(τ ) 12 W R (θ 3 (2τ ), θ 2 (2τ )) = 24 .
(4.38) Therefore, the condition 3 is satisfied. This result is consistent with the fact that for a unitary supersymmetric CFT, Z R (τ ) can be a nonzero constant only if h min = c/24, i.e., the condition 2 is satisfied by equality.
Since there is only one self-dual lattice at n = 12 that does not contain a vector λ s.t. λ 2 = 1, which corresponds to a free fermion in the CFT, Λ(C) is equivalent to the lattice in 3.5.4. Indeed, the partition function of the R sector agrees with (3.97). (Although an overall factor −1 is multiplied, this is not significant because of the ambiguity in the R sector as discussed in section 3.2.) 4.3.5 n = 20 , p = 5 Let C ⊂ F 20 5 be a self-dual code generated by which we constructed as an appropriate example.
The second condition asks for the minimum energy of the R sector to be positive. For the self-dual code C, the minimum value of 20 i=1 c i − 5 2 2 is 5 for c = (2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) ∈ C , (4.41) where the first row of the generator matrix guarantees the existence of the element in C. In this case, the SUSY condition 2 is not satisfied: The refined weight enumerator of C is Therefore, the RR partition function is not constant, which means that the condition 3 is not satisfied. This is consistent with the fact that the partition function of the R sector can be nonzero only if the CFT has no free fermions. In addition, the first term has a negative exponent, which corresponds to the fact that the condition 2 is not satisfied since the partition function is expressed as the sum of q h−c/24 .
Note that the above q expansion exactly agrees with the one of 4Θ E 8 (q)/η(q) 8 , where Θ E 8 (q) is the lattice theta function of the E 8 lattice. Since the E 8 lattice is even self-dual, the corresponding theta function is invariant under the modular transformations up to phases. This is consistent with the modular property of the RR partition function. We further discuss fermionic code CFTs with non-constant RR partition functions in Appendix B. We examine several examples of non-constant RR partition functions and observe that they are related to particular modular forms called the Eisenstein series. Let C ⊂ F 36 2 be a self-dual code generated by which is the top matrix for F 2 , n = 36, d = 6 in [42].
The complete weight enumerator of C is (4.46) The complete weight enumerator gives the expansion W C (1 + 2x 4 , 2x) = 1 + 72x 4 + 1536x 6 + 60120x 8 + · · · . (4.47) Then, the SUSY condition 1 is satisfied from the existence of the x 6 term and the fermionic code CFT does not contain free fermions because of the absence of the x 2 term.

Discussion
We have constructed chiral fermionic CFTs from linear self-dual codes over finite fields F p where p is a prime number including p = 2. The key ingredient of our construction is the relationship between self-dual codes and odd self-dual lattices via Construction A. This relationship can be generalized to classical codes over Z k , which is the ring of integers modulo k. It is known that Construction A can be applied to self-dual codes over Z k and endows with self-dual lattices [57]. Thus, we expect the generalization of our construction into such a class of classical codes.
In section 4.3.5, we found an example of fermionic CFTs with a non-constant RR partition function. Notably, the RR partition function is associated with the unique 8-dimensional even self-dual lattice E 8 . From the constraint of the modular property, a non-constant RR partition function should be written in a modular form. In Appendix B, we discuss nonconstant RR partition functions focusing on binary self-dual codes. From several examples of self-dual codes, we observe that the RR partition functions are related to particular modular forms called the Eisenstein series. Moreover, some examples show the RR partition functions written by the theta functions of 8-and 16-dimensional even self-dual lattices. As suggested in Question 0.2 of [17], it could be interesting to find a systematic construction of fermionic CFTs with the RR partition function related to even self-dual lattices. This paper has mainly studied the torus partition functions with four sectors NS, NS, R, and R depending on the choice of spin structures on the torus. More generally, we can consider the higher-genus partition functions corresponding to fermionic CFTs living on higher-genus Riemann surfaces. The higher-genus partition functions have been discussed for bosonic CFTs constructed from classical binary codes in [11]. It tells us that higher-genus partition functions can be expressed as the higher-genus weight enumerator [58], which is a natural generalization of the complete weight enumerator W C ({x a }). It could be extended to our fermionic CFTs constructed from classical p-ary codes. More recently, the average of highergenus weight enumerators over p-ary self-dual codes has been computed in [6], which may enable us to study the averaged higher-genus partition functions of our fermionic CFTs.
Our fermionic CFTs have been defined by a set of vertex operators associated with the Construction A lattice. In section 4, we have examined the three necessary conditions for fermionic CFTs to be supersymmetric. To show that they are in fact supersymmetric, we have to give a supercurrent satisfying the OPEs (4.1) from vertex operators. Recently, it has been pointed out that a fundamental property of quantum error-correcting codes can be used to construct supercurrents from vertex operators [53]. If the construction of supercurrents can be generalized to our theories, it can be helpful to show the existence of supersymmetry.

B Non-constant Ramond-Ramond partition functions
In section 4, we explored fermionic CFTs with constant RR partition functions. While most of the examples gave rise to 0 or a constant, we encountered the non-constant RR partition function written by the theta function of the E 8 lattice in section 4.3.5. In this appendix, we further discuss non-constant RR partition functions of fermionic code CFTs and clearly express them in modular forms. In some cases, we find the RR partition function associated with even self-dual lattices. We focus on binary singly-even self-dual codes in [42].
Let C ⊂ F n 2 be a singly-even self-dual code. We define l min ∈ N as the minimum value of l such that |{s ∈ C 1 | wt 1 (s) = l}| = |{s ∈ C 3 | wt 1 (s) = l}|. If no such l exists, W R (x 0 , x 1 ) = 0 and thus Z R (τ ) = 0. In the following, we assume that such l exists. Then, l min is equal to the minimum integer such that x n−l 0 x l 1 is included in W R (x 0 , x 1 ). In addition, the lowest degree term in Z R (τ ) is q h where h = 1 4 l min − n 24 .