Introduction

Exploring the phase diagram of a theory is central for the understanding of the fundamental laws of physics in many disciplines ranging from condensed matter to particle physics. For instance, in the case of ferromagnetic materials, critical points and phase boundaries help to understand and design magnetic materials with various applications1,2. Within superconductivity, phase diagrams allow for identifying the critical temperatures and magnetic fields required for materials to exhibit zero electrical resistance3. In particle physics, the phase diagram of Quantum Chromodynamics (QCD) elucidates the behavior of matter under extreme conditions, relevant for the early universe and neutron stars4. In high-energy physics, topological terms play an important role in the study of interesting phenomena such as the breaking of charge conjugation-parity symmetry in QCD5, and the occurrence of out-of-equilibrium dynamical effects involving axion fields6.

In order to explore the phase structure of a given theory, one often has to resort to numerical methods. A standard tool is Monte Carlo (MC) simulation, which has been successful for probing phase diagrams7,8,9,10, including that of lattice QCD11. However, the sign problem poses a barrier in certain parameter regimes12, leaving relevant questions unanswered. Specifically for lattice QCD, large baryon chemical potentials or the presence of a topological θ-term would trigger this problem13. Thus, variations of the conventional MC approach have been proposed to tackle this obstacle11, but so far only with limited success. Hence, there is great interest in alternative methods that bypass the issue, such as tensor networks and quantum computing14,15,16,17. In particular, quantum computing offers a promising alternative route15,16,18, with already a number of successful demonstrations19,20,21,22,23,24,25,26,27.

Here, we focus on exploring the possibility of studying the phase structure of the Schwinger model28 in the presence of a topological θ-term with near-term quantum devices. Despite its simplicity, the Schwinger model in the presence of a topological θ-term provides an example where conventional Monte Carlo methods would suffer from the sign problem. Moreover, it exhibits a rich phase structure with a first-order quantum phase transition for large enough masses at θ = π29,30,31,32,33,34,35,36,37. Hence, the Schwinger model serves as a benchmark system for developing and testing new methods. Regarding a quantum computing approach to the model in the presence of a topological θ-term, there are several open questions. First, the theory needs to be discretized on a lattice with a finite extent, and there are various different ways for discretizing fermions on such a lattice. It is therefore a priori not clear which one will show the best performance for a given set of resources. Second, it is important to identify how large the system sizes should be in order to obtain a reliable continuum extrapolation in order to assess the applicability of near-term quantum devices.

Here we address these questions by studying two fermion discretizations, staggered and Wilson fermions, in order to explore any potential advantages of one type of fermion formulation over the other. We use the variational quantum eigensolver (VQE)38 and derive a protocol for mapping this problem on a quantum circuit. The VQE, introduced as an alternative to quantum phase estimation39, aligns with the capabilities of current and near-term quantum devices. We test our VQE using noiseless classical simulations between 6–12 qubits, to identify the best possible setup regarding the ansatz and gates that would capture the relevant ground states most efficiently. After the optimal ansatz-gate combination and variational parameters are found, the ground states across the phase transition are prepared on IBM’s quantum devices. We demonstrate that using state-of-the-art error mitigation techniques—zero noise extrapolation40, readout error mitigation41, Pauli twirling42 and dynamical decoupling43—allows for obtaining precise results from the quantum measurements. To understand the minimum system sizes required to extrapolate faithfully to the continuum limit with a quantum computer, we use matrix product states (MPS). We numerically simulate intermediate system sizes and perform the continuum extrapolation, which we compare to analytical results.

Results

Summarizing the methods in Sec. “METHODS” that we have used to explore the lattice Schwinger model, we examine here the performance of the ansätze for the VQE using classical simulations. Furthermore, we demonstrate the first-order phase transition with quantum hardware using the ground states obtained from the classical simulation of the VQE. Finally, we perform the extrapolation to the continuum with data obtained from an MPS calculation and estimate the resource required for a reliable continuum limit.

VQE results

In order to explore the capacity of our ansatz of faithfully representing the ground states, the VQE is simulated classically in the absence of any noise following the procedure outlined in the previous section. We focus on two regimes, on the one hand a large value mlat/g = 10, for which we expect the first-order quantum phase transition to occur, and on the other hand mlat/g = 0, which should be considerably below the critical mass and, thus, no transition occurs as we change l0. For the rest of this section, we consider a fixed lattice volume of \(N/\sqrt{x}=30\).

Focusing on the case of Wilson fermions first, we generally observe a similar performance of both the brick and the ladder ansatz. The choice of SO(4) gates mostly leads to a slightly better fidelity than the RXX+YY gates, independently of the mass. Since the brick ansatz has a smaller CNOT-depth than the ladder one for the same number of layers, we deem it more suitable for near-term quantum hardware, and we focus on the brick ansatz with SO(4) gates for the Wilson case. Using the two product states described in Sec. “METHODS” F as initial states before and after the transition for the Wilson discretization with mlat/g = 10, the VQE was able to achieve fidelities above 0.99 with a single layer of the brick ansatz with SO(4) gates for all system sizes we study. Figure 1 shows the results from the VQE for electric field density, 〈LW〉, (first row of Fig. 1) and the particle number, 〈PW〉, (third row of Fig. 1) as a function of l0 for system sizes N = 3, 4, 5, 6, which correspond to 6, 8, 10 and 12 qubits for Wilson fermions. In particular, the results for the VQE show the distinct discontinuity in the electric field density and the particle number, indicating the remnant of the first-order phase transition. The location of the transition is shifted to values of l0 much larger than the prediction for the continuum model, l0 = 1/2. As we increase N, we observe that the transition point moves closer towards smaller values of l0. This behavior can be explained with the effects of the finite volume and lattice spacing on the transition point, which we discuss in detail in the supplementary material44. More specifically, since we increase N and keep the volume constant, we effectively reduce the lattice spacing, hence going closer to the continuum result. Comparing the results from the VQE to the ones obtained from exact diagonalization, we observe excellent agreement, reflecting the high fidelities that were reached. This can be accounted for by the fact that for mlat/g = 10 the true ground states before and after the transition are close to the product states we use as initial states. As a result, one layer of the ansatz is sufficient to generate essentially perfect overlap.

Fig. 1: Quantum hardware results for the first-order phase transition.
figure 1

Electric field density 〈LW,S〉 and particle number 〈PW,S〉 against l0 with data from quantum hardware (black crosses), as compared to the noiseless expectation values (red pluses) and exact diagonalization (blue circles) for Wilson and staggered fermions respectively. The staggered fermions in this case have the same number of qubits as the Wilson fermions. Hence, while the title of each column specifies the N for Wilson fermions, for staggered it is taken to be double that value. The lattice mass for these data is set to mlat/g = 10, so that we are above the second order phase transition of Fig. 5, without having to account for the mass shift. Therefore, we can observe the first-order phase transition. Note that the error bars, which are discussed in the supplementary material44, are much smaller than the y-scale and thus, are not visible.

