# The Cost of Improving the Precision of the Variational Quantum Eigensolver for Quantum Chemistry

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Methods

- Quantum: prepare a parametrized quantum state on a quantum device;
- Quantum: measure each Hamiltonian term (requires repetitions of step 1);
- Classical: sum the expectation values of the Hamiltonian terms to estimate the energy of the parametrized state;
- Classical: use the energy value to update the parameters of the trial quantum state.

`maxiter`parameter (in qiskit’s implementation). We then updated the parameter vector ${\overrightarrow{\theta}}_{\mathrm{k}}^{}$, and measured the final value of energy for the underlying optimized parameters. There is a subtlety that influences the total number of function evaluations. Qiskit’s implementation of SPSA includes additional initial exploration—a calibration phase that depends on the maximum number of iterations with $\mathrm{min}\left\{\mathtt{maxiter}/5,\phantom{\rule{0.166667em}{0ex}}25\right\}$ steps.

## 3. Results and Discussion

#### 3.1. Number of Quantum Computer Calls

`shots`parameter in the programs) for each evaluation of readout probabilities. Second, we can increase the maximum number of iterations (the parameter

`maxite`) allowed for the classical optimization subroutine.

`shots`and

`maxiter`parameters, on the two-qubit hydrogen molecule Hamiltonian, using the noiseless quantum simulator. Each combination of the settings was run 1000 times. We present the experimental results in detail in Table A2 (see Appendix B), and visualize it here in Figure 2 and Figure 3.

`shots`parameter. The limit of infinitely many shots is simulated using a statevector simulator, which calculates the outcome probabilities directly from the laws of quantum mechanics. It is important to note that when using a finite number of shots, the algorithm can also output energy values lower than the actual minimum energy. Thanks to stochastic noise, the estimates of outcome probabilities for the Pauli terms in (5), calculated from a limited number of shots, can be non-physical. To obtain realistic final optimized energies, one should thus invest in a precise final energy readout for the optimized state, using a larger number of shots.

`maxiter`parameter and waiting longer for convergence seems to have diminishing returns after surpassing a value of approximately $\mathtt{maxiter}=100$. We confirm this in detail in Figure 3. There, we simulate 1000 VQE calculations for various combinations of

`maxiter`/

`shots`settings. For the same

`shots`parameter value, increasing the

`maxiter`parameter only decreases the number of outliers, but the spread of the data remains almost unchanged. Both of these observations suggest that only a small fraction of runs can benefit from the increase in the

`maxiter`parameter beyond 100.

`shots`parameter set to 512 and 1024, with $\mathtt{maxiter}$ settings $50,75$ and 100. Results of this calculation can be found in Figure 4 and they suggest that the combination of

`shots`= 1024 and

`maxiter`= 75 already provides the median energy in the chemical accuracy for the 2-qubit H${}_{2}$ Hamiltonian.

#### 3.2. Choice of Hamiltonian and State-Preparation Ansatz

#### 3.3. Imperfect Quantum Devices

#### 3.4. Convergence of VQE on Real Quantum Hardware

`maxiter`= 75 and

`shots`= 1024, and compared it to noisy simulation results with the same parameter settings. To mitigate the readout errors we performed a simple mitigation routine described at the beginning of this Section. In Figure 8, we observe that in fact the predictions agree fairly well with practice. Further, we tested our hypothesis that the discovered states are very close to optimal ones, but their energies have to be evaluated more precisely. To this end we calculated their energies using 40,000 shots on the ibm_lagos quantum processor (40,000 shots result in ≈0.5% error in energy calculations) as well as using a statevector simulator. In Figure 8, we can see that both of these techniques decrease the spread of the data points. However, only the statevector simulator consistently evaluates energies within the chemical accuracy from the exact ground-state value. This only shows that evaluating the energies using a large number of shots still suffers from hardware errors, which are not present when using the statevector simulator. We conclude that a simple VQE implementation on real quantum hardware does not consistently find the minimum energy within the chemical accuracy. Nevertheless, using both error-mitigation and precise energy readouts, one can obtain a trustworthy result, taking the lowest of the precisely evaluated energies.

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

VQE | Variational Quantum Eigensolver |

STO-3G | Slater-type Orbital basis set with each orbital expanded into 3 Gaussian functions. |

6-31G | A double-zeta basis set, which uses six primitive Gaussians to describe each core |

atomic orbital. Further, each valence orbital is described by two basis functions. | |

The first one is composed of a linear combination of 3 primitive Gaussian functions | |

and the other one is composed of a single primitive Gaussian function. | |

SPSA | Simultaneous Perturbation Stochastic Approximation |

