Majorana dimers and holographic quantum error-correcting codes

Holographic quantum error-correcting codes have been proposed as toy models that describe key aspects of the AdS/CFT correspondence. In this work, we introduce a versatile framework of Majorana dimers capturing the intersection of stabilizer and Gaussian Majorana states. This picture allows for an efficient contraction with a simple diagrammatic interpretation and is amenable to analytical study of holographic quantum error-correcting codes. Equipped with this framework, we revisit the recently proposed hyperbolic pentagon code (HyPeC). Relating its logical code basis to Majorana dimers, we efficiently compute boundary state properties even for the non-Gaussian case of generic logical input. The dimers characterizing these boundary states coincide with discrete bulk geodesics, leading to a geometric picture from which properties of entanglement, quantum error correction, and bulk/boundary operator mapping immediately follow. We also elaborate upon the emergence of the Ryu-Takayanagi formula from our model, which realizes many of the properties of the recent bit thread proposal. Our work thus elucidates the connection between bulk geometry, entanglement, and quantum error correction in AdS/CFT, and lays the foundation for new models of holography.

The holographic principle -the idea that certain theories of gravity are dual to lower-dimensional quantum field theoryhas had wide-ranging applications within theoretical physics. In particular, the AdS/CFT correspondence has changed our understanding of theories of both (quantum) gravity and quantum field theory, by giving a specific relationship between gravity on d+1-dimensional negatively curved Anti-de Sitter spacetime (AdS) and d-dimensional conformal field theory (CFT) [1,2]. A number of simple models capturing key aspects of holography have been constructed [3][4][5][6][7][8], largely relying on tensor network descriptions of bulk AdS geometry and boundary states. Tensor networks have long been understood as describing a state in terms of its entanglement structure [9], thus serving as an ideal tool to study holography in terms of notions of quantum information theory [10][11][12][13][14]. The basis of this work is the tensor network construction of the hyperbolic pentagon code (HyPeC), a class of holographic models often named HaPPY codes after the authors' initials [5]. These codes explicitly realize holographic quantum error correction [3] by providing an error-correctable mapping from bulk to boundary degrees of freedom, reproducing many of the features of AdS/CFT. However, the boundary states of the HyPeC differ from other tensor network models specifically designed to produce physical CFTs, such as the MERA [15]. For computational basis bulk inputs, where the tensor network becomes Gaussian and efficiently contractible, earlier studies revealed a pair-wise correlation structure in terms of boundary Majorana modes [16]. As we show in this work, HyPeC states are in fact a special case of a Majorana dimer model, and can be described by entangled fermionic pairs. Majorana dimers have previously been used to describe superconducting phases on lattices [17,18], as instances of tensor networks that have a fermionic component [19][20][21][22][23]. We show that the contraction of dimer-based tensor networks is equivalent to combining entangled Majorana pairs, replacing the computational difficulties of contraction by simple rules on dimer diagrams. This graphical language directly visualizes parities, physical correlations, and the entanglement structure of quantum states spanning the entire fermionic Hilbert space. By deriving the holographic properties of the HyPeC merely from emergent entangled pairs, we connect to recent proposals of AdS/CFT models based on bit-threads [24,25]. Thus, our work is also an important step towards integrating discrete tensor network models of AdS/CFT into a unified setting.

II. A SIMPLE MODEL OF HOLOGRAPHY
Consider the boundary and bulk Hilbert spaces denoted by H ∂ and H bulk respectively. A holographic quantum errorcorrecting code is formed by an encoding isometry E from the logical states in H bulk to boundary states in H code ⊂ H ∂ . Indeed, EE † is the projector onto the code H code of the boundary Hilbert space H ∂ . Any bulk operator O acting on the states in H bulk can be represented by at least one operator O ∂ acting on |ψ code ∈ H code with the property E † O ∂ E = O while preserving the code subspace ([O ∂ , EE † ] = 0). The specific form of such a mapping from bulk to boundary is the holographic dictionary obtained in continuum AdS/CFT by equating bulk and boundary partition functions [2], which is equivalent to considering boundary CFT operators O ∂ as limits of fields on the gravitational AdS background [26]. As we visualize in Fig. 1 (left), oftentimes O ∂ acts non-trivially only on a subregion of the total boundary. Given a subregion A on the boundary one can perform the so-called AdS/Rindler reconstruction [26][27][28][29][30][31] to associate to any boundary operator O A a corresponding bulk operator O acting within the wedge W[A] which is a subset of the bulk.
Due to the computational difficulties in studying continuum AdS/CFT, discrete toy models often provide an easier approach to understanding its properties. These models usually consider a space-like slice of the full AdS spacetime, discretized by a tiling whose open boundary edges correspond to the AdS boundary. Subsets of these open edges are then identified with subregions of the boundary CFT (see Fig. 1, right).
What properties should the discretized boundary states in H code fulfill? As a bulk operator can be represented equivalently on different parts of the boundary, e.g. two regions A and B, we are led to the condition where O A and O B are boundary representations on A and B of an operator O inserted somewhere in the bulk. For this condition to hold for any O and any suitable A and B, the states in H code must necessarily possess multi-partite and nonlocal entanglement to allow for operators that act equivalently on distant parts of the boundary. In this work we show that the holographic pentagon code implements these properties through an underlying fermionic structure. To motivate the use of fermions in the context of holographic quantum error correction, consider a simple toy model of entangled fermionic modes. Throughout, we denote fermionic canonically anti-commuting operators by f j satisfying f † j f k + f k f † j = δ j,k and distinguish the vacuum state vector |∅ satisfying f j |∅ = 0 for any j. The counterpart of a Bell pair for fermions is the so-called BCS state which has the form By a simple calculation, we find that which implies that if j, k are boundary indices, we found a mapping between boundary operators that resembles (1). For holographic quantum error-correction, however, this mapping is insufficient: After acting with the operator, the result (3) is an unentangled Fock state vector f † k |∅ , which is no longer in the desired code-space of entangled states. Furthermore, |ψ BCS does not exhibit any multi-partite entanglement necessary for holography [32]. Fortunately, both problems can be resolved by fermionic mode fractionalization by means of Majorana dimers. Consider the action of Majorana operators, defined as and fulfilling {γ j , γ k } = 2δ j,k , on the BCS state vector (2) as This shows that a mapping between Majorana operators, unlike one relying on standard fermionic operators as in (3), can be performed without destroying entanglement. To achieve multi-partite entanglement, BCS-type states are insufficient. However, a suitable model is provided by the hyperbolic pentagon code (HyPeC). Let us briefly review its construction: The HyPeC is an isometry between bulk and boundary degrees of freedom. An AdS time slice is discretized by a finite tiling of M pentagons, the Poincaré disk projection of which is shown in Fig. 1. Each pentagon is associated with one logical qubit, i.e. one bulk degree of freedom, encoded in five spins (the pentagon edges) via the [ [5,1,3]] quantum error-correcting code. This code can be expressed by a sixleg tensor, with one "bulk" leg corresponding to the logical qubit and the remaining five to the physical spins. The tiling is connected by tracing out spins on the edges of two adjacent pentagon tiles, i.e. by contracting the corresponding tensor indices. This contraction can be understood as a projection of the spins on the two connected edges onto a Bell pair. In this paper, we will usually consider this setup with each bulk input fixed to a certain state. Before contraction, the bulk is then effectively composed of a product state of M local quantum states on five spins each. Contraction locally entangles the spins with each other, thus leading to a larger entangled state on the remaining N spins at the boundary of the pentagon tiling. If we consider instead an arbitrary bulk input on each pentagon 1 , contraction combines the local 5-spin Hilbert spaces into a larger N -spin Hilbert space that defines our code space H code . By merit of the [ [5,1,3]] code, the five spins on the edges of each pentagon are absolutely maximally entangled. A pure state of n qubits is absolutely maximally entangled if all of its reductions to n/2 subsystems are maximally mixed [33][34][35] and hence the states are maximally entangled over all such cuts. The isometric properties of the code follow from this construction.
A useful approach to understanding these states is to represent this spin picture of the HyPeC in terms of Majorana fermions [16]. This is achieved by a Jordan-Wigner transformation between L spins and 2L Majorana modes: where we have used the k-site Pauli operators defined as in terms of the Pauli matrices σ x , σ y , σ z . It will be useful to define the total parity operator In the HyPeC, we take L = 5 spins for each pentagon.
where P tot = ±1 is the eigenvalue of P tot and indices follow periodic boundary conditions. If we replace P tot → P tot , we recover the original [ [5,1,3]] stabilizer Hamiltonian with its two-fold degenerate ground state. Before considering contractions of these fermionic code states, we now develop a comprehensive framework for Majorana dimers that allows us to study the fermionic HyPeC in detail.

