- Original article
- Open Access
- Published:

# Numerical simulations of noisy quantum circuits for computational chemistry

*Materials Theory*
**volume 6**, Article number: 18 (2022)

## Abstract

The opportunities afforded by near-term quantum computers to calculate the ground-state properties of small molecules depend on the structure of the computational ansatz as well as the errors induced by device noise. Here we investigate the behavior of these noisy quantum circuits using numerical simulations to estimate the accuracy and fidelity of the prepared quantum states relative to the ground truth obtained by conventional means. We implement several different types of ansatz circuits derived from unitary coupled cluster theory for the purposes of estimating the ground-state energy of sodium hydride using the variational quantum eigensolver algorithm. We show how relative error in the energy and the fidelity scale with the levels of gate-based noise, the internuclear configuration, the ansatz circuit depth, and the parameter optimization methods.

## Introduction

Computation is a staple of predicting the behaviors and properties of new chemicals and materials, and leading computational methods must take advantage of state-of-the-art computers to address the most challenging calculations. The advent of quantum computers has motivated the development and testing of new methods for solving familiar problems by using quantum mechanics itself to perform the computation (Whitfield et al. 2011; McArdle et al. 2020; Cao et al. 2019; Bauer et al. 2020). Current quantum computing methods range from fault-tolerant quantum error corrected algorithms that support arbitrarily long calculations to noisy intermediate-scale quantum (NISQ) algorithms that adapt to the error-prone devices available today (Preskill 2018). We shall focus on the latter setting but we note the underlying quantum mechanical model affords novel opportunities to simulate the structure and dynamics of chemical systems within both regimes.

Among several approaches to NISQ algorithms, the family of variational methods have emerged in recent years as especially promising for testing the behavior of noisy quantum devices. Typified by the variational quantum eigensolver (VQE) (McClean et al. 2016), these algorithms use tunable quantum circuits to prepare approximations to the quantum mechanical states of a model Hamiltoninan (O’Malley et al. 2016). The familiar variational principle offers a promise that the parameters, which minimize the observed energy also prepare the best approximation to the Hamiltonian ground state, while modifications of this approach may be used to approximate higher energy eigenstates, i.e., excited states (Claudino et al. 2021).

Multiple experimental investigations have tested the principles of VQE for recovering the electronic states of small molecular Hamiltonians (Kandala et al. 2017; McCaskey et al. 2019; Sokolov et al. 2020a; Yeter-Aydeniz et al. 2021; Arute et al. 2020). Those results indicate that the choice of the parameterized quantum circuit, i.e., the ansatz, plays a significant role in the accuracy of the estimated energy as well as the complexity of finding the optimal parameters. In particular, development of an expressive and efficient ansatz is essential to temper the influence of noise and errors that arise during experimental implementation (Grimsley et al. 2019; Bauman et al. 2019; Xia and Kais 2020; Metcalf et al. 2020; Mizukami et al. 2020; Elfving et al. 2021; Tkachenko et al. 2021). Many different techniques, including symmetry, constraints, and iterative approximations, have been used to further the construction of efficient ansatz circuits (Grimsley et al. 2019; Gard et al. 2020; Tang et al. 2021).

Despite the continuing improvement of such experimental demonstrations, there is an outstanding question as to how the fidelity of the prepared quantum state compares to the idealized pure state representation of the sought electronic ground state. All demonstrations to date are well within the range of conventional computation yet the leading observable for comparison is the energy estimate and not the state. By construction, the applied ansatz circuit has a best approximation to the true ground state of the given Hamiltonian operator, but the accuracy with which this state is found is not the leading metric for experimental validation. This is due primarily to the complexity of estimating the prepared state, which requires tomographic techniques for reconstructing the quantum state (Sagastizabal et al. 2019; Smart and Mazziotti 2020).

Previously, Claudino et al. investigated the fidelity of several variational methods in approximating the ground state of few-electron molecular models (Claudino et al. 2020). Those results show that VQE methods with sophisticated ansatz circuits could approximate the ground electronic state with very high fidelity in the absence of circuit noise, depending on the ansatz and method of parameter selection. However, implementations on NISQ devices are prone to noise that leads to errors in state preparation, and there is an outstanding need to assess how noise influences circuit accuracy. The effects of noise and errors invalidate the pure-state representation used to motivate VQE methods and lead to significant sources of uncertainty in the prepared state.

Here we examine the accuracy and precision of the ansatz in several VQE methods by using numerical simulations of the noisy quantum circuits. This includes the nominal form of VQE with one- and two-parameter ansatz circuits derived from unitary coupled cluster (UCC) theory as well as the more sophisticated ADAPT-VQE. In both instances, the ansatz is inspired by how coupled cluster theory approximates the ground state based on a basis of singly and doubly excited determinants (UCCSD) as well as a basis of singlet-adapted configurations (singlet-adapted UCCSD). We investigate variations in parameter optimization due to noisy gate operations, testing the COBYLA (Powell 1998) (derivative-free) and BFGS (Nocedal 1980; Liu and Nocedal 1989) (gradient-based) optimizers, and in all cases we consider the influence of gate noise on the estimated energy and prepared state fidelity. As a test case, we simulate VQE calculations of the expected ground state and energy for sodium hydride (NaH) and we compare with conventional electronic structure calculations.

