Free fermion representation of the topological surface code

. The toric code is known to be equivalent to free fermions. This paper presents explicit local unitary transformations that map the Z 2 toric and surface code – the open boundary equivalent of the toric code – to fermions. Through this construction it is shown that the surface code can be mapped to a set of free fermion modes, while the toric code requires additional fermionic symmetry operators. Finally, it is demonstrated how the anyonic statistics of these codes are encoded in the fermionic representations.


Introduction
The toric code [1][2][3] and its open boundary version, the Z 2 surface code [4,5], have been the test-bed for numerous investigations of condensed matter phenomena as well as quantum information applications [6][7][8]. The main reasons for the popularity of the toric code are its ability to support Abelian anyons, exotic quasiparticles that can fault-tolerantly encode and manipulate quantum information, its eigenstates have non-trivial topological entanglement entropy [9], while it is exactly solvable. An important feature of this topological model is that it is relatively simple, where for example, the anyonic statistics and fusion rules emerge directly from the algebraic properties of Pauli matrices. At the same time the toric code enjoys many applications. It can be used as a fault tolerant quantum memory protecting against spurious local perturbations [10], it can perform topological quantum computation resilient against control errors [1], or it can encode more complex anyonic models such as Majorana fermions at lattice defects [11,12].
The toric code has been experimentally simulated with highly entangled four-photon GHZ states [13] and the four-body interaction has been physically realised with Josephson junctions [14,15]. However, it has been argued by Wen that the Hilbert space of the toric code, in the presence of an external magnetic field contains a low energy subspace that can be described effectively by hopping fermionic excitations coupled to a Z 2 gauge field [16]. This gauge field does not introduce interactions, but encodes the exotic statistics of the excitations. Moreover, previous investigation of the toric code's ground state in terms of the interaction distance [17] showed that the system is equivalent to free fermions [18]. As this paper will show this is part of a more general result, where all eigenstates of the toric code are Gaussian states having a e-mail: py12af@leeds.ac.uk entanglement spectra given in terms of free fermions. In addition, the energy spectrum has a similar decomposition in terms of single particle energies. Hence, it is expected that a unitary transformation exists that maps the toric code to a free fermion Hamiltonian. Nevertheless, a free fermion system can support neither anyonic statistics nor eigenstates with non-trivial topological entanglement entropy. Hence, these properties have to be encoded nontrivially in the unitary transformation that maps between these two physically different models.
Previous works studying transformations of the toric code include the paper [19], where the authors provide a duality mapping from a cluster state on an N × N lattice to the toric code on an N × (N − 1) lattice. The cluster state can be mapped to individual spin Hamiltonians, which are equivalent to free fermions. The mapping to the toric code takes some of the cluster state's boundary terms to stabilizers of non-contractible loops in the toric code, thus removing the degeneracy of the ground state. In addition, the paper [20] maps the toric code onto decoupled Ising chains, and the papers [21,22] give duality mappings, built from CNOT gates, from the toric and surface code in the presence of external magnetic fields to Ising models. This paper demonstrates that indeed it is possible to find a unitary transformation that maps the surface code to free fermions and presents its explicit form. It also presents the explicit form of a unitary transformation mapping the toric code to free fermions with an interacting fermionic parity operator, which ensures the excitations of the model are created in pairs, as in the toric code. These transformations comprise of products of C 4 Clifford rotations [23] that act on each plaquette, and are directly generalisable to arbitrary size systems. The resulting system of the surface code transformation consists of free fermion modes with local chemical potentials, that can encode the excitations of the plaquettes, and of a single zero energy fermion mode that does not appear in the Hamiltonian, encoding the logical state of the model. The toric code supports quasiparticle excitations that come always in pairs, while the surface code can have individual excitations. On the other hand the free fermion system described can support single particle excitations. As the unitary transformation is isospectral, it cannot map the toric code to a system of this form. The toric code is mapped to a similar system, with one extra zero mode to encode the second logical qubit of the toric code and a fermionic parity operator ensuring any excitations are created in pairs, thus fixing the isospectral nature of the transformation. The possibility to transform the surface code to free fermions could have a variety of applications, e.g. in condensed matter, by dissecting the way anyonic statistics emerge, or in quantum information, as free fermion systems and their manipulation have a very efficient descriptions [5,24].
The paper is organised as follows. Section 2.1 reviews the spin description of the surface and toric code, which will be the starting models. Section 2.2 explicitly presents the local unitary transformations, U S and U T , that map between the surface and toric code and their fermionic counterparts, respectively, for arbitrary size systems. Section 2.3 studies the resulting models, showing how the states of the models split into "dynamic" and "zero" (or "logical") modes. Section 3 looks at how string operators transform between the systems. It is demonstrated how the mapping keeps endpoints of anyonic string operators fixed, while extending their support into the dynamic and logical modes of the fermionic systems. Finally, it is shown how the anyonic statistics of the surface code are encoded in excitations of the free fermion model and how the same statistics of the toric code are encoded in its fermionic counterpart.

