Ansatz optimization of the variational quantum eigensolver tested on the atomic Anderson model

We present a detailed analysis and optimization of the variational quantum algorithms required to find the ground state of a correlated electron model, using several types of variational ansatz. Specifically, we apply our approach to the atomic limit of the Anderson model, which is widely studied in condensed matter physics since it can simulate fundamental physical phenomena, ranging from magnetism to superconductivity. The method is developed by presenting efficient state preparation circuits that exhibit total spin, spin projection, particle number and time-reversal symmetries. These states contain the minimal number of variational parameters needed to fully span the appropriate symmetry subspace allowing to avoid irrelevant sectors of Hilbert space. Then, we show how to construct quantum circuits, providing explicit decomposition and gate count in terms of standard gate sets. We test these quantum algorithms looking at ideal quantum computer simulations as well as implementing quantum noisy simulations. We finally perform an accurate comparative analysis among the approaches implemented, highlighting their merits and shortcomings.


Introduction
Quantum computers are currently used to investigate several physical systems including materials science compounds [1][2][3] as well as generic condensed matter entities [4,5].Finding exact solutions to such problems numerically has a computational cost that scales exponentially with the size of the system, and the computational 'classical' methods are usually unsuitable [6,7].The fundamental goal in the above-mentioned problems is to calculate the ground-state energy of the corresponding many-body interacting fermionic Hamiltonians [8,9].Indeed, when this goal is achieved relevant information about the physical properties of the system under investigation may be inferred.
First of all, solving this problem on a quantum computer relies on a mapping between fermionic and qubit operators, which restates the problem as a specific instance of a local Hamiltonian problem on a set of qubits.Then, one must implement quantum optimizers, as variational quantum eigensolvers (VQE) [10].The VQE usually uses the Rayleigh-Ritz Approximation (better known as variational principle of quantum mechanics) to prepare approximations of the ground state and its energy.In this approach, the quantum computer is used to prepare variational trial states that depend on a set of parameters, and the expectation value of the energy is then estimated and used in a classical optimizer to generate a new set of improved parameters.
The advantage of a VQE procedure over classical simulation methods is that it can prepare trial states that are not amenable to efficient classical numerical approaches.However, the VQE approaches are limited by different factors, some of them being strictly related to the specific problem addressed.
Here, the efficiency of variational quantum algorithms in the determination of the ground-state energy is evaluated for a well-known model of interacting electrons, i.e. the Anderson model [11], which is of particular interest for several reasons: first, its theoretical properties are far from being fully understood [12]; second, it is believed to be relevant to physical phenomena ranging from the magnetism to superconductivity and orbital physics [13]; third, its specific structure and relatively simple form suggest that it may be easier to implement on a near-term quantum computer than, for example, model systems occurring in quantum chemistry [14].
We point out that preceding works on variational methods for solving other strongly correlated models, such as for instance the Heisenberg [15,16] and the Hubbard model [17,18], have left open a number of important questions which must be properly answered to understand whether it is a realistic target for near-term quantum computers [19,20].These questions concern the precise complexity of implementing the variational ansatz, the optimisation routines used to handle statistical and quantum noise in the quantum circuit and the complexity of the procedure required to produce the initial state [21].
We here address all these issues and develop detailed resource estimates and circuit optimizations, as well as extensive numerical experiments, to evaluate how well realistic near-term quantum computers are able to solve the Anderson model, formulated in the atomic limit.
Although this model is easily solvable directly by a classical algorithm, the quantum computation presented here will give insight into the likely performance of the specific VQE adopted in the calculation.Specifically, we will test and compare three different variational ansatz, namely the hardware efficient ansatz (HEA), the Hamiltonian variational ansatz (HVA) and symmetry preserving ansatz (SPA), for both ideal and noisy simulations.We remind that the ideal simulations are performed in an ideal environment to test the expressibility and trainability of the ansatz under investigation, as well as the statistical noise due to samplings on the circuits [22,23].On the other hand, in noisy simulations one assumes a noise model using calibration data from the real quantum device to investigate the impact of noise on the VQE outcomes [24,25].The goodness of the estimated ground-state energy and ground-state vector is evaluated by means of the state fidelity and compared with the available exact analytical results.
The paper is organized as follows: in the next section we introduce the model Hamiltonian together with its spin encoding obtained by means of the well-known Jordan-Wigner transformation and we present the ansatz circuits for the above mentioned variational ansatz; in section 3 we present the numerical results of the ideal and noisy simulations, and we also review a test between these ansatz comparing the results of various numerical computations with the known exact outcomes; finally, section 4 is devoted to the remarks and conclusions.

