Superfast encodings for fermionic quantum simulation

Simulation of fermionic many-body systems on a quantum computer requires a suitable encoding of fermionic degrees of freedom into qubits. Here we revisit the Superfast Encoding introduced by Kitaev and one of the authors. This encoding maps a target fermionic Hamiltonian with two-body interactions on a graph of degree $d$ to a qubit simulator Hamiltonian composed of Pauli operators of weight $O(d)$. A system of $m$ fermi modes gets mapped to $n=O(md)$ qubits. We propose Generalized Superfast Encodings (GSE) which require the same number of qubits as the original one but have more favorable properties. First, we describe a GSE such that the corresponding quantum code corrects any single-qubit error provided that the interaction graph has degree $d\ge 6$. In contrast, we prove that the original Superfast Encoding lacks the error correction property for $d\le 6$. Secondly, we describe a GSE that reduces the Pauli weight of the simulator Hamiltonian from $O(d)$ to $O(\log{d})$. The robustness against errors and a simplified structure of the simulator Hamiltonian offered by GSEs can make simulation of fermionic systems within the reach of near-term quantum devices. As an example, we apply the new encoding to the fermionic Hubbard model on a 2D lattice.

Quantum error correction is a vital milestone on the path towards scalable quantum computing. It enables an arbitrarily long reliable computation with noisy qubits and imperfect gates, provided that the noise level is below a constant threshold value, which is close to what can be achieved in the latest experiments [1,2]. Unfortunately, realizing a computationally universal set of logical gates in a fully fault-tolerant fashion requires a significant overhead which may be prohibitive for near-term quantum devices. This has lead several groups to consider a less expensive option known as error mitigation [3][4][5][6][7]. Error mitigation schemes are usually tailored to a specific quantum algorithm such as adiabatic quantum computation [8] or variational optimization [3,4]. Although the proposed error mitigation schemes introduce less overhead and can extend the range of applications for the available quantum hardware [9], they are not truly scalable and do not offer full fault-tolerance.
Of particular interest for practical applications are error mitigation schemes for quantum simulation of fermionic systems -a fundamental problem emerging in the quantum chemistry and material science. All quantum algorithms for simulation of fermionic systems rely on a suitable encoding of fermionic degrees of freedom into qubits. Notable examples are the Jordan-Wigner transformation [10], the Verstraete-Cirac mapping [11], Fenwick trees [12,13], and the parity mapping [14], see also [15][16][17]. Such encodings map a target Hamiltonian H describing m fermionic modes to a simulator HamiltonianH describing n qubits such that V H =HV for a suitable unitary map (isometry) V . This ensures that H and H are unitarily equivalent if one restrictsH onto the subspace spanned by encoded states V |ψ .
A natural question is whether the encodings proposed for fermionic simulations can also be used for error correction or mitigation. Here we give the affirmative answer, for a generalized version of the Superfast Encoding proposed in Ref. [12]. * kanav.setia.gr@dartmouth.edu We consider a system of m fermi modes that live at vertices of some graph with the maximum vertex degree d m. Edges of the graph represent two-mode interactions in the target Hamiltonian H. A distinctive feature of the superfast encodings is that the simulator HamiltonianH includes only few-qubit interactions described by Pauli operators of weight O(d). The encoding requires n = O(md) qubits. For comparison, the Jordan-Wigner and the Fenwick-tree type of encodings require n = m qubits and produce a simulator Hamiltonian with Pauli weight Ω(m) and Ω(log m) respectively.
Here we propose Generalized Superfast Encodings (GSE) improving the original Superfast Encoding in two respects. First, we describe a GSE such that the corresponding quantum code corrects any single-qubit error under mild technical assumptions about the fermionic interaction graph. Namely, we assume that the graph is 3-connected [18] and has vertex degree d ≥ 6. In contrast, we prove that the original Superfast Encoding lacks the error correction property for d ≤ 6. The GSE requires the same number of qubits as the original encoding, so the extra error correction capability comes at no extra qubit cost. Additionally, the GSE produces a simpler local simulator Hamiltonian, with Pauli weights reduced by a factor 2 with respect to the original encoding.
Secondly, we describe a GSE that produces a simulator Hamiltonian with the Pauli weight O(log d), as opposed to the Pauli weight O(d) in the original Superfast Encoding. Both encodings use the same number of qubits. This achieves a significant reduction of the Pauli weight compared to all previously known encodings in the regime when d m. Note that this is naturally the case of physical systems, where the interactions have some degree of locality independent of the system size m.
We expect that the proposed GSEs will find practical applications in simulation of medium-size fermionic systems with aim at correcting single-qubit errors that occur in noisy devices. Furthremore, reducing Pauli weight of the simulator Hamiltonian is vital for mitigating readout errors in variational quantum algorithms [19,20].
The paper is organized as follows. We first define the rel-evant fermionic Hamiltonians and review the Superfast Encoding of Ref. [12]. Then we introduce GSEs and show that they can exponentially reduce the Pauli weight of the simulator Hamiltonian. We prove that the original Superfast Encoding lacks the error correction property on low-degree graphs (d ≤ 6). In contrast, we demonstrate that GSEs correct all single-qubit errors for any 3-connected interaction graph with vertex degree at least 6. Finally, we elucidate a practical use of GSEs by applying them to a Hubbard model on a square lattice. Superfast Encoding. We start by summarizing the encoding proposed in Ref. [12]. Consider a system of m fermionic modes such that each mode can be either empty or occupied by a fermionic particle. Let a † i and a i be the particle creation and annihilation operators for the i-th mode. They obey the canonical commutation rules a i a j + a j a i = 0 and a i a † j + a † j a i = δ i,j I.
a † j a j be the particle number operator. A fermionic operator H is called even if it preserves the number of particles modulo two, that is, [H, (−1) N ] = 0. All physical observables are known to be described by even operators. Let F be the algebra of all even operators.
Assume that each mode i can interact only with a few other modes j that are nearest-neighbors of i on some graph G = (V, E) with a set of vertices V = {1, 2, . . . , m} and a set of edges E. Such system is described by a Hamiltonian where H i,j ∈ F acts non-trivially only on the pair of modes i, j. Below we assume that G is a connected graph.
To define the Superfast Encoding it is convenient to rewrite H in terms of Majorana operators These operators are Hermitian and satisfy The algebra of even operators F has a set of generators For example, fermionic operators describing hopping, external field, and a two-body repulsion can be written as Any parity-preserving fermionic operator belongs to the subalgebra generated byA j,k , B j . An explicit derivation of twobody quantum chemistry and superconductivity interactions can be found in [21], and in Appendix E.
The operators A i,j and B i obey commutation rules In the last equation ζ is any closed loop of length s in the graph G that consists of vertices ζ(0), ζ(1), . . . , ζ(s) = ζ(0) ∈ V . Following Ref. [12] we shall impose one extra rule Note that i∈V B i = (−1) N . Thus Eq. (12) corresponds to restricting the Fock space of m fermi modes to the subspace with even number of particles. Note that all elements of the algebra F preserve this subspace.
To define the simulator HamiltonianH let us place a qubit at every edge of the graph G. The total number of qubits is where d(i) is the degree of a vertex i. Let X ij , Y ij , and Z ij be the Pauli operators acting on the edge (i, j) ∈ E. We shall assume that edges incident to each vertex i are labeled by integers 1, . . . , d(i). The corresponding ordering of edges incident to i will be denoted < i . We shall also assume that every edge (i, j) is oriented. Define i,j = 1 if i is the head and i,j = −1 if i is the tail of the edge (i, j). Qubit counterparts of the operators B j and A j,k are defined as A jk = jk X jk p : (j,p)<j (j,k) It can be checked that these operators satisfy commutation rules analogous to Eqs. (6-10) and Eq. (12). However, the rule Eq. (11) does not hold on the full Hilbert space of n qubits. This rule can be satisfied by restricting the operators A i,j andB i on a suitable subspace. For each closed loop ζ as above define a loop operator Recall that s is the length of ζ. It can be readily checked thatÃ(ζ) commutes with all operatorsÃ i,j andB i . Furthermore, loop operators pairwise commute. Let S be the abelian group generated by the loop operatorsÃ(ζ). In Appendix A we show that −I / ∈ S. Thus S can be viewed as a stabilizer group of a quantum code with the codespace L = {|ψ :Ã(ζ)|ψ = |ψ for all loops ζ}.
The number of independent stabilizers coincides with the number of independent loops in the graph which is known to be s = |E| − |V | + 1 = n − m + 1. It follows that the code S encodes k = n − s = m − 1 logical qubits into n physical qubits, that is, dim(L) = 2 m−1 . The codespace L can be identified with the even-parity subspace of the fermionic Fock space. Furthermore, the restrictions of qubit operatorsÃ i,j andB i onto L can be identified with the fermionic operators A i,j and B i restricted onto the even-parity subspace. We can now define a simulator HamiltonianH by replacing the operators A i,j and B i in the expansion of each term H i,j by their qubit counterpartsÃ i,j andB i . One can easily check thatH is composed of Pauli operators of weight at most 2d. Generalized Superfast Encodings (GSE). Consider the target Hamiltonian Eq. (1). Below we assume that the interaction graph G = (V, E) is connected and has only even degree vertices. Let us place d(i)/2 qubits at each vertex i. The total number of qubits n is given by Eq. (13). Let P i be the group of Pauli operators acting on the qubits located at a vertex i ∈ V tensored with the identity on the remaining qubits. A GSE is defined in terms of local Majorana modes By definition, γ i,p is a Pauli operator acting non-trivially only on the qubits located at the vertex i. We require that the operators γ i,p generate the full Pauli group P i and obey the usual Majorana commutation rules for all i ∈ V and 1 ≤ p, q ≤ d(i). Otherwise, γ i,p can be completely arbitrarily. Hence a GSE is non-unique. Note that local Majorana modes located at different vertices commute with each other because they act on disjoint subsets of qubits. Assume that the neighbors of each vertex i are labeled by integers 1, . . . , d(i) and denote the p-th neighbor of i as N (i, p). Define qubit counterparts of the operators B j and A j,k as where the integers p, q must satisfy In other words, k is the p-th neighbor of j while j is the q-th neighbor of k, see Fig. 1. One can check thatB i andÃ i,j obey the commutation rules analogous to Eqs. (6)(7)(8)(9)(10). To satisfy the remaining rules Eqs. (11,12) consider an abelian group S generated by the loop operatorsÃ(ζ) and a codespace L stabilized by S as defined in Eqs. (16,17). In Appendix A we show that −I / ∈ S and the codespace L has dimension 2 m−1 . Recall that G is assumed to be a connected even-degree graph. It is a well-known fact any such graph has an Eulerian cycle -a closed loop ζ that uses every edge of G exactly once. The corresponding loop operator has the formÃ(ζ) = ± i∈VB i , The operatorBj is proportional to the product of all local Majorana modes γj,p located at the vertex j.
where the sign depends on the choice of edge orientations j,k .
Thus the product of all operatorsB i is in the stabilizer group S for a suitable choice of j,k . We conclude that the restrictions of operatorsÃ j,k andB j onto L satisfy the same commutation rules as the respective fermionic operators A j,k and B j restricted to the even-parity subspace of the Fock space. We can now define a simulator HamiltonianH by replacing the operators A i,j and B i in the expansion of each term H i,j by their qubit counterpartsÃ i,j andB i . Next let us describe a specific choice of the local Majorana modes γ i,p that results in a simulator HamiltonianH with the Pauli weight O(log d). Consider a vertex i ∈ V and a system of d(i) Majorana modes γ 1 , . . . , γ d(i) . Letγ p be the Fenwick tree encoding [12,13] of γ p . As was shown in Ref. [13],γ p is a Pauli operator of weight at most log 2 d(i) . Choose γ i,p as a tensor product ofγ p on the vertex i and the identity operator on all other vertices. ThenÃ i,j has Pauli weight at most 2 log 2 d , see Eq. (21). The Fenwick tree encoding maps the fermionic parity operator γ 1 γ 2 · · · γ d(i) to a single-qubit Pauli Z, see [13]. HenceB i has Pauli weight 1, see Eq. (20). We conclude thatH has Pauli weight at most 2 log 2 d .
Lack of error correction in the Superfast Encoding. Let us first discuss error correcting properties of the original Superfast Encoding. Recall that a Pauli operator P is said to be a logical operator for a quantum code with a stabilizer group S if P commutes with all elements of S and the restriction of P onto the logical subspace L is a non-trivial operator. A code is said to correct single-qubit errors if any logical operator P has weight at least three (i.e. P acts nontrivially on at least three qubits). Let us show now that the stabilizer code defined through the Superfast Encoding fails to correct all single-qubit errors (regardless of how one chooses edge ordering).
Suppose first that the interaction graph G has a vertex i with degree d(i) ≤ 4. Note thatÃ i,j andÃ i,jBj are logical operators of the code S for any (i, j) ∈ E. We claim that at least one of these logical operators has weight 1 or 2. Indeed, let (i, j) be the first edge incident to i according to the ordering < i . Let e(1), . . . , e(d) be the edges incident to j listed according to the ordering < j .
If p ≤ 2 thenÃ i,j has weight 1 or 2. Otherwise, if p ≥ 3, then A i,jBj ∼ Y ij Z e(p+1) · · · Z e(d) has weight 1 or 2. Thus the stabilizer code S fails to correct all single-qubit errors regardless of how one orders the edges. In Appendix C we extend this argument to more general graphs and prove the following. Lemma 1. Suppose the interaction graph G has degree d for each vertex i. If d ≤ 6 then the Superfast Encoding does not correct all single-qubit errors.
In spite of this negative result, in Appendix D we show that in certain special cases the error correction property can be achieved by introducing ancillary fermi modes.
Error Correction in the Generalized Superfast Encoding. Here we describe a GSE that can correct all single-qubit errors. Below we consider arbitrary interaction graphs G. We allow G to have multiple edges, that is, some pairs of vertices can be connected by more than one edge. Recall that a graph is called 3-connected if it remains connected after removal of any subset of less than three vertices. Our main result is the following.
Theorem 1. Suppose the interaction graph G is 3-connected and each vertex i has even degree d(i) ≥ 6. Suppose any pair of vertices is connected by at most two edges. Then the Generalized Superfast Encoding corrects all single-qubit errors.
Note that the GSE lacks the error correction property if d(i) < 6 for some vertex i. Indeed, in this caseB i is a logical operator with weight at most 2 (since the vertex i contains at most two qubits). One can always satisfy conditions of the theorem by adding dummy edges (i, j) to the interaction graph such that the corresponding terms H i,j in the target Hamiltonian are zero. This would slightly increase the number of qubits required for the encoding, see Eq. (13).
Let us prove the theorem. Suppose one can choose the local Majorana modes γ i,p such that the following conditions hold for each vertex i ∈ V and for each 1 ≤ p < q ≤ d(i). Here |O| denotes the weight of a Pauli operator O.
(22) An explicit choice of γ i,p satisfying Eq. (22) is shown below. Assume that P is a logical operator with weight less than 3 and show that this assumption leads to a contradiction. Let V (P ) ⊆ V be the set of vertices i ∈ V such that P acts nontrivially on some qubit of i. By assumption, |V (P )| ≤ 2.
Suppose first that V (P ) = {i} is a single vertex or V (P ) = {i, j} for some pair of vertices i = j such that (i, j) / ∈ E. Since P commutes with the stabilizersÃ(ζ), it must commute with γ i,p γ i,q whenever there exists a closed loop ζ such that p, q are the labels of edges incident to i that belong to ζ. In the case V (P ) = {i, j} we additionally require that ζ does not contain the vertex j. We claim that such loop ζ exists for all 1 ≤ p < q ≤ d(i). Indeed, let s = N (i, p) and t = N (i, q) be the p-th and the q-th neighbors of i. By assumption, j / ∈ {s, t}. Let G be the graph obtained from G by removing the vertices i, j and all edges incident to these vertices. By assumption, G is connected. Let ζ be any path in the graph G connecting s and t. Complete ζ to a loop ζ in the graph G by adding the edges (i, s) and (i, t). By construction,Ã(ζ) acts on the vertex i as γ i,p γ i,q and acts trivially on the vertex j. It follows that P commutes with γ i,p γ i,q for all 1 ≤ p < q ≤ d(i). This is possible only if P ∼B i . This contradicts to the assumption that P acts on at most two qubits, per Eq. (22).
Suppose now that V (P ) = {i, j} for some pair of vertices i = j such that (i, j) ∈ E. We have to consider two cases.
Case 1: There is a single edge connecting i and j. Suppose j is the r-th neighbor, j = N (i, r). Choose any integers 1 ≤ p < q ≤ d(i) such that r / ∈ {p, q}. The same argument as above shows that the restriction of P onto the vertex i must commute with γ i,p γ i,q . This is possible only if P acts on i as γ i,r orB i γ i,r . According to Eq. (22), one can check that γ i,r andB i γ i,r have weight at least 2 for all r. Likewise, suppose i is the q-th neighbor of j, that is, i = N (j, q). The same argument shows that P acts on j as γ j,q orB j γ j,q . Again, these operators have weight at least 2. Thus P = P i P j , where P i and P j have weight at least 2. Therefore P has weight at least 4 which is a contradiction.
Case 2: There are two edges connecting i and j. Suppose j is the r-th and s-th neighbor of i for some r = s. The same argument as above shows that the restriction of P onto the vertex i must commute with γ i,p γ i,q for any 1 ≤ p < q ≤ d(i) such that r, s / ∈ {p, q}. This is possible only if the restriction of P onto the vertex i belongs to the group generated by γ i,r , γ i,s , andB i . Likewise, the restriction of P onto the vertex j belongs to the group generated by γ j,t , γ j,u , andB j for some 1 ≤ t < u ≤ d(j). Using Eq. (22) one can check that P = P i P j has weight at most 2 only if P ∼ γ i,r γ i,s γ j,t γ j,u . However, such P is proportional to the stabilizerÃ(ζ) where ζ here is a loop formed by the two edges connecting i, j. This is impossible since P is a logical operator. To summarize, Theorem 1 follows from Eq. (22).
Let us show how to satisfy Eq. (22) in the special case of degree-6 graphs. In this case each vertex i contains 3 qubits. We shall denote Pauli operators acting on the qubits located at a vertex i as (QRT ) i , where Q, R, T ∈ {I, X, Y, Z}. Choose where i, j are sites of a square lattice, (i, j) stand for nearestneighbor sites, σ is a spin index, and t, , U are some coefficients. The interaction graph G shown on Fig. 2  two copies of the lattice representing spin-up and spin-down fermi modes. To satisfy conditions of Theorem 1 we have introduced two dummy edges (dotted lines) connecting each respective pair of spin-up and spin-down vertices. The resulting graph G is 3-connected and has vertex degree 6. Therefore, by Theorem 1, the corresponding GSE encoding corrects any single-qubit error. The encoding requires 6s qubits, where s is the number of sites in the lattice (the number of fermi modes is m = 2s). Using Eq. (23) one can check that the operatorsB j , A j,k , andÃ j,kBj have Pauli weight 3, 4, and 4 respectively. The two-mode interaction operatorsB jBk have weight 6. We conclude that the simulator HamiltonianH for the 2D Hubbard model is a sum of Pauli terms with weight at most 6.
Conclusions. We described a GSE that maps a target fermi Hamiltonian on a graph of degree d into a qubit simulator Hamiltonian with Pauli terms of weight at most d and corrects all single-qubit errors. If one does not insist on the error correction property, the Pauli weight of the simulator Hamiltonian can be reduced to O(log d). Future research could address the question of whether GSEs are capable of correcting more than one error and whether it is possible to combine O(log d) Pauli weight and the error correction property.
Appendix A: Properties of the loop operators Let S be an abelian group generated by all loop operators A(ζ) constructed using the Superfast Encoding or its generalized version. In this section we prove that −I / ∈ S and thus S can be viewed as a stabilizer group of a quantum code. We show that this code has m − 1 logical qubits. To avoid clutter, in this section we shall omit the tilde symbol in the notations for loop and edge operators. In other words, in the rest of this section A(ζ) and A j,k refer to qubit operators.
Recall that we consider a connected interaction graph G = (V, E). Define a path of length s as a function ζ : {0, 1, . . . , s} → V such that vertices ζ(j − 1) and ζ(j) are nearest neighbors in the graph G for all j = 1, . . . , s. A path may intersect itself. We shall use a shorthand notation |ζ| = s for the length of ζ. For any path ζ letζ be the inverse path such that |ζ| = |ζ| = s andζ(j) = ζ(s − j) for 0 ≤ j ≤ s. A path is called a loop if ζ(s) = ζ(0). Finally, suppose ζ i are paths of length s i , where i = 1, 2. We say that ζ 1 and ζ 2 are composable if ζ 1 (s 1 ) = ζ 2 (0). Define a composition ζ = ζ 1 • ζ 2 as a path of length s 1 + s 2 that ζ(j) = ζ 1 (j) for 0 ≤ j ≤ s 1 and ζ(j) = ζ 2 (j − s 1 ) for s 1 ≤ j ≤ s 1 + s 2 . For any path ζ define a path operator Proof. We shall use the commutation rules Let ζ be a path of length s. By definition, (2) follows directly from the definitions. Suppose ζ is a loop. Consider an arbitrary edge (j, k) ∈ E. To prove Property (3) it suffices to check that A(ζ) commutes with A j,k . From Eq. (A2) one infers that A j ,k anti-commutes with A j,k iff (j , k ) is an edge incident to the subset {j, k}. However, since ζ is a loop, it contains even number of edges incident to any subset of vertices. Thus A(ζ) commutes with A j,k proving Property (3). To prove Property (4) suppose that ζ = ζ • e for some path ζ and some edge e (considered as a path of length one). The same argument as above shows that A(e) commutes with A(ζ ). Likewise, if ζ = ζ • e • ζ for some non-empty paths ζ , ζ and some edge e then A(e) anti-commutes with A(ζ ) and A(ζ ). Repeatedly applying these commutation rules gives and proves Property (4).
Let T ⊆ E be some fixed spanning tree of G with a fixed root vertex. For any vertex j ∈ V let ω j be the unique path in T that starts at the root and ends at j. If ζ is a loop of length s then Here we used Property (1) of Lemma 2 and noted that ζ(s) = ζ(0). Note that Here e j is a path of length one that starts at ζ(j − 1) and ends at ζ(j). Regrouping the terms in Eq. (A3) using Property (2) gives Note that ζ j is a loop that starts and ends at the root. Finally, Properties (1,3) give and all operators A(ζ p ) pairwise commute. If e j belongs to the spanning tree T then ζ j is a composition of a path from the root to one of the vertices ζ(j − 1), ζ(j) and the inverse path. Properties (1,2) imply that A(ζ j ) = I whenever e j ∈ T . We conclude that any loop operator A(ζ) belongs to the group generated by the loop operators A(ζ j ) with e j / ∈ T . In other words, We claim that the set of generators of S defined in Eq. (A4) is independent. Consider first the Superfast Encoding. Then A(ζ j ) is the only generator that anti-commutes with the Pauli Z acting on the edge e j which implies the independence property. Consider now the Generalized Superfast Encoding and some generator A(ζ j ). Let p be the integer such that ζ(j) is the p-th neighbor of ζ(j−1). Then A(ζ j ) is the only generator that anti-commutes with the local Majorana mode γ ζ(j−1),p which implies the independence property. Property (4) implies that each generator A(ζ j ) is hermitian. Thus S is an abelian group that has a set of independent hermitian Pauli generators. The standard stabilizer formalism then implies that −I / ∈ S. Note that the number of generators in Eq. (A4) is s = |E| − |T | = |E| − |V | + 1. Thus the stabilizer code S has |E| − s = |V | − 1 = m − 1 logical qubits. In this section we show how to choose the local Majorana modes γ i,p that satisfy the error correction condition Eq. (22) for any even vertex degree d(i) ≥ 6. For example, if d(i) = 8 or d(i) = 10 one can satisfy Eq. (22) by choosing Suppose now that d(i)/2 = 2k + 1 for some integer k. Set and choose the remaining modes γ i,p as 2k cyclic shifts of γ i,1 and γ i,2 . If d(i)/2 = 2k for some integer k then set and choose the remaining modes γ i,p as k − 1 cyclic shifts of γ i,1 , γ i,2 , γ i,2k+1 , γ i,2k+2 . One can easily check that such local Majorana modes have the desired property Eq. (22).