Turning to a smaller lattice mass of mlat/g = 0, the ground state is more complicated, and in general our VQE needs more layers to achieve equally good fidelities as previously. For the most part, two layers of the brick ansatz with SO(4) gates gave the best performance resulting in fidelities above 0.99. In a few occasions, the RXX+YY gates showed a slightly better performance, and we observed a few instances where a single ansatz layer was already sufficient to reach fidelities above 0.99. Figure 2 summarizes the results for the electric field density and the particle number for mlat/g = 0. Compared to the larger mass, we now see that both quantities exhibit a smooth behavior, as one would expect for masses below the critical one. It can be seen that for a few values of l0, the VQE did not fully converge to the exact diagonalization, especially for larger values of N close to l0 = 1/2 (see Fig. 2b–d, j). In these cases the best fidelity obtained is around 0.85. Looking at the electric field density and the particle number for larger N, we observe a rather larger slope around l0 = 1/2. This indicates that despite choosing a small lattice mass, we are not too far away from the first-order phase transition, possibly due to finite-size effects and the additive mass renormalization. Hence, at l0 = 1/2 there are presumably two states with similar energy making it harder for the VQE to converge. Nevertheless, our classically simulated VQE results are in general in good agreement with the data from exact diagonalization for a wide range of parameters.

Fig. 2: Quantum hardware results in the absence of phase transitions.
figure 2

The description for this figure follows Fig. 1, however the lattice mass here is set to mlat/g = 0, so that we are below the second order phase transition and thus observe no first-order phase transition as expected. Note that the error bars are much smaller than the y-scale and thus, are not visible. The blue circles represent the exact diagonalization, red pluses the noiseless simulations and black crosses the quantum hardware results.

Focusing on the case of staggered fermions and using the initial states and qubit mappings discussed in Sec. “METHODS” (Parametric ansatz circuits for VQE), the ansätze with the RXX+YY gates generally returned higher fidelities compared to the ones with the SO(4) gates. In the latter case, we observed the tendency that the final parameters obtained by the optimization routine at the end of the VQE were all close to 0, resulting in a state formed only from the initial non-parametric part (which prepares the \({\left\vert 10\right\rangle }^{\otimes N/2}\) state). In contrast, with RXX+YY gates both of the architectures performed comparably well and were able to achieve fidelities above 0.99. Since the brick architecture has smaller CNOT-depth, we again focus on this one for the staggered discretization. Considering mlat/g = 10 first, the staggered discretization behaves qualitatively similar to the Wilson fermions, as Fig. 1 reveals. We again observe the characteristic discontinuities in the electric field density (second row of Fig. 1) and the particle number (fourth row of Fig. 1), indicating the first-order quantum phase transition. Comparing to the Wilson fermions, the transition for the staggered discretization occurs at larger l0, despite the fact that for both discretizations we match the qubit number, which effectively means that for the staggered fermions we have a larger number of physical sites and, since the volume is fixed to \(N/\sqrt{x}=30\), a finer lattice spacing than for the Wilson fermions. This effect might be caused by a larger additive mass renormalization compared to the Wilson case. Also for the staggered discretization, we see the same trend that with increasing system size it is shifted to smaller values of the θ-angle (for details, see the supplementary material44). In particular, the data from exact diagonalization is in excellent agreement with the one from simulated VQE with one ansatz layer, thus showing that our ansatz circuit together with the qubit mapping described in Sec. “METHODS” is appropriate for capturing the physics of the model in the regime of large masses.

Going to the opposite regime of small lattice mass, mlat/g = 0, we again have to increase the number of layers to two for the staggered case to have high fidelities with the exact results, due to the more complicated nature of the ground state in this regime. The results for two layers of the brick ansatz are shown in Fig. 2. Similar to the Wilson fermions, also for the staggered discretization, the electric field density (particle number) now shows a smooth decrease (increase), indicating that the absence of the first-order phase transition for the chosen lattice mass. Interestingly, for the staggered discretization we essentially obtain perfect agreement with the data from exact diagonalization, and there the results from classically simulated VQE do not show any deviations for the entire parameter range we study.

In summary, our results for the Wilson case suggest that the brick ansatz with SO(4) gates with an appropriate initial state is generally favorable, and that the resources required for approximating the ground state to a good level of accuracy do not show a strong dependence on the system size in the range we study. For the staggered case, our data imply the brick ansatz with RXX+YY gates provides good performance using the same initial state for the entire parameter regime we explore. Moreover, also for the staggered case there is no strong dependence on the system size in the range we study.

Inference runs on quantum hardware

The previous section has shown that our VQE ansatz is able to capture the relevant ground states efficiently with a small number layers. To demonstrate the approach is feasible on current and near-term quantum hardware, we perform inference runs on quantum hardware. To this end, we prepare the ansatz circuit for the parameters obtained at the end of the classical simulation of the VQE on a quantum device and measure the electric field density as well as the particle number. We use IBM’s quantum devices ibm_hanoi, ibm_cusco and ibm_nazca for our inference runs, where we perform 104 measurements in the computational basis. The results for both fermion discretizations after applying the error mitigation techniques discussed in Sec. “METHODS” (Error mitigation techniques) are shown in Figs. 1 (mlat/g = 10) and in 2 (mlat/g = 0), alongside with the data from the simulated ideal VQE and the results from the exact diagonalization.

In general, the results from the quantum hardware agree well with the noise-free simulation of the VQE, except at a few points. This discrepancy may be a result of several factors. We have observed for example that measurements performed right after calibration of the quantum hardware were closer to the simulated result, as compared to measurements done when the last calibration took place several hours before. Furthermore, the case mlat/g = 0 has a few points which do not match well with the corresponding noise-free ones, compared to the larger mass of mlat/g = 10. This can be related to the fact that the circuits for mlat/g = 0 were one layer deeper, which generally leads to larger effects of noise on the results.

To assess the performance of the error mitigation procedure, we show in Fig. 3 histograms for the absolute error of the unmitigated and mitigated results for the particle number and the electric field density. The absolute error (shown on the x-axis) corresponds to the absolute value of the difference between the ones obtained from the simulated VQE, and the (un)mitigated values from the quantum device. For the electric field density in the Wilson case and the particle number in the staggered formulation, the histograms in Fig. 3a, d show a clear improvement. The mitigated values (blue bars) are concentrated around smaller errors and have a higher probability of coinciding with the correct result than the unmitigated ones (red translucent bars). For the electric field density in the staggered case and the particle number in the Wilson discretization, we observe a different picture. Figure 3b, c shows that the probability of measuring the exact result has decreased compared to the unmitigated results. Nevertheless, the overall distribution after mitigation shows a smaller width and is concentrated at smaller values of the absolute error than the original data. This effect can be explained by the fact that the ZNE is in general not guaranteed to improve the results, and occasionally it can make the final result slightly worse (examples of ZNE extrapolations are shown in detail in the supplementary material44). In general, we observe a positive effect of the error mitigation, as the expected error is reduced in all cases.

Fig. 3: Zero noise extrapolation performance analysis.
figure 3

Histograms for the absolute errors of the mitigated and unmitigated data for the electric field density for the Wilson (a) and the staggered discretization (b) as well as the particle number for the Wilson fermions (c) and the staggered formulation (d). Blue bars represent the absolute error between the hardware data after ZNE and the simulated VQE, while red bars represent the absolute error between unmitigated hardware data and the simulated VQE. Each subplot includes all N, mlat/g, l0.