The variational quantum eigensolver
The VQE algorithm [10] uses the variational principle to estimate the ground-state energy of a physical system.The algorithm can be summarized in the following steps: • on a quantum computer a trial state |ψ(θ k )⟩, where the θ k are parameters to be determined numerically, is prepared; • on a classical computer, an optimization routine is used to minimize E(θ k ) and obtain a new set of parameters θ k+1 ; • the previous steps are iterated until the estimated energy converges to a value that approximates the exact ground-state energy of the system with enough accuracy.
There is a certain number of choices that can be made in order to implement the VQE algorithm correctly.In particular, we will focus on the encoding used to map the fermionic modes in qubits, on the construction of different variational ansatz and on the classical optimizer used to estimate the ground-state energy.
To analyze and test how different variational ansatz work, we refer to a well-known strongly correlated electron model, namely the Anderson model, which is here investigated in the atomic limit.

Hamiltonian encoding
The single-site Anderson Hamiltonian is given in standard second-quantization notation by where (00 000 00 000 100 000) (00 000 00 000 010 000) (00 000 00 000 001 000) (00 000 00 000 000 100) (00 000 00 000 000 010) (00 000 00 000 000 001) The operators fσ and ĉσ describe correlated and uncorrelated electrons with spin σ, respectively.The model allows different fillings, ranging from N = 0 to N = 4, N being the total number of particles.However, since the most interesting physical case is that of half-filling, we focus our attention on the subspace with N = 2. Since the qubit is a spin-1/2 object, to run the VQE routine for the Hamiltonian (2.1) on a quantum hardware we need to encode fermionic operators into spin operators.To this purpose, we use the well known Jordan-Wigner transformation [26] ĉ † j = In order to use this encoding, we also need to choose an appropriate ordering for the system spin-orbitals, i.e. we need to define the generic state vector of the system.The most useful representation is given by since the corresponding Pauli strings in the Hamiltonian have the lowest Pauli weights, thus lowering the total number of gates required.To manage the results generated by the quantum device, in table 1 we report the mapping between fermionic Fock space state vectors and the corresponding computational basis state vectors.