The remainder of the presentation is organized as follows: in “Variational quantum eigensolver methods” section, we present the background on the theory for the VQE methods and ansatz circuits; in “Numerical methods” section we present the methods we use to conduct the noisy and noiseless numerical simulations; in “Results” section, we present results from numerical simulations of the noisy ansatz circuits and we make comparisons with conventional solutions in terms of energy and state fidelity; and in “Conclusions” section, we discuss conclusions from our analysis.

## Variational quantum eigensolver methods

Within the context of computational chemistry, the non-relativistic, time-independent molecular Hamiltonian is

with *R*_{i} the coordinate of the *i*-th nuclei of mass *M*_{i} and charge *Z*_{i} and with *r*_{i} the coordinate of the *i*-th electron with mass *m*_{e}=1 and charge *e*=1. Under the Born-Openheimer approximation, the molecular Hamiltonian is decomposed into an electronic Hamiltonian and nuclear Hamiltonian. By adopting a spin-orbital basis {*φ*_{p}:*p*=1,…,*N*} for the electronic degrees of freedom, the second-quantized form of the electronic Hamiltonian is expressed as

where the one-electron integrals

and two-electron integrals

are taken with respect to the variable *σ* denoting both spin and position and depend on the nuclear coordinates *R*. The associated fermionic creation and annihilation operators satisfy the anti-commutation relations

The fermionic representation of the Hamiltonian in (2) may be transformed into a qubit representation using the usual Pauli operators

which satisfy [*X*,*Y*]=−2*i**Z*. Several transformations into the qubit representation are known to satisfy the necessary fermionic commutation relations, and we employ the Jordan-Wigner transformation defined as

in terms of the qubit raising and lower operations \(\sigma ^{\pm }_{p} = (X_{p}\pm {iY}_{p})/\sqrt {2}\). The implementation of this transformation requires *n*≥*N* qubits, and the resulting representation of the fermionic Hamiltonian is

where *P*_{j} denotes the *j*-th string of Pauli operators over *n* qubits and *c*_{j}(*R*) is the corresponding coefficient. The maximum number of terms in (8) is 4^{n} but, in practice, symmetries within the Hamiltonian significantly reduce the number of terms that have non-zero coefficients (Romero et al. 2018).

The variational quantum eigensolver (VQE) method estimates the minimal expectation value of a Hermitian operator with respect to a variable quantum circuit. The method relies on the variational principle, which states that only the lowest eigenstate of a non-negative operator can minimize the expectation value. Here, we use the qubit representation of the electronic Hamiltonian as the operator of interest, such that the estimated energy expectation value is

where |*ψ*(*θ*)〉=*U*(*θ*)|*ψ*(0)〉 is a variable pure quantum state prepared by a (unitary) ansatz operator *U*(*θ*). The parameter *θ*^{⋆} denotes the optimal value that minimizes the energy, and a generalization of *θ* may include multiple parameters within the ansatz.

The critical choice in applying the VQE method to a given Hamiltonian is selection of the ansatz operator *U*(*θ*) and the underlying reference state *ψ*(0). The latter may be selected by using conventional approximations to the electronic ground state that are efficiently encoded as superpositions of binary states. For example, using the Hartree-Fock solution to the electronic Hamiltonian offers a convenient choice for the reference state, and the vacancy or occupation of a molecular orbital may be encoded by 0 or 1, respectively. The choice of the ansatz operator may also be drawn from conventional electronic structure theory, and many recent efforts have focused on unitary coupled cluster (UCC) theory to generate possible choices for the ansatz operator (Romero et al. 2018; Sokolov et al. 2020b). The accuracy with which a given ansatz operator represents the true ground state of the Hamiltonian may be quantified using the fidelity

where *Ψ* is the expected ground state in the qubit representation. We next review a family of ansatz operators derived from UCC theory.

### Unitary coupled cluster ansatz operators

Consider the fermionic UCC ansatz operator (Romero et al. 2018)

where

and *T*_{k}(*θ*) represents the *k*-th cluster operator of *M* electrons excited. The unitary operator (11) may be approximated to first order by the finite series (Barkoutsos et al. 2018)

with \(\tau _{m}(\theta) = T_{m}(\theta) - T_{m}^{\dagger }(\theta)\) and *M* is the series limit. Terminating the series at *M*=2 limits the theory to single and double excitations and yields what is known as the UCC singles and doubles (UCCSD) ansatz

where

and

with \(\hat {t}_{i}^{a} = a^{\dagger }_{a} a_{i}\), \(\hat {t}_{i,j}^{a,b} = a_{a}^{\dagger } a_{b}^{\dagger } {a_{i}}{a_{j}}\) and the vector *θ* defines the single- and double-excitation parameters \(\theta ^{a}_{i}\) and \(\theta ^{a,b}_{i,j}\), respectively, for excitations from occupied orbitals *i* and *j* to virtual orbitals *a* and *b* of the reference state.

The ansatz operator in (14) may be transformed by the Jordan-Wigner transformation (7) to yield the individual terms

and

with

and

Recalling that *X*_{k}=*i**Y*_{k}*Z*_{k}, the latter may be recast as

where, under the *Z* operator, occupied orbitals yield an eigenvalue +1 and virtual orbitals yield an eigenvalue −1 such that each operator \(Q^{a,b}_{i,j}\) is determined by the single four-qubit Pauli string *X*_{a}*X*_{b}*X*_{i}*Y*_{j}.