Having demonstrated, that our ansatz can be reliably executed on current and near-term quantum hardware for system sizes corresponding 6-12 qubits, we examine if a near-term device with \({\mathcal{O}}(100)\) qubits would allow for reliably studying the continuum limit of the model.

Continuum extrapolations with MPS

To investigate the system sizes required for a reliable extrapolation to the continuum limit as well as to compare the performance of both fermion discretizations towards that limit, we use MPS simulations (for details, see the supplementary material44). We use again a fixed lattice volume of \(N/\sqrt{x}=30\), where we restrict N {70, 80, 90, 100}. This allows us to study the fixed volume continuum limit, ag → 0, with resources that should be accessible on current and near-term quantum hardware. In order to be able to follow a line of constant renormalized mass, towards the continuum limit, we determine the mass shift for each value of N and l0 following the ideas in ref. 29. Here we focus on a small value, mr/g = 0.01, as for large masses the ground state of the model is closer to a product state and small masses are in general more challenging. In particular, we will focus on the electric field density, as for this observable our continuum extrapolations can be compared to the prediction from mass perturbation theory45, which reads

$$\frac{{\mathcal{F}}}{g}=\frac{{e}^{\gamma }}{\sqrt{\pi }}\left(\frac{m}{g}\right)\sin \theta -8.9139\,\frac{{e}^{2\gamma }}{4\pi }{\left(\frac{m}{g}\right)}^{2}\sin (2\theta ),$$
(1)

where γ = 0.5772156649 is the Euler-Mascheroni constant.

Figure 4 shows the continuum result for the electric field density obtained for each discretization in comparison with prediction from mass perturbation theory. To compare the performance between the staggered and the Wilson discretization, there are two options. On the one hand, one can choose the same value of x = 1/(ag)2 for both, which results in a staggered formulation that has half of the number of qubits than the Wilson one. On the other hand, one can choose the same number of qubits for both discretizations, which leads to double the number of physical sites for the staggered formulation, which, given the fixed lattice volumes we work with, simultaneously means a finer lattice spacing than in the Wilson case. For each case, in the staggered formulation we additionally compare the results obtained with using the theoretically predicted values of the mass shift in Eq. (14), and the ones from measuring the mass shift MSL following ref. 29. Hence, there are in total four combinations of the two above considerations, which are all shown in Fig. 4.

Fig. 4: Continuum extrapolation results with matrix product states.
figure 4

Electric field density \({\mathcal{F}}/g\) against l0 for Wilson fermions and staggered fermions at mr/g = 0.01. The following MSE values are the mean squared error of each of the data as compared to the continuum mass perturbation theory prediction for the electric field density \({\mathcal{F}}/g\) given in Eq. (1). For staggered fermions with MSt and same x (number of qubits as Wilson), the MSE is 1.041 × 10−6 (6.16 × 10−7), and respectively for MSL 6.143 × 10−9 (2.617 × 10−8). For Wilson fermions the MSE is 7.926 × 10−9. The error bars emanate from the errors in the variational algorithm to compute the relevant ground states, the extrapolation in bond dimension and in lattice spacing.

In general, we observe the most precise results from both Wilson and staggered fermion when using MSL and the same x as Wilson. When the staggered utilized MSL but retained an equivalent qubit count to Wilson, the performance dipped, primarily since resources (like bond dimension D) were consistent with the same x scenario, even if the former had an expanded N. Further, the staggered fermions using the MSt were not able to match the best performance, since the MSt does not take into account the l0 dependence to the MS; this effect is exemplified in the points with higher l0 which are further away from perturbation theory in Fig. 4. In the supplementary material44 we include a table which quantifies this deviation by showing the absolute distance between the points in Fig. 4 and mass perturbation theory. An l0 dependence in the massless Schwinger model with staggered fermions was also reported in Fig. 7 of31. We emphasize that the MSt is derived with periodic boundary conditions while we only consider OBC.

Overall, we conclude that, even with these modest resources, the extracted data closely aligns with the continuum theory, both qualitatively and quantitatively. However, disregarding the mass shift significantly skews the extrapolated data in comparison to the theory (for details, see the supplementary material44). Hence, if this procedure is to be approached with digital quantum computing, the mass shift will play an important role in giving reliable continuum limit results with relatively small system sizes up to 100 − 200 qubits.

Methods

The Schwinger model

The Schwinger model describes quantum electrodynamics in (1+1)-dimensions coupled to a single, massive Dirac fermion28. Here we briefly introduce the Hamiltonian formulation and review its phase diagram in the presence of a topological θ-term. We then discuss two different discretizations for the fermionic matter fields of the model, namely Wilson and staggered fermions.

Hamiltonian formulation in the continuum

The continuum Hamiltonian density of the Schwinger model in the presence of a topological θ-term is given by

$${\mathcal{H}}=-i\overline{\psi }{\gamma }^{1}\left({\partial }_{1}-ig{A}_{1}\right)\psi +m\overline{\psi }\psi +\frac{1}{2}{\left({\dot{A}}_{1}+\frac{g\theta }{2\pi }\right)}^{2},$$
(2)

where ψ(x) is a two-component Dirac spinor describing the fermionic matter. The spinor components, ψα, α = 1, 2, fulfill the standard fermionic anticommutation relations \(\{{\psi }_{\alpha }^{\dagger }(x),{\psi }_{\beta }(y)\}=\delta (x-y){\delta }_{\alpha \beta }\). The gauge field Aμ, μ = 0, 1, mediates the interaction between the matter fields. Here we have chosen the temporal gauge, A0 = 0, hence only the spatial component A1 appears in the Hamiltonian. The parameters m and g are the bare fermion mass and the coupling between fermions and the gauge fields. The matrices γμ are two dimensional matrices obeying the Clifford algebra {γμ, γν} = 2ημν, with η = diag(1, − 1), and \(\overline{\psi }\) corresponds to ψγ0. The physically relevant gauge invariant states of the Hamiltonian have to fulfill Gauss’s law

$$\begin{array}{r}-{\partial }_{1}{\dot{A}}^{1}=g\overline{\psi }{\gamma }^{0}\psi ,\end{array}$$
(3)

where \(-{\dot{A}}^{1}\) is the electric field and \(g\overline{\psi }{\gamma }^{0}\psi\) represents the charge density.

The topological term, gθ/2π, appearing in the Hamiltonian corresponds to a constant background electric field whose effect has been assessed both theoretically and numerically. Coleman argued that the physics of the model is periodic in θ with a period of 2π, and that above a certain critical mass, mc/g, the model undergoes a first order quantum phase transition at θ = π33. This picture was later on confirmed in numerical simulations, where it was found that the critical line ends in a second-order quantum phase transition at mc/g ~ 0.3332,37,46. Figure 5 provides a sketch of the phase diagram, highlighting the first-order phase transition line, which culminates with a second-order phase transition at mc/g.

Fig. 5: Schwinger model phase diagram.
figure 5