A. Definition
Majorana dimers are effectively a reordering of the vacuum state in terms of Majorana modes. The L-fermion vacuum state vector is defined by being annihilated by all of the fermionic annihilation operators f k for k ∈ {1, 2, . . . , L} as The dimer parities p j,k ∈ {−1, 1} give each pair an "orientation" with respect to the index ordering. We refer to p j,k = 1 as "even" and p j,k = −1 as "odd". To recapitulate, a Majorana dimer state is defined to be a (normalized) state vector of L fermionic modes which is annihilated by L independent conditions of the form (12). Note that we have fixed a vacuum state which under the Jordan-Wigner transformation corresponds to a product state in spins, but non-trivial Majorana dimer states can be highly entangled, as we shall see. Equivalently, we may characterize Majorana dimer state vectors |ψ as ground states of specific quadratic Hamiltonians: Multiplying (12) with its Hermitian conjugate from the left yields which implies that the Hermitian operator i γ j γ k has expectation value −p j,k . We can now construct the Hamiltonian where we sum over all L Majorana dimers Ω = {(j, k)}. H is a parent Hamiltonian of |ψ , meaning that |ψ is the unique ground state vector of H with energy −L, being in the −1 eigenspace of all the summands. These two equivalent characterizations are most intuitively visualized through a diagrammatic notation. Consider L fermionic modes, ordered as a chain visualized by an L-gon, with the Majorana modes shown as dots on the edge (mode). Arrows between the Majorana modes represent the pairing. For example, for L = 5, the state visualized by is the ground state of the Hamiltonian An arrow j → k along the index orientation (j < k, blue) corresponds to a dimer parity p j,k = +1, while an arrow against it (j > k, orange) corresponds to p j,k = −1. Note that these diagrams only specify the state up to a scalar c ∈ C, as c affects neither the ground state property nor the dimer conditions (12). A particularly symmetric case is the aforementioned vacuum |∅ represented by a diagram for L = 5. Unsurprisingly, |∅ is also the ground state vector of the Hamiltonian H 0 = k n k with the local number operators n k = f † k f k = (1 + i γ 2k−1 γ 2k )/2. We can construct any Majorana dimer state from the vacuum by applying swap operators S j,k := P tot (γ j − γ k )/ √ 2 onto |∅ , P tot being the total parity operator defined in the last section. For example, the state expressed by diagram (15) is given by S 8,9 S 4,6 |∅ . It should be noted that while these swap operators violate the fermionic super-selection rule in an actual fermionic systems, we are merely interested in Majorana dimers as an effective representation of spins (such as the HyPeC).
As Majorana dimer states are Gaussian, all expectation values are determined by the entries of the covariance matrix with entries We can read off Γ ψ j,k directly from the corresponding diagram: As |ψ is constructed from |∅ by acting with a product S of swap operators mapping each index k to an index S(k), Γ ψ j,k is simply Γ ∅ j,k with interchanged rows and columns The only non-zero entries of the vacuum covariance matrix are Γ ∅ 2k,2k−1 = −Γ ∅ 2k−1,2k = 1. We can thus infer Γ ψ j,k from its diagram using the rules if no arrow connects j and k . (21) For example, the covariance matrix for diagram (15) is   As we will see in the next section, the code distance d = 3 between these two states in terms of Pauli operations can be shown graphically.

B. Pauli operations and total parity
As the Majorana operators are obtained from spin operators through a Jordan-Wigner transformation, local Pauli operations in the spin picture generally act non-locally on the Majorana dimers. Specifically, the reverse transformation of (7) is given by A Majorana operator γ k acting on a Majorana dimer state flips the parity of the dimer ending on site k. We show this by noting that if a state vector |ψ is annihilated by the operator γ a + i p γ b (with dimer parity p ∈ {−1, +1} and a = b), then both γ a |ψ and γ b |ψ are annihilated by γ a − i p γ b : All other dimer conditions remain unaffected. As a graphical notation, we highlight the affected edges of the state in red. Some examples of these operations on a Majorana dimer state vector |ψ are shown here, (32) Up to mirroring, relabeling and relative shifting of indices, all possible swaps belong to one the four categories shown above. The first two swaps flip one local parity but create no additional crossings; the last two either add or remove one crossing while flipping an even number of parities. Thus (31) is always satisfied. Note that we are free to move around the dimer curve between the fixed endpoints, which means we can make two (or more) paths overlap. However, this will always change the number of crossings by an even number. For example, the logical0 state of the [ [5,1,3]] code corresponds to both of the following diagrams (each with ten crossings): As expected, (31) tells us that this state has positive parity. For a fixed dimer configuration but variable dimer parities p k , only the second factor of (31) is relevant. Thus we find that acting with an X k or Y k operator, which changes an odd number of dimer parities, also flips the total parity. A Z k error, which always flips two dimer parities, leaves the total parity invariant.

C. Contracting dimers
We will now show how the notion of tensor network contraction applies to Majorana dimer states. To begin with, consider a state of N spins Here the amplitudes T j1,...,j N = j 1 , . . . , j N |ψ can be viewed as a tensor T which fully specifies the state vector |ψ T . A tensor network is a means of specifying a tensor describing a state of a large number of spins through multiple contractions of tensors of a smaller rank. Specifically, the contraction of two tensors S and T of rank N S and N T between the last index of S and the first index of T is defined to be a new tensor U of rank We see that by contracting the respective tensors, this operation allows us to merge two state vectors |ψ S and |ψ T into a larger one |ψ U given by A tensor network state can thus describe a large state by the relatively few entries of its contracted tensors. This process can be generalized to fermions by identifying the spin basis with a fermionic one as In this picture, tensors are associated with pure fermionic states. As these expressions only use creation operators, they obey a Grassmann algebra. The tensor contraction (35) can (40) as γ j and γ k commute with the integration. We now claim that the dimers connected to the contracted edge become new dimers of the contracted state ω. This leads to the following statement. An example for the contraction of two pentagon state vectors |φ and |ψ is given by We have visualized the contraction by a pair of dashed lines. In this example, dimers not connected to the contracted edges are omitted. The upper diagram corresponds to the conditions We now prove that (42) implies (γ 4 − i γ 19 ) |ω = 0 for the contracted state vector |ω , i.e., that the two original dimers fuse into a larger one: where we have used the identities d f † k f k = 0 and {f k , f † l } = δ k,l . A similar proof using (43) leads to (γ 5 + i γ 15 ) |ω = 0.
The full proof for all possible dimer contractions is given in Appendix A. The resulting rules are: • Contracting neighbouring edges k and k+1 removes the Majorana modes {2k − 1, 2k, 2k + 1, 2k + 2}. The dimers ending on 2k − 1 and 2k + 2 as well as 2k and 2k + 1 are fused into larger dimers.
• The dimer parity p j,k of a fused dimer is the product of parities of the original dimers. In addition, every crossing of the path of a contracted dimer with itself reverses p j,k .
• Every contraction that creates closed loops leads to a vanishing contracted state if at least one loop has an odd dimer parity.
The last case refers to diagrams such as the following: Loops with even total dimer parity only change the contracted state by a non-zero constant.

D. Ordering and cyclic permutations
As fermionic operators anti-commute, defining a chain of fermionic sites requires a definite ordering of the site indices. This is also true for the Majorana modes that make up Majorana dimer states. For convention, we assume clockwiseoriented indices starting from an initial index which we call the pivot and mark by a little circle in the following diagrams. Shifting the pivot corresponds to a cyclic permutation of all indices: How does this transformation affect the dimer parities? First, let us interpret (46) as a cyclic permutation of Majorana indices through an operator M 4 acting on Majorana modes. For example, in the initial labeling we find (γ 5 + i γ 7 ) |ψ = 0. After a cyclic permutation |ψ → |ψ = M 4 |ψ with M 4 γ k M −1 4 = γ (k+4) mod 10 , it follows that Hence, while a cyclic permutation of Majorana operators does not change the direction of the arrows, it flips the local parities of dimers ending on the edges between the initial and final pivot (with indices i, i + 1, . . . , f ), effectively acting like a product of all Majorana operators γ 2i−1 , γ 2i , . . . , γ 2f on these edges. However, in our use of Majorana dimers as a description of the HyPeC, the underlying physical system is one of spins, where (Pauli) operators on different sites commute. Hence, we are interested in cyclic permutations not of Majorana modes but of the underlying spin degrees of freedom. This modifies the previous result, as each spin permutation effects a different Jordan-Wigner transformation. Consider an initial spin state vector |ψ = k∈{0,1} ×N T k1,k2,...,k N |k 1 , k 2 , . . . , k N .
A permutation i → σ(i) of indices i gives rise to the spin state vector |ψ = S σ |ψ , where S σ is the spin-picture unitary permutation operator. Explicitly, In terms of fermionic operators, the initial and final state vectors |ψ and |ψ are identified as The operators f † k andf † k are fermionic operators defined by the respective Jordan-Wigner transformations. Consider a onestep cyclic spin permutation i → (i + 1) mod N through a permutation operator S +1 . The Majorana operators transform as γ k → S +1 γ k S † +1 , and explicitly as Hence, the transformed Majorana operators are not the Majorana operators defined by the new Jordan-Wigner transformation! Instead, under the cyclic permutation S +1 all γ k for k < 2N − 1 transform as γ k → Z 1γk+2 , while γ 2N −1 and γ 2N transform with an additional total parity P tot = Z 1 Z 2 . . . Z N . This changes the dimer conditions: If the state vector |ψ is annihilated by the operator γ j + i p j,k γ k (with j < k), then this operator changes under cyclic spin permutation to Let us distinguish this result by the parity of |ψ . For even parity P tot |ψ = |ψ , we find For odd parity P tot |ψ = − |ψ , the result is given by For odd-parity states, we thus find from (56) that the dimer parities flip as one dimer endpoint moves past the pivot, just as in (47). However, for an even-parity state (55) tells us that the dimer parities remain invariant under spin permutations. This is the only difference between cyclic permutations of Majorana modes and of the underlying spin sites. Omitting arrows and showing only dimer parities, spin cyclic permutation correspond to diagrams such as These two diagrams illustrate a more general observation.
Namely, the upper diagram shows a parity-even Majorana dimer state, where changing the index labeling (i.e., shifting the pivot) does not change the dimer parities. The lower one, however, is parity-odd: The red-shaded edges, following the path along which the pivot was moved, represent Majorana operators on the edges that flip the connected dimer parities. Note that there are two possible paths (clockwise and anticlockwise) between the initial and final position of the pivot, and that both lead to the same final state up to a total sign. As a special case, consider the behaviour of the logical code state vectors |0 5 and |1 5 of the [ [5,1,3]] code under cyclic permutations (here, for a clockwise shift of two edges): We see that a cyclic permutation of these states is equivalent to a rotation of its dimer parities, which is simply a rotation of the corresponding diagram. This is because the tensors T corresponding to these states are invariant under cyclic permutations of indices, i.e., T i,j,k,l,m = T m,i,j,k,l . The explicit construction of these states can be easily performed using matchgate tensors [16].