Ansatz circuits
An efficient use of the VQE algorithm requires the construction of a suitable variational ansatz trial wavefunction.
The ansatz circuit can be generally constructed as a sequence of parametrized unitary operators Û(θ) acting on the quantum computer initial state |ψ 0 ⟩: where θ = {θ 1 , . . ., θ L } is the set of parameters to be optimized.
In this work we employ three different variational ansatz: the HEA [27], the HVA [28], and the SPA [29].They are briefly described in the following.HEA is a problem-agnostic trial state.The corresponding circuit can be constructed as alternate layers of single-qubit rotation gates Û(θ q,l ) and two-qubit entangling gates Ûent applied to the qubit ground state |ψ 0 ⟩ = |0 . . .00⟩ = |0⟩ ⊗N (in general |ψ 0 ⟩ is a randomly chosen state vector).The trial state takes the form For our purposes we chose rotations around the y axis, i.e.Û(θ q,l ) = R y (θ), as single qubit gates and CNOT gates as two qubit entangling gates.The entanglers are applied to qubit pairs (q i , q i+1 ) for i ∈ {1, 2, . . ., N − 1}.A single layer of the HEA circuit for our model is represented in figure 1.
HVA is a problem-inspired ansatz based on the Quantum Approximation Optimization Algorithm and the adiabatic evolution of a quantum state.To implement such ansatz we rewrite the Hamiltonian as a sum of operators where the various Ĥα in general do not commute with each other, [ Ĥα , Ĥα ′ ] ̸ = 0. Then the ansatz circuit is given by where |ψ 0 ⟩ is the ground state of one of the Ĥα in equation (2.10), except for the first term acting on it.If the system exhibits symmetries, then both |ψ(θ)⟩ and |ψ 0 ⟩ will transform in the same way under those symmetries.As a consequence, a proper choice of |ψ 0 ⟩ allows one to choose the correct quantum numbers for the state of the complete system.Moreover, to construct a circuit able to achieve high accuracy on the evaluation of the ground-state energy, we used the second-order Trotter-Suzuki decomposition [30], so that a single layer of the HVA is given by the trial state |ψ (θ)⟩ = e iθ 7,L ĤCoul e iθ 6,L Ĥc e iθ 5,L Ĥf e iθ 4,L Ĥhyb e iθ 3,L Ĥf e iθ 2,L Ĥc e iθ 1,L ĤCoul |ψ 0 ⟩ , (2.12) where the initial state |ψ 0 ⟩ is the ground state of H hyb .A single layer of the HVA circuit for our model, at the first order of Suzuki-Trotter approximation is depicted in figure 2.
SPA is a problem-inspired ansatz which is constructed using a two-qubit unitary gate given by  with θ, ϕ being variational parameters.The above gate only mixes 1-particle states, thus leaving unchanged the total number of occupied states in the system wavefunction.Furthermore, setting ϕ = 0 allows to select only real wavefunctions, thus imposing time-reversal symmetry.The initial state of the computer is usually chosen to be the vacuum state |0⟩ ⊗N .To construct a general SPA circuit, we first bring the circuit initial state in the correct subspace with fixed number of particles by applying the X gate to m non-adjacent qubits (m is the chosen number of particles); then, a layer of A(θ, ϕ) gates is applied to pairs of adjacent qubits in different states (touched and untouched by the X gate); subsequently, other layers of A(θ, ϕ) gates are sequentially applied to pairs of qubits, each pair consisting of a qubit exiting a A(θ, ϕ) gate and a qubit untouched by A(θ, ϕ) at the previous step.This process is repeated until ) gates are applied, where N is the total number of spin-orbitals of the system.For our problem, we bring the system to the subspace with m = 2 particles by applying X gates to two non-adjacent wires.Then, since the maximum value of N is 4, we construct the ansatz circuit using A(θ, ϕ) gates.Moreover, since the system exhibits time-reversal symmetry, we fix the variational parameter ϕ = 0 for each gate.A single layer of the SPA circuit for our model is represented in figure 3.