## Appendix A. Convergence to Local Minima

**Figure A1.**Ground-state energies of the ${H}_{2}$ molecule from 200 calculations on a noise-less simulator, using the 4-qubit Hamiltonian (3).

**Figure A2.**Comparison of similarities of vectors of measured probabilities as functions of energies. The plotted values are averaged ones using all 200 values and evaluated using either the Jaccard-Tanimoto (J-T) similarity index (parts (

**a**,

**b**)) and scalar product (parts (

**c**,

**d**)) for both the circuit 0 (parts (

**a**,

**c**)) and circuit 1 (parts (

**b**,

**d**)).

## Appendix B. Data Tables

`shots`and

`maxiter`= 1000. This is followed by Table A2 and Table A3 in which we elaborete in more detail on energy values obtainable by various

`shots`and

`maxiter`settings. Then, in Table A4, we list the results underlying Figure 5, comparing state preparation ansatzes for 2- and 4-qubit computations. Further, in Table A5, we list the results highlighting the variability of actual hardware when performing runs on different dates, plotted in Figure 7. Finally, in Table A6 we show energies underlying the real runs presented in Figure 8.

**Table A1.**Summary of the medians of 1000 optimized ground-state energies and the percentage of outcomes that were found within chemical precision of exact energy ($-1.86712\pm 0.0015$ Ha) for different settings of

`shots`parameter and

`maxiter`= 1000. Additionally, in the middle two columns, the final energy is the direct outcome of the SPSA algorithm and the last two columns show the recalculation using the statevector simulator. The ${R}_{\mathrm{y}}$ variational ansatz was used. The error margin of 3 percent was estimated based on the standard deviation of 1000 identically distributed trials. These data are the basis for Figure 2.

Simulator | Shots | Median [Ha] | % | Recalculation | |
---|---|---|---|---|---|

Median [Ha] | % | ||||

qasm_simulator | 512 | $-1.86637$ | $10.5\pm 3$ | $-1.86675$ | $93.8\pm 3$ |

1024 | $-1.86723$ | $14.8\pm 3$ | $-1.86693$ | $98.5\pm 3$ | |

2048 | $-1.86667$ | $21.1\pm 3$ | $-1.86703$ | $99.1\pm 3$ | |

4096 | $-1.86705$ | $28.7\pm 3$ | $-1.86707$ | $99.0\pm 3$ | |

8192 | $-1.86729$ | $38.9\pm 3$ | $-1.86710$ | $99.4\pm 3$ | |

statevector_simulator | − | $-1.86712$ | $99.1\pm 3$ | − | − |

**Table A2.**Summary of the medians of 1000 optimized ground-state energies and the percentage of outcomes that were found within chemical precision of exact energy ($-1.86712\pm 0.0015$ Ha) for different settings for the maximum number of iterations (

`maxiter`) and number of shots. The ${R}_{\mathrm{y}}$ variational ansatz was used. The error margin of 3 percent was estimated based on the standard deviation of 1000 identically distributed trials. These data are the basis for Figure 3.

Settings | shots | Median [Ha] | % |
---|---|---|---|

SPSA(maxiter = 50) | 512 | $-1.86119$ | $8.6\pm 3$ |

1024 | $-1.86258$ | $11.4\pm 3$ | |

4096 | $-1.86475$ | $20.7\pm 3$ | |

8192 | $-1.86544$ | $29.9\pm 3$ | |

SPSA(maxiter = 75) | 512 | $-1.86276$ | $9.1\pm 3$ |

1024 | $-1.86439$ | $12.6\pm 3$ | |

4096 | $-1.86559$ | $24.9\pm 3$ | |

8192 | $-1.86601$ | $34.2\pm 3$ | |

SPSA(maxiter = 100) | 512 | $-1.86419$ | $9.4\pm 3$ |

1024 | $-1.86530$ | $13.5\pm 3$ | |

4096 | $-1.86607$ | $25.9\pm 3$ | |

8192 | $-1.86644$ | $38.1\pm 3$ | |

SPSA(maxiter = 125) | 512 | $-1.86486$ | $9.3\pm 3$ |

1024 | $-1.86524$ | $13.6\pm 3$ | |

4096 | $-1.86631$ | $27.0\pm 3$ | |

8192 | $-1.86656$ | $37.5\pm 3$ | |

SPSA(maxiter = 150) | 512 | $-1.86461$ | $9.3\pm 3$ |

1024 | $-1.86593$ | $14.3\pm 3$ | |

4096 | $-1.86613$ | $28.8\pm 3$ | |

8192 | $-1.86637$ | $36.9\pm 3$ | |