E. Computing entanglement
The entanglement entropy S A = − tr A (ρ A log ρ A ) of a subsystem A and its corresponding reduced density matrix ρ A =tr A C (ρ tot ) can be evaluated diagrammatically. Given the 2M × 2M Majorana covariance matrix Γ A of the subspace belonging to A (i.e., the rows and columns of the full 2L × 2L covariance matrix Γ whose Majorana modes are contained in A), we can perform a special orthogonal transformation Γ A = QΓ A Q T to the form where ±iλ k are the eigenvalues of Γ A , some of which may be zero. From this form the entanglement entropy follows as (62) As we have found in Section III, the covariance matrix entries Γ j,k of Majorana dimer states can only be ±1 or zero. Consider the jth row (or column) of the sub-matrix Γ A : The dimer connected to Majorana mode j ends on another mode k (with 1 ≤ k ≤ 2L.) If j, k ∈ A, the j and kth row will jointly contribute to a λ i of ±1, i.e., zero entanglement entropy. However, if j ∈ A, k ∈ A, the jth row of Γ A will be zero. As the number of such "dimer leaks" must be even, each pair contributes to a vanishing λ i . Thus each dimer connecting A with its complement A C contributes an entanglement entropy of 1 2 log 2, i.e., half of an EPR pair. Graphically, the entanglement entropy reduces to counting such dimers Consider the following example state.
The subsystem A comprises four edges with the Majorana modes 9 to 16. As four dimers connect A with A C , the entanglement entropy is given by S A = 2 log 2. Effectively, S A counts the number of dimers across the cut γ A separating A from A C (shown as a dashed line). For contracted states, where |γ A | is the length of the shortest cut through the contracted network. Thus, we recover the tensor network interpretation of the Ryu-Takayanagi surface γ A , which appears in continuum AdS/CFT in the holographic entanglement entropy formula [40] which expresses S A in terms of the area of the minimal surface γ A , denoted |γ A |, and Newton's constant G N . In our two-dimensional bulk space, γ A is simply a geodesic and |γ A | its length. We will see later how the discrete analog of (65), where 1/(4G N ) → log 2, is saturated in the HyPeC. The definition of entanglement entropy S A can be ambiguous under a mapping from spins to fermions, as fermionic operators on different sites do not commute. As long as we consider connected subsystems A, such a mapping (37) yields the same S A , as both are related only by cyclical permutation of fermionic sites, which only leads to a sign flip along the permuted rows and columns of the covariance matrix Γ. For a region A composed of disconnected parts, S A is generally not preserved by a mapping from spins to fermions. If, as in the HyPeC model, we want to compute the spin entanglement entropy in the effective fermionic picture, we first need to permute the spin degrees of freedom so that A becomes connected, and then apply the mapping to fermions. However, such a spin transposition usually breaks the Majorana dimer structure, as it leads to fermionic states that are not ground states of Hamiltonians quadratic in Majorana operators. Thus (63) describes fermionic entanglement that remains valid in the spin picture only for connected regions A.
In the fermionic picture, we can easily generalize (63) to disjoint subsystems, such as the mutual information Compared to (63), each dimer in (66) is counted twice. In terms of the geometry of the dimer graph itself, (66) corresponds to a system with an exact area law. [41] One of the properties of this form of the mutual information is an always vanishing tripartite information [42] This implies that Majorana dimer models are compatible with holographic theories, where I 3 ≤ 0 [43]. Furthermore, as we show in Appendix B, the spectrum of Rényi entropies is flat, a property of the underlying stabilizer state structure [44]. We show in Appendix B that this property also follows from the Majorana dimer picture for arbitrary local superpositions of bulk input in the HyPeC under certain constraints on the (compact) boundary region considered.
To clarify the connection between Majorana dimers and EPR pairs, we can explicitly construct Bell states from pairs of dimers. Consider the following two even-parity dimers connecting edges j and k (with j < k) without crossing: This corresponds to two conditions on the total state vector |ψ , As no entanglement between edges j and k and the rest of the system exists, |ψ should be factorizable with regards to these degrees of freedom: where (. . . ) includes terms containing creation operators f † i with i = j, k. Up to a complex phase, the parameters a, b, c, d ∈ C can be fixed using (70), which leads to b = c = 0 and a = d = 1/ √ 2 (assuming normalization). This corresponds to a Bell state vector |Φ + = ( |0 |0 + |1 |1 )/ √ 2 on sites j and k. This analysis can be repeated for all possible dimer configurations, yielding Table I. Conveniently, this allows us to form superpositions of dimers, for example Each diagram in this expression corresponds to a normalized Majorana dimer state. Note that this diagram confirms our intuition that a contraction, which is the sum of projections onto |0 and |1 , is equivalent to connecting pairs of Majoranas via dimers. In a mild abuse of notation, we may thus write to express a contraction (dashed lines). This also allows us to fix relative factors that appear through contraction, such as in the following projection of (72) onto a |0 state vector: The second term vanishes from the condition 0|1 = 0, in agreement with the rule that loops of total odd parity vanish (compare Eq. (45)). Note that the arrow orientation of the dimer for |0 is reversed, as it is used in its adjoint form 0 | (more on Hermitian conjugates in the next section). Projections like (74) can be evaluated for each of the entries in Table I, always leading to a resulting factor of 1/ √ 2. This result is heavily used in Appendix B, where we study the entanglement properties of superpositions of HyPeC code states, where norms of Majorana dimer states become relevant.

F. Orthogonality and completeness
Our diagrammatic notation can also express inner products. Consider the bra ψ | corresponding to a ket |ψ . Clearly, if (γ j + i γ k ) |ψ = 0 then ψ | (γ j − i γ k ) = 0 holds for the adjoint. Thus, we can visualize adjoints by inverting all arrows and corresponding parities, for example (omitting labels): The inner product ψ|ψ is a contraction between |ψ and ψ | over all indices, expressed as The right-hand side, showing a "flipped" ψ |, represents a Choi-Jamiolkowski isomorphism expressing ψ | in the same Hilbert space as |ψ . This involves an inversion of the orientation which flips all dimer parities. As all diagrams are defined for normalized state vectors that satisfy ψ|ψ = 1. Furthermore, we can easily evaluate whether two diagrams correspond to orthogonal states as a contraction ψ|φ of |ψ and |φ vanishes for any odd-parity loop (see Appendix A).
In particular, |ψ and |φ are orthogonal if they share the same correlation structure (i.e., pairing of Majorana modes) but differ in at least one dimer parity. This allows us to construct the complete Hilbert space with Majorana dimer states on N edges by fixing a correlation structure and then flipping through all 2 N possible dimer parities, resulting in 2 N mutually orthogonal state vectors. Since the Hilbert space is also 2 N -dimensional, we can express any state in it by a superposition of Majorana dimer states under the given correlation structure. This is equivalent to obtaining a orthogonal stabilizer state basis by considering all 2 N sign combinations of N stabilizer generators.

A. Overview
As we saw in the previous section, the computational basis logical code states of the [ [5,1,3]] quantum error-correcting code can be expressed as Majorana dimers. Furthermore, we showed that identifying Majorana dimer states as tensors and contracting them yields new Majorana dimer states, and that these contractions are easy to evaluate diagrammatically. Because the HyPeC is built from tensors each representing the [ [5,1,3]] code, we find the following key result: Theorem 2 (Representing the HyPeC with Majorana dimers). The hyperbolic pentagon code (HyPeC) with logical bulk input fixed to local basis states0 or1 yields a Majorana dimer state on the boundary. Each input corresponds to a (unique) pattern of dimer parities on the boundary state.
While fermionic modes require an explicit ordering, we show in Appendix C that different contraction orderings lead to equivalent boundary states. We will now show how the geometry of the dimers in the HyPeC determines its properties, using the tools developed in the previous section.