Numerical results
The free microscopic parameters for the problem are U, V, ϵ c , ϵ f .The hybridization coupling V is usually smaller than the on-site Coulomb strength U, so that we choose V ∈ (0, 1] and U ∈ {1, 3, 5}.The localized electron energy is set to the constant value ϵ f = −1, having fixed to zero the uncorrelated electron one (ϵ c = 0).Since we have verified that for values of V and U in the ranges considered above the results yield no qualitative variation, in what follows all the plots refer to the intermediate coupling case with V = 0.5 and U = 3.For all simulations we set the number of shots to s = 20 000 and the initial values of the variational parameters to θ i = π/2 for all i.Concerning this latter choice, we have conducted several optimization runs starting with different initial parameters to explore the performance of the algorithm under a certain ansatz.In this numerical exploration, we found that the algorithm performs better when all initial parameters are set to π/2, compared to other initial parameter settings.
As classical optimization routine, we employ the widely used Simultaneous Perturbation Stochastic Approximation [31], which is particularly useful for evaluating noisy cost functions [32].Finally, depending on the ansatz used, we choose different values of the number of layers L and the number of cost function evaluations through the classical optimizer.The numerical procedure is based on the estimation of the ground-state energy value with the number of iterations, during multiple optimization runs.Once convergence is reached, we evaluate the goodness of the estimated ground state with respect to the exact one by means of the state fidelity, defined as Here we have supposed that both ρ = |ψ ρ ⟩⟨ψ ρ | and σ = |ψ σ ⟩⟨ψ σ | are pure states [33].For our case the fidelity has the form where θ f are the variational parameters obtained at the end of the optimization process.Usually, fidelity values F ⩾ 0.99 mean that the exact ground state is achieved.Numerical analysis is done using the IBM-Qiskit library for Python, which allows to create quantum circuits and execute experiments both on classical simulators and real quantum devices [34,35].Furthermore, two kinds of simulations are performed: ideal and noisy simulations.In the first case, the ground-state energy estimation is carried out sampling the ansatz circuit s times.The gate operations are performed in an ideal environment, i.e. in the absence of quantum noise.These simulations are made to test the expressibility and trainability of the ansatz, as well as the statistical noise due to samplings on the circuits.When noisy simulations are considered, one introduces a noise model using the most recent calibration data from the real quantum device we want to simulate.These simulations are used to investigate the impact of noise on the VQE's outcomes.

Ideal simulations
Here, we analyze the results obtained using different ansatz circuits in ideal environment.In particular, we investigate (i) the accuracy of the VQE results with respect to the exact ground-state energies, (ii) the number of iterations required to achieve convergence as a function of the number of layers L, and (iii) the ability of the ansatz to approximate the exact ground state of the system through fidelity measurements.

HEA
Due to the heuristic nature of the ansatz circuit, the HEA procedure spans more basis state vectors than the other ansatz, although not the whole Hilbert space [36].As a consequence, in our case practically every basis state contributes to the output state of the algorithm |ψ(θ f )⟩, as one can see from figure 4(a).We found that for the values of U and V used in the simulations, the HEA circuit can reach relative errors on the ground-state energy lower than E r ≈ 12% with L = 1.The convergence is reached after I ≈ 280 iterations in the worst case, thus the algorithm is computationally expensive even if there are few variational parameters that need to be optimized.Moreover, the output state of the algorithm has a poor fidelity, thus it does not approximate well the exact ground state of the system.
Raising the ansatz circuit layers to L = 2 we found a better relative error on the ground-state energy, E r ≈ 2%.The convergence is reached after I ≈ 150 iterations, a significantly lower value compared to the L = 1 case.The output state fidelity is also improved, even if the values reached are not significantly high to well represent the exact ground state of the system.The situation radically changes for L ⩾ 3: in that case the energy estimated with VQE converges to a much higher value than the exact one since the algorithm cannot find the global minimum of the cost function.Convergence comparison between different HEA layers is shown in figure 4(b).Here and in the following figures, the blue horizontal dashed line denotes the exact ground-state energy of the model as evaluated analytically.