Illustration of the phase diagram of the Schwinger model in the presence of a topological term in the m/gθ plane. Since the physics is periodic in θ with period 2π, only the first period is shown. The critical line (shown in black) indicates the first-order phase transitions occurring at θ = π for masses larger than the critical one mc/g ≈ 0.33, which ends in a second-order phase transition (green dot) exactly at mc/g. Below the critical mass no transitions occur.

The physics of the model can also be understood qualitatively in an intuitive picture. For large values of the mass in units of the coupling, m/g 1, it is generally unfavorable to generate charged particles. In the regime l0 = θ/2π < 1/2, the ground state thus remains devoid of charged particles and the electric field matches the background electric field due to Gauss’s law. For l0 > 1/2, it becomes energetically favorable to produce a negative unit charge on the left of the one-dimensional space and a particle of positive unit charge on the right. As a result of Gauss’s law, these are connected by a flux string, lowering the electric field by one unit, which takes the electric field in the bulk from l0 to l0 − 133,37. Given that the electric field energy is proportional to the square of the electric field and the mass contribution of the particle-antiparticle pair is negligible at infinite volume, these two states are degenerate directly at the point l0 = 1/2. Hence, a first-order quantum phase transition occurs at l0 = 1/2 (or equivalently θ = π) for large values of m/g, manifesting itself in an abrupt change of the electric field density and particle number.

For small values of m/g below the critical mass, it is energetically favorable to screen the electric field by producing more of the negative-positive charge pairs, and at m/g = 0 we have complete screening of the background electric field45. Hence, in this regime the electric field density and the particle number do not display an abrupt change as a function of θ.

Lattice discretizations

In order to address the Hamiltonian of the theory numerically, we choose to work with a discrete lattice formulation. To ensure that one faithfully recovers the physics of the continuum model in the limit of vanishing lattice spacing, special care has to be taken when discretizing the fermionic degrees of freedom. In particular, a naive discretization of the fermionic fields leads to an incorrect continuum limit due to the so-called doubling problem47. There are several ways to avoid this problems, and here we choose to work with two types of fermion discretizations, Wilson and staggered fermions, which are commonly used in the literature. We first turn to Wilson fermions and present the final Hamiltonian as well as the relevant observables in this formulation before discussing the same operators for the staggered discretization. Moreover, we show how to translate them to qubit degrees of freedom.

Wilson fermions

The basic idea of Wilson fermions is to add a lattice version of the second derivative of the fermion field to the native discretization (for details, see the supplementary material44). While this term vanishes in the continuum limit, it can be shown that it breaks the chiral symmetry explicitly, and gives the doubler solutions originating from the discretization of space a mass proportional to the inverse of the lattice spacing. This ensures that they decouple from the theory when approaching the continuum limit48,49. The Wilson discretization of the of the Schwinger Hamiltonian on a lattice with N sites and spacing a reads29,50

$$\begin{array}{ll}{H}_{W}\,=\,\mathop{\sum }\limits_{n=0}^{N-2}\left({\overline{\phi }}_{n}\left(\frac{r+i{\gamma }^{1}}{2a}\right){U}_{n}{\phi }_{n+1}+\,\text{h.c.}\,\right)\\\qquad\quad \,+\,\mathop{\sum }\limits_{n=0}^{N-1}\left({m}_{{\rm{lat}}}+\frac{r}{a}\right){\overline{\phi }}_{n}{\phi }_{n}+\mathop{\sum }\limits_{n=0}^{N-2}\frac{a{g}^{2}}{2}{\left({L}_{n}+{l}_{0}\right)}^{2}.\end{array}$$
(4)

The field ϕn is a dimensionless two-component Dirac spinor at site n, whose components ϕn,α, α = 1, 2, again fulfill the standard anticommutation relations for fermionc fields \(\{{\phi }_{n,\alpha }^{\dagger },{\phi }_{{n}^{{\prime} },\beta }\}={\delta }_{n{n}^{{\prime} }}{\delta }_{\alpha \beta }\). The operators Un and Ln act on the links in between the matter sites n and n + 1, where Ln represents the quantized dimensionless electric field. They fulfill the commutation relation \([{U}_{n},{L}_{{n}^{{\prime} }}]={\delta }_{n{n}^{{\prime} }}{U}_{n}\), hence, in the eigenbasis of the electric field operator, Un acts as a lowering operator, decreasing the electric flux value by one unit. The parameters mlat and g are the lattice mass and coupling, and r corresponds the Wilson parameter, which can be chosen arbitrarily between (0, 1] to ensure the correct continuum limit50. The background electric field, l0 = θ/2π, is the lattice version of the topological θ-term. On the lattice, Gauss’s law translates to

$${L}_{n}-{L}_{n-1}={Q}_{n}$$
(5)

where \({Q}_{n}={\phi }_{n}^{\dagger }{\phi }_{n}-1\) is the charge operator. Given the global U(1) symmetry of the model, the total charge ∑nQn is conserved. The lattice discretization with Wilson formulation generates an additive mass renormalization29. The renormalized mass can be expressed as

$${m}_{r}/g={m}_{{\rm{lat}}}/g+\,{\text{MS}}\,(V,ag,{l}_{0}),$$
(6)

where MS is the additive mass shift which, in general, depends on the dimensionless lattice volume, \(V=N/\sqrt{x}\), the lattice spacing in units of the coupling, ag, and the background field, l0. In order to follow a line of constant mr/g, one needs to determine MS. For our simulations later on, we use the method from ref. 29 to obtain MS. For the Wilson discretization, we can define the particle number operator as

$${P}_{W}=N+\mathop{\sum }\limits_{n=0}^{N-1}{\overline{\phi }}_{n}{\phi }_{n},$$
(7)

which essentially is the lattice version of the chiral condensate, \(\overline{\psi }\psi\), up to the constant N, the number of two-component Dirac spinor lattice sites. The constant shift ensures that PW is a positive semidefinite operator, where the zero eigenvalue is obtained for states minimizing \(\mathop{\sum }\nolimits_{n = 0}^{N-1}{\overline{\phi }}_{n}{\phi }_{n}\). These correspond to the ground state of the Hamiltonian in the limit of dominating mass term, for which we do not expect any particles from the picture discussed for the continuum model. As soon as particles are present in the ground state, we expect a nonzero expectation value for PW. Thus, together with the electric field, this observable should allow us to detect the first-order phase transition in the lattice model.

For open boundary conditions, Eq. (5) can be solved iteratively after fixing the value of the electric field on the left boundary, ε0. Choosing a nonzero ε0 value for the electric field can be interpreted as a shift in the value of l0 to \({l}_{0}^{{\prime} }={l}_{0}+{\varepsilon }_{0}\). Hence, we can set ε0 = 0 without loss of generality. Choosing ε0 = 0, we find for the electric field

$${L}_{n}=\mathop{\sum }\limits_{k=0}^{n}{Q}_{k}.$$
(8)

This implies that the electric field on each link can be determined by the fermionic charges, and is not a dynamical variable. Inserting this into the Hamiltonian in Eq. (4) and applying a residual transformation to the fermionic fields51, we can integrate out the gauge fields and obtain a formulation purely in fermionic degrees of freedom29