Appendix C: Lack of error correction in the Superfast Encoding
In this section we prove Lemma 1. Suppose G = (V, E) is a d-regular graph, that is, every vertex has exactly d incident edges. We assume that edges incident to each vertex i are labeled by integers p ∈ [d] ≡ {1, 2, . . . , d}. This can be described by a map such that ω(i, 1), . . . , ω(i, d) are the edges incident to a vertex i ∈ V . For any p, q ∈ [d] let E p,q ⊆ E be the subset of edges labeled by p, q, that is, E p,q ={e = (i, j) ∈ E : e = ω(i, p) = ω(j, q) or e = ω(i, q) = ω(j, p)}. (C1) By definition, E p,q = E q,p . Proof. Consider an edge (i, j). If (i, j) ∈ E 1,p with p = 1, 2 thenÃ i,j has weight≤ 2. If (i, j) ∈ E 1,p with p = d, d − 1 thenÃ i,jBi orÃ i,jBj has weight≤ 2. If (i, j) ∈ E d,p with p = 1, 2 thenÃ i,jBi orÃ i,jBj has weight≤ 2. If (i, j) ∈ E d,p with p = d, d − 1 thenÃ i,jBiBj has weight≤ 2.
Below we say that an edge is singular if it belongs to E 1,p or E d,p for some p ∈ [d].
Lemma 3. Suppose the interaction graph G has degree d ≤ 5. Then the Superfast Encoding does not correct all singlequbit errors.
Proof. Assume the contrary and show that this leads to a contradiction. Note that every vertex i has at least two incident singular edges, namely, ω(i, 1) and ω(i, d). Thus the total number of singular edges is at least 2|V |. Here we noted that On the other hand, suppose e = (i, j) is a singular edge such that e = ω(i, 1) or e = ω(i, d). By Proposition 1 e = ω(j, p) where p = 1, 2 and p = d, d − 1. This is only possible if d = 5 and p = 3. Thus the total number of singular edges is at most |V |. This is a contradiction. Proof. Assume the contrary and show that this leads to a contradiction. The same argument as above shows that the total number of singular edges is at least 2|V |. On the other hand, suppose e = (i, j) is a singular edge such that e = ω(i, 1) or e = ω(i, d). By Proposition 1 e = ω(j, p) where p = 1, 2 and p = d, d − 1. This is only possible if p = 3 or p = 4. Thus the number of singular edges is at most 2|V |. This is only possible if there are exactly 2|V | singular edges and every vertex i has exactly four incident singular edges, namely, ω(i, 1), ω(i, d), ω(i, 3), ω(i, 4).
Consider some vertex i and edges e = ω(i, 3), f = ω(i, 4) incident to i. The above shows that e and f are singular. Let e = (i, j) and f = (i, k) for some vertices j, k ∈ V . Consider two cases. Case 1: j = k. Then one of the operators A i,jÃi,k ,Ã i,jÃi,kBj ,Ã i,jÃi,kBk ,Ã i,jÃi,kBjBk acts non-trivially only on the qubits e, f . Since these are logical operators, we get a contradiction. Case 2: j = k. Then e = ω(j, 1), f = ω(j, d) or e = ω(j, d), f = ω(j, 1). In both cases the operator A eÃfBj acts non-trivially only on the qubits e, f . This is a contradiction sinceÃ eÃfBj is a logical operator.