HVA
HVA is able to search the energy minimum in a subspace of the total Hilbert space, provided that an appropriate initial state for the computation, with desired quantum numbers, is selected.Choosing the ground state |ψ 0 ⟩ of the hybridization term H Hyb as the initial state of computation, we find that only the basis vectors |1001⟩, |0101⟩, |1010⟩, |0110⟩ contribute to the output state of the algorithm figure 5(a).For all the values of U and V considered in the simulations, HVA reaches low relative errors on the ground-state energy, i.e. of the order of E r ≈ 1.3% with L = 1.The iterations needed to achieve convergence are I ≈ 60 on average.Finally, the output state fidelity is, on average, F ⩾ 0.98.We can add more circuit layers in an attempt to increase the accuracy of the energy estimation; however, going from L = 1 to L = 2 we found no significant increase in the accuracy of the result, as shown in figure 5(b).In addition, the number of iterations required to achieve convergence is almost unchanged compared to the L = 1 case.In the L = 3 case, however, we can see that the convergence to the minimum is not represented by a monotonic decreasing curve as in the previous cases.Here the minimization path presents heavy oscillations while reaching the energy, minimum which may indicate the occurrence of overfitting [37]: due to the increasing number of variational parameters in the ansatz circuit, even a slight adjustment of a single parameter towards its optimum value, if not accompanied by an analogous adjustment of all the others, can heavily increase the value of the cost function, breaking its decreasing behavior.In general, this kind of instability usually arises when we have an ansatz circuit with high expressibility, that is, when we have a large number of variational parameters to be optimized.

SPA
As HVA, SPA is able to search the global minimum of the cost function in a subspace with fixed particle number.In our case the subspace has N = 2 particles, so that the only possible quantum states are the basis vectors |0011⟩, |0101⟩, |0110⟩, |1001⟩, |1010⟩, |1100⟩ figure 6(a).For the values of U and V used here, SPA reaches a good approximation on the ground-state energy, with relative errors E r ≈ 1.5%.The optimizer iterations required to have convergence are I ≈ 85 on average, reaching the value I ≈ 90 in the worst case.The value of the fidelity indicates that the output state is able to approximate well the exact ground state only in some cases, and in general it is not sufficiently high.
Raising the number of layers from L = 1 to L = 2, as in the HVA case, does not improve the algorithm result.The number of iterations required to have convergence is I ≈ 65 on average, lower than the one required with only one circuit layer.Moreover, the output state fidelity increases, approaching for most cases the threshold value F ≈ 0.99, thus representing well the exact ground state of the system.A further layer increase from L = 2 to L = 3 does not improve any features of the VQE routine.Convergence comparison between different SPA layers are shown in figure 6(b).

Ansatz comparison in ideal environment
We can now compare the performances of the three ansatz circuits used in the simulations.We start analyzing the performances with a single ansatz layer L = 1 figure 7(a).HEA gives poor approximations for the ground-state energy E gs , while HVA and SPA reach similar levels of approximation.Moreover, the number of iterations required to have convergence is significantly smaller for the problem-inspired ansatz than the heuristic one.This trend is also reflected on the fidelity of the output ground state.Though the fidelity is high both for HVA and SPA, only the HVA reaches almost always fidelity values F ⩾ 0.99, thus approximating well the exact ground state of the system, as plotted in figure 7(d).
As far as the case with L = 2 is concerned figure 7(b), we see that due to the increased number of layers, HEA can now reach energy estimations which are comparable with the values obtained with the other two ansatz circuits.Note also that the iterations needed for the convergence are now comparable to those required by the other ansatz.SPA requires more iterations compared to the case with L = 1, while the iterations required by HVA are almost unchanged.Finally, the output state fidelity increases for all the ansatz circuits but it is high enough only for HVA.Further increasing the layer number to L = 3 figure 7(c) there are no significant changes in the energy estimation for the HVA and SPA compared to the case with L = 1.However, HEA has a completely different behavior compared to the previous cases, giving an energy estimate that converges to a value far from the exact one, reversing the trend of improving the estimation as L grows: this circuit is unable to reach the true minimum of the cost function.In table 2 we report the average fidelity values achieved during the optimization run and the corresponding average number of iterations required.It is clear from this table that the physically motivated HVA and SPA ansatz achieve the best performances for the algorithm, both in finding the optimal ground-state approximation and in providing a better approximation for the ground-state energy.

