Quantum Simulation of Z2 Lattice Gauge theory with minimal resources

The quantum simulation of fermionic gauge field theories is one of the anticipated uses of quantum computers in the NISQ era. Recently work has been done to simulate properties of the fermionic Z2 gauge field theory in (1+1) D and the pure gauge theory in (2+1) D. In this work, we investigate various options for simulating the fermionic Z2 gauge field theory in (2+1) D. To simulate the theory on a NISQ device it is vital to minimize both the number of qubits used and the circuit depth. In this work we propose ways to optimize both criteria for simulating time dynamics. In particular, we develop a new way to simulate this theory on a quantum computer, with minimal qubit requirements. We provide a quantum circuit, simulating a single first order Trotter step, that minimizes the number of 2-qubit gates needed and gives comparable results to methods requiring more qubits. Furthermore, variational approaches are investigated that allow to further decrease the circuit depth.


I. INTRODUCTION
Simulating the dynamics of physical quantum systems is one of the most anticipated applications of quantum computing and a good candidate to show useful quantum advantage for a NISQ device [1].Physical systems of interest include quantum chemistry models, material simulations, and high energy physics problems via lattice gauge theories, as the one considered here [2][3][4].To simulate the quantum dynamics on a near-term quantum device, the resources used need to be optimized.NISQ devices offer only a limited number of qubits, and have limited coherence times, as well as considerable 2-qubit gate errors [5].Thus, to simulate a given problem it is necessary to optimize the number of qubits used and their architecture, as well as the depth (and the number of 2-qubit gates) of the quantum circuit.This is especially true for lattice gauge theories that feature more complicated plaquette and dynamical fermion terms [6].
In this work, we focus on the simulation of the full Z 2 (i.e.including fermionic matter) lattice gauge theory in (2+1) D with minimal resources.In particular, we use as benchmarks the number of qubits and 2-qubit quantum gates needed to implement a single first-order Trotter step.The latter can be used to probe the dynamics of the system either directly, via a Trotterized time evolution, or by using it as a single step for an ansatz to perform variational quantum algorithms for time evolution, like parametrised variational quantum dynamics (pVQD) [7][8][9].The same ansatz can also be applied for other algorithms like QAOA or variational quantum eigensolver (VQE) [10] to probe the ground state properties.In minimizing the resources, we exploit the fermion mapping (fermion elimination method) introduced in [11,12], which allows the fermionic Z 2 theory to be encoded with the same number of qubits as the pure gauge theory without the fermions.This is the first practical proposal that evaluates the resources needed for simulating such fermionic (2+1) D physical system on a quantum computer 1 .We compare the circuit depth obtained via the fermion elimination method with the one obtained if a standard approach for encoding fermions -Verstraete-Cirac (VC) [14] transformation is used.The new method offers similar circuit depth requirements , with 17 CX gates per link as compared to the 14 of VC encoding, while only using half of the qubits of the latter.Furthermore, the use of the variational pVQD algorithm is explored to further reduce the requirements for the circuit depth to perform time evolution of the system.
The discretization of continuous gauge field theories on a lattice has enabled very successful numerical results in high energy physics [15,16].Here we consider a genuinely discrete lattice gauge theory, namely Z 2 with fermionic matter.This simple model allows an easy encoding of the gauge field in qubits, but merits also an interest of its own.In high energy physics, SU(N) theories are of particular importance, since the strong force, responsible for quark binding and their interactions is mediated via SU(3) gauge field.The exact mechanism of the quark confinement is poorly understood and many insights have been obtained from numerical simulations.In particular, it is believed that the centre of the SU(N) theory -Z N is responsible for the confinement [17].The classical simulations using Monte-Carlo methods suffer from a sign problem and the required resources scale exponentially with the system size.Quantum computers could avoid this problem by working in the Hamiltonian formalism, see [4,6,18,19] and refs within.We show that the circuit depth needed to simulate a single Trotter step is independent of the system size, allowing the simulation to be scaled.As quantum technologies continue to advance, it is important to explore the optimal ways to simulate this theory in a sign problem free way to better understand 1 While completing this manuscript, an independent proposal has appeared that explored the use of the same fermion elimination method and also considered the fermionic Z 2 theory in (2+1) D in their work [13].
its properties, and eventually the process of quark confinement.This work only considers the Z 2 theory, but the methods used here can be altered to probe other Z N theories, which are left for future work.Previous work in [20,21] covered the simulation of a pure Z 2 theory in (2+1) D. Very recently, [22] simulated the fermionic Z 2 theory in (1+1) D, with an implementation on the Google Sycamore quantum device, and particular emphasis on probing the confinement.The authors were able to perform the simulation of time dynamics via Trotterization, with a much greater accuracy than one naively would expect from the 2-qubit gate error rate of the device.Additionally, there have been multiple proposals to simulate the Z 2 theory in both pure and matter case with analog quantum simulators [23][24][25][26][27].These works point out the current interest of simulating the fermionic Z 2 theory in (2+1) D, which we analyze in this paper.
We start by reviewing the Hamiltonian approach to the pure gauge and fermionic Z 2 theory in (2+1) D. Next we introduce the mechanism to encode the fermions in the gauge-field, as proposed in [11,12], and how it can be applied to the Z 2 theory.In section III, we show how this model can be mapped to a quantum circuit and evaluate the necessary number of 2-qubit gates needed for a single step of a first order Trotter circuit, which is compared with the VC method.Section IV explores the use of the variational methods, including numerical results.Finally, section V summarizes our conclusions.