The transformation to fermions
In order to perform the transformation of the Z 2 surface [5] and toric code [1] to free fermions and fermions with fermionic parity operators, respectively, let us first adopt a suitable representation of the models in terms of spins located at the vertices of the lattice [4]. We will then study the energy and entanglement spectra and show that they both exactly correspond to those of free fermions. This description can be formalised through the use of the interaction distance, D F , [17,18]. We then see that the stabilizer groups of both the surface and toric codes are isomorphic to groups generated by commuting Pauli operators, thus giving a description of the form of these unitarily equivalent fermion models. Two explicit unitaries, U S and U T , are then presented. The first of which transforms the surface code to decoupled fermions, and the second transforms the toric code to fermions coupled to two fermionic parity operators.

The spin description of the surface and toric code
We now review the spin description of the surface and toric code [4]. We start with the surface code. The distance d surface code has support on a d × d lattice with open boundary conditions, where d is always odd. There are d 2 Fig. 1. (a) The 3 × 3 surface code, with physical qubits located at the vertices of the lattice. Plaquette stabilizers, B b and Bw, are on black, b, and white, w, plaquettes respectively. B b (Bw) applies a σ z (σ x ) operator to each qubit surrounding b (w) and detects the parity of σ x (σ z ) operators on these qubits. Logical Pauli operators XL and ZL are shown as the red and green lines, respectively, encoding one logical qubit. (b) The 4 × 4 toric code, with physical qubits at the vertices of the lattice. Plaquette stabilizers, B b and Bw, are of the same form as those in the surface code. The choices of X and Z logical operators are shown in red and green, respectively, with X L as the vertical lines. These encode the two logical qubits of the toric code. A σ x operator acting on a single qubit producing a string with an excitation on the plaquettes at each end, is shown in blue.
physical qubits, or spins, one on each site of the lattice, that encode one logical qubit. The code has an alternating checker pattern of stabilizers, B b and B w , at the black, b, and white, w, plaquettes, built from σ x or σ z Pauli operators on the surrounding physical qubits, respectively, as shown in Figure 1a. The stabilizers corresponding to the semicircle plaquettes on the boundary and square plaquettes have support on two and four qubits, respectively. We can define two logical operators, X L and Z L , as strings of σ x and σ z operators, respectively, with support on the d physical qubits along the left and bottom of the lattice, respectively. These map between degenerate states of the model and are built from σ x and σ z operators, respectively. The Hamiltonian is given by where B b = j∈b σ z j and B w = j∈w σ x j , with {b} and {w} the set of all black and white plaquettes, respectively, and j is the site the Pauli operator acts on. The form of the Hamiltonian, H SC , suggests that it is strongly interacting. Excitations in this model arise due to string operators, O X C and O Z C , which are strings of σ x and σ z operators respectively, that create localised excitations at the endpoints of the path, C, of the string operator. O X C operators create excitations at black plaquettes and O Z C at white plaquettes. Crossings between these string operators on qubits give rise to the anyonic statistics through the Pauli commutation relations. A single σ x or σ z is the smallest string operator, having endpoints on two plaquettes, diagonally adjacent to each other. This is the standard form of the surface code in terms of qubits (spins).
The toric code is similar to the surface code. The distance d toric code has support on a d × d lattice on the surface of a torus with periodic boundary conditions, where d is always even. It still has d 2 physical qubits, but now encodes two logical qubits and supports four logical operators, X Excitations of the toric code are produced by string operators of the same form as those in the surface code, given in (2). A string operator on the toric code, consisting of a single σ x , is shown in Figure 1b. One consequence of the periodic boundary conditions is that b B b = w B w = 1, this will prove to be important when producing the unitary mapping from the toric code to free fermions with fermionic parity operators.
To investigate how close to free fermions these codes are, we can employ the interaction distance. This distance is the minimal trace distance of a given density matrix to the manifold, F, of all Gaussian density matrices, where D(ρ, σ) = 1 2 tr (ρ − σ) 2 is the trace distance. A more convenient expression for the interaction distance is in terms of the eigenstates of ρ and σ, i.e. D F (ρ) = min {σ k }∈F |ρ k − σ k |. The interaction distance can be determined for ρ being the reduced density matrix from the bipartition of the system's ground state or being the thermal density matrix. In the first case D F probes the quantum correlations of the system and thus its entanglement spectrum, while in the second case it probes its energy spectrum. Recent studies of the interaction distance, D F , [17,18], of the Z 2 surface and toric code have found that D F = 0, for the entanglement spectrum of the ground state. Here we show that not only does the ground state entanglement spectrum correspond to that of free fermions but so does the energy spectrum. Let us first consider in more detail the interaction distance with respect to the entanglement and energy spectra of the model. The entanglement interaction distance, D ent = D F (ρ ent ), is the interaction distance of the reduced density matrix, ρ ent , produced by a given bi-partition of the model in a particular eigenstate. In general, we can write the eigenvalues of ρ ent as ρ ent is the entanglement spectrum of the state. For Gaussian states the entanglement spectra are given by, where j are the single particle energies of the free fermion modes, n j (k) are the single particle occupations corresponding to the energy level k and N is the number of fermion modes in the system [25]. Bi-partitioning the state of an anyonic system into two parts A and B gives an entanglement spectrum of the form, where i is a specific anyonic configuration related to k, a is the set of all anyons in i, c is the total anyonic charge across the bi-partition, N is the multiplicity of the fusion of the anyons a to c, d a l is the quantum dimension of an anyon a l , D is the total quantum dimension of the system and |∂A| is the size of the boundary of A [26,27].
is the normalised probability of having an anyonic configuration, i, at the boundary of the partition, with total charge c. The entire spectrum is built from all possible anyonic configurations, i. The surface and toric code are abelian models, so N c a = 1 for all valid sets of anyons a that fuse to c and zero otherwise. The quantum dimensions, d a l , of all anyons of the these codes are equal to one and there are four species of anyon [8]. Hence, D = a d 2 a = 2, where the sum is over all anyons of the code. Therefore each state of the surface and toric code has a flat entanglement spectrum with degeneracy proportional to the size of the boundary of the partition [18,26]. This spectrum has the same form as that of (5) with all j 's set to zero. Therefore D ent = 0 for the entanglement spectrum of all states of the surface and toric code for all possible partitions.
The thermal interaction distance, D β th = D F (ρ th (β)), is the interaction distance of the thermal density matrix, is the partition function and T = 1 β is the temperature. The eigenvalues of ρ th have the form ρ th k = 1 Z e −βE k , where {E k } is the energy spectrum. The energy spectrum of free states should satisfy the same relation as (5). For the surface and toric code, the energy spectrum, E k , is given by the syndrome pattern of anyonic excitations at plaquettes. These excitations all have the same energy contribution, as seen from (1) and (3), hence the spectrum of the surface code can be reproduced with a set of d 2 − 1 single particle energies, { j }, (corresponding to the d 2 − 1 plaquettes of the d × d surface code) arranged in all possible occupation patterns, n j (k). The spectrum of the toric code can be reproduced with a set of d 2 single particle energies (corresponding to the d 2 plaquettes of the d × d toric code) arranged in all possible occupation patterns, with even total occupation number. Therefore, the thermal interaction distance of these codes is zero. The fact that D β th = 0 means these codes are isospectral to free fermion systems. This suggests, there should exist unitary transformations, U, mapping the surface and toric code presented above to such isospectral free fermion models.
By studying the group structure that corresponds to the surface and toric code we find the form of the fermionic models they map to. The group generated by the set of all surface code stabilizer operators, {B p } ∈P , where P is the set of all plaquettes, all stabilizers square to the identity and stabilizers commute with one another, is isomorphic to a group generated by a set of commuting Pauli operators. (7) for all plaquettes λ and η in P. This suggests it should be possible to map each plaquette operator of the surface code to a single free fermion mode.
The toric code stabilizer group has the added restriction that the product of all stabilizers supported on a black, B b , or white, B w , plaquette, respectively, must be equal to the identity. The group generated by these stabilizer operators is isomorphic to a group generated by a set of commuting Pauli operators two smaller than that of the surface code, The resulting group generated by the Pauli operators in (8) will be one quarter the size of that in (7). All plaquette operators in the toric code should be mapped to free fermion modes, except one black and one white operator which will each be mapped to fermionic parity operators over the set of all black and white modes respectively. Hence, even though the interaction distance tells us that the toric code is isospectral to a free fermion model, we actually find these interacting fermionic parity operators are necessary by studying the group structure. These symmetry terms are a result of the periodic boundary conditions of the toric code and the fact that excitations in the code are created in pairs. This is discussed in more detail in Section 3. The surface and toric code are mapped by unitary transformations, U S and U T , respectively, to fermionic models where H FS is a free fermion model Hamiltonian and H FT is a fermionic model Hamiltonian, consisting of free fermion terms and two interacting fermionic parity operators. It is the purpose of the next section to present the exact form of U S and U T .