B. Dimers and entanglement structure
First, we will consider the physical properties of the Hy-PeC for logical inputs fixed locally to0 or1. The code is constructed from a hyperbolic {5, 4} tiling 2 , with each tile now set to (23) or (24) (the full HyPeC also allows for superpositions between the two). As the model consists of asymptotically infinite tiles, we have to define a UV cutoff at which the tiling is truncated. We do this by starting with a central tile and iteratively adding tiles on all free edges. The number n of iterations thus gives the graph distance between each boundary tile and the centre, determining the cutoff. Such a series of iterations for an all-0 bulk input is visualized in Fig. 2.
The contracted dimers are drawn as geodesics in the Poincaré disk. This is not an arbitrary choice, as the dimers follow discrete geodesics (i.e., shortest paths) in the {5, 4} tiling. Fig. 3 shows the n → ∞ limit both for an example of two dimers and the whole contraction. Because of the particular property of the {5, 4} tiling that the pentagon edges connect to continuous geodesics, the asymptotic endpoints of a contracted dimer are also endpoints of such a geodesic. 3 Tracing this geodesic back into the bulk, we see that it passes along all tiles that contained the uncontracted dimer pieces. Furthermore, as Fig. 3 also shows, there are always two dimers with the same pair of asymptotic boundary points, resulting in a bulk geodesic that is dual to a boundary Bell state. While Fig.  3 only shows a uniform0 bulk input, the dimer parities generally differ with the input. The dimer pairs then correspond to different types of Bell states, as in Table I. Note that the Majorana modes composing the effective fermions of these Bell states are located on neighbouring boundary edges at any finite cutoff. This elucidates the code's error correction properties: Any product of pairs of Majorana operators i γ j γ k acting on dimer endpoints (j, k) can only change the state up to a total sign, and is thus a representation of a logical parity operation in the bulk. While single Majorana operators are nonlocal in terms of spins, pairs of Majorana operators on neighboring sites can be expressed by a local pair of Pauli operators (compare (25)). For each pair of HyPeC dimers, there then exists a boundary operator O of weight |O| = 4, i.e., consisting of four Pauli operators acting on the boundary, which represents a logical bulk operation. Thus, even for an infinitely large number of HyPeC tiles, the code distance d never exceeds d = 3, as such an O represents an error on the code space.
Given this picture of pair entanglement on the boundary through bulk geodesics, the dependence of the entanglement entropy S A on the boundary subsystem size |A| = can be explicitly computed. Clearly, the position of this subsystem affects the value of S A , as the distribution of entangled pairs in Fig. (3) does not respect translation invariance on the boundary. Thus, we consider the average expectation value E (S) of the entanglement entropy instead. The results in Fig. 4 show an approximate logarithmic growth S A ∝ log , as expected of a critical theory. Fitting against the expected logarithmic scaling expected for a CFT [45], we find a central charge c ≈ 4.2 (dashed line in Fig. 4). For a finite system of boundary size L, S A reaches its maximum at = L/2, in agreement with the full form of (77). Each iteration preserves the entanglement entropy scaling of the previous one up to ≈ L/4. We already observed this behaviour in a previous analysis using matchgate tensors [16].
The logarithmic entanglement entropy scaling saturates the bound we observed in (64): The maximum entanglement between two boundary regions A and A C is proportional to the maximum number of dimers that can connect them, or equivalently, the number of edges |γ A | of a minimal cut γ A through the bulk separating A from A C . Due to the hyperbolic geometry of the {5, 4} tiling, |γ A | ∝ log |A|. As γ A is a geodesic in this discrete geometry, no other geodesic -and thus no dimer -can pass through it twice (up to cases such as in Fig. 6), turning the upper bound into an equality: Clearly, this result is the same for each computational basis state input, as changing this input only changes dimer parities, leaving S A invariant. We can modify the IR structure of our boundary states by modifying the central tiles. There are two possible approaches: One is the replacement of the dimer structure in these tiles, and the other is the complete removal of the tiles. In the first case, we simply reconnect the dimers with each other, so that they no longer follow geodesics. This breaks the conditions for the saturation of the bound (78), so that we reduce the entanglement of the boundary states. The more tiles in the centre are changed (e.g. to the vacuum (17)), the further long-range entanglement is suppressed, so that we approach a gapped boundary state with constant (i.e., area-law) entanglement.
The second case was already considered in the original Hy-PeC model: When removing entire tiles, auxiliary bulk degrees of freedom (open edges, or open legs in tensor network language) are opened up. The usual interpretation of this setup is that of a black hole, or when extending the open edges to a non-contracted auxiliary system, that of a wormhole. In both cases, the boundary state of this setup should exhibit an additional thermal entropy, which the Ryu-Takayanagi formula interprets as a deformation of geodesics around the horizon. In the language of Majorana dimers, this additional entropy  is explained by dimers ending on the open edges: Following (62), any dimer in a region A that connects to a site outside of A contributes log(2)/2 to the entanglement entropy S A . When A becomes large, this entropy contribution scales with the "horizon area" of the black hole, i.e., the number of fermionic modes on the open edges. As we increase the radius of the black hole, S A will begin to grow linearly with the size of A, as expected of a thermal CFT.
As we show in Appendix B, the entanglement entropy S A of compact subsystems A of the HyPeC for logical bulk input can be generalized to arbitrary local input, i.e. superpositions of0 and1 that factorize between the tiles. Without additional entanglement between bulk sites, S A is independent of the specific bulk input, as long as the boundary regions A and its complement A C are reducible to the same discrete bulk geodesic γ A via the greedy algorithm [5], which can be completely re-derived using Majorana dimers. This algorithm iteratively removes tiles with three or four open edges (see Fig. 5), deforming A into a region A further in the bulk, while keeping S A = S A invariant. Fig. 6 illustrates how some boundary regions B are not reducible to the same geodesic γ B as their complement regions B C . In these cases, no cut along the pentagon edges can completely separate dimers with endpoints in B from those with endpoints in B C , leaving dimers in a residual bulk region. While (63) still holds if local bulk inputs are fixed to basis states0 or1, the entanglement entropy S B for local superpositions can generally be larger, as there is additional input-dependent entanglement between the residual dimers. For example, in the setup of Fig. 6 (bottom), S B can be up to log 2 larger than the fixed-input result (see Appendix B for details).

C. Scaling and RG flow
As we saw in Fig. 3, contracting the HyPeC produces effective boundary EPR pairs connected along geodesics through the bulk. This allows for a naive interpretation in terms of IR/UV scaling: Longer geodesics that probe deeper into the bulk are then associated with the IR scale, while short-range geodesics close to the boundary correspond to UV modes. The iteration of contractions in Fig. 2 is then interpreted as a renormalization group (RG) flow, with each new iteration adding additional degrees of freedom. As each tile connects to either one or two tiles of the previous iteration, there are This IR→UV renormalization step has a well-defined UV→IR inverse constructed from the Hermititian conjugate of a specific tile. Consider the 2 → 3 step from Fig. 7: The IR→UV step consists of contracting the edges 1 and 2 of |ψ = α |0 5 + β |1 5 (with |α| 2 + |β| 2 = 1) onto the boundary state. To inverse this operation, we trace out the edges 3, 4, 5 of |ψ ψ |, which we can express using Majo- tr (3,4,5) Note the representation of the identity as a set of dimers directly connecting two pairs of edges: Any Majorana dimer state is left invariant by contraction with such a state, and hence any other state, which we can always express in a dimer basis, as well. We can similarly find that tr (2,3,4,5) |ψ ψ | = 1 2 /2. The inverse renormalization step is thus simply the reversal of Fig. 7: Some dimers are closed into loops, thus tracing out the associated degrees of freedom. In fact, this result is closely related to the perfect tensor property of the HyPeC, whereby any pentagon tile can act as an isometry of k → 5 − k edges as long as k ≤ 5 − k. We also use it in Appendix B to prove the greedy algorithm with Majorana dimers.
While we saw that Majorana dimers form effective EPR pairs in the asymptotic limit of infinitely many contractions, we can also observe a separation of the boundary into separate fermionic subsystems at finite cutoff. The physical fermion corresponding to each uncontracted edge can be coupled to at most two other fermions/edges via the dimers it contains. These two fermions are again coupled to further fermions, so we end up with a -necessarily closed -chain of fermions, each only coupled to its two non-local "neighbors". However, as we contract more and more tiles, we find that our boundary fermions are separated into an increasing number of independent chains. This is shown in Fig. 8 for the first few iterations, where the dimers are colored according to the decoupled fermionic chain they belong to. The appearance of additional decoupled subsystems at larger iterations is another sign of an RG flow: Increasing the number of iterations encodes more and more subsystems of varying sizes on the boundary. For the full HyPeC beyond basis-state input, correlations between these subsystems can be nonzero. As we will show next, however, such correlations can only be captured by n-point correlators with n > 2.