II. Z2 LATTICE GAUGE THEORY
In the lattice gauge theory Hamiltonian formalism, the space is discretized, but the time is left continuous.On the lattice, matter fields are located on the vertices (labelled by vectors x) and the gauge fields on the links (labelled l) connecting them.In two spatial dimensions, x = (x, y).In this case, the fermions can be staggered as shown in Fig 1-on even sites (red) we have particles and on the odd sites (blue) antiparticles, with charges +1 and −1 respectively.The parity of the site is given by (−1) s(x) = (−1) x+y with 1 (−1) indicating an even (odd) site [28].The green sites on the links denote the gauge fields.We will consider two-dimensional rectangular lattices with periodic boundary conditions and dimension M × N , where M , N are even, to accommodate fermion staggering.Note that on a lattice of size M × N , there are L = 2 × M × N gauge field links and M × N fermion vertices (Fig 1).The gauge field in Z N theories has a finite-sized Hilbert space of dimension N, thus allowing it to be encoded on each link.

A. Pure Z2 lattice gauge theory
The Hamiltonian of the pure gauge Z 2 theory is given by H KS [29]: For the electric term H E the sum is over all links and for the magnetic term H B over all plaquettes p, as indicated in Fig 1 .When discretizing the theory from the continuum one, the coupling constants are connected through the relations For Z 2 the field can take two values: 0 and 1.The theory can be defined using two generators per link U l , P l , satisfying the relations: The gauge field on a given link can be encoded into qubit states |0 , |1 corresponding to the field values such that Thus, U l is the raising (lowering) operator for the gauge field and P l is a diagonal operator in this basis, describing the field strength.An additional constraint that the theory obeys is the Gauss law: where Q(x) is the charge on vertex x.For the pure gauge theory with no static charges, Q(x) = 0 on all sites.The sign convention for the gauge fields is given in Fig. 1.
This Hamiltonian can be implemented on a quantum computer by mapping: where (X l , Y l , Z l ) are Pauli matrices acting on link l.The Pure gauge Hamiltonian is expressed as: and the Gauss law (in the absence of external charges) is given by for every vertex.The quantum circuit to simulate this model will be explicitly shown in the next section.