Appendix D: 2D Hubbard Model
Here we derive an encoding for the Hubbard model using the original Superfast Algorithm that incorporates singlequbit error correction. Note that the distance of the graph necessary to do this is d = 8. We use the same lattice structure as the one used in the main texdt for the GSE, e.g. two square lattices of opposite spins connected by vertical edges. The Hamiltonians for the two lattices are given in Eq. (24) in the main text. We transform the creation and annihilation operators of each spin square lattice to edge operators The graph G describing one of the two spin lattices for the 2D Hubbard model is shown on Fig. 3. Fermi modes (blue dots) lie on the vertices and the edges represent hopping operators. Qubits of the Superfast Encoding live on edges of the lattice (green dots). The relevant stabilizer operators correspond to the elementary loops (plaquettes). For example, the loop ζ = (u, v, x, w) shown on Fig. 3 gives rise to a stabilizer A(ζ) =Ã u,vÃv,xÃx,wÃw,u = X uv X vx X xw X wu · · · where the dots represent a product of Pauli Z on some edges incident to u, v, x, w that depend on the chosen edge ordering. Let S be the stabilizer group generated by all loop operators.
There are three distinct terms that appear in the Hubbard model, excitation term, number operator term, and the Coloumb operator term. Based on the expressions found in [21], we know the edge operator representation of all the three terms that appear in the Hubbard model. Therefore, for H ↑ we get: The spin-density interaction terms are given by: As discussed in Section C, the set of stabilizers available proves to be insufficient to correct all the single-qubit errors in the Hubbard model, if we do not introduce auxiliary ancillary modes. These auxiliary modes contribute to edges in the graph but do not have fermionic terms appearing in the target Hamiltonian. For each plaquette in the original lattice we introduce an auxiliary mode at its center which 'interacts' with all the vertices of the plaquette, see Fig. 4. We get four extra edges per one auxiliary mode in the model, which give us four smaller independent stabilizer loops. We can then the B i vertex operators at the auxiliary mode as stabilizers.
To prove that the code corrects all single-qubit Pauli errors it suffices to show that each single-qubit error has a unique syndrome. From Eqs. (4,5) it is easy to see that the ordering of the edges will affect the analytical expressions of the stabilizers. This in turn affects whether it is possible to get unique syndromes for all the single qubit errors or not. The ordering that we used is given on a unit cell in Fig. 4. The fermionic modes in the original problem are represented with numbers without dashes, while auxiliary modes are numbered with a dash. We use the ordering 1 < 2 < 3 .. < 1 < 2 < 3.. . The bottom most row is numbered from left to right and then the numbering continues for the rows above it. So, the mode numbers increase from left to right and from bottom to top. In Fig. 4, for any mode, the mode left and above it will have a higher index. Due to the ordering choice, we can prove single-qubit error correction for a unit cell in terms of stabilizers around it. Indeed, it is easy to check that all single-qubit errors in the unit cell '6-7-11-10' have distinct syndromes. Note that this encoding requires 12s qubits, where s is the number of sites in the original lattice.