The UCCSD operator serves as our starting point for developing various ansatz operators. First, we define a one-parameter ansatz operator derived from the UCCSD ansatz by considering only contribution from the doubles excitations in (21). For the four-qubit encoding of two-electrons described below, the resulting UCC doubles (UCCD) ansatz operator is reduced to

We also consider a singlet-adapted variation of the UCCSD ansatz for which the state is defined in a basis of restricted determinants. Specifically, we restrict the ansatz to basis states that are, by construction, spin eigenstates with *S*^{2}=0. Such states are formed from linear combinations of the corresponding excitation operators that conserve electron spin and obey the spin symmetry. These linear combinations are often referred to in chemistry as configuration state functions or symmetry-adapted basis functions. We defer the description of constructing these linear combinations to prior work (Szabo and Ostlund 1984). Various details on both ansatz operators have been reported previously (McCaskey et al. 2019; Claudino et al. 2020).

An alternative to the fixed-depth ansatz operators above is an adaptive ansatz that changes the generating operator based on iterative evaluations of the energy estimate. Grimsley et al. first proposed the adaptive derivative-assembled pseudo-trotter (ADAPT) ansatz motivated by UCC theory in which the unitary (11) is expanded beyond first order (Grimsley et al. 2019). They showed how the resulting operator expression guides iteratively growing an ansatz circuit until a desired convergence in the expectation value is obtained. The ADAPT method begins by decomposing the individual single- and double-excitations operators represented by (14) into a set known as the operator pool. Let \(\mathrm {T} = \{\hat {t}_{i}^{a}\} \bigcup \{\hat {t}_{i,j}^{a,b}\}\) denote the operator pool derived from the UCCSD approximation. An exact ansatz operator may be expressed as

in which *k* indexes the different instances of each excitation operator.

The ADAPT method creates an approximation to (23) by selecting a subset of elements in the operator pool T to generate an ansatz operator. Operator selection is initialized with a starting ansatz operator, which, for example, prepares the Hartree-Fock state for the given Hamiltonian. The selection then evaluates the commutator between each operator in the pool and the Hamiltonian with respect to the presently prepared state. The resulting vector of commutator evaluations defines a gradient that is steepest in the direction of the operator with the largest commutator. The operator corresponding to the largest commutator is then appended to the ansatz operator and, therefore, the ansatz circuit for the next evaluation of VQE. An associated parameter is introduced to tune the unitary rotation represented by the new operator, such that the number of optimized parameters grows with the size of the ansatz. When the norm of the gradient vector is less than a defined threshold, the algorithm converges and the lowest energy state is recovered.

### Ansatz compilation

The above ansatz operators must be compiled into quantum circuits for execution. We use the XACC programming framework to synthesize circuits representing these ansatz operators. XACC provides a set of software methods to define and implement fermionic and spin transformations that reduce the operator expressions above into a sequence of discrete quantum gates (McCaskey et al. 2020). In addition, the accompanying VQE and ADAPT-VQE methods orchestrate iterative execution of the ansatz and search through the corresponding parameter space. We defer details on the compilation methods to prior references (McCaskey et al. 2019; Grimsley et al. 2019). The results include, for example, the compiled one-parameter UCCD ansatz from (22) decomposed into the sequence of one- and two-qubit gate operations shown in Fig. 1. Compiled circuits are then simulated and XACC facilitates this step as well. Here we perform numerical simulations that interface the compiled circuits with a simulator that otherwise faithfully execute the VQE and ADAPT-VQE methods. Details on the numerical simulations are reviewed below.

We also study the effect of noise on circuits generated using the randomized compiling method that are logically equivalent to the UCCD one parameter ansatz but have a higher gate depth. Specifically, we consider randomized compiling to transform ansatz circuits by introducing independent, random single-qubit gates such that the output circuit is logically equivalent to the original (Wallman and Emerson 2016). The technique is implemented by dividing gate sets into so-called ‘easy’ and ‘hard’ gates and then reorganizing the original circuit into clock cycles alternating between a round of easy and hard gates applied to disjoint qubits per cycle (Wallman and Emerson 2016). Each round of easy gates is conjugated by a twirling gate *T*_{k} from a twirling gate set and an inverse operator \(T_{k-1}^{c}\). The original single qubit gates and the twirling gates are then compiled into new easy gate cycles.

Randomized compiling was developed to address coherent and correlated noise by effectively transforming the noise into a stochastic Pauli noise channel. While randomized compiling can offer improvements in circuit performance (Hashim et al. 2021), our investigation does not test such promises due to the selected noise model described in the next section. Rather, we investigate the role that additional gates in the ansatz circuit have on the increased circuit depth and output state fidelity. We limit our analysis to randomized compiling of the UCCD ansatz circuit due to its simplicity and single variational parameter. At the time that we used the commercially available TrueQ software package to generate these circuits, it was not equipped to compile parametrized operators of the circuit (Beale et al. 2020).

## Numerical methods