B. Fermionic Z2 lattice gauge theory
In the full theory, when the gauge field interacts with matter, the Hamiltonian acquires two extra terms, the mass term of the dynamical fermions and the interaction term between the fermions and the gauge field.The matter field part of the Hamiltonian is given by: with a i , a † j satisfying the canonical anticommutation relations (CAR).Note that in (10) the interaction term has been split into horizontal and vertical parts for future convenience.To accommodate both particles and antiparticles on the lattice, the staggered fermion approach is used.Here on even (odd) sites we have particles (antiparticles) with charge +1 (-1).In this approach, in the computational basis, on even site The number operator on the vertex is given by: While the number operator can be easily expressed, the fermionic creation/annihilation operators require some attention, as they obey the non-local CARs.In the method from [11,12], that we review in the next section, the fermionic statistics is absorbed into the gauge field, at the expense of increasing the Pauli weight of the Hamiltonian terms (i.e. the number of qubits on which the term acts non-trivially).The transformed Hamiltonian consists of hard-core bosonic matter for which creation/annihilation operators can be implemented with simple spin raising/lowering ones.Furthermore, these hard-core bosonic degrees of freedom can be eliminated by the use of Gauss law, which uniquely determines the charge distribution on the vertices.This allows the full fermionic Z 2 theory to be simulated with the same number of qubits needed for the pure gauge one, minimizing the spatial resources of the quantum computation.

C. Fermion encoding via elimination
In [11] a method was introduced to perform a unitary transformation that converts the fermionic degrees of freedom to hard core bosonic degrees of freedom, if the gauge group has Z 2 as a normal subgroup.As a result, the theory acquires phase factors ξ of the gauge field to keep track of the fermionic exchange antisymmetry.The transformed Hamiltonian is where η(x) is a staggered hard-core boson annihilation operator and the ξ phase factors are given by: and the ordering is shown in Fig 1 .Under this transformation, the Gauss law remains unchanged.This is important, as the Gauss law fully defines the charge configuration on the vertex and thus can be used to eliminate the matter fields [12].
For an occupied (unoccupied) site (n(x) = 1(0)) Q(x) = ±1(0) and the Gauss law gives P u P r P † d P † l = −1 (1).We define projection operators Π ρ (x, y) that project the Hilbert space to the subspace with G(x) = ρ, with ρ = 1 indicating that the site is empty and ρ = −1 that the site is full.Elimination of the matter fields via Gauss law leads to the H f terms to acquire projection operators as follows: where the factors of (−1) s(x) arise from fermion staggering.Thus, the full fermionic Z 2 theory can be simulated only by encoding the gauge field values.Once again, it is worth re-emphasizing that the matter fields have been eliminated at the expense of the Gauss law, thus leaving the new theory without this constraint.In further sections it will be shown how each of these terms can be encoded on a digital quantum computer.
D. Full Z2 theory as a spin system Here we show how the pure gauge Hamiltonian can be simulated on a quantum computer.We will assume access to Pauli gates P = {X, Y, Z} and their single qubit rotations {RX(θ), RY (θ), RZ(θ)} with RP(θ) = exp(−iθP/2) as well as controlled X (CX) gate as the 2 qubit gate.To implement this model, it is necessary to have an architecture of qubits with a possibility to perform the CX gate between nearest neighbours.
In order to perform the simulation, in addition to the mapping of U l − → X l and P l − → Z l introduced previously, we need to map the projection operators Π g and the phase factors ξ.The mapping of the phase factors is straight forward since (−1) E l = P l .The projection operator Π ρ can be implemented as follows: (20) The Hamiltonian mass term H M is thus given by: Since we know how to implement each operator in the interaction Hamiltonian H int , it can be mapped to a quantum device.While the direct mapping produces a somehow complicated structure, it can be considerably simplified as follows.Consider the horizontal part of the interaction Hamiltonian and note that U l = U † l = X l .
In the lines 1-3, the projection operators are collected, followed by insertion of (Z r (x, y)) 2 and simplification from the Gauss law constraint in line 4.In the last 2 lines, both terms are collected and Π ρ values are inserted to give the final result.
Similarly the vertical interaction terms can be simpli-fied to: The interpretation of these terms is that we will have an interaction term of the form Y ⊗ Z acting when both sites at the end of the links are empty or occupied.This corresponds to either particle-antiparticle pair creation or annihilation.The pure gauge part of the Hamiltonian gets slightly altered, with the plaquette term becoming 6-local: In this matter-eliminated formalism, the most complicated terms to implement are the interaction and magnetic ones since they are both 6-local.Despite the complications introduced by the projectors, the final gate complexity to perform time evolution is similar to using the Verstraete-Cirac encoding.
The same model was also considered in [13] where the authors arrived at the same result.A similar (transformed) Hamiltonian was obtained in [31] for classical simulation.In our work the emphasis is put towards optimization for circuit depth and comparison with other methods.