SPSA(maxiter = 200) | 512 | $-1.86634$ | $11.3\pm 3$ |

1024 | $-1.86575$ | $14.3\pm 3$ | |

4096 | $-1.86652$ | $28.7\pm 3$ | |

8192 | $-1.86653$ | $36.5\pm 3$ |

**Table A3.**Summary of the medians of 1000 optimized ground-state energies and the percentage of outcomes that were found within chemical precision of exact energy ($-1.86712\pm 0.0015$ Ha) for different settings for the maximum number of iterations (

`maxiter`) and number of shots. The ${R}_{\mathrm{y}}$ variational ansatz was used. An error margin of 3 percent was estimated based on the standard deviation of 1000 identically distributed trials. The rightmost two columns are the recalculation of obtained energies using the statevector simulator. These data are the basis for Figure 4.

Settings | Shots | Median [Ha] | % | Recalculation | |
---|---|---|---|---|---|

Median [Ha] | % | ||||

SPSA(maxiter = 50) | 512 | $-1.86101$ | $7.0\pm 3$ | $-1.86349$ | $25.5\pm 3$ |

1024 | $-1.86190$ | $10.8\pm 3$ | $-1.86520$ | $41.4\pm 3$ | |

SPSA(maxiter = 75) | 512 | $-1.86369$ | $9.7\pm 3$ | $-1.86511$ | $38.7\pm 3$ |

1024 | $-1.86420$ | $11.7\pm 3$ | $-1.86594$ | $57.4\pm 3$ | |

SPSA(maxiter = 100) | 512 | $-1.86472$ | $9.7\pm 3$ | $-1.86560$ | $49.4\pm 3$ |

1024 | $-1.86458$ | $13.9\pm 3$ | $-1.86627$ | $64.5\pm 3$ |

**Table A4.**A comparison of various settings of quantum circuits for 2-qubit and 4-qubit Hamiltonians of H${}_{2}$. The ${R}_{\mathrm{y}}{R}_{\mathrm{z}}$ and ${R}_{\mathrm{y}}$ variational forms accompanied by linear entanglement with different depths of circuit and numbers of parameters used. In the case of the 2-qubit Hamiltonian, we used an unrestricted maximum number of iterations of the SPSA optimizer, and in the case of 4-qubit Hamiltonian, the

`maxiter`was set to 400. Columns labeled % represent the percentage of the runs that ended within chemical accuracy ($-1.86712\pm 0.0015$ Ha) of the optimum. The error margin of 3 percent was estimated based on the standard deviation of 1000 identically distributed trials. These data are the basis for Figure 5.

2-Qubit Hamiltonian H${}_{2}$ | |||
---|---|---|---|

Form | Depth (Parameters) | Median [Ha] | % |

${R}_{\mathrm{y}}$ | 3 $(8)$ | $-1.86713$ | $31.2\pm 3$ |

${R}_{\mathrm{y}}$${R}_{\mathrm{z}}$ | 2 $(12)$ | $-1.86664$ | $30.7\pm 3$ |

${R}_{\mathrm{y}}$ | 2 $(6)$ | $-1.86709$ | $32.4\pm 3$ |

${R}_{\mathrm{y}}$${R}_{\mathrm{z}}$ | 1 $(8)$ | $-1.86594$ | $25.8\pm 3$ |

${R}_{\mathrm{y}}$ | 1 $(4)$ | $-1.86705$ | $28.7\pm 3$ |

4-qubit Hamiltonian H${}_{2}$ | |||

Form | Depth (Parameters) | Median [Ha] | % |

${R}_{\mathrm{y}}$ | 5 $(24)$ | $-1.86331$ | $18.1\pm 3$ |

${R}_{\mathrm{y}}$${R}_{\mathrm{z}}$ | 2 $(24)$ | $-1.86070$ | $12.5\pm 3$ |

${R}_{\mathrm{y}}$ | 2 $(12)$ | $-1.86361$ | $17.9\pm 3$ |

${R}_{\mathrm{y}}$${R}_{\mathrm{z}}$ | 1 $(16)$ | $-1.84560$ | $0.0$ |

${R}_{\mathrm{y}}$ | 1 $(8)$ | $-1.84591$ | $0.0$ |

**Table A5.**A comparison of results from different dates and different noise models built from a real quantum processor, ibmq_santiago. The number of shots was set to 4096. The calculations were performed using both the ${R}_{\mathrm{y}}{R}_{\mathrm{z}}$ and ${R}_{\mathrm{y}}$ variational forms. The classical optimization method SPSA was used, for 2-qubit system the maxiter was unrestricted and for 4-qubit system, the maxiter was set to 400. The last column represents the percentage of the runs that ended within chemical accuracy ($-1.86712\pm 0.0015$ Ha) of the optimum. The error margin of 3 percent was estimated based on the standard deviation of 1000 identically distributed trials. These data are the basis for Figure 6 and Figure 7.