The unitary transformations
This section presents the transformations, U S and U T , between the spin representation of the surface and toric code and the fermionic Hamiltonians, H FS and H FT , respectively, as dictated by (9). These are general unitaries for any system size. To achieve this we employ C 4 Clifford rotations [23], of the form, where σ µi is the Pauli matrix acting on the ith qubit and Using this wet can map a collection of spin operators to a spin operator on a single qubit and the identity everywhere else. For example, where σ 0 = 1.
Let us start with the surface code mapping, U S . The purpose of U S is to transform each plaquette stabilizer, [28] (a † and a are fermionic creation and annihilation operators, respectively), on a single free fermion mode (or spin) and the logical operators, X L and Z L , to operatorsX L = σ x = a † + a andZ L = σ z = 1 − 2a † a with support on a shared zero mode, not in the Hamiltonian, H FS , hence separate from those supportingB p operators. We split U S into N + 2 unitaries, where N = d 2 − 1 is the number of plaquettes in the d × d surface code. Each of the U 's has a similar structure, transforming one of the d 2 − 1 plaquette stabilizers, or 2 logical operators into single spin operators. The where R C4 (σ  in the operator we are mapping from at each stage, but at this top left qubit we replace the Pauli operator with a σ y in the first step and a −σ y in the second. There is a lot of freedom in the choice of the specific form of C 4 rotations throughout this section. For example, we could have a −σ y in the first R C4 and a σ y in the second. We just present two particular collections of C 4 rotations that work for the surface and toric code, respectively. These N/2 unitary parts act in order from the top to bottom row of the lattice. This ensures that their effect on all other black plaquettes are trivial. The effect of these unitaries on the white (X) plaquettes, however are non-trivial. We see in Figures 2b and 2c that some σ x operators of the white plaquettes are mapped to σ z operators by the first N/2 unitaries. These σ x operators are those with support on the qubits pointed at by the blue arrows.
The white (X) plaquette stabilizers are mapped, by the next N/2 unitary parts, to σ z operators on the bottom right qubit of the plaquette, or the right qubit in the case of the order two operators. They are mapped individually, each by their own U in order from the right to left column. The form of the U 's that perform this mapping vary depending on the effect of the U 's corresponding to the black plaquettes. The mapping (U N/2 , . . . , U 1 ) acts trivially on the semi circle plaquette stabilizers on the bottom row of the lattice, as is shown in Figure 2c, . For these types of plaquettes we use the rotation, All others are acted on non-trivially, such as the top right square plaquette stabilizer, B w , in Figure 2(c), w labels the intermediate form of the operator. For an operator of this form we use the rotation, where the Pauli operators in the R C4 rotation are equal to those in the operator we are mapping from,B w , except at the bottom right qubit of the plaquette where we replace the σ x with a −σ y . The operator on the bottom right qubit of a white plaquette is always unaffected by any previous U 's by construction, thus will remain a σ x .
Once we have transformed the N plaquette operators, we transform the logical operators with the two remaining unitaries, U N +1 and U N +2 . The logical operator, , respectively, with support on a single shared qubit. U N +1 and U N +2 act trivially on all previously obtainedB b andB w operators.
The toric code mapping, U T , has a similar form. U T transforms each plaquette stabilizer, B p , in H TC to an operatorB p = σ z on a single free fermion mode, except one black, B b1 , and one white, B w1 , stabilizer, which are mapped to symmetry operators,S b1 = b\b1B b and S w1 = w\w1B w , which are the products of all other black and white transformed stabilizers respectively. The four logical operators, X L , X (2) L = σ z k with support on two zero modes, j and k, not in the Hamiltonian, H T S , hence separate from those supportingB p operators. We split U T into M + 2 unitaries,  Figures 3a and 3b. The mappings take the following form, . This operator has support on one of the four qubits of the corresponding plaquette, b, the same qubit that supports the σ y operators in the  Figure 4. These M/2 − 1 unitary parts act in a certain order. No unitary part may act before the unitary corresponding to the plaquette their arrow points at. So as can be seen from Figure 3 the first plaquette is the one whose arrow points towards the top left plaquette, as this has no unitary part of its own. This ordering ensures that the effect of each part on all other black plaquettes that are yet to be transformed is trivial. However, the effect of each of these parts on the top left plaquette is non-trivial. This is mapped to a symmetry operator, with a σ z supported at each qubit supporting aB b . This non-trivial effect is marked in Figures 3b-3f, by the position of underlined blue "(Z)"'s. Similarly to the surface code mapping, the  For an operator of this form we use the rotation, where the Pauli operators in the R C4 rotation are equal to those in the operator we are mapping from,B w , except at the top left qubit where we replace the σ x with a −σ y . The operator on the qubit that will support the final B w operator will always be unaffected by any previous U 's by construction, thus will remain a σ x . These qubits are the ones positioned at the heads of orange arrows in   Figure 4. As with the first M/2 − 1 unitary parts, the second M/2 − 1 act in a particular order. No unitary part may act before the unitary corresponding to the plaquette their arrow points at. As can be seen from Figure 3 the first plaquette must be the one whose arrow points towards the top right plaquette of the bottom left quarter of the lattice, as this has no unitary part of its own. This ordering ensures that the effect of each part on all other white plaquettes that are yet to be transformed is trivial.
Once we have mapped all plaquette operators to single σ z operators or symmetry operators, we transform the logical operators with the four remaining unitaries, U M −1 , . . . , U M +2 . The logical operators, X L and X (2) L , are mapped by all previous unitaries to strings of σ z operators along the qubits they originally had support on with a σ x on the qubits that intersect with Z  L are acted on trivially by all previous unitaries. We label these intermediate forms of the operators asX where the operatorsX (2) L andZ (2) L are transformed in a similar way. Thus X (1) L and Z (2) L are mapped toX The unitaries U M −1 , . . . , U M +2 act trivially on all previously obtainedB b andB w operators.