E. Fermion encoding via VC transformation
Different methods exist to deal with the fermion statistics in simulations.The simplest strategy is to encode the fermions via Jordan-Wigner transformation [32], effective for one-dimensional (or small two-dimensional) systems.In this transformation, fermions in a chosen order are mapped to spin operators, keeping track of their CARs.However, in two dimensions, any such ordering maps local fermionic terms (e.g.nearest-neighbor interactions) to non-local ones, which results in strings of spin operators.In general, the Pauli weight of interaction terms after this mapping will scale as O(L) where L is the linear size of the 2D system.
There exist several fermionic encoding methods that map a local fermion Hamiltonian to a local spin system [14,33,34].However, in all of these methods extra spins (qubits) are introduced to enforce the fermion CARs, thus making them unfavourable in terms of the spacial quantum computation requirements when compared to the fermion elimination method.One such methodthe Verstraete-Cirac (VC) transformation [14] encodes fermions as spins by introducing ancillary qubits and encoding the fermionic statistics into this multi-qubit increased Hilbert space.Despite the fact that this method has been around for nearly two decades it is still one of the lowest-weight encodings, and a gold standard for benchmarking.In the VC approach, the pure gauge part of the Hamiltonian remains unchanged, with the matter part of Hamiltonian increasing in weight.To accommodate for fermion statistics, an extra qubit is introduced per each fermion site and the operators acting on the ancillary qubits are denoted by Ã.Under this mapping, the matter Hamiltonian becomes: Each of the horizontal terms has 2 components, each of them with weight 4, while the vertical components have weight 5.

A. Simulating time dynamics via Trotterization
Trotterization is a common way of simulating time dynamics in which the non-local exponential of a Hamiltonian is approximated as a sequence of smaller, easier to implement unitaries, by means of a Suzuki-Trotter expansion.In this method the entire time evolution gets divided into n = t/δ steps of fixed size δ, as In general the Hamiltonian H contains multiple terms that do not commute.Such Hamiltonian can be written as H = M i=1 H i where each H i does not commute with the others, but all terms within each of them do.At the lowest Trotter order, each step U (δ) is approximated as V(δ): In general a single Trotter step of a Hamiltonian, composed as a sum of local Pauli terms can be expressed as: where V i is a general unitary operator and RP(c(δ)) is a Pauli operator rotation that depends on the time step size δ and the Hamiltonian couplings.Note that we have used the fact that in each H i the L commuting terms can be done in parallel.Next, the exact form of each of the terms RP i , V i will be given.The entire error for the time evolution with Trotterization can be bound by [35]: and thus it depends on the time step δ and the total evolution time t.Furthermore, it has been observed that in practice these bounds are loose and the Trotter error tends to be much smaller [35].Recent studies [36,37] that explored the chaos-regular transition in Trotterized quantum dynamics showed that even for large values of δ the systems still obey controlled behavior.Furthermore, the threshold for this transition is largely independent of the system size considered.This is an important result as it illustrates that one can faithfully probe time dynamics with large δ values, thus minimizing the number of steps and the circuit depth needed to perform a simulation of a given time.
B. Quantum Circuit for pure gauge Z2 In the pure Z 2 case there are two non-commuting parts H E and H B .To perform time evolution we need to implement both exp(−iδH E ) and exp(−iδH B ). Implementing the exp(−iθH E ) is trivial in the chosen basis as it is just a RZ rotation on each link: Implementing the terms in H B is more difficult.Note that a weight K Pauli term can be implemented with (2K − 2) CX gates.For the terms appearing in H B of form exp iθX ⊗4 , the identity X a X b = CX ab X a CX ab can be used to yield: Thus, a single Trotter step of the pure theory can be implemented with 6 × 1/2 × L = (3 × L) 2-qubit CX gates for a system with L links.
C. Quantum Circuit for fermionic Z2 In the fermionic Z 2 theory, we need to implement all 5 terms - 1.The implementation of the exp(−iδH E ) is the same as in the pure case, it consists of exp(−iθZ) rotations that can be done in parallel on each link: 2. The implementation of exp(−iδH B ) is slightly more complicated than in the pure case as it is 6-local.Each term is of the form exp(−iθY p1 Y p2 X p3 X p4 Z p5 Z p6 ) and can be implemented as V † 2 RX p3 (2θ)V 2 where the circuit V 2 is given by: 3. The evolution of the mass term exp(−iδH M ) where each term is of form exp −iθZ ⊗4 and can be implemented as exp −iθZ ⊗4 = V † 3 RZ r (2θ)V 3 where V 3 is given by: The V 3 circuit can be interpreted as calculating the parity of a given vertex on link r.