Simulator NoiseModel | Qubits | Date | R Form | ${\mathit{R}}_{\mathbf{y}}$${\mathit{R}}_{\mathbf{z}}$ Form | ||
---|---|---|---|---|---|---|

Median [Ha] | % | Median [Ha] | % | |||

gate errors | 2 | 14 December 2020 | $-1.85819$ | $3.3\pm 3$ | $-1.85719$ | $2.4\pm 3$ |

14 May 2021 | $-1.85947$ | $5.3\pm 3$ | ||||

4 | 14 December 2020 | $-1.79786$ | $0.0$ | $-1.77738$ | $0.0$ | |

readout errors | 2 | 14 December 2020 | $-1.80617$ | $0.0$ | $-1.80510$ | 0.0 |

14 May 2021 | $-1.82060$ | $0.0$ | ||||

4 | 14 December 2020 | $-1.78270$ | $0.0$ | $-1.76214$ | $0.0$ | |

all errors | 2 | 14 December 2020 | $-1.79816$ | $0.0$ | $-1.79646$ | $0.0$ |

14 May 2021 | $-1.81879$ | $0.0$ | ||||

4 | 14 December 2020 | $-1.70967$ | $0.0$ | $-1.68760$ | $0.0$ |

**Table A6.**Energy values obtained by $ibm\_lagos$ with various final energy evaluations. These data are the basis for Figure 8.

ibm_lagos | Statevector Simulator | |
---|---|---|

shots = 1024 | shots = 40,000 | |

$-1.85075$ Ha | $-1.85688$ Ha | $-1.86588$ Ha |

$-1.86237$ Ha | $-1.86035$ Ha | $-1.86558$ Ha |

$-1.81998$ Ha | $-1.82370$ Ha | $-1.86560$ Ha |

$-1.82088$ Ha | $-1.82312$ Ha | $-1.85678$ Ha |

$-1.84165$ Ha | $-1.83561$ Ha | $-1.86488$ Ha |

$-1.82453$ Ha | $-1.83271$ Ha | $-1.86456$ Ha |

$-1.85601$ Ha | $-1.86479$ Ha | $-1.86569$ Ha |

$-1.87990$ Ha | $-1.86107$ Ha | $-1.86605$ Ha |

$-1.84045$ Ha | $-1.81550$ Ha | $-1.86504$ Ha |

$-1.86599$ Ha | $-1.82214$ Ha | $-1.86554$ Ha |

$-1.78271$ Ha | $-1.84946$ Ha | $-1.86099$ Ha |

$-1.82068$ Ha | $-1.83412$ Ha | $-1.86482$ Ha |

$-1.83439$ Ha | $-1.82281$ Ha | $-1.85480$ Ha |

$-1.80671$ Ha | $-1.83176$ Ha | $-1.86270$ Ha |

## References

