Solutions of modular bootstrap constraints from quantum codes

Modular invariance imposes rigid constrains on the partition functions of two-dimensional conformal field theories. Many fundamental results follow strictly from modular invariance, giving rise to the numerical modular bootstrap program. Here we report a way to assign to a particular family of quantum error correcting codes a family of"code CFTs"CFTs", which forms a subset of the space of Narain CFTs. This correspondence reduces modular invariance of the 2d CFT partition function to a few simple algebraic relations obeyed by a multivariate polynomial characterizing the corresponding code. Using this relation we construct many explicit examples of physically distinct isospectral theories, as well as many examples of nonholomorphic functions, which satisfy all basic properties of the 2d CFT partition function, yet are not associated with any known CFT.

Modular invariance imposes rigid constraints on the partition functions of two-dimensional conformal field theories. Many fundamental results follow strictly from modular invariance and unitarity, giving rise to the numerical modular bootstrap program. Here we report on a way to relate a particular family of quantum error correcting codes to a family of "code CFTs", which forms a subset of the space of Narain CFTs. This correspondence reduces modular invariance of the 2d CFT partition function to a few simple algebraic relations obeyed by a multivariate polynomial characterizing the corresponding code. Using this correspondence we construct many explicit examples of physically distinct isospectral theories, as well as many examples of nonholomorphic functions, which satisfy all the basic properties of a 2d CFT partition function yet are not associated with any known CFT.
Two-dimensional conformal field theories (CFTs) enjoy an exceptionally wide range of applications from condensed matter physics to string theory and quantum gravity. Characterizing the space of all CFTs is one of the central tasks of the conformal modular bootstrap program [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17], which aims to deduce universal properties of 2d theories, as well as details of specific models, from the modular invariance and non-negativity of their partition functions on the torus. In a nutshell, the modular bootstrap conditions form a proper subset of the conditions for conformal invariance and unitarity, and hence a solution to the bootstrap equations does not necessarily imply the existence of an actual theory. Nevertheless it has been observed numerous times, including in the context of the conformal bootstrap in d > 2, that a robust solution of the bootstrap constraints, e.g. a "kink" in the exclusion plot, reflects the presence of an actual theory. This picture is consistent with another observation, that with the exception of a limited family of examples related to chiral models [18] and a class of candidate partition functions for rational CFTs with two characters [19] all currently known non-chiral candidate partition functions -nonholomorphic modular-invariant functions Z(τ,τ ) which can be expanded in (Virasoro) characters with non-negative integral coefficients and with leading coefficient equal to one (reflecting the requirement of a unique CFT vacuum) -are partition functions of actual 2d theories. Furthermore, in practice, solutions of the modular bootstrap equations are typically associated with specific theories, which implicitly assumes that distinct CFTs must have different partition functions.
We show that this simple picture is not accurate, and the true situation is maximally complex: (i) there are many functions Z(τ,τ ) which are not partition functions of any (known) theory, and (ii) there are many examples of isospectral physically distinct theories, i.e. pairs, triplets, and even groups of 11 theories, which are all different but share the same partition function. Our re-sults therefore expose the limitations of any approach, including the modular bootstrap program, which aims to characterize CFTs solely on the basis of their torus partition functions.
Our construction is very explicit and uses a map from a particular class of quantum error correcting codes to the space of 2d Narain CFTs that describe the compactification of free scalar fields on a multi-dimensional cube. The CFT partition function in this case is fully determined by the code, namely by the code's refined enumerator polynomial, introduced below. A direct search in the space of n-qubit codes with n ≤ 8 readily reveals many dozens of distinct codes with the same enumerator, leading to many examples of physically distinct isospectral theories. There are also many polynomials obeying the standard symmetries and constraints of the enumerator polynomial, which are nevertheless not enumerator polynomials of any actual code. These "fake" polynomials provide thousands of examples of modular invariant Z(τ,τ ) which are sums of U (1) n × U (1) n characters, with non-negative integral coefficients C h,h , which are not partition functions of any known CFTs. We start by reviewing graph codes, a particular family of real self-dual stabilizer codes [20,21]. A graph code is specified by a binary symmetric matrix B -the adjacency matrix of an unoriented graph on n nodes, B ii = 0, B ij = B ji ∈ {0, 1}. The adjacency matrix defines a set of n generators acting on the space of n qubits. Because the matrix B is symmetric, the generators g i commute. Furthermore they are nilpotent g 2 i = I and they generate an Abelian arXiv:2009.01236v3 [hep-th] 3 Jul 2021 stabilizer group S of rank 2 n . There is a unique (up to scalar rescaling) state ψ C which is invariant under the action of any element of the stabilizer group, g i ψ C = ψ C . Known as the graph state [22][23][24][25], ψ C can be written explicitly in terms of the "computational" up-down basis. Self-duality of the code implies that the Abelian stabilizer group possesses the maximal possible number of independent generators. The code is called real because all matrix elements of (2) are real. The most general element of the stabilizer group is a product of generators characterized by a binary vector α ∈ Z n 2 . Up to a sign it can be written as a product of Pauli operators where the binary vector β := B α mod 2. With this definition w y (α) = α · β counts the number of Pauli matrices σ y in (4), while w(α) = i α i + β i − w y (α) counts the total number of qubits on which g(α) acts non-trivially. A basic characteristic of a code is its enumerator polynomial, which counts the number of g ∈ S which act on a particular number of qubits. For our purposes we consider the closely related refined enumerator polynomial, which keeps track of the total number of affected qubits, as well as the number of σ y 's, When the code is real, there is always an even number of σ y in each g(α), and therefore W is invariant under Furthermore, the refined enumerator polynomial of a selfdual code is invariant under the transformation This symmetry follows from the MacWilliams identity [26][27][28].
In the context of quantum codes it is natural to call codes equivalent if they are related by a permutation of qubits, which at the level of graphs is simply a relabeling of nodes. Two codes are also said to be equivalent if they are related by a local Clifford (LC) transformation, a unitary transformation g i → U g i U † acting on the individual qubits U = u 1 ⊗ · · · ⊗ u n , which preserves the form of the stabilizer generators as tensor products of Pauli operators. If we restrict attention to real codes, the only allowed LC transformations are those generated by the Hadamard matrix, u i = H, which simply exchanges Following an LC transformation, the generators can be recombined to bring them again to graph form (2), so that the action of the LC group can be understood in terms of graph transformations. At the level of graphs, all code equivalence transformations among real codes generate an orbit in the space of graphs under the action of edge local complementation (ELC) [29]. The action of an ELC transformation on the graph adjacency matrix is as follows where all operations, including matrix inversion, are understood mod 2, and D is an arbitrary diagonal matrix. Clearly, permutations of qubits and exchanges σ i x ↔ σ i z do not change (5); therefore two graph codes associated with graphs related by ELC will have the same refined enumerator polynomial.
In the context of quantum computation, real codes are not special and code equivalence is usually defined to include the full group of LC transformations. At the level of graphs, the full equivalence group gives rise to orbits under local complementation. A classification of orbits under local complementation for all graphs on n ≤ 12 nodes has been performed in [30], where it was used to enumerate all equivalence classes of self-dual stabilizer codes for n ≤ 12 qubits. The orbits of graphs under ELC are suborbits within the orbits of local complementation. To our knowledge they have not been fully classified previously. We classify all ELC orbits for graphs on n ≤ 8 nodes.
At this point we would like to assign to each stabilizer group of the form (2) a Narain CFT, which describes n free scalar fields compactified on an n-dimensional cube of "unit" size 2π in the presence of quantized B-field flux. The Narain CFT can be defined in terms of an even self-dual Lorentzian lattice in R n,n . Starting from (2), or equivalently from the graph adjacency matrix B, we define a lattice generator matrix where B ij is an arbitrary antisymmetric matrix satisfying It is easy to check that (9) satisfies Λ T g Λ = g, where the Lorentzian metric is Different values of B satisfying (10) lead to the same Lorentzian lattice, and the corresponding CFTs are related by T-duality. The relation between graph codes and Narain CFTs can be extended to all real self-dual codes [31]. We will call the corresponding theories code CFTs.
The partition function of a code CFT is fully specified by the underlying code itself, or more precisely by its refined enumerator polynomial where a = θ 2 (τ ), b = θ 3 (τ ), c = θ 4 (τ ). Using standard relations for the Jacobi theta functions one can verify that (12) is invariant under τ → τ + 1 due to (6) and under τ → −1/τ due to (7). This ensures modular invariance of the code CFT partition function. The refined enumerator polynomial satisfies other conditions, which follow from its definition: W should be homogeneous, W (1, 0, 0) = 1, and all coefficients of the polynomial W (x, y, z) should be non-negative integers. At the level of the partition function this ensures Z(τ,τ ) is of the form (1) with non-negative integral C h,h . The condition of invariance of the refined enumerator polynomial under (6) and (7) is easy to "solve" in full generality. A polynomial W (x, y, z) invariant under both symmetries is an arbitrary polynomial in three generating polynomials, Imposing other conditions, W (1, 0, 0) = 1 and nonnegativity of integer coefficients, reduces the problem of finding such a W to an exercise in discrete linear programming, which can be easily solved using computer algebra for small and moderate n. As is well known in the context of classical codes [28], there are many more polynomials satisfying the aforementioned conditions than there are actual codes. We call such polynomials that do not correspond to codes "fake" refined enumerator polynomials. Their number grows quickly with n. There are no fake polynomials for n = 1 and n = 2, there are 6 fake polynomials for n = 3, there are 11 for n = 4, 128 for n = 5, 2835 for n = 6, 71164 for n = 7, 4012529 for n = 8, and so on. Each fake enumerator polynomial defines a candidate partition function via (12) which is modular invariant and nonnegative, yet which is not the partition function of any known physical theory. The multitude of "fake" partition functions of small central charge that do not correspond to known CFTs is one of our main results.
FIG. 1. "Fish" graphs -representatives of two ELC orbits of graphs, which at the level of graph codes share the same refined enumerator polynomial (20) and lead to a pair of isospectral non-chiral CFTs with c =c = 7.
T-duality is a symmetry of any Narain CFT; it leaves the physical theory intact, but can change the lattice generator matrix. In principle T-duality can map one code theory into another code theory. It is easy to see that the code equivalence transformations that respect the reality condition -permutations of qubits and exchanges of σ i x ↔ σ i z -become T-duality transformations, at the level of lattices and their associated Narain theories. The opposite is also true: any T-duality transformation which maps a code theory into another code theory is, at the level of codes, a code equivalence which involves qubit permutations and exchanges σ i x ↔ σ i z [31]. We therefore arrive at a key observation: two code CFTs associated with graph codes are T-dual to each other (physically equivalent) if and only if the corresponding graphs are related by edge local complementation. Our classification of all ELC orbits for graphs on n ≤ 8 nodes therefore provides an enumeration of all physically distinct code CFTs. By comparing refined enumerator polynomials associated with different ELC orbits we find no degeneracies for n ≤ 6 and one degeneracy for n = 7. Namely, one refined enumerator W = x 7 + x 5 y 2 + 5x 4 y 2 z + 5x 2 y 4 z + x 5 z 2 + (20) 12x 3 y 2 z 2 + 9xy 4 z 2 + 4x 4 z 3 + 22x 2 y 2 z 3 + 4y 4 z 3 + 5x 3 z 4 + 25xy 2 z 4 + 11x 2 z 5 + 11y 2 z 5 + 10xz 6 + 2z 7 .
is the same for two different classes of codes, giving rise to a pair of physically distinct isospectral CFTs. At the level of lattices, this corresponds to a pair of isospectral even self-dual Lorentzian lattices (also equipped with a Euclidean metric), analogous to Milnor's example of isospectral even self-dual lattices in R 16 [32]. At the level of graphs, the two ELC classes respectively include 9 and 10 different graphs (up to isomorphisms). We have chosen one graph from each class based on simplicity and aesthetics, and have depicted them in Fig. 1. For n = 8, there are already 60 new pairs and 5 triplets of isospectral code theories, too many to list here. While we did not fully analyze ELC classes for higher n, we can utilize the analysis of [30] classifying orbits under local complementation. Since any ELC orbit is a subset within an orbit under local complementation, graphs belonging to different local complementation orbits correspond to physically different theories. Going through the values n = 9−11 we find many examples of pairs, triples, and in fact k-tuples of isospectral code theories for every k ≤ 11, confirming the expectation that the number of isospectral theories grows rapidly with n. These findings raise the question of identifying a mechanism that could explain the growing number of isospectral theories.
A natural generalization of our construction would be to consider the grand canonical partition function decorated by U (1) n × U (1) n charges, Z(τ,τ , ξ,ξ), where ξ I andξ I are the associated chemical potentials. The choice ξ I = ξ andξ I =ξ for all I = 1, . . . , n preserves permutation symmetry. With this choice, for code theories the grand canonical partition function is given in terms of the full code enumerator polynomial W (t, x, y, z) by an expression generalizing (12) Z(τ,τ , ξ,ξ) = W bb + cc, aā + dd, bb − cc, aā − dd 2 n |η(τ )| 2n where a = θ 2 (τ, ξ), b = θ 3 (τ, ξ), c = θ 4 (τ, ξ), d = θ 1 (τ, ξ). Just as one finds for Z(τ,τ ) in (12), modular covariance of Z(τ,τ , ξ,ξ) follows from the MacWilliams identity for W (t, x, y, z). The introduction of nonzero ξ,ξ removes the degeneracy of Z between the isospectral but not T-dual n = 7 theories associated with the graphs shown in Fig. 1. A detailed derivation of (21) together with a discussion of the n = 7 case can be found in the Supplemental Material at the [url], which includes Ref. [33]. The construction relating quantum codes to rational CFTs outlined in this paper is not unique. Other classes of codes can be naturally mapped to families of non-chiral rational theories [34]. As was shown in [35], conformal blocks of rational CFTs are wave-functions of the dual Chern-Simons theory, which form a finite-dimensional Hilbert space. Provisionally we identify this Hilbert space with the Hilbert space of qubits the quantum code describes. Exploring further the role of quantum codes in CFTs and in the holographic correspondence is an important program to which we hope to return in the future.
There is a simpler chiral version of our construction. Classical binary doubly-even self-dual codes are associated with even self-dual lattices, which can be used to define chiral CFTs. As is well known, starting with n = 24 there exist "fake" enumerator polynomials, and hence would-be holomorphic partition functions Z(τ ) which are known to have no CFT counterpart [18]. Furthermore, starting in dimension n = 16, there are isospectral selfdual lattices and hence isospectral physically inequivalent chiral theories [36][37][38]. The main difference of our work is that it applies to non-chiral theories, which are much less studied. Furthermore, our examples arise in large numbers at much smaller values of the central charge, with implications for the numerical conformal bootstrap.
As a final remark we notice that the partition function (12) is a polynomial in code CFT partition functions associated with the polynomials (13) [31]. This observation suggests a simple way to construct many new modular-invariant Z(τ,τ ) by simply taking polynomials of any collection of CFT partition functions and making sure that the coefficients in the character expansion are non-negative integers and the vacuum character is unique. For homogeneous polynomials, each term has leading small-q behavior q −c/12 , so uniqueness of the vacuum is a constraint on the coefficients of the polynomial. The examples in this paper show that this constraint has many nontrivial solutions. For an inhomogeneous polynomial in a single variable, uniqueness of the vacuum requires the coefficient of the leading term to be one, as in [39]. We expect that there are many more possibilities for inhomogenious polynomials in several variables, leading to a plethora of modular-invariant Z(τ,τ ) not associated with any CFT.
Conclusions. In this paper we have reported on a way to associate graph codes, a family of quantum error correcting codes, to a specific class of Narain CFTs, whose elements we call code theories. Code CFTs describe free scalar fields compactified on a multidimensional cube in the presence of quantized B-flux. This mapping between graph codes and CFTs provides a new way to study nonchiral theories. It allows us to construct many explicit examples of isospectral non-chiral theories, as well as many examples of would-be partition functions (1) which do not correspond to any known theories. These examples emphasize the fact that solutions of the modular bootstrap equations need not correspond to a unique CFT, nor indeed to any CFT at all.
Many technical details relevant to our presentation, including data necessary to construct pairs and triples of n = 8 isospectral theories, can be found in the accompanying work [31].
We thank Petr Kravchuk and Xi Yin for discussions. AD is supported by the National Science Foundation under Grant No. PHY-2013812.