The Fermion models
Let us now focus on the properties of the models, H FS and H FT , that result from the transformations, U S and U T , of the surface and toric code, respectively. We will start with the surface code. The plaquette stabilizers are mapped to σ z operators on free spins (qubits), which are equivalent to free fermion modes. The excitations of plaquettes can now be encoded by the occupation of isolated dynamic fermion modes subject to a local chemical potential that encode the corresponding increase of the energy by 2J test when the plaquettes are populated. As a result the Hamiltonian of the transformed model is, whereB p = σ z = 1 − 2a † a [28], and a † and a are fermionic creation and annihilation operators, respectively. Applying U T to a state of the surface code, |ψ S , gives, In general for a distance d code, any given state,|ψ S , has d 2 − 1 dynamic modes, each corresponding to a plaquette of the surface code and one zero mode, which supports the transformed logical operators,X L andZ L . The ground state, |ψ g S , of the original surface code, H SC , is stabilized by all plaquette operators, i.e. B p |ψ g S = |ψ g S for all plaquettes, p. This relationship is preserved by the transformation, U T . Therefore,B p| ψ g S =|ψ g S for all p, implying the ground state of this model is a collection of where b \ b 1 and w \ w 1 are the sets of all black and white plaquettes, respectively, minus the plaquettes, b 1 and w 1 , that become fermionic symmetry operators over all other transformed plaquettes of the same colour. These symmetry operators areS b1 = b\b1B b andS w1 = w\w1B w in (25). The other d 2 − 2 transformed plaquette stabilizers have the same form as those in (23) Any transformed state has d 2 − 2 dynamic modes, each corresponding to a plaquette of the toric code and two zero modes, which support the four transformed logical operators. The ground state, |ψ g T , of the toric code is stabilized by all plaquette operators, i.e. B p |ψ g T = |ψ g T for all p. Hence the transformed ground state,|ψ g T , is stabilized by all transformed plaquette stabilizers, including the symmetry operators,B p| ψ g T =S b1| ψ g T =S w1| ψ g T = |ψ g T for all p, implying the ground state is a collection of d 2 − 2 empty free fermion modes, with a degeneracy of 4 encoded by the two logical zero modes. Occupied dynamic modes indicate the positions of local anyonic excitations in this model. A single occupied mode, b, would result in an increase in energy due to the violated stabilizer opera-torB b , and symmetry operator,S b1 . This reflects the fact that excitations are created in pairs at the ends of string operators in H TC , with one end of the string being at plaquette b and one at b 1 . The symmetry operators,S b1 and S w1 , restrict excitations in H FT to be created in pairs. There is a more detailed discussion of the excitations of H FS and H FT in the next section.