- Baiardi, A.; Reiher, M. The density matrix renormalization group in chemistry and molecular physics: Recent developments and new challenges. J. Chem. Phys.
**2020**, 152, 040903. [Google Scholar] [CrossRef][Green Version] - Bowler, D.R.; Miyazaki, T. O(N) methods in electronic structure calculations. Rep. Prog. Phys.
**2012**, 75, 036503. [Google Scholar] [CrossRef] - Montanaro, A. Quantum speedup of Monte Carlo methods: Table 1. Proc. R. Soc. A Math. Phys. Eng. Sci.
**2015**, 471. [Google Scholar] [CrossRef][Green Version] - Friesner, R.A. Ab initio quantum chemistry: Methodology and applications. Proc. Natl. Acad. Sci. USA
**2005**, 102, 6648–6653. [Google Scholar] [CrossRef] [PubMed][Green Version] - Helgaker, T.; Klopper, W.; Tew, D.P. Quantitative quantum chemistry. Mol. Phys.
**2008**, 106, 2107–2143. [Google Scholar] [CrossRef] - Cremer, D. Møller–Plesset perturbation theory: From small molecule methods to methods for thousands of atoms. WIREs Comput. Mol. Sci.
**2011**, 1, 509–530. [Google Scholar] [CrossRef] - Lyakh, D.I.; Musiał, M.; Lotrich, V.F.; Bartlett, R.J. Multireference Nature of Chemistry: The Coupled-Cluster View. Chem. Rev.
**2012**, 112, 182–243. [Google Scholar] [CrossRef] [PubMed] - Yu, H.S.; Li, S.L.; Truhlar, D.G. Perspective: Kohn-Sham density functional theory descending a staircase. J. Chem. Phys.
**2016**, 145, 130901. [Google Scholar] [CrossRef] - Mardirossian, N.; Head-Gordon, M. Thirty years of density functional theory in computational chemistry: An overview and extensive assessment of 200 density functionals. Mol. Phys.
**2017**, 115, 2315–2372. [Google Scholar] [CrossRef] - Feynman, R. Simulating physics with computers. Int. J. Theor. Phys.
**1982**, 21, 467–488. [Google Scholar] [CrossRef] - Jordan, S. Quantum Algorithm ZOO. Available online: https://quantumalgorithmzoo.org/ (accessed on 11 November 2021).
- Abhijith, J.; Adedoyin, A.; Ambrosiano, J.; Anisimov, P.; Bärtschi, A.; Casper, W.; Chennupati, G.; Coffrin, C.; Djidjev, H.; Gunter, D.; et al. Quantum Algorithm Implementations for Beginners. arXiv
**2018**, arXiv:1804.03719. [Google Scholar] - Nielsen, M.A.; Chuang, I.L. Quantum Computation and Quantum Information: 10th Anniversary Edition, 10th ed.; Cambridge University Press: Cambridge, CA, USA, 2011. [Google Scholar]
- Degen, C.L.; Reinhard, F.; Cappellaro, P. Quantum sensing. Rev. Mod. Phys.
**2017**, 89, 035002. [Google Scholar] [CrossRef][Green Version] - Gisin, N.; Ribordy, G.; Tittel, W.; Zbinden, H. Quantum cryptography. Rev. Mod. Phys.
**2002**, 74, 145–195. [Google Scholar] [CrossRef][Green Version] - Xu, F.; Ma, X.; Zhang, Q.; Lo, H.K.; Pan, J.W. Secure quantum key distribution with realistic devices. Rev. Mod. Phys.
**2020**, 92, 025002. [Google Scholar] [CrossRef] - Herrero-Collantes, M.; Garcia-Escartin, J.C. Quantum random number generators. Rev. Mod. Phys.
**2017**, 89, 015004. [Google Scholar] [CrossRef][Green Version] - Arute, F.; Arya, K.; Babbush, R.; Bacon, D.; Bardin, J.C.; Barends, R.; Biswas, R.; Boixo, S.; Brandao, F.G.S.L.; Buell, D.A.; et al. Quantum supremacy using a programmable superconducting processor. Nature
**2019**, 574, 505–510. [Google Scholar] [CrossRef] [PubMed][Green Version] - Wu, Y.; Bao, W.S.; Cao, S.; Chen, F.; Chen, M.C.; Chen, X.; Chung, T.H.; Deng, H.; Du, Y.; Fan, D.; et al. Strong Quantum Computational Advantage Using a Superconducting Quantum Processor. Phys. Rev. Lett.
**2021**, 127, 180501. [Google Scholar] [CrossRef] [PubMed] - Zhong, H.S.; Deng, Y.H.; Qin, J.; Wang, H.; Chen, M.C.; Peng, L.C.; Luo, Y.H.; Wu, D.; Gong, S.Q.; Su, H.; et al. Phase-Programmable Gaussian Boson Sampling Using Stimulated Squeezed Light. Phys. Rev. Lett.
**2021**, 127, 180502. [Google Scholar] [CrossRef] [PubMed] - Cao, Y.; Romero, J.; Olson, J.P.; Degroote, M.; Johnson, P.D.; Kieferová, M.; Kivlichan, I.D.; Menke, T.; Peropadre, B.; Sawaya, N.P.D.; et al. Quantum Chemistry in the Age of Quantum Computing. Chem. Rev.
**2019**, 119, 10856–10915. [Google Scholar] [CrossRef][Green Version] - Peruzzo, A.; McClean, J.; Shadbolt, P.; Yung, M.H.; Zhou, X.Q.; Love, P.; Aspuru-Guzik, A.; O’Brien, J. A variational eigenvalue solver on a photonic quantum processor. Nat. Commun.
**2014**, 5, 4213. [Google Scholar] [CrossRef][Green Version] - O’Malley, P.J.J.; Babbush, R.; Kivlichan, I.D.; Romero, J.; McClean, J.R.; Barends, R.; Kelly, J.; Roushan, P.; Tranter, A.; Ding, N.; et al. Scalable Quantum Simulation of Molecular Energies. Phys. Rev. X
**2016**, 6, 031007. [Google Scholar] [CrossRef] - Bloch, F. Generalized theory of relaxation. Phys. Rev.
**1957**, 105, 1206–1222. [Google Scholar] [CrossRef] - Krantz, P.; Kjaergaard, M.; Yan, F.; Orlando, T.P.; Gustavsson, S.; Oliver, W.D. A quantum engineer’s guide to superconducting qubits. Appl. Phys. Rev.
**2019**, 6, 021318. [Google Scholar] [CrossRef] - Preskill, J. Quantum Computing in the NISQ era and beyond. Quantum
**2018**, 2, 79. [Google Scholar] [CrossRef] - Kandala, A.; Mezzacapo, A.; Temme, K.; Takita, M.; Brink, M.; Chow, J.M.; Gambetta, J.M. Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature
**2017**, 549, 242–246. [Google Scholar] [CrossRef] - Kandala, A.; Temme, K.; Córcoles, A.D.; Mezzacapo, A.; Chow, J.M.; Gambetta, J.M. Error mitigation extends the computational reach of a noisy quantum processor. Nature
**2019**, 567, 491–495. [Google Scholar] [CrossRef][Green Version] - Temme, K.; Bravyi, S.; Gambetta, J.M. Error Mitigation for Short-Depth Quantum Circuits. Phys. Rev. Lett.
**2017**, 119, 180509. [Google Scholar] [CrossRef][Green Version] - Endo, S.; Benjamin, S.C.; Li, Y. Practical Quantum Error Mitigation for Near-Future Applications. Phys. Rev. X
**2018**, 8, 031027. [Google Scholar] [CrossRef][Green Version] - Geller, M.R.; Sun, M. Toward efficient correction of multiqubit measurement errors: Pair correlation method. Quantum Sci. Technol.
**2021**, 6, 025009. [Google Scholar] [CrossRef] - Bravyi, S.; Sheldon, S.; Kandala, A.; Mckay, D.C.; Gambetta, J.M. Mitigating measurement errors in multiqubit experiments. Phys. Rev. A
**2021**, 103. [Google Scholar] [CrossRef] - Nachman, B.; Urbanek, M.; de Jong, W.A.; Bauer, C.W. Unfolding quantum computer readout noise. NPJ Quantum Inf.
**2020**, 6, Art. [Google Scholar] [CrossRef] - Maciejewski, F.B.; Zimborás, Z.; Oszmaniec, M. Mitigation of readout noise in near-term quantum devices by classical post-processing based on detector tomography. Quantum
**2020**, 4, 257. [Google Scholar] [CrossRef] - Cai, Z. Quantum Error Mitigation using Symmetry Expansion. Quantum
**2021**, 5, 548. [Google Scholar] [CrossRef] - Suchsland, P.; Tacchino, F.; Fischer, M.H.; Neupert, T.; Barkoutsos, P.K.; Tavernelli, I. Algorithmic Error Mitigation Scheme for Current Quantum Processors. Quantum
**2021**, 5, 492. [Google Scholar] [CrossRef] - McArdle, S.; Endo, S.; Aspuru-Guzik, A.; Benjamin, S.; Yuan, X. Quantum computational chemistry. Rev. Mod. Phys.
**2020**, 92, 15003. [Google Scholar] [CrossRef][Green Version] - Bravyi, S.; Gambetta, J.M.; Mezzacapo, A.; Temme, K. Tapering off qubits to simulate fermionic Hamiltonians. arXiv
**2017**, arXiv:1701.08213. [Google Scholar] - Bravyi, S.; Kitaev, A. Fermionic quantum computation. Ann. Phys.
**2002**, 298, 210–226. [Google Scholar] [CrossRef][Green Version] - Jordan, P.; Wigner, E. Über das Paulische Äquivalenzverbot. Z. Phys.
**1928**, 47, 631–651. [Google Scholar] [CrossRef] - Qiskit: An Open-Source Framework for Quantum Computing. Available online: https://qiskit.org/ (accessed on 4 January 2021).
- Miháliková, I. Implementation of the Variational Quantum Eigensolver. 2021. Available online: https://github.com/imihalik/VQE_H2 (accessed on 11 November 2021).
- VQE Tutorial. Available online: https://pennylane.ai/qml/demos/tutorial_vqe.html (accessed on 1 November 2021).
- Qiskit’s Chemistry Module. Available online: https://qiskit.org/documentation/apidoc/qiskit_chemistry.html (accessed on 4 January 2021).
- Spall, J.C. Multivariate Stochastic Approximation Using a Simultaneous Perturbation Gradient Approximation. IEEE Trans. Autom. Control
**1992**, 37, 332–341. [Google Scholar] [CrossRef][Green Version] - Spall, J. Implementation of the simultaneous perturbation algorithm for stochastic optimization. IEEE Trans. Aerosp. Electron. Syst.
**1998**, 34, 817–823. [Google Scholar] [CrossRef] - Spall, J.C. An Overview of the Simultaneous Perturbation Method for Efficient Optimization. Johns Hopkins Apl Tech. Dig.
**1998**, 19, 482–492. [Google Scholar] - Havlíček, V.; Córcoles, A.; Temme, K.; Harrow, A.; Kandala, A.; Chow, J.; Gambetta, J. Supervised learning with quantum-enhanced feature spaces. Nature
**2019**, 567, 209–212. [Google Scholar] [CrossRef] [PubMed][Green Version] - IBM Quantum. Available online: https://quantum-computing.ibm.com/ (accessed on 4 November 2021).
- Least Square Fitting Error Mitigation. Available online: https://qiskit.org/textbook/ch-quantum-hardware/measurement-error-mitigation.html (accessed on 2 November 2021).
- Amazon Braket Pricing. Available online: https://aws.amazon.com/braket/pricing/ (accessed on 1 November 2021).
- Tukey, J.W. Exploratory Data Analysis; Addison-Wesley: Boston, MA, USA, 1977. [Google Scholar]
- Letham, B.; Karrer, B.; Ottoni, G.; Bakshy, E. Constrained Bayesian Optimization with Noisy Experiments. arXiv
**2017**, arXiv:1706.07094. [Google Scholar] [CrossRef] - Frazier, P. A Tutorial on Bayesian Optimization. arXiv
**2018**, arXiv:1807.02811. [Google Scholar] - Powell, M.J.D. The NEWUOA software for unconstrained optimization without derivatives. In Large-Scale Nonlinear Optimization; Di Pillo, G., Roma, M., Eds.; Springer: Boston, MA, USA, 2006; pp. 255–297. [Google Scholar] [CrossRef]
- Powell, M.J.D. A Direct Search Optimization Method That Models the Objective and Constraint Functions by Linear Interpolation. In Advances in Optimization and Numerical Analysis; Gomez, S., Hennart, J.P., Eds.; Springer: Dordrecht, The Netherlands, 1994; pp. 51–67. [Google Scholar] [CrossRef]
- Derby, C.; Klassen, J.; Bausch, J.; Cubitt, T. Compact fermion to qubit mappings. Phys. Rev. B
**2021**, 104, 035118. [Google Scholar] [CrossRef] - Lee, J.; Berry, D.W.; Gidney, C.; Huggins, W.J.; McClean, J.R.; Wiebe, N.; Babbush, R. Even More Efficient Quantum Computations of Chemistry Through Tensor Hypercontraction. PRX Quantum
**2021**, 2, 030305. [Google Scholar] [CrossRef] - Cerezo, M.; Sone, A.; Volkoff, T.; Cincio, L.; Coles, P.J. Cost function dependent barren plateaus in shallow parametrized quantum circuits. Nat. Commun.
**2021**, 12, 1791. [Google Scholar] [CrossRef] [PubMed] - Funcke, L.; Hartung, T.; Jansen, K.; Kühn, S.; Stornati, P. Dimensional Expressivity Analysis of Parametric Quantum Circuits. Quantum
**2021**, 5, 422. [Google Scholar] [CrossRef] - Nakaji, K.; Yamamoto, N. Expressibility of the alternating layered ansatz for quantum computation. Quantum
**2021**, 5, 434. [Google Scholar] [CrossRef] - Jaccard, P. The distribution of the flora IN the alpine ZONE.1. New Phytol.
**1912**, 11, 37–50. [Google Scholar] [CrossRef] - Tanimoto, T.T. An Elementary Mathematical theory of Classification and Prediction; Internal IBM Technical Report; International Business Machines Corporation: New York, NY, USA, 1958; p. 8. [Google Scholar]