For our numerical studies, we use the model of a two-electron Hamiltonian representing sodium hydride (NaH) within the frozen-core approximation and with the STO-3G basis set. We require *n*=4 qubits to encode the four spin-orbitals or two spatial orbitals using the Jordan Wigner transformation, and the corresponding Pauli representation of terms in the electronic Hamiltonian is summarized in Table 1. As described previously, we use the XACC framework to compile the ansatz circuits and perform optimization of the ansatz parameters with respect to the estimated energy. The compiled circuits are simulated numerically using the IBM aer simulator as the XACC backend, and we integrate a noise model that describes each gate by a noisy operation.

In modeling noise in the quantum circuits, we assume a model by which each one- and two-qubit gates are followed by a depolarizing noise channel. The depolarizing noise model is a convenient device agnostic noise model that offers a coarse-grain representation for the loss of coherence caused by a noisy circuit, particularly for few-qubit numerical simulations (Temme et al. 2017). By setting the depolarizing noise to *p*=0, we are able to simulate a noiseless circuit. We then chose a few parameters, where *p*>0, that mimic the settings of current hardware (Dahlhauser and Humble 2021). Although it does not provide a fine-grain representation of the noise process, it has been used previously for accurately modeling the output from NISQ devices (Dahlhauser and Humble 2021). In addition, randomized compiling is known to yield a statistical model for the quantum circuit noise that is well approximated by the depolarizing model and motivates our use for the model here (Ville et al. 2021).

Within this model, the action of a single-qubit unitary gate *G* acting on register element *j* in the quantum state *ρ* is simulated as

with *ρ*^{′}=*G**ρ**G*^{†}, \(\sigma ^{k}_{j} \in {X_{j}, Y_{j}, Z_{j}}\), and the noise parameter *p*∈[0,1]. Errors on a two-qubit gate acting on elements *i* and *j* are modeled similarly as \(\xi ^{G}_{i,j}(\rho) = \xi ^{I}_{i}(\xi ^{G}_{j}(\rho))\) with *I* the identity operator. For our simulations, we use a gate set consisting of the single-qubit Pauli operator, the Hadamard gate, and single-qubit rotations with the two-qubit CNOT gate. These gates are decomposed by XACC into the OpenQASM representation (McKay et al. 2018). Notably, OpenQASM gates that are diagonal in the computational basis, e..g, *Z*, are not modeled with noise, a consequence of using the IBM aer simulator. For our noise model, we use noise levels for the two-qubit CNOT gate that is always ten times the value of the single-qubit gate noise. This is motivated by the difference in noise values observed in hardware. We use the same noise level for all single-qubit gates.

For different values of noise, we explore the influence of methodology on parameter optimization by comparing results from two different optimizers, COBYLA and L-BFGS. These two optimizers were chosen as gradient-free and gradient-based methods, respectively. Constrained optimization by linear approximation (COBYLA) constructs and optimizes a series of linear approximations to the objective function to compute parameter steps that minimize the objective function (Powell 1998). We use the third-party library implementation nlopt with a maximum number of iterations set to 1,000 with a convergence tolerance of 10^{−6} (Johnson 2014). By comparison, the low-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method is a quasi-Newton method that uses the gradient and an approximate Hessian to determine steps in parameter space that minimize the objective function (Nocedal 1980; Liu and Nocedal 1989). We use the third-party library implementation mlpack with the central gradient method with a maximum number of iterations set to 500,000 with a convergence tolerance of 10^{−4} and numerical step set to 10^{−7} (Curtin et al. 2018).

The output of each simulation is a list of expectation values characterizing the individual Pauli terms representing the Hamiltonian shown in Table 1, which are then combined to estimate the electronic energy. In addition, the output includes the simulated quantum state in the form of a density matrix. We compare the simulated energy estimate and simulated state with the energy and state obtained for the same Hamiltonian molecule calculated using the complete active-space self-consistent field (CASSCF) method within pyscf (Sun et al. 2018). We investigate different levels of noise as well as the behavior with respect to inter-nuclear configuration.

## Results

We conduct a range of studies of the above noise model applied to VQE and ADAPT-VQE simulations of the NaH molecule. We compare the statistics and fidelity of the expectation values of the noisy and noiseless simulations across a range of values for the internuclear distance, *R*, and different optimizers. For the studies with VQE we study the simulations of the original circuit and compare them with the results of the randomly compiled circuits. The goal is to understand how noise affects these properties and if there are parameters that are more resilient to noise than others.

We begin our study of the results of the ground state electronic energy calculation and fidelity of the prepared state with our simplest ansatz, the UCCD bare circuit (BC) ansatz, shown in Fig. 2. The simulated ground state energy predictably increases with increase in the depolarizing noise parameter *p* across all *R*. In addition the fidelity accross all *R* drops as we increase the depolarizing parameter. The increase in energy from the noisless simulation is no greater than 0.03 Ha at the greatest level of noise, while the fidelity drops less than 5%. Additionally, the overall shape of the curve is fairly standard for a potential energy curve, and the fidelity is relatively flat across all *R*. We report little difference between the optimizers used to find the energy and the fidelity of the this ansatz. Figure 3 plots the optimal parameters found to represent the ground state in the UCCD ansatz using the COBYLA and L-BFGS optimizers. There are noticeable differences in the parameters returned by COBYLA and L-BFGS with the latter showing a smoother variation across different levels of the noise parameter, especially at larger values of *R*. These differences, however, did not correspond to any significant difference to the reported energy or fidelity of the respective optimizer.