D. Correlation functions for general bulk input
By counting the dimers by the boundary distance over which they reach, the average correlation falloff of the Majorana covariance matrix Γ defined in Eq. (18) can be determined. For fixed input, this leads to a polynomial Γ j,k ∝ |j − k| −1 falloff of two-point correlations [16], again resembling a CFT scaling. Naively, this holds only for the case of a fixed logical input0 or1 on each tile, as superpositions of Majorana dimer states are generally non-Gaussian and have a complicated two-point correlation structure.
However, we will now show that two-point correlations for the HyPeC with general bulk input, where local superpositions of0 and1 inputs are allowed, are surprisingly similar to the fixed-input case. First, consider the dimer parity structure caused by local1 inputs. As we showed in Fig. 2, using even-parity0 input over the entire bulk leads to a simple contracted state, where all resulting dimer parities are even. When contracting over odd-parity1 inputs, index permutations necessary during the contraction process can lead to additional dimer parity flips caused by Z operators on some of the pentagon edges. After going through the contraction process, which is laid out in Appendix C, we find that these dimer parity flips can be grouped into strings of Z operators between the tiles with1 input. Possible configurations are shown in Fig. 9 for two and four1 insertions. While neither the pairing of1 tiles with Z strings nor the paths of these strings are unique, we can freely deform them without changing the boundary state (bottom diagrams in Fig. 9). Furthermore, we can freely add closed Z loops around a set of tiles with an even number of1 tiles in it, as this is equivalent to evaluating the total (even) parity of the contained tiles. Intriguingly, we can relate this to physical rotations of tiles: While the dimer parities of 0 tiles are invariant under cyclic permutations (in the spin picture), we showed in (60) that a rotation of a tile with1 input is equivalent to tracing the shifted endpoint of the local ordering with a Z string. A full "rotation" (leading to a closed Z loop around a1 tile) changes the state by a total minus sign. In other words, as shown in Fig. 9, Z string loops around tiles with an even number of1 insertions leave the state invariant. Thus, it is tempting to interpret the0 tiles as local fermionic vacua and the1 tiles as logical fermions, emergent from the underlying spin degrees of freedom.
The set of boundary states for all possible basis-state bulk inputs (0 or1 on each tile) gives us a basis set for the states of the full HyPeC. In general, boundary n-point functions for an arbitrary input can have a correlation structure completely different from the dimer structure we saw for logical basisstate input, and overlaps between different basis states can change the entanglement structure. Fortunately, as we show in Appendix C, the HyPeC boundary states for different basis inputs are all distinct by an operator of Majorana weight w>2, i.e., at least three Majorana operators γ k are required to map one basis state to another. This leads us to the following conclusion: Proof. We denote by |b := |b 1 , b 2 , . . . , b N the state vector for a fixed basis-state input b k on the kth pentagon. A general HyPeC boundary state vector is given by the superposition with c b ∈ C. A fermionic two-point correlation function with entries is generally a sum of 2 2N terms. However, we assumed that two boundary states for different basis-state inputs b and b are separated by a w > 2 operator, i.e. fulfill the conditions In other words, the expectation values of operators with Majorana weight w ≤ 2 are diagonal in the logical basis. This implies where Γ b j,k = i b| [γ j , γ k ] |b /2 are the covariance matrices for the Gaussian boundary state for a basis-state input b.
In dimers, the explicit basis-state contractions are . (92) Note that in this labeling, the first pentagon is on the right. As we can see, each of these state vectors is distinguished from the others by at least three dimer parity flips, i.e. it requires more than two Majorana operators to map between them. As a result, G (2) only contains four diagonal terms, with the covariance matrix Γ b1,b2 j,k containing two-point correlations for the basis state vector |b 1 , b 2 8 .
This example, as well as the general case of Theorem 3, implies that two-point functions G (2) preserve the correlation structure of the fixed-input covariance matrices Γ, whose entries only differ by signs (i.e., dimer parities). Hence, if Γ j,k = 0 for a fixed logical input (no dimer connecting Majorana modes j and k), then two-point correlations between the two modes vanish for any bulk input. This is even true for the case of superpositions with entangled bulk input, where G (2) is still a convex sum. Higher-order correlation functions separate into a Gaussian part that follows Wick's theorem and have the form of products of dimer terms, and a non-Gaussian part which contains contributions from overlaps between boundary states for different logical input. To illustrate, consider a single pentagon with arbitrary logical input, described by |ψ = α |0 5 + β |1 5 (with |α| 2 + |β| 2 = 1). The n-point correlators G (n) until n = 4 are given by We have used square brackets around indices to denote antisymmetrization. Gaussian contributions can occur only for even n, as only pairs of Majorana operators can map a dimer state onto itself. As |0 5 and |1 5 are mapped to each other by a w = 3 operator, the non-Gaussian part appears at n = 3: The correlator G j,k,l can have non-zero entries for j ∈ {1, 6}, k ∈ {3, 8}, l ∈ {5, 10} and its permutations, corresponding to the dimers differing between both input states (compare (23) and (24)). As the exact entries of G (3) depend on the complex phases with which we define |0 5 and |1 5 , they are not determined by the Majorana dimer structure.
Our example generalizes to large HyPeC contractions: The Gaussian part of n-point correlations G (n) is described by a convex combination of Gaussian covariance matrices, while all boundary states for fixed logical input that differ by n dimer parities contribute to its non-Gaussian part. We can think of the latter as an "interaction" between code words that depends on how much the logical bulk input is in a superposition of the basis state vectors0 and1. For a completely classical version of the code, no non-Gaussianity appears.

A. Other stabilizer codes
We have extensively focused on the [ [5,1,3]] stabilizer code as the building block of the HyPeC. However, we can construct Majorana dimer models for states on other n-gons, i.e., more general [[n, 1, d]] stabilizer codes. We now show that these have properties very similar to the n = 5 case.
We set a number of requirements to such generalizations: I. Stabilizer code: We require n − 1 stabilizers (commuting products of Pauli operators) that lead to a twofold degenerate ground state, stabilizing one logical qubit.
II. Majorana dimer representation: All stabilizers should be products of two Majorana operators, up to a total parity operator P tot .
III. Rotational symmetry: All stabilizers S k should be cyclic permutations of S 1 .
We may also wish to construct n-qubit codes that correspond to perfect tensors. For fixed inputb with b ∈ {0, 1}, this requires an isometric reduced density matrix for any subset A of sites with size |A| ≤ n/2. To hold for arbitrary input (i.e., superpositions of0 and1), it is also necessary that0 and1 are partially orthogonal on A C , i.e., again assuming |A| ≤ n/2. Unfortunately, perfect tensors for qubits require states that are maximally entangled for any subdivision of sites, a condition which cannot be satisfied for n = 4 or any n > 6 [46,47]. As n < 3 does not correspond to a physical tile and we already covered the n = 5 case, this leaves only n = 3 and n = 6 to be studied with Majorana dimers. However, as we will see below, none of the corresponding Majorana dimer codes can be perfect for arbitrary bulk input. Let us start with the n = 3 case. We can easily find a stabilizer code that conditions I -III. The stabilizers S are The twofold degenerate ground state of the stabilizer Hamiltonian H = − k S k is spanned by one parity-even and one parity-odd Majorana dimer state with pairing between modes on opposite sites. Furthermore, for a fixed logical input0 or1 (but not its superpositions), the boundary state is decribed by a perfect tensor. This implies that adding such triangular tiles into the pentagon code preserves its entanglement structure only for logical basis-state input. Note that this code is equivalent to a repetition code under Y k → Z k . We will explore the connection to GHZ states in the next section. Contrary to the pentagon code, embedding the states of this "triangle code" into a regular {3, k} bulk tiling does not lead to interesting bulk/boundary relations, as the dimers close into loops. Similarly, we can consider a "square code" for n = 4, where we find yet another stabilizer code with similar properties. The following stabilizers lead to a familiar Majorana form: (101) Note that by applying a total parity operator, we can map this to an equivalent code with stabilizers S = which again highlights the GHZtype entanglement). As in the triangle code, Majorana dimers at a distance of three Majorana sites are paired up. Again, this implies trivial bulk loops of dimers for a regular {4, k} tiling. Furthermore, this code does not lead to a perfect tensor for any logical input, as this is impossible to achive with 4-leg tensors. One may be tempted to construct a stabilizer code with S = X 1 Z 2 X 3 , X 2 Z 3 X 4 , X 1 X 3 Z 4 , Z 1 X 2 X 4 , where each element of S can also be written as a product of two Majorana operators on opposite edges (see Table II). However, this choice of S only stabilizes a single state instead of a full qubit, as the ground state is non-degenerate. Interestingly, this ground state does fulfill the perfect tensor property for connected subsets of the boundary legs.
Beyond the familiar n = 5 case (with permutations of X 1 Z 2 Z 3 X 4 as stabilizers), we can construct another code by exchanging X k ↔ Y k , which is equivalent to exchanging γ 2k−1 ↔ γ 2k and leads to the stabilizers (102) Naturally, this code inherits the properties of the original [ [5,1,3]] code, including the perfect tensor property for any logical input.
Attempting to generalize to n = 6, we find the following choice for the elements of S: (103) The n = 6 case resembles the n = 3 result, as partial traces tr A C |0 1 | do not usually vanish. Contrary to the n = 3 case, it is also possible to form subsystems A of size |A| ≤ n/2 that are disjoint. In both cases, the reduced density matrix ρ A is not an isometry. In other words, this code is only perfect for basis-state inputs and connected subsystems A.
We find similar properties for n > 6 codes: While it is impossible to construct a perfect tensor for all (possibly disjoint) boundary regions A, we can always construct a Majorana dimer code with basis states0 and1 that are each perfect for connected subsystems A by connecting Majorana dimer modes on opposite edges. For n = 4k+1, k ∈ N, this construction even leads to codes where tr A C |0 1 | = 0 for a connected subsystem A with |A| ≤ n/2. Such a block perfect code leads to an isometric ρ A for superpositions of bulk input for any connected A. The n = 9 case, whose stabilizers are permutations of X 1 Z 2 Z 3 Z 4 Z 5 X 6 , is visualized in Table II. Note that block perfect holographic codes can also be constructed from CSS codes [48].
While we would expect a bulk tiling of each of the two n = 5 codes to lead to similar boundary properties, it would be interesting to investigate codes built from combinations of perfect and block perfect tensors.