$$\begin{array}{ll}{H}_{W}\,=\,\mathop{\sum }\limits_{n=0}^{N-2}\left({\overline{\phi }}_{n}\left(\frac{r+i{\gamma }^{1}}{2a}\right){\phi }_{n+1}+\,\text{h.c.}\,\right)\\\qquad \,+\,\mathop{\sum }\limits_{n=0}^{N-1}\left({m}_{{\rm{lat}}}+\frac{r}{a}\right){\overline{\phi }}_{n}{\phi }_{n}+\mathop{\sum }\limits_{n=0}^{N-2}\frac{a{g}^{2}}{2}{\left({l}_{0}+\mathop{\sum }\limits_{k = 0}^{n}{Q}_{k}\right)}^{2}.\end{array}$$
(9)

Note that the above Hamiltonian is directly confined to the gauge invariant subspace, as Gauss’s law is fulfilled by construction. For the rest of this paper, we will fix r = 1 and choose to work with the convention γ0 = X, γ1 = iZ, where X, Z are the usual Pauli matrices.

In order to be able to measure the Hamiltonian on a quantum device, we have to map the fermionic degrees of freedom to qubits. To this end, we use the Jordan-Wigner transformation52 to translate the fermion fields to spins. Note that in the Wilson formulation, we have a two-component spinor on each site. Hence, the Jordan-Wigner transformation for a system with N sites results in 2N spin degrees of freedom. As shown in detail in the supplementary material44, applying a convenient ordering for the fermions, allows for obtaining a purely real Hamiltonian, and we find for the dimensionless spin formulation of Eq. (9)

$$\begin{array}{ll}{W}_{W}\,=\,x\mathop{\sum }\limits_{n=0}^{N-2}\left({X}_{2n+1}{X}_{2n+2}+{Y}_{2n+1}{Y}_{2n+2}\right)\\\qquad \,+\,\left(\frac{{m}_{{\rm{lat}}}}{g}\sqrt{x}+x\right)\mathop{\sum }\limits_{n=0}^{N-1}\left({X}_{2n}{X}_{2n+1}+{Y}_{2n}{Y}_{2n+1}\right)\\\qquad \,+\,\mathop{\sum }\limits_{n=0}^{N-2}{\left({l}_{0}+\mathop{\sum }\limits_{k = 0}^{n}{Q}_{k}\right)}^{2}.\end{array}$$
(10)

Here we have defined the inverse lattice spacing squared in units of the coupling, x = 1/(ag)2. The charge operator in spin formulation is given by Qn = (Z2n + Z2n+1)/2, and Xn, Yn, and Zn are the standard Pauli operators acting on spin n.

The relevant observables for detecting the first-order phase transition, can be readily translated to the spin formulation. Since we expect the electric field density to be homogeneous in the bulk for large enough system sizes, we only consider a single link operator in the center of the system to minimize boundary effects. The total electric field including the background field on this link can then be reconstructed from the charges as

$$\begin{array}{ll}{L}_{W}\,=\,{l}_{0}+{L}_{\lceil \frac{N}{2}\rceil -1}={l}_{0}+\mathop{\sum }\limits_{k=0}^{\lceil N/2\rceil -1}{Q}_{k}\\\qquad \,=\,{l}_{0}+\displaystyle\frac{1}{2}\mathop{\sum }\limits_{k=0}^{\lceil N/2\rceil -1}({Z}_{2k}+{Z}_{2k+1}).\end{array}$$
(11)

Using the same ordering for the fermions as for the Hamiltonian, the particle number operator becomes

$${P}_{W}=N+\frac{1}{2}\mathop{\sum }\limits_{n=0}^{N-1}\left({X}_{2n}{X}_{2n+1}+{Y}_{2n}{Y}_{2n+1}\right).$$
(12)

This operator commutes with the Hamiltonian only in the weak-coupling limit, m/g 1, for which the kinetic term can be neglected. Hence, only in this limit we expect the integer eigenvalues of PW to be good quantum numbers53. Each part from the two components in the sum of Eq. (12) can contribute a minimum of -1, hence the minimum of the sum including the prefactor is − N, which is the negative of the number of two-component Dirac spinor lattice sites. Thus the first term N will take the minimum of this operator to 0.

Staggered fermions

Another approach to discretize the model are the Kogut-Susskind staggered fermions54. The basic idea is to distribute the two spinor components to different lattice sites, thereby “thinning out” the fermionic degrees of freedom and avoiding the doubling problem. The Kogut-Susskind formulation for the Schwinger Hamiltonian for a lattice with N sites, spacing a and open boundary conditions can written as54

$$\begin{array}{ll}{H}_{S}\,=\,-\displaystyle\frac{i}{2a}\mathop{\sum }\limits_{n=0}^{N-2}\left({\phi }_{n}^{\dagger }{U}_{n}{\phi }_{n+1}-\,\text{h.c}.\right)\\\qquad \,+\,{m}_{{\rm{lat}}}\mathop{\sum }\limits_{n=0}^{N-1}{(-1)}^{n}{\phi }_{n}^{\dagger }{\phi }_{n}+\displaystyle\frac{a{g}^{2}}{2}\mathop{\sum }\limits_{n=0}^{N-2}\left({L}_{n}+l_0\right)^{2}\,,\end{array}$$
(13)

where N is supposed to be even. In the expression above, the operators Ln and Un are the same as for the Wilson case and act on the links between sites n and n + 1. Different to the Wilson discretization, ϕn now represents a single-component fermionic field whose anticommutation relations are given by \(\{{\phi }_{n}^{\dagger },{\phi }_{{n}^{{\prime} }}\}={\delta }_{n{n}^{{\prime} }}\). In the limit of vanishing lattice spacing, the fermionic fields residing on even (odd) sites will correspond to the upper (lower) component of the Dirac spinor ψ(x). Thus, the staggered formulation effectively doubles the lattice spacing. Again, mlat and g refer to the lattice mass and the coupling. The Gauss’s law for the staggered case has the same form as in Eq. (5), but Qn is now given by the staggered charge operator \({Q}_{n}={\phi }_{n}^{\dagger }{\phi }_{n}-\left(1-{(-1)}^{n}\right)/2\). Also for the staggered formulation, the total charge ∑nQn is a conserved quantity and commutes with the Hamiltonian.

Similar to the Wilson case, it was recently shown that staggered fermions experience an additive mass renormalization, where the renormalized mass can again be written as in Eq. (6)55. For the case of periodic boundary conditions, ref. 55 was able to compute the mass shift analytically finding

$${\text{MS}}_{t}=\frac{1}{8\sqrt{x}}.$$
(14)

For open boundary conditions, there is no analytical prediction, and we can measure the mass shift using the approach from ref. 29. Moreover, ref. 29 also demonstrated that the results for MS obtained for the staggered discretization using open boundary conditions agree with the theoretical prediction MSt for large lattice volumes. Thus, for large enough volumes Eq. (14) should still provide an approximation even for open boundary conditions. In our numerical computations later on, we will consider both options.

Analogously to the Wilson case, the particle number operator for the staggered fermions resembles the mass term of the Hamiltonian and is given by