SUPPLEMENTAL MATERIAL GRAND CANONICAL PARTITION FUNCTION
For 2d CFTs with U (1) n × U (1) n symmetry compactified on a torus is it natural to introduce the grand canonical partition function, which besides the modular parameter τ , would also depend on 2n chemical potentials where q = e iπτ ,q = e −iπτ and Q, Q are the U (1) charges. For the Narain CFT associated with the lattice Λ it can be represented as follows Under modular transformations Z changes covariantly Z is related to the worldsheet path integral Z P I as follows: The path integral is invariant under modular transformations. The relation between Z and Z P I is discussed in detail in the Appendix A of [33]. The full group of T-dualities includes orthogonal transformations O L × O R ∈ O(n) × O(n), which change the lattice Λ. While the conventional partition function is invariant under O(n) × O(n), the grand canonical partition function changes by a rotation of ξ, ξ . Hence, we should recognize Z(τ,τ , ξ, ξ ) and Z (τ,τ , ξ, ξ ) as physically equivalent if for some orthogonal O L , O R .

Z(τ,τ , ξ, ξ ) FOR CODE THEORIES
For code theories the grand canonical partition function (23) drastically simplifies when all components of ξ and ξ are equal This choice restores permutation symmetry between different U (1) generators. In the language of codes this is the symmetry of permutations of qubits. In this case Z C -the grand canonical partition function of a code CFT associated with the code C -will only depend on such aggregate properties of codewords as the total number of different letters, i.e. precisely the information contained in the full enumerator polynomial Here w x (c) is the number of generators σ x contained in the stabilizer element (codeword) c, etc. The refined enumerator polynomial, eq. (5) in the main text, is related to the full enumerator polynomial (30) as follows An explicit calculation shows that Θ is then given by Θ(τ,τ , ξ,ξ) = W C bb + cc, aā + dd, bb − cc, aā − dd , giving rise to eq. (21) in the main text. Here and θ 1 (τ, z) = −i n∈Z e iπτ (n+1/2) 2 +2πi(n+1/2)z (−1) n , (34) θ 4 (τ, z) = n∈Z e iπτ n 2 +2πinz (−1) n .
It is illustrative to discuss the modular covariance of Z for code theories. Under the transformation τ → τ + 1, τ →τ +1, the variables a, d acquire a phase e iπ/4 andā,d acquire the opposite phase e −iπ/4 . This transformation also exchanges b ↔ c andb ↔c. Therefore (33) remains invariant, as follows from the fact that the code C is real, W C (t, x, y, z) = W C (t, x, −y, z), see [31] for details. Under the transformation τ → −1/τ ,τ → −1/τ , ξ → ξ/τ , ξ →ξ/τ the change is as follows Therefore Θ changes covariantly, as outlined in (26), which follows from the invariance of W C (t, x, y, z) under MacWilliams identity [28] In other words, covariance of the grand canonical partition function under modular transformation follows from the properties of the full enumerator W C (t, x, y, z) exactly in the same way that invariance of the partition function follows from the properties of the refined enumerator W C (x, y, z).
To summarize, the full enumerator polynomial has a clear physical meaning in the context of the relation between codes and CFTs: it governs the CFT grand canonical ensemble decorated by U (1) charges with the values of chemical potentials invariant under qubit permutation symmetry. A natural question to ask is if the full enumerator polynomial can resolve or modify the presence of fake refined enumerator polynomials, i.e. modular invariant and otherwise appropriate Z without known CFT counterparts. Unfortunately, using the full enumerator instead of the refined one does not change the picture: there is still a rapidly growing number of fake full enumerator polynomials not associated with any code starting from n = 3. Z(τ,τ , ξ,ξ) FOR ISOSPECTRAL THEORIES As summarized in (28), the grand canonical partition function changes covariantly under T-duality transformations. The only T-dualities which map a code CFT into another code CFT are those whose action reduces to an action on codes, see Appendix D of [31]. They permute qubits and exchange σ x and σ z in the codewords (stabilizer generators). Acting on ξ I ,ξ I they may permute the components and flip the signs of someξ I → −ξ I . (Since θ 2 , θ 3 , θ 4 are even and θ 1 is odd with respect to the second argument, this flip is equivalent to exchanging σ x and σ z at the level of codewords.) We shall regard pairs of Z(τ,τ , ξ, ξ ) which can be mapped to each other by a T-duality transformation as equivalent. The question we would like to understand is whether, by using the grand canonical partition function with ξ I = ξ,ξ I =ξ (or more accurately with |ξ I | = ξ, |ξ I | =ξ) to account for possible T-dualities, we can remove the degeneracy between isospectral theories. By using T-duality transformation any code (associated with a code CFT) discussed in this paper, and more generally in [31], can be brought to graph form, see eqs.
(2) and (9) in the main text. This representation is not unique: there could be additional T-dualities, which map a graph code CFT to another graph code CFT. As we have discussed in the main text, at the level of graphs they act by Edge Local Complementation (ELC). These transformations leave the refined enumerator polynomial invariant but change the full enumerator polynomial. The corresponding Z(τ,τ , ξ,ξ) would be different, but in fact would be related by a permutation of ξ I ,ξ I and a sign flip of someξ I → −ξ I , although this relation might not be obvious at the level of Z(τ,τ , ξ,ξ). Importantly, these generate all transformations which are equivalences of Z(τ,τ , ξ,ξ). Hence, to verify if a particular pair of isospectral theories would have the same (equivalent) Z(τ,τ , ξ,ξ), we must do the following. For each theory in question we should consider the full set of graphs associated with this theory and related by ELC to each other. Each graph in the ELC class defines a graph code and we need to evaluate its full enumerator polynomial. Of course, the full enumerator polynomial is invariant under qubit permutations (node permutations at the level of graphs), so only non-isomorphic graphs from the ELC class should be considered. Finally, one should compare full enumerator polynomials obtained in this way for both theories. If there is even one polynomial which appears for both theories, then the theories are isospectral not only in the sense of the partition function but also in the sense of the grand canonical partition function. If the sets of polynomials associated with the two theories have no common elements, the grand canonical ensemble removes the degeneracy.
We illustrate this general scheme for the pair of isospectral theories with n = 7 discussed in the main text. Up to isomorphisms, the ELC equivalence class of the first theory includes 9 graphs; there are 10 graphs for the second theory. All 19 full enumerator polynomials associated with these graphs turn out to be distinct. It is less important that all 9 (10) graphs of each ELC class lead to a unique full enumerator. It is important though that the resulting sets of polynomials do not overlap. Hence in this particular case the grand canonical ensemble removes the degeneracy between these two theories. We have performed this calculation using the full classification of the ELC classes for n = 7 graphs, see Appendix E of [31]. Extending this analysis to instances of isospectral theories with n = 8 would require first classifying ELC orbits for graphs with n = 8 nodes.