**Figure 1.**A scheme of the 4-qubit quantum circuits for calculations of the ground-state energy. The circuit depth was set to 2. Dashed lines represent blocks of two layers—the entangled layer and the rotation layer. (

**a**) The ${R}_{\mathrm{y}}{R}_{\mathrm{z}}$ variational circuit. (

**b**) The ${R}_{\mathrm{y}}$ variational circuit.

**Figure 2.**VQE energy estimate improvement with number of shots. We calculated the ground-state energy of H${}_{2}$ using the VQE on a two-qubit system, the SPSA optimization algorithm with unrestricted maximum interations, and the ${R}_{\mathrm{y}}$ variational circuit accompanied by linear entanglement. The red line represents the physical ground-state energy ($-1.86712$ Hartree) and the light-red background represents the chemical accuracy regime ($\pm 0.0015$ Hartree). (

**a**) A boxplot of VQE results, with each box representing 1000 independent runs of the algorithm. (

**b**) A statevector simulator calculation of the energies for the 1000 result states from (

**a**). Note that all the energies are above the real ground-state energy.

**Figure 3.**(

**a**–

**d**) A boxplot visualization of 1000 optimized ground-state energies for various maximum numbers of iterations of the SPSA optimizer. We performed calculations using the ${R}_{\mathrm{y}}$ variational form. The red line represents the physical ground-state energy ($-1.86712$ Hartree) and the light-red background represents the chemical accuracy ($\pm 0.0015$ Hartree). The