Figure 4 plots the results of the UCCD randomly compiled (RC) ansatz simulation at varying levels of depolarizing noise. Similar to the bare UCCD ansatz, the simulated ground state energy increases with increase in the noise parameter across all *R*. Again, we see a corresponding drop in fidelity as we increase the noise parameter, and minimal differences in the reported energy and fidelity when comparing the COBYLA and L-BFGS optimizers. The increase in energy from the noiseless simulation is no greater than 0.04 Ha at the greatest level of noise, while the fidelity drops less than 6%. The overall shape of the curve is standard for a potential energy curve, and the fidelity is relatively flat across all *R*. The plotted thetas in Fig. 5 show a different selection of optimal parameters between the COBYLA and L-BFGS optimizers. Like the bare UCCD ansatz, there are obvious difference between the selected *θ* for the ground state as the depolarizing noise increases for both optimizers. For example, the COBYLA optimizer has a greater variance than that of the L-BFGS optimizer, especially at higher values of *R*. When comparing the differences in optimal parameter selection between optimizers at the same level of noise, we report no significant difference to the resultant energy or fidelity between the respective optimizers.

The energy and fidelity results of the singlet-adapted UCCSD ansatz are reported in Fig. 6. The general trend of increasing energy and decreasing fidelity as the depolarizing noise increases is still seen within this plot. The general shape of the energy curve is standard to that of potential energy curves, and the fidelities are relatively flat across all *R*. While there is negligible difference between the reported values of the energy and fidelity between optimizers, there is significant difference between the reported values at varying levels of the noise parameter. The increase in energy from the noiseless simulation is no greater than 0.3 Ha, while the fidelity drops less than 40% at the greatest value of noise. Figure 7 show a different selection of optimal parameters between the COBYLA and L-BFGS optimizers. Both optimizers search similar regions but there is noticeable variation in their results. In addition, as the noise level *p* increases, the parameter search changes in tandem, with the *p* = 0.01 case for the *θ*_{1} parameter showing the most dramatic shift. In general, the COBYLA optimzer varies greatly with a much more jagged curve as we search across all *R* for both *θ*_{0} and *θ*_{1} when we compare it to that of the L-BFGS optimizer. While being smoother, the L-BFGS optimizer reports similar values of the energy and fidelity to that of the COBYLA optimizer.

The energy and fidelity results of the ADAPT-VQE simulation using the singlet-adapted UCCSD operator pool is shown in Fig. 8. The general trend of increasing energy and decreasing fidelity is still seen in this plot, however, with increasing depolarizing noise, the shape of the energy plot deviates from standard potential enegy curves. Likewise, the fidelity of the state prepared is not flat across all *R*. The increase in energy from the noiseless simulation is no greater than 1.0 Ha, while the fidelity drops at most a little less than 90% at the greatest value of noise. In contrast to the previous ansatze, the ADAPT-VQE ansatze grow uniquely with respect to *R*. This growth can be shown by plotting the number of parameters the ADAPT-VQE algorithm used in ansatz construction to reach convergence, which is shown in Fig. 9. There are significant differences in the number of parameters between the COBYLA and L-BFGS optimizers, however, the general trend in this plot shows how the number of parameters decreases as *R* increases.

Figure 10 plots the absolute error in energy of all the above ansatze simulated from the ground state energy found through conventional means. As we presented the energy and fidelity data of the different ansatze from the smallest to largest circuits in terms of gate depth, we see a similar trend in the absolute error plot. This is because every one- and two-qubit gate in every circuit is affected by depolarizing noise, thus increasing the number of gates increases the amount of noise in the system. The bare UCCD ansatz is the smallest ansatz and as such sees the smallest change in energy at the greatest value of depolarizing noise. Similarly, the randomly compiled circuits result in slightly larger increase for the same noise level due to the presence of additional one-qubit gates. On average, the randomly compiled circuits consist of approximately 50% more single-qubit gates than the bare UCCD ansatz. The singlet-adapted UCCSD ansatz has more gates, but more significantly, the ansatz has a higher number of two-qubit, CNOT, gates than that of the previous ansatze. The effect of depolarizing noise is an order of magnitude greater within two-qubit gates than that of one-qubit gates. This translates to a greater increase in energy as the depolarizing parameter increases. Lastly, the ADAPT-VQE ansatze exhibit the greatest increase in energy due to the large increase in one- and two-qubit gates within the circuit. The number of one- and two-qubit gates required for *p*=0.01 is approximately an order of magnitude higher than those found for any other ansatze tested.

## Conclusions

Our goal was to understand how noise affects the energy and fidelity of the ansatz and if there are parameters that are more resilient to noise than others. Across all ansatz circuits, we find that the noiseless simulations always recover the ideal energy and unit fidelity, while in the presence of noise, the depth of the ansatz circuit has the most important influence on the error in these quantities. Increases in gate depth of the ansatz necessarily increases the error in energy and lowers the fidelity and this is amplified at larger noise values. The differences observed between the bare UCCD and the randomly compiled UCCD circuits reflect differences in their single-qubit gate depth while the singlet-adapted UCCSD and ADAPT-VQE related ansatze, reflect differences in the number of two-qubit gates. More specifically, this indicates that the number of CNOT gates is the leading limit on how accurately the ansatz can describe the ground-state wavefunction.