B. GHZ states
The n = 3 code considered previously possesses a peculiar property: The logical eigenstates are GHZ states in the Y basis, i.e., |0 3 = |Y +  where |y ± are the eigenstates of σ y with σ y |y ± = ± |y ± . This is because |± GHZ n is in the +1 eigenspace of the stabilizer S 1 = Y 1 Y 2 and its permutations, and thus in the ground state space of corresponding stabilizer Hamiltonian. The total parity P tot |± GHZ n = ± |± GHZ n follows from the relation σ z |y ± = − |y ∓ .
We can easily generalize these Y -basis GHZ states to higher n. Using (25), we find Y k Y k+1 = i γ 2k−1 γ 2k+2 for k < n and Y 1 Y n = iP tot γ 2 γ 2n−1 . This fixes the Majorana dimers for any n to a (2k+2 mod 2n) → (2k−1) pairing (k ∈ {1, . . . , n}), with the last dimer parity flipped in the Y − state. For example, the GHZ state vectors on a pentagon are: |Y + . (106) Similarly, we can construct n-qubit GHZ states in the X basis: As X k X k+1 = − i γ 2k γ 2k+1 and X 1 X n = iP tot γ 1 γ 2n , we find a 2k → 2k+1 mod 2n pairing, with the last dimer flipped in the X+ state. For the n = 5 case, the corresponding diagrams are: (108) As a general rule, the positive-parity GHZ states are rotationally invariant in dimer parities, while the negative-parity GHZ states are rotationally invariant in dimer orientation (i.e., direction of arrows). As shown in Sec. III D, this means that the underlying spin degrees of freedom are invariant under a cyclic permutation of indices of the tensors specifying the GHZ states.
In the Majorana dimer language, we can also see that the [ [5,1,3]] logical code states are extensions of GHZ states: All have a completely symmetric entanglement structure, but whereas the X± and Y ± GHZ states connect Majorana modes at a distance of d = 1 and d = 3 modes, respectively, the0 and1 logical eigenstates pair modes 5 sites apart. While an even d cannot lead to rotational symmetry, we can systematically construct all of these states by considering all odd d. For example, the n = 9 case in Table II corresponds to a d = 9 pairing.

C. Majorana dimers and Majorana codes
So far, we have only discussed quantum error correction in a system of spins which we effectively described by fermionic degrees of freedom. Another approach is to build quantum error correction in fundamentally fermionic systems and then describe the actions of Majorana operators in such codes [49]. While superficially similar to our treatment of the HyPeC, there are fundamental differences: The advantage of actual Majorana codes is the use of fermion super-selection to reduce the occurrence of logical errors by encoding them in operators that are odd in Majorana operators, and thus cannot occur if the system is in a purely bosonic environment. However, our Majorana dimer model encodes the0 and1 states in different fermionic parity sectors, superpositions of which would thus be forbidden in a system composed of actual fermions. It follows that our Majorana dimer description of the [ [5,1,3]] stabilizer code is different from the Bravyi-Terhal-Leemhuis prescription to turn stabilizer into Majorana codes, which uses four Majorana modes to encode one spin degrees of freedom. However, Majorana dimers can still be a useful tool for studying Majorana codes. Consider a simple Kitaev chain [50] of 2N Majorana modes in the ground state of the stabilizer Hamiltonian The ground state is two-fold degenerate, but can be spanned by two Majorana dimer state vectors |± N . Explicitly for N = 6, From (31) we immediately see that |± N has fermionic parity ±1. While the logical code states can be easily mapped into each other by applying the operator γ 1 or γ 12 (which flips the parity of the 1 → 12 dimer), any physical error has to respect fermion parity and locality and is therefore restricted to the form γ k γ k+1 , i.e., even nearest-neighbour terms. Thus, a phase error requires a string γ 1 γ 2 . . . γ 12 of Majorana operators with w = 2N , endowing the ground state of the Kitaev chain with topological protection. Clearly, this approach can be generalized to any Majorana dimer state of 2N Majorana modes: By fixing N −k dimers, we leave a k-dimensional logical qubit subspace on the remaining k possible dimers. If these remaining k modes are far apart, then they will be robust against errors that are both even and local in Majorana operators.
Furthermore, we can express Majorana stabilizer codes with dimers even if the stabilizer generators are not quadratic in Majorana operators. Consider N = 4 edges with eight Majorana modes under the stabilizers S = − γ 1 γ 3 γ 5 γ 7 , − γ 2 γ 4 γ 6 γ 8 . The +1 eigenspace of each S k is spanned by two Majorana dimer states on the corresponding modes, one where both dimer parities are even and one where they are odd. We can thus define the logical 2-qubit state vectors b 1 ,b 2 as follows: (112) If we again assume physical errors to correspond to even nearest-neighbour Majorana operators, we find a code distance d = 2 with regards to these errors. Explicitly, two such operators are required for both bit-flip and phase-flip errors, e.g. γ 1 γ 2 γ 2 γ 3 = γ 1 γ 3 for a phase flip and γ 3 γ 4 γ 5 γ 6 for a bit flip. We identify these types of errors by the Majorana dimers whose parity differs between the logical code states: In the former case, we identify operators acting on both ends of one of these dimers, while the latter case corresponds to operators on one endpoint of each of them. We can thus systematically evaluate the error correction properties of any Majorana stabilizer code by expressing its logical basis in Majorana dimers.

VI. MAJORANA DIMERS AND BIT THREADS
Our model bears close resemblance to the bit thread proposal [24], a model for holographic states that re-derives the Ryu-Takayanagi (RT) formula by postulating that such states are composed by a flow of EPR pairs between boundary regions. In this proposal, the entanglement entropy S A of a boundary region A is then equivalent to the maximal flow of EPR pairs between A and A C through the bulk, which is equivalent to the area of the minimal surface γ A in the standard RT prescription.
Clearly, this picture is satisfied by the Majorana dimer description of the HyPeC for compact regions A (for which (63) holds). While each dimer only carries half the entanglement of an EPR pair, the phenomenological behaviour is identical: S A is determined by the number of dimers between A and A C , which is restricted by the minimal cut through the bulk tiling from the endpoints of A. The HyPeC leads to a special dimer configuration in which this bound is saturated for any compact region A (up to degenerate cases shown in Fig. 6). It thus defines a global bit thread configuration, i.e., one inde- pendent of the choice of A. A special property of this configuration is that the dimers/bit threads follow discrete geodesics through the bulk, so that the bulk metric is emergent from the entanglement structure. Note that in the asymptotic limit of infinitely many tiles, shown in Fig. 10, each geodesic can be identified with a pair of dimers, thus forming an effective EPR pair. Curiously, the resulting entanglement entropy resembles a classical fracton models on a {4, 5} tiling, where the Shannon entropy scales with the number of dual geodesics, each doubling the ground state degeneracy [51].
However, global bit thread configurations are generally not sufficient to reproduce the RT formula for disjoint subsystems; in such cases, the bit thread flow must differ according to the choice of the subsystems to reproduce the correct holographic multi-partite entanglement [25]. This cannot be fulfilled with fermionic dimers, as the global entanglement structure is fixed for a specific state. However, the HyPeC is only a Majorana dimer model effectively, with its underlying spin degrees of freedom converted to fermionic modes through a Jordan-Wigner transformation. Thus in general, when considering disjoint subsystems, the entanglement entropy cannot be determined by a dimer counting. It is an interesting future question whether the entanglement between disjoint subsystems (or equivalently, for transpositions of boundary regions) leads to a multi-partite entanglement of the HyPeC also resembling the bit thread picture.