Noisy simulations
For the noisy simulations we used Qiskit 'Aer' simulator with calibration data from the IBM superconducting quantum computer 'Osaka' [38].The main sources of noise for this device are CNOT gates and State Preparation And Measurement (SPAM) errors.In the first case, the total error rate for two-qubit operations is of the order ϵ CNOT ∼ 10 −3 and inevitably affects the algorithm result.In order to have a better algorithm performance, it is essential to keep the CNOT gates number as low as possible.The largest source of noise is represented by SPAM errors, whose error rate is of the order ϵ SPAM ∼ 10 −2 .These errors can significantly affect the algorithm result as the number of shots on the ansatz circuit increases.Other minor error sources are single-qubit gates error rates and small decoherence times.
A major problem is the need to rewrite the circuit in terms of the native set of gates of the quantum device.This process, called transpilation, could lead to an increase in the number of single-qubit gates needed to implement a circuit, thus producing one with greater circuit depth [39].Another problem is the limited qubit connectivity on the hardware: this can lead to CNOT implementation issues since the qubits need to be physically connected in order to perform a controlled operation on them.SWAP gates are then required to swap the quantum state of different qubits, therefore leading to an increase in the total number of CNOT gates required (a SWAP operation demands 3 CNOT gates).Avoiding previous errors is difficult with current technologies; nevertheless it is possible to minimize their impact using some precautions.Qiskit transpiler allows to optimize the ansatz circuits connections on the device topology, in an effort to lower the number of SWAP gates required.This process also eliminates unnecessary gates, thus lowering the overall circuit depth.Comparison between the probabilities of finding a computational basis state of the states which achieve the best estimation of the ground-state energy vs the exact one; this approach is chosen because the F is practically always the same in every simulation.
Since the main source of error are the CNOT gates, our main focus is the number of such gates after the circuit transpilation and optimization.The number of the hardware native gates required for each ansatz circuit, for a single circuit layer before and after the transpilation process, is reported in table 3.

HEA
After the transpiling process, HEA has 3 CNOT gates, that is, the same number of the ideal circuit.Due to the little number of controlled gates, we expect that the major impact of noise is caused by readout errors.We found that for the values of U and V used in the simulations, HEA can reach approximations on the ground-state energies with a relative errors E r ≈ 20% and a number of iterations required to reach the convergence almost unchanged with respect the ideal case.As in the ideal case the output state fidelity is low, thus HEA cannot represent the exact ground state with enough accuracy (See figure 8(a)).Changing the  circuit layer from L = 1 to L = 2 the number of controlled gates doubles but the noise is still low enough to get a net result improvement.The energy estimation is more accurate with relative error E r ≈ 11%.In addition to the increase of noise due to the higher number of CNOT gates occurring, if we raise the circuit layers to L = 3, as in the ideal case, the ansatz circuit converges to an energy value well above the exact one.Comparison between convergence rates and energy estimation for different circuit layers are given in figure 8(b).

HVA
After the transpiling process, HVA circuit has 14 CNOT gates, thus we expect high noise impact on the energy estimation.The results obtained for different choices of the parameters are generally quite far from the exact results, with relative error E r ≈ 17% and with a number of optimization steps close to the ideal case one.The output state fidelity is high, hence HVA can represent the exact ground state with high accuracy.Notice that, unlike the ideal case, in the presence of noise a measurement on the optimal ground state returned by the algorithm can give any state of the computational basis, as depicted in figure 9(a).If we change the circuit layers to L = 2, the number of controlled gates doubles; as a result, the corresponding noise is so high that there is no improvement in the accuracy of the results: the energy estimation worsens and the relative error obtained is E r ≈ 20%.A similar behavior can be found for the circuit with L = 3 layers.As in the ideal case, again we observe severe oscillations during the minimization due to the overfitting.A comparison between convergence rates and energy estimations for different circuit layers is given in figure 9(b).