The COBYLA and L-BFGS optimizers do yield different optimal parameters for the UCCD bare circuit, the UCCD randomly compiled circuit, and the singlet-adapted UCCSD circuit, however, these differences generally have a small influence on the outcomes of the fidelity and energy. For example, prior work has confirmed that the energy surface characterizing the UCCD ansatz is relatively smooth (Gowrishankar et al. 2021), while our results presented here confirm similar behavior in the presence of noise. The differences between the two optimizers are more apparent within the ADAPT-VQE method at higher levels of noise, but generally follow the same trend.

A leading feature of the ADAPT-VQE algorithm is that the ansatz grows iteratively to improve the accuracy of the computed energy. This feature allows for variability in the number and types of gates that make up the ansatz. However, as shown here, variability in the ansatz circuit depth due to increasing depolarizing noise leads to fluctuations in the energy and fidelity that are not observed within the fixed ansatz.

We studied how depolarizing noise specifically affected different ansatze, but note that other sources of noise could be present in other systems. Thus, this study would not accurately represent systems that included more, or different types of noise such as readout noise or coherent noise. In addition, we are limited to the size of the systems we are able to study due to the use of density matrices, which are exponentially larger than statevectors. Finally, we note that the ADAPT-VQE method could be further modified to combat the effects of noise such as modifying the ADAPT-VQE configuration to ensure continuity in the ansatz circuit depth and parameter values. For example, intelligent pruning of the ADAPT ansatz may be beneficial with little loss of accuracy. We defer this point for later work.

## Availability of data and materials

The data and materials are available upon request.

## References

F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, S. Boixo, M. Broughton, B. B. Buckley, D. A. Buell, et al., Hartree-fock on a superconducting qubit quantum computer. Science.

**369**(6507), 1084–1089 (2020).P. K. Barkoutsos, J. F. Gonthier, I. Sokolov, N. Moll, G. Salis, A. Fuhrer, M. Ganzhorn, D. J. Egger, M. Troyer, A. Mezzacapo, S. Filipp, I. Tavernelli, Quantum algorithms for electronic structure calculations: Particle-hole hamiltonian and optimized wave-function expansions. Phys. Rev. A.

**98:**, 022322 (2018). https://doi.org/10.1103/PhysRevA.98.022322.B. Bauer, S. Bravyi, M. Motta, G. K. -L. Chan, Quantum algorithms for quantum chemistry and quantum materials science. Chem. Rev.

**120**(22), 12685–12717 (2020).N. P. Bauman, G. H. Low, K. Kowalski, Quantum simulations of excited states with active-space downfolded hamiltonians. J. Chem. Phys.

**151**(23), 234114 (2019).S. J. Beale, A. Carignan-Dugas, D. Dahlen, J. Emerson, I. Hincks, P. Iyer, A. Jain, D. Hufnagel, E. Ospadov, J. Saunders, A. Stasiuk, J. J. Wallman, A. Winick, True-Q. Zenodo (2020). https://doi.org/10.5281/zenodo.3945250.

Y. Cao, J. Romero, J. P. Olson, M. Degroote, P. D. Johnson, M. Kieferová, I. D. Kivlichan, T. Menke, B. Peropadre, N. P. Sawaya, et al., Quantum chemistry in the age of quantum computing. Chem. Rev.

**119**(19), 10856–10915 (2019).D. Claudino, B. Peng, N. P. Bauman, K. Kowalski, T. S. Humble, Improving the accuracy and efficiency of quantum connected moments expansions. Quantum Sci. Technol.

**6**(3), 034012 (2021).D. Claudino, J. Wright, A. J. McCaskey, T. S. Humble, Benchmarking adaptive variational quantum eigensolvers. Front. Chem.

**8:**, 1152 (2020).R. R. Curtin, M. Edel, M. Lozhnikov, Y. Mentekidis, S. Ghaisas, S. Zhang, mlpack 3: a fast, flexible C++ machine learning library. J. Open Source Softw.

**3:**, 726 (2018).M. L. Dahlhauser, T. S. Humble, Modeling noisy quantum circuits using experimental characterization. Phys. Rev. A.

**103**(4), 042603 (2021).V. E. Elfving, M. Millaruelo, J. A. Gámez, C. Gogolin, Simulating quantum chemistry in the seniority-zero space on qubit-based quantum computers. Phys. Rev. A.

**103**(3), 032605 (2021).B. T. Gard, L. Zhu, G. S. Barron, N. J. Mayhall, S. E. Economou, E. Barnes, Efficient symmetry-preserving state preparation circuits for the variational quantum eigensolver algorithm. NPJ Quant. Inf.

**6**(1), 1–9 (2020).M. Gowrishankar, J. Wright, D. Claudino, T. Nguyen, A. McCaskey, T. Humble, in

*2021 IEEE Intl. Conf. on Quantum Computing and Engineering*. Numerical simulations of noisy variational quantum eigensolver ansatz circuits, (2021), pp. 155–159. https://doi.org/10.1109/QCE52317.2021.00032.H. R. Grimsley, D. Claudino, S. E. Economou, E. Barnes, N. J. Mayhall, Is the trotterized uccsd ansatz chemically well-defined?J. Chem. Theory Comput.

**16**(1), 1–6 (2019).H. R. Grimsley, S. E. Economou, E. Barnes, N. J. Mayhall, An adaptive variational algorithm for exact molecular simulations on a quantum computer. Nat. Commun.