$${P}_{S}=\frac{N}{2}+\mathop{\sum }\limits_{n=0}^{N-1}{(-1)}^{n}{\phi }_{n}^{\dagger }{\phi }_{n}$$
(15)

This expression is again equivalent the lattice version of the chiral condensate up to a constant shift, and has the same properties as for the Wilson case. Note that PS now contains an alternating sign factor, which is the result of the staggered discretization separating the spinor components to different lattice sites. Together with the electric field, this observable is again suitable to detect the first-order phase transition in the model.

As in the case of Wilson fermions, the gauge fields can be integrated using Gauss’s law resulting in Eq. (8), but now with the staggered charge. Performing the same steps as in the Wilson case, we can obtain a Hamiltonian directly restricted to the gauge invariant subspace where all notion of the gauge field is gone51

$$\begin{array}{ll}{H}_{S}\,=\,-\displaystyle\frac{i}{2a}\mathop{\sum }\limits_{n=0}^{N-2}\left({\phi }_{n}^{\dagger }{\phi }_{n+1}-\,\text{h.c}.\right)\\\qquad \,+\,{m}_{{\rm{lat}}}\mathop{\sum }\limits_{n=0}^{N-1}{(-1)}^{n}{\phi }_{n}^{\dagger }{\phi }_{n}+\displaystyle\frac{a{g}^{2}}{2}\mathop{\sum }\limits_{n=0}^{N-2}{\left({l}_{0}+\mathop{\sum }\limits_{k = 0}^{n}{Q}_{k}\right)}^{\!\!2}.\end{array}$$
(16)

Finally, this expression can again be translated to qubits by using the Jordan-Wigner transformation52 (for details, see the supplementary material44). Note that in the staggered case, each site is only populated by a single-component fermionic field. Thus, in contrast to the Wilson case, for N physical sites we obtain a system with N qubits and the dimensionless Hamiltonian reads51

$$\begin{array}{ll}{W}_{S}\,=\,\displaystyle\frac{x}{2}\mathop{\sum }\limits_{n=0}^{N-2}\left({X}_{n}{X}_{n+1}+{Y}_{n}{Y}_{n+1}\right)\\ \qquad\quad+\,\displaystyle\frac{{m}_{{\rm{lat}}}}{g}\sqrt{x}\mathop{\sum }\limits_{n=0}^{N-1}{(-1)}^{n}{Z}_{n}+\mathop{\sum }\limits_{n=0}^{N-2}{\left({l}_{0}+\mathop{\sum }\limits_{k = 0}^{n}{Q}_{k}\right)}^{2}\end{array}$$
(17)

where Xn, Yn, and Zn are the Pauli matrices acting on spin n as in the Wilson case. The staggered charge operator is given by Qn = (Zn + (−1)n)/2, from which we can infer that on even (odd) sites we have a positron (electron) present when the spin is up (down).

The observables for detecting the first-order phase transition can again be straightforwardly expressed in spin language. As opposed to Wilson fermions, in the staggered discretization, the charge configuration on the lattice exhibits a staggering effect, which leads to a non-uniform electric flux on the links, in particular for smaller lattices. Therefore, to suppress the boundary effects as well as the staggering effect while computing the electric field density, two adjacent links in the center of the system are averaged rather than just a single one for the case of Wilson fermions. The corresponding electric field operator including the background field is given by

$$\begin{array}{ll}{L}_{S}\,=\,{l}_{0}+\displaystyle\frac{1}{2}\left({L}_{N/2-2}+{L}_{N/2-1}\right)\\ \qquad =\,{l}_{0}+\displaystyle\frac{1}{2}\left(\mathop{\sum }\limits_{k=0}^{N/2-2}{Q}_{k}+\mathop{\sum }\limits_{k=0}^{N/2-1}{Q}_{k}\right)\\ \qquad =\,{l}_{0}+\displaystyle\frac{1}{4}+\displaystyle\displaystyle\frac{1}{2}\mathop{\sum }\limits_{k=0}^{N/2-2}{Z}_{k}+\frac{1}{4}{Z}_{N/2-1}.\end{array}$$
(18)

For the particle number we find

$${P}_{S}=\frac{N}{2}+\frac{1}{2}\mathop{\sum }\limits_{n=0}^{N-1}{(-1)}^{n}{Z}_{n}.$$
(19)

When there are no particles present, i.e. the state of the system is given by spin down on even sites and spin up on odd sites, the sum in the equation above contributes a − 1 for every site. In contrast, for even sites with spin up and on odd sites with spin down, the sum contributes a + 1. Hence, the first term in Eq. (19) is added to render PS positive semidefinite.

In summary, both staggered and Wilson fermions provide a viable discretization of the continuum Schwinger Hamiltonian. For a lattice system with N physical sites the Wilson discretization results in a Hamiltonian on 2N qubits, whereas the staggered approach only requires N qubits. While both formulations reproduce the correct continuum limit, as we demonstrate explicitly in Sec. “RESULTS”, it is a priori not clear which of the two discretizations converges faster. Although the staggered approach requires less qubits than the Wilson one, this does not imply it will produce better results given a fixed amount of resources. The latter question is particularly relevant for quantum computing, as current and near-term devices only offer a limited number of qubits that still suffer from a considerable level of noise. Here, we aim at testing both approaches in a realistic scenario to benchmark their performance. For the rest of the paper we will focus on the sector of vanishing total charge, ∑nQn = 0, for both approaches.

In order to assess both fermion discretizations, we study their performance with a VQE as well as their convergence towards the continuum limit. Here, we introduce the VQE setup we consider, including a description of the parametric ansatz circuits and the optimization procedure for the parameters we utilize. Moreover, we discuss the error mitigation techniques used for the inference runs on quantum hardware. Finally, we briefly describe the MPS techniques we use to explore the behavior of both discretizations towards the continuum limit.

Parametric ansatz circuits for VQE

In order to test the performance of the different discretizations for VQE, we focus on two different types of parametric ansätze and consider two different types of gates, as shown in Fig. 6. We refer to the two ansatz architectures as “brick” (c.f. Fig. 6c) and “ladder” (c.f. Fig. 6d). The two types of parametric gates we consider are the SO(4) gates and the RXX+YY gates, whose decomposition in standard controlled-NOT (CNOT) and Pauli rotation gates is shown in Fig. 6a, b. Here, we have chosen SO(4) instead of SU(4) gates, because the Hamiltonians we study are real, and hence their ground states are real. Thus, we can restrict our ansätze to the real subspace of the Hilbert space. While the SO(4) gates are in principle more expressive by having more free tunable parameters than the RXX+YY ones, they do not conserve the total charge as they can realize any two qubit orthogonal operation that can in general change the total charge. In contrast, using the algebra of Pauli operators, one can verify that the total charge operator commutes with RXX+YY. As a result, if we use SO(4) gates, we need to manually enforce vanishing total charge, which we do by adding a penalty term \(\lambda {\left(\mathop{\sum }\nolimits_{n = 0}^{N-1}{Q}_{n}\right)}^{2}\) to the Hamiltonians in Eqs. (10), (17). The Lagrange multiplier λ has to be chosen sufficiently large that one obtains a ground state with vanishing total charge. In contrast, the RXX+YY gate preserves the total charge, but is generally less expressive.