SPA
Among the selected ansatz, SPA has the highest number of CNOT gates after the transpiling process, reaching 18.We hence expect a high impact of noise on the algorithm results.For the values of U and V used in the simulations, the mean relative error is E r ≈ 25%, with a number of iterations equal to the ideal case.The output state fidelity is high enough to correctly approximate the exact ground state of the system.As for HVA, the presence of noise does not allow to search the energy minimum remaining in the subspace with fixed number of particles, rather it returns an optimal ground state in which all the computational basis states contribute (see figure 10(a)).Let us now consider the case with L = 2. Since the number of CNOT gates doubles, we expect a significant impact of noise on the algorithm and consequently a net worsening on the energy estimation.The results obtained indeed have a large relative error E r ≈ 37%.Comparison between convergence rates and energy estimation for different circuit layers are given in figure 10(b).

Ansatz comparison in noisy environment
Let us now compare the ansatz performances in a noisy environment.Since the noisy simulations are closest to represent the algorithm execution on a real device, the best performing ansatz is the preferable one to use on a real quantum computer, in absence of error mitigation protocols.We found an overturned situation as compared to the ideal case.For L = 1 (see figure 11(a)), HEA allows to obtain a better approximation on the ground-state energy, albeit with large energy error and a high number of iterations needed to reach convergence.On the other hand, HVA and SPA rapidly converge to energy values which however turn out to be much less accurate than the HEA one.The previous trend was observed for all values of U and V used in these simulations.Considering the output state fidelity, once again the HVA reaches the highest values (figure 11(d)).When the number of circuit layers is changed to L = 2 (figure 11(b)), due to the low number of controlled gates only HEA can be trained efficiently in such a way to improve the ground-state energy estimation.This result is also reached with a number of iterations lower than the L = 1 instance.For the problem-inspired ansatz the situation is different: the number of CNOT gates becomes too high to get an improvement on the ground-state energy evaluation and eventually the estimation results in less accurate values with respect the single layer case.In table 4 we report the average fidelity values achieved during the optimization runs and the corresponding average number of iterations required.From the table we can see that, for all the ansatz circuits examined, the action of noise prevents the algorithm from finding a good approximation for the ground state and its energy.However, it is worth noting how the highest value for the fidelity is counterintuitively achieved by the HEA circuit for L = 2.This is due to the noise effects, which reduce the advantages provided by the two physically motivated ansatz, and to a good combination of expressibility and the number of gates required by that particular ansatz, given that depth.

Conclusions and remarks
We have carried out a detailed study of some variational quantum algorithms for finding the ground state of the atomic Anderson model.We investigate this model since it is an important benchmark system within strongly correlated models, allowing a physical application to transition metal compounds.Moreover, its structure ensures a rather easier implementation of VQE than for typical electronic structure Hamiltonians.Specifically, we have compared three VQE ansatz, i.e.HEA, HVA and SPA, both in ideal simulations as well as considering noisy environments.We have been able to perform an accurate comparative analysis among the approaches implemented, highlighting their merits and shortcomings.This comparison has been made looking at the convergence rate, the relative error and the fidelity of the ground state.
We have found that when the ideal situation is considered, HEA gives poor approximations for the ground-state energy, whereas HVA and SPA give almost similar levels of approximation; this behaviour is also found for the fidelity of the output ground state.Referring to the number of iterations required to get convergence, we find that it is smaller for the problem-inspired ansatz than the heuristic one.
Looking at noisy simulations, we find that HEA allows to obtain a better approximation on the ground-state energy, albeit it exhibits a large energy error with a higher number of iterations to reach convergence.On the contrary, HVA and SPA rapidly converge to the ground-state energy value, even though the result is less accurate than the HEA one.We stress that these outcomes are very relevant in view of the execution on a real device, suggesting the best performing ansatz to use in order to optimize the results as well as the process time.
Starting from the results presented here, an important direction for future work is to carry out a similarly detailed analysis of the complexity of VQE for other practically relevant electronic models.We refer for instance to models suitable to approach transition metal oxides that definitely require a multi-orbital model Hamiltonian.Furthermore, determining the best choice for classical optimizer remains an important challenge.It is plausible that the optimizers used here could be combined or modified to improve their performance, as well as other methods that include adaptive optimization algorithms.We refer, for instance, to the application of the Bayesian optimization as minimization procedure, often used in machine learning, as well as to the implementation of post-processing error mitigation [36,40].
Finally, we point out that what we have shown numerically on small lattice sizes suggests the possibility to correctly analyze larger lattices on a near-term quantum hardware, hinting that optimizing over quantum circuits, with a reasonable gate depth, could be enough to solve instances of the Anderson model beyond the capacity of classical exact diagonalization.