**10**(1), 1–9 (2019).A. Hashim, R. K. Naik, A. Morvan, J. -L. Ville, B. Mitchell, J. M. Kreikebaum, M. Davis, E. Smith, C. Iancu, K. P. O’Brien, I. Hincks, J. J. Wallman, J. Emerson, I. Siddiqi, Randomized compiling for scalable quantum computing on a noisy superconducting quantum processor. Phys. Rev. X.

**11**(4), 041039 (2021). https://doi.org/10.1103/PhysRevX.11.041039, https://link.aps.org/doi/10.1103/PhysRevX.11.041039.S. G. Johnson, The NLopt nonlinear-optimization package (2014). http://github.com/stevengj/nlopt. Accessed Nov 2021.

A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow, J. M. Gambetta, Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature.

**549**(7671), 242–246 (2017).D. C. Liu, J. Nocedal, On the limited memory BFGS method for large scale optimization. Math. Program.

**45:**, 503–528 (1989).S. McArdle, S. Endo, A. Aspuru-Guzik, S. C. Benjamin, X. Yuan, Quantum computational chemistry. Rev. Mod. Phys.

**92:**, 015003 (2020). https://doi.org/10.1103/RevModPhys.92.015003.A. J. McCaskey, D. I. Lyakh, E. F. Dumitrescu, S. S. Powers, T. S. Humble, XACC: a system-level software infrastructure for heterogeneous quantum–classical computing. Quant. Sci. Technol.

**5**(2), 024002 (2020).A. J. McCaskey, Z. P. Parks, J. Jakowski, S. V. Moore, T. D. Morris, T. S. Humble, R. C. Pooser, Quantum chemistry as a benchmark for near-term quantum computers. NPJ Quant. Inf.

**5**(1), 1–8 (2019).J. R. McClean, J. Romero, R. Babbush, A. Aspuru-Guzik, The theory of variational hybrid quantum-classical algorithms. New J. Phys.

**18**(2), 023023 (2016).D. C. McKay, T. Alexander, L. Bello, M. J. Biercuk, L. Bishop, J. Chen, J. M. Chow, A. D. Córcoles, D. Egger, S. Filipp, et al., Qiskit Backend Specifications for OpenQASM and OpenPulse Experiments. arXiv preprint arXiv:1809.03452 (2018). https://doi.org/10.48550/ARXIV.1809.03452, https://arxiv.org/abs/1809.03452.

M. Metcalf, N. P. Bauman, K. Kowalski, W. A. De Jong, Resource-efficient chemistry on quantum computers with the variational quantum eigensolver and the double unitary coupled-cluster approach. J. Chem. Theory Comput.

**16**(10), 6165–6175 (2020).W. Mizukami, K. Mitarai, Y. O. Nakagawa, T. Yamamoto, T. Yan, Y. -y. Ohnishi, Orbital optimized unitary coupled cluster theory for quantum computer. Phys. Rev. Res.

**2**(3), 033421 (2020).J. Nocedal, Updating quasi-newton matrices with limited storage. Math. Comp.

**35:**, 773–782 (1980).P. J. J. O’Malley, R. Babbush, I. D. Kivlichan, J. Romero, J. R. McClean, R. Barends, J. Kelly, P. Roushan, A. Tranter, N. Ding, B. Campbell, Y. Chen, Z. Chen, B. Chiaro, A. Dunsworth, A. G. Fowler, E. Jeffrey, E. Lucero, A. Megrant, J. Y. Mutus, M. Neeley, C. Neill, C. Quintana, D. Sank, A. Vainsencher, J. Wenner, T. C. White, P. V. Coveney, P. J. Love, H. Neven, A. Aspuru-Guzik, J. M. Martinis, Scalable quantum simulation of molecular energies. Phys. Rev. X.

**6:**, 031007 (2016). https://doi.org/10.1103/PhysRevX.6.031007.M. J. D. Powell, Direct search algorithms for optimization calculations. Acta Numerica.

**7:**, 287–336 (1998). https://doi.org/10.1017/S0962492900002841.J. Preskill, Quantum computing in the nisq era and beyond. Quantum.

**2:**, 79 (2018).J. Romero, R. Babbush, J. R. McClean, C. Hempel, P. J. Love, A. Aspuru-Guzik, Strategies for quantum computing molecular energies using the unitary coupled cluster ansatz. Quant. Sci. Technol.

**4**(1), 014008 (2018).R. Sagastizabal, X. Bonet-Monroig, M. Singh, M. A. Rol, C. C. Bultink, X. Fu, C. H. Price, V. P. Ostroukh, N. Muthusubramanian, A. Bruno, M. Beekman, N. Haider, T. E. O’Brien, L. DiCarlo, Experimental error mitigation via symmetry verification in a variational quantum eigensolver. Phys. Rev. A.

**100:**, 010302 (2019). https://doi.org/10.1103/PhysRevA.100.010302.S. E. Smart, D. A. Mazziotti, Efficient two-electron ansatz for benchmarking quantum chemistry on a quantum computer. Phys. Rev. Res.