The weight-6 part of the horizontal interaction
term evolution exp(−iδH H ) can be implemented as V † 4 RZ L (2θ)V 4 with V 4 given by: u, ( 5. The weight-6 part of the vertical interaction term exp(−iδH V ) is similar to the horizontal, making the structure of the circuit similar.Each term can be implemented as V † 5 RZ L (2θ)V 5 with V 5 given by: u, ( Both the horizontal and vertical terms also have a weight-2 component that can be implemented as exp(−iθZ a Y b ) = V † 6 RZ b (2θ)V 6 with V 6 given by: Note that in all of the circuits the control gates act only between qubits that are nearest neighbours on the lattice.
If the ordering of the terms is chosen in an optimal way, it is possible to simplify the unitaries by contracting some of the CX gates into identities.Trivially, to apply all these terms one would need 10 × 1/2L + 6 × 1/2L + 12 × L = 20L of CX gates (Table I).By choosing this order optimally it can be brought down to 17L of CX gates for L links.A detailed description of the optimal ordering to obtain this simplified result is given in the Appendix B.
Even though this fermion-eliminated Hamiltonian has a complicated structure, the necessary number of 2-qubit gates is quite modest.In comparison, the VC method needs 14L CX gates, but it achieves that by using twice as many qubits.

D. Approaches for circuit depth minimization
One possible way to decrease the circuit depth of a particular time dynamics simulation is to use variational methods, such as parametrized variational quantum dynamics (pVQD) [7].The variational approaches allow one to decrease the circuit depth at the expense of executing the quantum circuit multiple times in the optimization subroutine.
In the pure Z 2 theory, a Trotter step is given by The full time evolution for time t can either be implemented by applying n Trotter steps such that nδ = t, or approximated by a variational circuit.A good candidate for the variational circuit is to simply take k variational steps and optimize the evolution parameters θ i : The optimization proceeds as follows: 1. Start with an easily preparable state |Ψ to be evolved 2. For the first step maximize the overlap 3. Proceed to variationally maximize the overlap: by changing the parameters θ (i) and using the already optimized parameters θ (i−1) from the previous timestep.
By saving the variational parameters θ (i) , it is possible to implement the entire time evolution with the constant circuit depth of 2k + 1 (Trotter timesteps).
For the full fermionic theory, the ansatz can be constructed in a similar way: exp −i(−1) x+y θ 5j+4 H H ).
Even though here we only explore the application of the ansatz for simulating the time dynamics, it can also be used in variational algorithms like QAOA and VQE to probe the ground state properties of the system.

IV. NUMERICAL RESULTS
In this section we present the numerical results obtained using pVQD.Probing the time dynamics via Trotterization requires to repeat the single Trotter step circuit many times, which results in a large circuit depth and thus makes it hard to execute such simulations on NISQ hardware.But the depth can be kept small and constant with the use of variational methods.Here we apply pVQD to both the pure gauge and the fermionic Z 2 theories, focusing on a 2 × 2 lattice.We will explore how the accuracy depends on the number of Trotter layers used in the ansatz (33).In all simulations we ignore the shot noise that arises from finite amount of measurements.We consider the evolution from the initial product state: and measure the accuracy of the variational evolution by the fidelity of the pVQD approximation F, The error of the approximation is 1 − F(t).

A. Pure Gauge results
For the pure Z 2 theory we investigate the 2 × 2 lattice and observe that the ansatz of k = 2 steps already well approximate the dynamics for all coupling values considered g = 0.5, 0.85, 1.The results are shown in Fig 2 .In particular, we look at the expectation value of the plaquette operator on site x = (0, 0).The results show excellent agreement for the entire evolution range.By using this method, it is possible to reduce circuit depth required from 20 to 5 Trotter steps that were used in the pVQD optimization procedure.

B. Full fermionic results
The variational ansatz for the full fermionic theory consists of 5 terms compared to the 2 for the pure case.This leads to the optimization process being slower and makes it more difficult to reach the global minimum.In this case, we compare the results for depth values of k = 2, 3, 4, 5 along with their associated errors for the Hamiltonian with (λ E , λ B , , M ) = (1, 0.2, 1) and observe good agreement with the Trotterized evolution (Fig 3).We investigate the expectation value of occupation n on site x = (0, 0) and the expectation value of a plaquette operator on site x = (0, 0) when evolved under the variational circuit.Furthermore, we study the infidelity 1 − F of the variational state when compared to the Trotterized evolution.The results are also compared with the exact dynamics obtained by exact diagonalization.As expected, the increase in the variational circuit depth leads to a better agreement for long times.

V. CONCLUSION
Here we have presented a new method to simulate the full fermionic Z 2 theory in (2+1) D with minimal resources, in particular, with minimal number of qubits.This was achieved by eliminating the fermionic degrees of freedom and absorbing them into the gauge field.(i.e. one per link) to simulate the model.In methods that involve encoding the fermions with the help of ancillary qubits, like the Verstraete-Cirac encoding, one needs twice as many qubits.We have shown that the circuit depth in our case is only slightly worse, with 17 CX gates per link, compared to the 14 of VC.Furthermore, we have presented a variational Trotterization strategy that allows to further decrease the circuit depth.Numerical results of the 2×2 lattice simulation suggest that the time dynamics of both the pure gauge and fermionic Z 2 theory can be well approximated with Trotterized time dynamics.For the pure gauge theory, the long time dynamics could be approximated well with a variational ansatz of only k = 2 layers.For the full fermionic case, the evolution can still be approximated by the variational ansatz, but we find that the number of variational layers need to be increased to obtain reliable results for longer times.This work shows that the fermion elimination method is an optimal approach for simulating the Z 2 theory on a quantum computer, due to its minimal qubit requirement and the comparable 2-qubit gate count with other methods.Further work involves developing similar methods for higher Z N theories and extending them to (3+1) D.
While completing this manuscript, an independent proposal appeared that also explores the use of fermion elimination method for simulating lattice gauge theories, including the fermionic Z 2 in (2+1) D [13].

FIG. 1 .
FIG. 1.The top figure shows the labelling for the pure gauge theory on a lattice.The bottom figure shows the labelling for the full fermionic theory with staggered fermionic matter.Matter sites are located on vertices while gauge fields are on the links.

1 FIG. 2 .
FIG.2. Figure shows the pVQD results for g = 0.5, 0.85, 1 (lines red, green, blue) of a pure Z2 on a 2 × 2 lattice.In this case the depth of k = 2 was used.× marks the pVQD results, • -Trotterization results, and the dotted lines represent results obtained from exact diagonalization.

FIG. 3 .
FIG. 3. Figure shows the expressibility for the pVQD variational ansatz for depths k = 2, 3, 4, 5 for the 2 × 2 fermionic Hamiltonian with couplings (λE, λB, , M ) = (1, 1, 0.2, 1).The time step for the evolution is λEδ = 0.1.a) shows the expectation value for the occupation n on the site (0,0) for various ansatz depths and the comparison with the Trotterized and exact values.b) shows the expectation value of the transformed plaquette operator and the comparison with the Trotterized and exact values.c) shows the accuracy of the approximation in terms of infidelity 1 − F(t) = 1 − | ΨT rotter (t)|ΨpV QD (t) | 2 .

TABLE I .
Table shows the cost of implementing each term of the Hamiltonian in terms of CX gates.