Figure 1 .
Figure 1.Single-layer HEA circuit for the single-site Anderson model, repeated L times in the numerical iterative procedure.The single qubit rotation gates are operators of the form Ry(θ) = e i Ŷθ/2 .

Figure 2 .
Figure 2.Single-layer HVA circuit with second-order Suzuki-Trotter approximation, repeated L times in the numerical iterative procedure.The initial state |ψ0⟩ is chosen as the ground state of Ĥhyb in order to fix the total particles number and the total z-component of the electron spin.

Figure 3 .
Figure3.Single-layer SPA circuit, repeated L times in the numerical iterative procedure.The X gates bring the initial state in the correct subspace with fixed total particle number.

Figure 4 .
Figure 4. (a) Comparison between the probabilities of finding a computational basis state after performing a measurement for the exact ground state and the optimal estimated ground state.(b) Convergence curves for different layers of the HEA in ideal environment.

Figure 5 .
Figure 5. (a) Comparison between the probabilities of finding a computational basis state after performing a measurement for the exact ground state and the optimal estimated ground state.(a) Convergence curves for different layers of the HVA in ideal environment.

Figure 6 .
Figure 6.(a) Comparison between the probabilities of finding a computational basis state after performing a measurement for the exact ground state and the optimal estimated ground state.(b) Convergence curves for different layers of the SPA in ideal environment.

Figure 7 .
Figure 7. Convergence plot comparison between the selected ansatz circuits in ideal environment, for (a) L = 1, (b) L = 2, (c) L = 3. (d)Comparison between the probabilities of finding a computational basis state of the states which achieve the best estimation of the ground-state energy vs the exact one; this approach is chosen because the F is practically always the same in every simulation.

Figure 8 .
Figure 8.(a) Comparison between the probabilities of finding a computational basis state after performing a measurement for the exact ground state and the optimal estimated ground state.(b) Convergence curves for different layers of the HEA in noisy environment.

Figure 9 .
Figure 9. (a) Comparison between the probabilities of finding a computational basis state after performing a measurement for the exact ground state and the optimal estimated ground state.(b) Convergence curves for different layers of HVA in noisy environment.

Figure 10 .
Figure 10.(a) Comparison between the probabilities of finding a computational basis state after performing a measurement for the exact ground state and the optimal estimated ground state.(b) Convergence curves for different layers of the SPA in noisy environment.

Figure 11 .
Figure 11.Convergence plot comparison between the selected ansatz circuits in noisy environment, for (a) L = 1,(b) L = 2,(c) L = 3.(d) Comparison between the probabilities of finding a computational basis state after performing measurements on the optimal estimated ground states and the exact one, in presence of noise.

Table 1 .
Fermion-to-qubit mapping for the single site Anderson model with generic state vector of the form |c ↑ f ↑ f ↓ c ↓ ⟩.

Table 2 .
Comparison of the average fidelity and the number of iterations of the different ansatz in ideal environment.

Table 3 .
Gates required to implement a single layer of the chosen ansatz circuits before and after the transpilation process on the 'IBM Osaka' quantum hardware.

Table 4 .
Comparison of the average fidelity and the number of iterations for the different ansatz in noisy environment.