Fig. 6: Ansätze and gates tested with the VQE.
figure 6

Decomposition of a generic SO(4) gate depending on the six parameters θ1, …, θ6 (a) the \({R}_{XX+YY}(\theta )={R}_{{Z}_{0}}\exp (-i\theta (XX+YY)/2){R}_{{Z}_{0}}^{\dagger }\) (b), into CNOT and Pauli rotation gates. The \({R}_{{Z}_{0}}\) rotations in the definition of RXX+YY(θ) restrict the state to the real subspace. Boxes acting on a single qubit correspond to Pauli rotation gates, \({R}_{P}(\alpha )=\exp -i\alpha P/2\) with P {X, Y, Z}. Single-qubit gates where the argument is omitted refer to rotations around an angle π/2, RP(π/2). The light blue boxes represent the parameterized gates which are R(α, β, γ) = RX(γ)RZ(β)RX(α) in (a) and RY(θ) in (b). Panel (c) and (d) illustrate one layer of the brick and ladder ansatz, respectively, both following a non-parametric part for preparing the initial state \(\vert {\psi }_{in}\rangle\) (yellow box). The first layer in the brick ansatz has a CNOT-depth of 4 whereas in ladder it is 2n − 2, where n is the number of qubits, and in both cases it increases by 4 with each layer.

In all our simulations, we choose the initial parameters for the parametric part of this ansatz randomly in the interval [0, 0.001), such that the parametric part of the circuit is close to the identity and we start the VQE with a state close to \(\left\vert {\psi }_{in}\right\rangle\).

For Wilson fermions, three options for the ansatz’s non-parametric portion \(\left\vert {\psi }_{in}\right\rangle\) are tested, and the one producing the best fidelity in the VQE will be adopted. As explained in Sec. “METHODS” (Hamiltonian formulation in the continuum), for m/g 1 and θ < π, we expect the continuum Hamiltonian to be dominated by the mass term, and the ground state corresponds to a state with no particles present. The lattice analog of this state for the Wilson case is given by the product state \({\left((\left\vert 01\right\rangle -\left\vert 10\right\rangle )/\sqrt{2}\right)}^{\otimes N}\). As one can easily verify, this state contains no charges and should provide a good initial state for large masses before the onset of the first-order phase transition. For θ > π the continuum model predicts that a particle antiparticle pair is produced and a negative (positive) charge will form on the left (right) boundary of the system. On the lattice, this would correspond to the state \(\left\vert 11\right\rangle {\left((\left\vert 01\right\rangle -\left\vert 10\right\rangle )/\sqrt{2}\right)}^{\otimes (N-2)}\left\vert 00\right\rangle\) in spin formulation, which approximates the state expected after the phase transition. Finally, we also try a generic state with vanishing total charge given by \({\left\vert 10\right\rangle }^{\otimes N}\). In all cases, a simple linear mapping of the logical qubits \(\left\vert {\sigma }_{l}\right\rangle\) in the model Hamiltonian to the physical ones of the hardware \(\left\vert {q}_{l}\right\rangle\) is used.

For the staggered fermions, the state \({\left\vert 10\right\rangle }^{\otimes N/2}\) corresponds to the ground state at large values of m/g 1 in the sector of vanishing total charge and, thus, is a viable initial state \(\left\vert {\psi }_{in}\right\rangle\) for large masses and θ < π. For θ > π we expect similar to the Wilson case a pair of charges to form with the negative (positive) charge located on the left (right) boundary of the system. Due to the staggered formulation, negative (positive) charges can only reside on odd (even) sites, thus the pair will be located at sites 1 and N − 2, resulting in the state \(\left\vert 11\right\rangle {\left\vert 10\right\rangle }^{\otimes (N-2)/2}\left\vert 00\right\rangle\). This state can be easily created from \({\left\vert 10\right\rangle }^{\otimes N/2}\) by acting with an SO(4) or an RXX+YY gate between qubits 1 and N − 2. For the ansatz architectures shown in Fig. 6, there is no two-qubit gate directly acting on qubits 1 and N − 2. In order to provide such a connection between these qubits, we deviate from the usual linear mapping of the logical qubits in the model Hamiltonian to the physical ones of the hardware. In particular, we choose the mapping \(\vert {q}_{0}\rangle \otimes \vert {q}_{1}\rangle \otimes \ldots \otimes \vert {q}_{N-1}\rangle \equiv \vert {\sigma }_{(N-2)/2+1}\rangle \otimes \ldots \otimes \vert {\sigma }_{N-3}\rangle \otimes \vert {\sigma }_{N-1}\rangle \otimes \vert {\sigma }_{N-2}\rangle \otimes \vert {\sigma }_{1}\rangle \otimes \vert {\sigma }_{0}\rangle \otimes \vert {\sigma }_{2}\rangle \otimes \ldots \otimes \vert {\sigma }_{(N-2)/2}\rangle\), where \(\left\vert {q}_{k}\right\rangle\), qk {0, 1} are the basis states of the qubits k, and \(\left\vert {\sigma }_{l}\right\rangle\), σl {0, 1} represent the basis states of the logical qubit l in the Hamiltonian. Using the ansätze shown in Fig. 6 on the physical qubits, this provides a direct two-qubit gate between the logical qubits 1 and N − 2. Thus, for the staggered case with large masses, we use the initial state \({\vert 10\rangle }^{\otimes N/2}\) for the logical qubits and then proceed with the mapping discussed above. In the opposite regime, m/g 1, in which we expect the ground state to (partially) screen the electric field, we do not foresee that a deviation from the linear mapping is required. Thus in this parameter range, we choose \({\vert 10\rangle }^{\otimes N/2}\) as an initial state for the logical qubits and simply use the linear mapping as in the Wilson case.

In order to benchmark the ansätze for the different discretizations, we first simulate the VQE classically. We employ the L-BFGS-B optimizer56 with two distinct heuristic warm-start stages. In the first phase, we group all variational parameters in a layer and collectively optimize them using a VQE with 2000 iterations. This stage is based on the idea that for large enough system sizes the model should exhibit translation invariance. While translation invariance is broken in the presence of open boundary conditions, this will still provide a reasonable approximation. In the second phase, each parameter can be independently varied in a VQE. At this stage, we allow for an extremely large number of 100,000 iterations to assess the best possible performance of each ansatz. In practice, we typically observe convergence after only a few hundred iterations in most cases. Once an optimization with k ansatz layers is complete, to test the performance of k + 1 layers we apply the following. In the warm start phase with k ansatz layers we have found the optimal k parameters, one for each layer, as at this stage we group all the parameters of a given layer into one single parameter. These k optimal parameters are given as initial parameters for the first k layers when performing the warm start phase of the calculation with k + 1 layers.