`shots`parameter was set to: (

**a**) 512, (

**b**) 1024, (

**c**) 4096, (

**d**) 8192.

**Figure 4.**A recalculation of energies using statevector simulator for experiments with

`maxiter`$\in \{50,75,100\}$, and (

**a**,

**b**)

`shots`= 512; (

**c**,

**d**)

`shots`= 1024. The red line represents the physical ground-state energy ($-1.86712$ Hartree) and the light-red background represents the chemical accuracy ($\pm 0.0015$ Hartree).

**Figure 5.**Comparison of the VQE energies for H${}_{2}$ using the ${R}_{\mathrm{y}}$ and ${R}_{\mathrm{y}}{R}_{\mathrm{z}}$ variational circuit forms. We used a noiseless quantum simulator and 4096 shots; (

**a**) 2-qubit Hamiltonian. (

**b**) 4-qubit Hamiltonian. The red line represents the physical ground-state energy ($-1.86712$ Hartree) and the light-red background represents the chemical accuracy ($\pm 0.0015$ Hartree).

**Figure 6.**A comparison of VQE results with noise calibration from two different dates. We used quantum backend ibmq_santiago. All the other parameters in the simulation were kept the same, using 4096 shots and the ${R}_{\mathrm{y}}{R}_{\mathrm{z}}$ variational ansatz. The red line represents the physical ground-state energy ($-1.86712$ Hartree) and the light-red background represents the chemical accuracy ($\pm 0.0015$ Hartree).