**2:**, 023048 (2020). https://doi.org/10.1103/PhysRevResearch.2.023048.I. O. Sokolov, P. K. Barkoutsos, P. J. Ollitrault, D. Greenberg, J. Rice, M. Pistoia, I. Tavernelli, Quantum orbital-optimized unitary coupled cluster methods in the strongly correlated regime: Can quantum algorithms outperform their classical equivalents?J. Chem. Phys.

**152**(12), 124107 (2020). https://doi.org/10.1063/1.5141835.I. O. Sokolov, P. K. Barkoutsos, P. J. Ollitrault, D. Greenberg, J. Rice, M. Pistoia, I. Tavernelli, Quantum orbital-optimized unitary coupled cluster methods in the strongly correlated regime: Can quantum algorithms outperform their classical equivalents?J. Chem. Phys.

**152**(12), 124107 (2020).Q. Sun, T. C. Berkelbach, N. S. Blunt, G. H. Booth, Z. L. Sheng Guo, J. D. M. Junzi Liu, E. R. Sayfutyarova, S. Sharma, S. Wouters, G. K. -L. Chan, Software focus pyscf: the python-based simulations of chemistry framework. WIREs Comput. Mol. Sci.

**8**(1), 1340 (2018). https://doi.org/10.1002/wcms.1340.A. Szabo, N. S. Ostlund,

*Modern Quantum Chemistry*(Dover Publications, Mineola, 1984).H. L. Tang, V. Shkolnikov, G. S. Barron, H. R. Grimsley, N. J. Mayhall, E. Barnes, S. E. Economou, qubit-adapt-vqe: An adaptive algorithm for constructing hardware-efficient ansätze on a quantum processor. PRX Quant.

**2**(2), 020310 (2021).K. Temme, S. Bravyi, J. M. Gambetta, Error mitigation for short-depth quantum circuits. Phys. Rev. Lett.

**119:**, 180509 (2017). https://doi.org/10.1103/PhysRevLett.119.180509.N. V. Tkachenko, J. Sud, Y. Zhang, S. Tretiak, P. M. Anisimov, A. T. Arrasmith, P. J. Coles, L. Cincio, P. A. Dub, Correlation-informed permutation of qubits for reducing ansatz depth in the variational quantum eigensolver. PRX Quant.

**2**(2), 020337 (2021).J. -L. Ville, A. Morvan, A. Hashim, R. K. Naik, M. Lu, B. Mitchell, J. -M. Kreikebaum, K. P. O’Brien, J. J. Wallman, I. Hincks, et al., Leveraging randomized compiling for the qite algorithm. arXiv preprint arXiv:2104.08785 (2021). https://doi.org/10.48550/ARXIV.2104.08785, https://arxiv.org/abs/2104.08785.

J. J. Wallman, J. Emerson, Noise tailoring for scalable quantum computation via randomized compiling. Phys. Rev. A.

**94:**, 052325 (2016). https://doi.org/10.1103/PhysRevA.94.052325.J. D. Whitfield, J. Biamonte, A. Aspuru-Guzik, Simulation of electronic structure hamiltonians using quantum computers. Mol. Phys.

**109**(5), 735–750 (2011).R. Xia, S. Kais, Qubit coupled cluster singles and doubles variational quantum eigensolver ansatz for electronic structure calculations. Quant. Sci. Technol.

**6**(1), 015001 (2020).K. Yeter-Aydeniz, B. T. Gard, J. Jakowski, S. Majumder, G. S. Barron, G. Siopsis, T. S. Humble, R. C. Pooser, Benchmarking quantum chemistry computations with variational, imaginary time evolution, and krylov space solver algorithms. Adv. Quant. Technol.

**4**(7), 2100012 (2021).

## Acknowledgements

This research used resources of the Oak Ridge Leadership Computing Facility, which is a DOE Office of Science User Facilities supported by the Oak Ridge National Laboratory under Contract DE-AC05-00OR22725. This research used resources of the Compute and Data Environment for Science (CADES) at the Oak Ridge National Laboratory, which is supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC05-00OR22725.

This manuscript has been authored by UT-Battelle, LLC under Contract No. DE-AC05-00OR22725 with the U.S. Department of Energy. The United States Government retains and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes. The Department of Energy will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan (http://energy.gov/downloads/doe-public-access-plan).

## Funding

This work was supported by the “Embedding Quantum Computing into Many-body Frameworks for Strongly Correlated Molecular and Materials Systems” project, which is funded by the U.S. Department of Energy (DOE), Office of Science, Office of Basic Energy Sciences, the Division of Chemical Sciences, Geosciences, and Biosciences. This work was also supported by the Quantum Science Center (QSC), a National Quantum Information Science Research Center of the U.S. Department of Energy (DOE).

## Author information

### Authors and Affiliations

### Contributions

J. W. and M. G. developed the methods, performed the experiment, processed the data, and composed the manuscript. D.C. developed the methods and composed the manuscript, P.C.L. processed the data and composed the manuscript, T.N. developed the methods, A.J.M. developed the methods, and T.S.H. processed the data and composed the manuscript. All authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Additional information

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Wright, J., Gowrishankar, M., Claudino, D. *et al.* Numerical simulations of noisy quantum circuits for computational chemistry.
*Mater Theory* **6**, 18 (2022). https://doi.org/10.1186/s41313-022-00047-7

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s41313-022-00047-7

### Keywords

- Variational Quantum Algorithms
- Noise
- Quantum Chemistry
- Quantum Computing