VII. DISCUSSION
In this work, we have studied the intersection of stabilizer states and fermionic Gaussian states, both efficiently describable classes of quantum states with a wide range of applications in quantum information theory and both condensed matter and high energy physics. For this purpose, we have introduced a novel graphical formalism for describing Majorana dimer states, free fermionic states characterized by entangled Majorana modes. These can describe stabilizer states such as those of the [ [5,1,3]] quantum error-correcting code. We applied this formalism to the recently constructed hyper-bolic pentagon code (HyPeC), a discrete toy model of the AdS/CFT correspondence [5]. For logical bulk input fixed to code basis states, the HyPeC was found to correspond to Majorana dimers along discrete bulk geodesics. With the bulk geometry thus encoded in boundary state entanglement, we reproduced the logarithmic scaling of the entanglement entropy S A with its subsystem size for connected subsystems A, reproducing the Ryu-Takayanagi formula through a calculation that sharply resembles the recent bit thread proposal. We also extended our results to bulk inputs containing local superpositions on each pentagon tile. For this case, where boundary states are generally non-Gaussian, Majorana dimers quantify the dependence of the entanglement entropy on residual bulk regions. We also provided a method for computing non-Gaussian n-point correlations function of the HyPeC for arbitrary bulk input, finding that the Majorana dimer structure -i.e., boundary correlations only between pairs of Majorana modes -is preserved for n = 2, a feature related to the quantum error-correcting properties of the code. Furthermore, we showed that Majorana dimers can describe a range of entangled states, including GHZ states and models such as the Kitaev chain, while also allowing for complicated non-Gaussian states by expansion in a Majorana dimer basis. Finally, tensor networks based on Majorana dimers provide a particularly simple model of an RG flow, where an IR→UV transformation is interpreted as an addition of new dimer degrees of freedom upon contraction.
As this work has focused on the specific Majorana dimer structure of the [ [5,1,3]] code and the HyPeC that is built upon it, we have only glimpsed at the general relationship between Majorana fermions and stabilizers. While our graphical formalism for Majorana dimers can be used to describe a wide range of entangled quantum states, including generalized stabilizer codes, only a subset of these could be covered here. As this formalism allows for the construction of quantum states from their entanglement symmetries, a more systematic study of Majorana dimer states and their symmetries would be useful in the future. With our approach allowing for a direct analytical contraction of dimer-based tensor networks through simple graphical rules, and a possible description of non-Gaussian states through dimer superpositions, there ap-pears to be a vast number of potential applications. Within the Gaussian setting, an interesting question is the deformation of Gaussian stabilizer states. As each Majorana dimer state can be expressed by a matchgate tensor [16], one may consider smooth deformation of the HyPeC (and other stabilizer models) while retaining an efficiently contractible tensor network. Under such deformations, it is conceivable that a picture with some effective degrees of freedom localized to geodesics is retained. For example, there exists a possible connection to ribbon operators [52] which appear in the study of topological phases of matter away from fixed point models. This would also involve exploring the similarities between Majorana dimers and anyon models. One may also wish to address the actual recovery rates of logical qubits in holographic codes, which have been studied both in the original HyPeC proposal [5] and in extensions such as the Calderbank-Shor-Steane (CSS) holographic heptagon code [48]. Their remarkable property of a resilience of logical qubits further in the bulk may be studied more directly with Majorana dimers, where an explicit mapping between bulk and boundary degrees of freedom is provided. While the toy models studied here are inherently discrete, the many properties of the HyPeC resembling a conformal field theory (CFT) motivate further studies on its continuum limits, analogous to continuous MERA [53,54]. While rigorous studies of the continuum quantum fields corresponding to lattice models are ongoing [55], the quasiregular symmetries expected on the boundary of regular hyperbolic bulk tilings [56] may require a different notion of a CFT for regular discretizations than the familiar continuum formulation. We hope that the present work stimulates further endeavours in this direction. We start with an N -fermion state vector |χ (N = 7 in (A2)) that obeys the Majorana dimer conditions where we assume for now that a < b and c < d, so that the dimer lines do not cross (a = 1, b = 9, c = 3, d = 5 in (A2)). We claim that after contraction, the contracted state vector |ω is again a Majorana dimer state with conditions which means that the parities along a contracted path are multiplied. We write these conditions as O k |ω = 0 with k ∈ {1, 2} denoting the two cases. Using the tools developed in section III C, we will now prove them simultaneously: Using (A3) and (A4), we can rewrite this purely in terms of operators acting locally on the contracted edges: We previously assumed a < b and c < d. What happens if e.g. c > d? As the condition (A6) for the contracted state vector |ω still hold, we just multiply both sides by − i p c,2N −1 p d,2N −2 , yielding In other words, contracting out two Majorana dimers that cross each other flips the parity of the resulting dimer. For our example, the corresponding diagram has the form Self-contractions also allow for special cases involving dimers on the contracted edge itself, which we will now prove, as well. First, consider the case where one of the contracted edges contains a local dimer, such as the contraction The contracted path contains contributions from three parities. Without loss of generality, we assume that the local dimer is located on the N th edge, so that we start with the conditions In our example (A11), a = 2 and b = 7. The first line simply becomes f † N |χ = 0 for p 2N −1,2N = −1 and f N |χ = 0 for p 2N −1,2N = +1. The latter case implies that d f † N |χ = 0 as well, as Grassmann integrations and annihilators act equivalently. We now prove that these assumptions for the uncontracted |χ imply that for the contracted |ω , similar to (A5) and (A6). The proof is similar to the previous setup: Again, crossing the two initial paths so that a > b introduces an additional minus sign to the contracted parity. The next case to consider contains a Majorana pair across the two contracted edges, such as in the diagram Note that this kind of contraction always contains a crossing. Again without loss of generality, we assume that the dimer on the contracted edges connects Majorana modes 2N − 3 and 2N . The full conditions for the uncontracted state are with a = 3 and b = 7 in (A16). The first condition can be rewritten into the form We now prove the contracted state fulfills Note that additional minus sign in comparison to (A14) due to the crossing. The proof is given by Finally, consider contractions that involve paths that get completely removed by contraction. Up to parities, there are two possible dimer configurations for such contractions: Clearly, such contractions can only affect the state on the remaining edges by an overall constant C. Unless C = 0, this constant can be absorbed into an appropriate normalization. But when does C = 0 occur? Let us consider the first diagram (A22), which can be generalized to the conditions We claim that the contracted state vector |ω vanishes if (p 2N −3,2N −2 , p 2N −1,2N ) ∈ {(1, −1), (−1, 1)}. These two cases correspond to either f N −1 |χ = 0 and f † N |χ = 0 or f † N −1 |χ = 0 and f N |χ = 0. It is easy to see that the contraction is annihilated in either case (recall that integrals df † k act like annihilation operators f k ). The second diagram (A22), corresponding to the conditions is more involved. We seek to prove that |ω vanishes if (p 2N −3,2N , p 2N −2,2N −1 ) ∈ {(1, −1), (−1, 1), (−1, −1)}, i.e., for at least one odd parity. In terms of creation and annihilation operators, these three cases can be rewritten as For the first two cases, the contraction (A26) turns into For the third case, we get To summarize, we see that a self-contracted loop leads to vanishing contracted state if the total parity of the loop is odd, as postulated in the main text. Even-parity loops contribute an overall constant C = 0 to the contracted state. Here we are effectively using a Choi-Jamiolkowski isomorphism, representing a density matrix as a state in a doubled Hilbert space. In order to produce a reduced density matrix ρ A of some subsystem A, we sum over a complete set of states projected onto the edges that are part of A C (the complement of A), which we saw in (72) to be equivalent to a contraction. For instance, the green-shaded subsystem A in the following example leads to a reduced density matrix of the form We have omitted Majorana labels for clarity. In the first step, we used (72) to relate partial trace and contraction, then applied (74) in the second, yielding proper normalization factors. The third step merely uses (72) in reverse. In summary, we see that normalization (requiring trρ A = 1 at each step) leads to a simple rule: Each contraction that glues two pairs of dimer together produces a factor of 1/ √ 2. The entanglement entropy now follows from the eigenvalue spectrum of ρ A . We can compute the eigenstates by projecting a full basis of Majorana dimer states onto the contracted edges of |ψ . For simplicity, we choose the basis of local Fock states, i.e., with dimers only between the Majorana modes on each edge. As two edges are contracted out, there are four such basis states, of which only two are non-vanishing. These eigenvectors |ψ A,1 and |ψ A,2 are given by Here both diagrams represent normalized states. To see that our construction indeed yields eigenstates of ρ A , consider the eigenvalue equation for the second eigenvector |ψ A,2 : With a similar diagram for ρ A |ψ A,1 it is found that both eigenvalues are 1/2. Thus, the entanglement entropy is given by We find that evaluating S A reduces to counting the dimers connecting the "ket" edges with the "bra" edges, which determines how mixed ρ A is. In general, any reduced density matrix contains 2m "mixing dimers" that span an eigenspace of 2 m orthogonal dimer states (whose diagrammatic representation is not unique for m > 1). The entanglement entropy follows as Equivalently, as 2m dimers connect A with the complementary (contracted) region A C , each dimer contributes 1 2 log 2 to the entanglement entropy S A , as in (63).
Using a similar strategy, we can compute the Rényi entropy S (n) A = log(trρ n A )/(1−n). This requires evaluating the nth power of the reduced density matrix ρ A . As an example, consider the square of (B2): Thus, it follows that ρ n A = ρ A /2 n−1 , and hence S (n) A = log(trρ A /2 n−1 )/(1−n) = log 2. This property of a "flat Rényi spectrum", i.e., S (n) A = S A , holds for any Majorana dimer state. For a generic ρ A , (B7) involves n − 1 contractions of 2m mixing dimers, leading to the following analog of (B6) for Rényi entropies: Note that this property of a flat entanglement spectrum is a proven feature of stabilizer codes states [44], thus making Majorana dimers ideal for the study of stabilizers. Contrary to the stabilizer picture, however, we can also diagrammatically evaluate the entanglement entropy for classes of superpositions, as we will now see. First, we take a look at superpositions of input states of the HyPeC. Consider a single tile of the [ [5,1,3]] code. For arbitrary bulk input, the boundary state is given by (B9) On the right-hand side, we have used a new notation for superpositions of [ [5,1,3]] computational basis states with complex factors α and β. Normalization requires |α| 2 + |β| 2 = 1. We now show that the reduced density matrix ρ A of this superposition becomes an identity on the subsystem A when it consists of only two (A = (1, 2)) or one edge (A = (1)): Note that the actual values for α and β do not change ρ A , and thus the entanglement spectrum is the same for any superposition of the [[5, 1, 3]] logical code states. As we can easily see, S (1) = log 2 and S (1,2) = 2 log 2, identical to the result for the logical code states. The corresponding eigenstates are simply a complete basis of Majorana dimers on one or two edges, respectively. Let us now consider the |A| = 3 case. We easily find the entanglement entropy S A = S A C = 2 log 2. The eigenstates of ρ A can be found, as in (B3), by starting with the state vector |ψ and contracting a complete basis on the edges in A C , yielding four eigenstates. We compute the first one explicitly: The remaining three eigenstates are given by: To see that these are eigenstates, we do not need to actually evaluate these contractions. Instead, using (B10), we compute the eigenvalue equation for the first eigenvector as follows: The equations for the other eigenstates follow equivalently, leading to an entanglement entropy S A = 2 log 2 (i.e., m = 2). For more than one tile, we can generalize (B14) for local superpositions, i.e., superpositions that factorize along the tiles. As an example, consider a |ψ resulting from contracting two states of the form (B9): Note that a normalization factor of 2 appears as a result of the unresolved contraction within both |ψ and ψ |. To see that the eigenvalue spectrum of ρ A is the same as that of ρ A , we simply extend the eigenvectors (B12) and (B13) onto the region A by contracting them with the first pentagon, which is equivalent to contracting a complete basis on the extended vector |ψ . For the first eigenvector, we thus find The complete eigenvalue equation can be resolved by applying (B10) and (B11) successively: Again, this procedure holds for all eigenstates, leading to the same eigenvalue spectrum as for ρ A . Thus we see that "gluing" [ [5,1,3]] tiles onto a region A on an original tile only projects the eigenvalues onto a larger space of Majorana dimer states, leaving their eigenvalues invariant. This procedure can also be extended to cases where a subsystem B and its complement B C both cover different tiles, as in the following example: Here, we have rotated the configuration (B15) for easier visualization; as before, the adjoint part of ρ B is on the right. Even in this configuration, we can construct a set of eigenvectors by projecting a complete dimer basis onto B C : Again, after repeating this procedure for all eight eigenstates, we find that the entanglement entropy corresponds to the result for a fixed logical input, S B = 3 log 2. An important condition for computing reduced density matrix eigenstates in this way is that when projecting a complete basis of eigenvectors onto |ψ , the resulting states must be orthogonal. This is always the case when no dimers connect sites within region A C . If they do, we can still simplify the reduced density matrix to an effective density matrix of a reduced state, as in the following example for a region C: Instead of 2 |C C | = 32 eigenstates, as in the previous example, we now only find 2 |γ C | = 8, where γ C is the complement region of C after simplifying ρ C (with ∂γ C = ∂C; here, γ C = C). This is because a basis set contracted onto C C of the original state does not lead to fully orthogonal states, for example: Thus we conclude that if by applying (B10) and (B11) a reduced density matrix ρ A can be simplified so that no dimers connect sites within γ A , then there are 2 |γ A | eigenstates with equal eigenvalues and an entanglement entropy S A = |γ A | log 2. When such a simplification is not possible, the entanglement entropy can depend on the bulk input. If we extend the region C → D onto half of the two-pentagon system, we cannot apply (B10) and (B11): Because of a dimer connecting Majorana modes within D, an eigenbasis projected onto its edges becomes mixed. Indeed, the reduced density matrix ρ D separates into a sum of parity-even and parity-odd terms, as cross-terms between both vanish: We can thus write ρ D = tr D C (α 1 α 2 |0,0 + β 1 β 2 |1,1 )(α 1 α 2 0 ,0 | + β 1 β 2 1 ,1 |) +tr D C (α 1 β 2 |0,1 + β 1 α 2 |1,0 )(α 1 β 2 0 ,1 | + β 1 α 2 1 ,0 |) ≡ tr D C |ψ + ψ + | + tr D C |ψ − ψ − | .
We have defined as |ψ ± the parity-even and parity-odd part of the total state vector |ψ . For each of the two states, we can still apply our previous approach of finding the eigenbasis by projecting a complete dimer basis on the state itself, yielding S D (ψ + ) = S D (ψ − ) = 3 log 2, as 3 dimers connect D and D C . Following the rules for the entanglement of superpositions for biorthogonal states [57], we can now compute the entanglement entropy of the full state as S D = ψ + |ψ + S D (ψ + ) + ψ − |ψ − S D (ψ − ) + h 2 ( ψ + |ψ + ) = 3 log 2 + h 2 (|α 1 α 2 | 2 + |β 1 β 2 | 2 ) ≤ 4 log 2 , where we have used the binary entropy function x → h 2 (x) := −x log x − (1 − x) log(1 − x). We are thus in a position to compute the entanglement entropy even for complicated superpositions of dimer states.
Assuming a boundary region A that can be simplified using (B10) and (B11), however, we can easily compute the entanglement entropy of the full HyPeC independent of the bulk input. For this we follow the steps laid out in (B18), (B21) and (B22) for the construction of reduced density matrices and their eigenstates. Using our previous notation for superpositions, an example is given by The normalization depends on the number N C of internal contractions. We omitted the superposition labels α, β for clarity, but still assume only local superpositions within each tile. Given a boundary region A, we first simplify the reduced density matrix ρ A as in (B22), being left with a wedge W bounded by minimal cut (or "bulk geodesic") γ A : Here N C,W is the number of (still unresolved) contractions in the wedge W. The eigenstate basis of ρ A can again be constructed by projecting a complete basis of dimer states onto the edges of γ A , leading to a 2 |γ A | -dimensional space of states, where |γ A | is the number of edges along the cut. For illustration, we consider the eigenstate with all-even projections: |ψ 0,0,0,0,0 The eigenvalue equation can be evaluated with the same techniques that we have used for reducing (B18) and (B21), ρ A |ψ 0,0,0,0,0 Thus we find the same entanglement entropy as for the case of fixed logical input states, S A = |γ A | log 2 (with |γ A | = 5). Our procedure is equivalent to the greedy algorithm [5], which in dimer language is manifested through the reduction steps (B11) and (B10). As for the greedy algorithm, our approach only applies when both A and its complement A C are reduced to the same γ A after simplification. In that case, we can draw the following conclusion about the reduced density matrix: As a result, we find a flat spectrum of Rényi entropies S (n) A = S A = |γ| log 2. When reductions from A and A C are not equivalent, i.e., when the greedy algorithm does not converge to a geodesic, dimers will be "lost" during each power of ρ A , and S (n) A will decrease with n.
During the first iteration of contractions, the last contraction involves the first1 tile and makes the contraction parity-odd. We thus need to mark it with a pivot, which is simply the pivot of the original1 tile. To contract the other1 tile, a pivot shift is required, which produces a Z string (red line): The contraction is now again parity-even (the pivots "cancel each other out"), and the rest of the contraction can be performed without worrying about orientations: This result is independent of the ordering of the previous contraction, as we can freely deform the Z strings through the0 tiles: To indicate the action of the Z strings on the full contraction, we have omitted the spaces between tiles in the previous diagram. Furthermore, the result is independent of the initial orientations of the1 tiles, as rotating these is equivalent to extending or shortening the Z strings, as we have found in (59): Contracting more than two1 tiles will create Z strings between pairs of them, in the order in which we contracted. This ordering, however, also does not affect the final contraction, as we can change this pairing using the same rules: The same rules apply if we have an odd number of1 tiles in the bulk. As the entire contraction now has odd parity, it also requires a pivot, which pairs up with the last1 tile in the ordering. Again, this choice of a "last" tile does not change the outcome: (C8) Note that in the last step, we pushed Z strings through two pentagon tiles. Consistent with the lemma above, moving the boundary pivot of the full contraction extends the Z string attached to it along the boundary, which is the expected behaviour for a cyclic permutation of an odd-parity dimer state.
Lemma 4 now allows us to make some statements on the distance between Majorana boundary states for different bulk inputs. Let us define the Majorana weight w as the number of Majorana operators (i.e., dimer parity flips) required to transform one state into another. Given a boundary state vector |0,1,1,0, . . . for an arbitrary bulk input, what is the lowest w min with respect to a state with any other bulk input? We claim the following: Lemma 5 (Majorana distance of HyPeC boundary states). The boundary states of the HyPeC for fixed logical input in the bulk have a code distance w > 2 between any two inputs.
Proof. We will now show that starting from any fixed-input HyPeC boundary state, no number of logical input flips in the bulk can lead to a state which is closer that w = 3 to the original one. This bound is clearly saturated for such an input flip0 ↔1 of a tile on the boundary, which flips three dimer parities. If we instead push the input flip further into the bulk, we will produce a Z string from the boundary (or annihilate one, if the original contraction is parity-odd). The further in the bulk the flip occurs, the longer the Z string grows, increasing w. Due to the hyperbolic geometry, there is also no way that the dimer flips by neighbouring1 insertions can cancel each out. For neighbouring pairs of1 insertions, we always find w > 3: We have defined w relative to the all-0 input, but the result clearly holds for insertions on any fixed code input. When nonneighbouring pairs are added, the resulting Z strings cause additional dimer flips: Similarly, adding even more pairs to make two Z strings "cancel" out does not bring down w: = = (w = 8) (C12) As a result, it is impossible to produce Majorana dimer states on the boundary of the fixed-input HyPeC that can be mapped to each other with less than w = 3 Majorana operators. The underlying reason for this can be found in the geometrical construction: The number of possible boundary configurations 2 M on L boundary edges increases much faster than the 2 N configurations on the N bulk tiles, as the geometry is hyperbolic.
The property w > 2 resembles the code properties of the HyPeC: Due to the tiles corresponding to [[5, 1, 3]] code states, it requires three Pauli-type operations ("errors") to map one code state to another. Thus, it requires at least three Pauli errors on the boundary to map any HyPeC state to another one. Here, we found that it also requires at least three "Majorana errors" to perform such a mapping. This is not a trivial result, as the number of Pauli operations corresponding to just two Majorana operations already grows in the distance between the two sites on which the Majorana operators act. For example, In general, applying two Majorana operators γ j and γ k at some distance on the boundary produces a Z string between the edges on which γ j and γ k act. Fortunately, the [ [5,1,3]] code states upon which the HyPeC are built allow for the expression of long