To demonstrate that our VQE ansatz is also suited for current quantum devices, we take in a second step the parameters obtained from the classical simulations and perform inference runs on a quantum device. In particular, we prepare the corresponding states on IBM’s superconducting quantum hardware and measure the electric field density as well as the particle number. We explore a wide range of parameter regimes ranging from weak coupling, m/g 1, in which we expect the first-order phase transition to happen up to m/g 1, in which limit we do not expect any transition. In order to obtain the best possible hardware results, we utilize several error mitigation techniques, which we outline in the next section.

Error mitigation techniques

In order to mitigate various errors occurring on the quantum devices we use, we employ a composite mitigation strategy combining several techniques. The backbone of our composite approach is zero-noise extrapolation (ZNE)40,57. We use digital circuit folding, i.e. inserting pairs of unitaries UU in the circuit, which would result in an identity operation on an ideal quantum computer. For real quantum devices with noise, this effectively allows for running the same circuit at different (and larger) noise levels. Subsequently, the results can be extrapolated to zero noise with an appropriately chosen fitting function40. While ZNE allows for addressing incoherent errors, it cannot mitigate coherent errors.

To counter coherent errors, we employ Pauli twirling to two-qubit CNOT gates and to measurements, in order to transform their coherent quantum error channels into incoherent ones41,42,58. A two-qubit gate can be twirled by adding random single-qubit Pauli gates before and after it in a way that the action of the resulting operation is logically unchanged compared to the original one. Sequential single-qubit gates resulting from twirling overlapping CNOT gates can be merged to minimize the gate count in the circuit. Averaging the results over many random instances of twirled circuits turns coherent errors into incoherent ones. In our case, we use 10 twirls and average over their result for each noise factor in zero-noise extrapolation. Measurements can be twirled in a similar manner, except that a random single-qubit Pauli is inserted only before the measurement. The logical change of basis is then corrected in post-processing. Different instances of twirled circuits can be generated by sampling new single-qubit Pauli gates.

Lastly, dynamical decoupling is harnessed to tackle decoherence. During extended idling periods comparable to the decoherence time, crosstalk between neighboring qubits can cause decoherence. By leveraging externally controllable interactions, such as spin flip cycles, during these idle intervals, we can suppress this form of decoherence. Here, we use the XX sequence, or two X pulses placed uniformly in all idle times43.

Extrapolation to the continuum limit with Matrix Product States

In order to estimate the system sizes required to obtain a faithful continuum limit and to examine the behavior of both fermion discretizations towards that limit, we need to reach system sizes that cannot directly be simulated on a classical computer. To go beyond the limit of a few tens of qubits, we use MPS. MPS are an entanglement-based ansatz for quantum states16,59,60,61 that can efficiently represent ground states of local gapped Hamiltonians62. For a system of N sites with open boundary conditions, the MPS ansatz reads

$$\vert \psi \rangle =\sum _{{\sigma }_{0},..,{\sigma }_{N-1}}{A}_{0}^{{\sigma }_{0}}{A}_{1}^{{\sigma }_{1}}\ldots {A}_{N-1}^{{\sigma }_{N-1}}\vert {\sigma }_{0}\rangle \otimes \vert {\sigma }_{1}\rangle ...\otimes \vert {\sigma }_{N-1}\rangle ,$$
(20)

where \({\{\vert {\sigma }_{k}\rangle \}}_{k = 1}^{d}\) is a local basis for each site, and the \({A}_{k}^{{\sigma }_{k}}\) are complex D × D matrices for 0 < k < N − 1. The first (last) tensor \({A}_{0}^{{\sigma }_{0}}\) (\({A}_{N-1}^{{\sigma }_{N-1}}\)) is a D-dimensional row (column) vector. For a fixed combination of physical indices, the coefficient of the wave function is parameterized as a product of matrices, hence the name MPS. The size of the matrices D determines the amount of variational parameters that are present in the ansatz and limits the maximum entanglement in the state16,59,60,61.

The MPS approximation for the ground state of a given Hamiltonian can be found with standard variational algorithms. The tensors are updated iteratively one by one, while keeping all others fixed. The optimal tensor at each step is obtained by finding the ground state of an effective Hamiltonian that describes the interaction of the tensor with its environment. Repeating the procedure starting from one of the boundaries and sweeping back and forth until the relative change of the energy is below a certain tolerance, the resulting MPS represents an approximation for the ground state of the Hamiltonian.

MPS algorithms routinely deal with several hundreds of spins and allow us to check the system sizes that are required for obtaining a reliable continuum extrapolation for both fermion discretizations. In particular, we use systems with N {70, 80, 90, 100} physical sites and focus on the continuum limit at a dimensionless lattice volume \(N/\sqrt{x}=30\). In previous studies29 we have observed that this volume is large enough that it shares relevant features with the continuum model. These system sizes seem to be within reach on near-term quantum devices.

Discussion

In this work, we developed VQE ansätze for the lattice Schwinger model suitable for studying its phase structure on current and near-term quantum devices in the presence of a topological θ-term, a regime where conventional Monte Carlo methods suffer from the sign problem. Using two types of fermion discretizations, Wilson and staggered fermions, we demonstrated that for both approaches it is possible to find shallow parametric ansatz circuits that allow for obtaining high fidelities with the exact solution for a large range of system sizes, masses and θ-values. In particular, we demonstrated that we can observe the remnants of the expected phase structure of the first-order phase transition at θ = π occurring in the regime of large masses. Moreover, preparing the resulting wave function for up to 12 qubits on IBM’s quantum hardware, we showed that the characteristic observables revealing the phase structure, the electric field density and the particle number, can be measured precisely on quantum hardware when using state-of-the-art error mitigation techniques, notably zero noise extrapolation, Pauli twirling and dynamical decoupling. In general, our simulations on classical and quantum hardware suggest that both fermion discretizations do not show a large difference in performance for the entire parameter range we study. The ansatz that performed best for the staggered discretization in our studies is slightly simpler than the one for the Wilson fermions. Nevertheless, the results from quantum hardware after error mitigation showed a similar precision for both cases.

Furthermore, we used MPS simulations to estimate the resources for both fermion discretizations required to obtain the continuum limit. Our results show that the continuum values for the electric field density and the particle number can be reliably obtained with 100–200 qubits, which is within reach with current quantum hardware. In addition, we explicitly observe the same continuum limit for the electric field density and the particle number from both approaches. Comparing both discretizations, for the staggered fermions we observe reduced lattice artifacts towards the continuum limit, thus allowing us to obtain a continuum limit with the same precision at slightly larger lattice spacings compared to Wilson fermions. Moreover, for both cases we observe that taking the additive mass renormalization into account significantly improves the continuum extrapolation.

Given that for the staggered case our MPS simulations showed better convergence towards the continuum limit, and our ansatz circuit for the VQE is slightly simpler, this suggests that the staggered discretization might be easier to address on current and near-term quantum hardware. Combining our results with some of the techniques of ref. 20, it seems possible to reach larger lattice sizes on the order of 100 qubits, and for the future we plan to study the continuum extrapolation directly on quantum hardware. Moreover, it is an interesting question how both fermion discretizations perform in higher dimensions. While for the Schwinger model we integrated the gauge fields out, this is no longer possible for two and more spatial dimensions. This might change the performance of both discretizations and the complexity of a VQE ansatz required to reliably capture the ground state.