**Figure 7.**The calculations of H${}_{2}$ energy were performed using simulator of real quantum hardware using a 2 and a 4 qubit Hamiltonian. We used quantum processor ibmq_santiago with noise model from December 14 2020. The number of shots was set to 4096. We minimized energy with the SPSA optimizer: (

**a**) in case of 2-qubit Hamiltonian we used unrestricted maximum number of iterations and the ${R}_{\mathrm{y}}$ variational form with depth 1, (

**b**) in case of 4-qubit Hamiltonian the maximum number of iterations was set to 400 and we used the ${R}_{\mathrm{y}}$ form with depth 2. The red line represents the physical ground-state energy ($-1.86712$ Hartree) and the light-red background represents the chemical accuracy ($\pm 0.0015$ Hartree).

**Figure 8.**A comparison of results obtained with a noisy quantum simulator with error mitigation (orange points and box plot), with real runs of the ibm_lagos quantum processor (blue points). The energies of real runs were subsequently recalculated with greater precission using 40,000 shots of the ibm_lagos quantum processor (grey points). Finally, we recalculate their energies also with a statevector simulator (red diamonds). The red line represents the physical ground-state energy ($-1.86712$ Hartree) and the light-red background represents the chemical accuracy ($\pm 0.0015$ Hartree).

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Miháliková, I.; Pivoluska, M.; Plesch, M.; Friák, M.; Nagaj, D.; Šob, M. The Cost of Improving the Precision of the Variational Quantum Eigensolver for Quantum Chemistry. *Nanomaterials* **2022**, *12*, 243.
https://doi.org/10.3390/nano12020243

**AMA Style**

Miháliková I, Pivoluska M, Plesch M, Friák M, Nagaj D, Šob M. The Cost of Improving the Precision of the Variational Quantum Eigensolver for Quantum Chemistry. *Nanomaterials*. 2022; 12(2):243.
https://doi.org/10.3390/nano12020243

**Chicago/Turabian Style**

Miháliková, Ivana, Matej Pivoluska, Martin Plesch, Martin Friák, Daniel Nagaj, and Mojmír Šob. 2022. "The Cost of Improving the Precision of the Variational Quantum Eigensolver for Quantum Chemistry" *Nanomaterials* 12, no. 2: 243.
https://doi.org/10.3390/nano12020243