Encoding anyonic statistics in free fermions
Previous sections have shown that the surface code is unitarily equivalent to a free fermion model, as individual spins are equivalent to free fermion modes. Hence, these models should have equivalent physical properties. Nevertheless, operators on single free fermions cannot account for the anyonic statistics supported by the surface code. The exotic statistics of its excitations arises due to the commutation and anti-commutation relations of the σ x and σ z 's the string operators are built from. In this section we show how these relations are preserved by the unitary transformation, U S , and how they are encoded in the action of operators on the dynamic and logical modes of the system.
The string operators of the surface code, O X C and O Z C , presented in (2), are a product of σ x j or σ z j operators, respectively along the path C, producing local excitations at their endpoints. Crossings of these strings give rise to the anyonic statistics through the Pauli commutation relations. These string operators transform as follows, are string operators acting on the dynamical and logical fermion modes along the pathC S in H FS .
All commutation relations of operators are preserved by U S . If O X C creates an excitation at plaquette b, Hence the endpoints ofC S are the transformed versions of the plaquettes, which were the endpoints of C. Paths between endpoints of string operators may change, but the endpoints are fixed at the transformed versions of the plaquettes. Hence, the paths remain homotopically equivalent to those of the untransformed operators. The commutation relations of operators with each other are also preserved, by the mapping U S . Crossings of these strings may appear in the dynamic or logical modes. Therefore, the anyonic statistics of excitations of the surface code are encoded in the free model by a mix of the dynamic and logical modes.
It is more instructive to look at how string operators, OC S , in the free model, H FS , are mapped under the inverse unitary transformation, U † S , to string operators, O C , in the surface code, H SC . A σ x operator on a single spin (or a † + a on a single mode) in the free model transforms to a string operator with one end point at the plaquette, p, corresponding to that spin (or mode) and one at a boundary not associated with a logical degree of freedom (the top boundary if p is black and the right if p is white). This has to be the case as it is the only type of operator that anti-commutes with just one plaquette. This also suggests why there could not exist a unitary transformation from the toric code with periodic boundary conditions to decoupled free fermions (without the symmetry operators in (25)). If each plaquette in the toric code were mapped to a fermion mode in the free model, any operator creating a single fermion population would be mapped to one creating a single plaquette excitation in the toric code. However, all excitations in the toric code must be created in pairs, as dictated by its periodic boundary conditions. In other words the boundary conditions of the surface code are what facilitate such a mapping.
A string operator with end points on any two plaquettes of the same colour in the surface code may be obtained by mapping from a product of two σ x 's at the spins (or two a † + a operators at the modes) corresponding to those plaquettes in H FS . The string operators,Õ x C S orÕ z C S , that will map to string operators, O x C or O z C , creating logical excitations (i.e. those with end points at the bottom and left boundaries, respectively), containX L andZ L , respectively. Any other string operator, O x C or O z C , with the same end points and effect on the logical qubit as those already mentioned may be obtained by including some combination of σ z 's in the operatorsÕ x These σ z 's alter the string operator's path by applying stabilizer operations, thus including a loop around the corresponding plaquette to the path, C.
The string operators in the toric code are mapped via the unitary transformation, U T , to string operators in a system of fermion modes coupled to two fermionic parity constraints, in a similar way to those in the surface code, If O X C does not create an excitation at any black plaquette then, Hence the endpoints ofC T are the transformed versions of the plaquettes, which were the endpoints of C. Paths between endpoints of string operators may change, but the endpoints remain fixed. As in the surface code transformation, the commutation relations of operators with each other are also preserved, by the mapping U T . Crossings of these strings may appear in the dynamic or logical modes. Therefore, as with the surface code mapping, the anyonic statistics of excitations of the toric code are encoded in the fermionic model by a mix of the dynamic and logical modes.
We now look at how string operators,ÕC T , in the free model, H FT , are mapped under the inverse unitary transformation, U † T , to string operators, O C , in the toric code, H TC . A σ x operator on a single spin in the free model transforms to a string operator with one end point at the plaquette, p, corresponding to that spin and one at the plaquette that was mapped to the symmetry operator of the same colour as p (b 1 if p is black and w 1 if p is white). This demonstrates how the symmetry operators ensure excitations are created in pairs in H FT , as they are in the toric code.
A string operator with end points on any two plaquettes of the same colour in the toric code may be obtained by mapping from a product of two σ x 's at the spins corresponding to those plaquettes in H FT . The string operators,Õ x C T orÕ z C T , that will map to string operators, O x C or O z C , with strings of σ x 's around a non-contractible loop of the torus, i.e. those which cross the Z L and/orZ (2) L , respectively. Any other string operator, O x C or O z C , with the same end points and effects on the logical qubits as those already mentioned are produced by the same method as those in the surface code, by including some combination of σ z 's in the operatorsÕ x C T orÕ z C T . These σ z 's alter the string operator's path by including a loop around the corresponding plaquette to the path, C.

Conclusions and outlook
In this paper we have shown that the surface and toric code are unitarily equivalent to free fermions and free fermions coupled to a fermionic parity constraint, respectively. Moreover, we have presented unitary transformations, U S and U T , that map these codes to their fermionic counterparts. We have given the explicit form of these unitaries and demonstrated how the statistical properties of the surface and toric code anyons map to the localised excitations of the fermionic models. We have shown how the periodic boundary conditions of the toric code introduce the need for interacting fermionic parity operators in the fermion model.
We expect the ability to map the surface code to free fermions, could have a number of applications. We have shown, for example, how the anyonic statistics of the excitations are encoded by the unitary transformation. This has allowed for an intuitive and unique understanding of the origins of these statistics. Moreover, descriptions for the construction and manipulation of free fermion systems are more efficient than current interacting descriptions of the surface code [5]. We believe extending the group of mappings, U, to other topological models in two and higher dimensions could provide valuable insight into the emergence of exotic statistics in these systems [18].
I would like to thank Jiannis Pachos for all his guidance and valuable ideas. This paper would not have been possible without his support. I would also like to thank Christopher Turner for his useful insights and discussions. This research is supported by the Henry Ellison scholarship.
Open Access This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.