Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Autoregressive neural-network wavefunctions for ab initio quantum chemistry

A preprint version of the article is available at arXiv.

Abstract

In recent years, neural-network quantum states have emerged as powerful tools for the study of quantum many-body systems. Electronic structure calculations are one such canonical many-body problem that have attracted sustained research efforts spanning multiple decades, whilst only recently being attempted with neural-network quantum states. However, the complex non-local interactions and high sample complexity are substantial challenges that call for bespoke solutions. Here, we parameterize the electronic wavefunction with an autoregressive neural network that permits highly efficient and scalable sampling, whilst also embedding physical priors reflecting the structure of molecular systems without sacrificing expressibility. This allows us to perform electronic structure calculations on molecules with up to 30 spin orbitals—at least an order of magnitude more Slater determinants than previous applications of conventional neural-network quantum states—and we find that our ansatz can outperform the de facto gold-standard coupled-cluster methods even in the presence of strong quantum correlations. With a highly expressive neural network for which sampling is no longer a computational bottleneck, we conclude that the barriers to further scaling are not associated with the wavefunction ansatz itself, but rather are inherent to any variational Monte Carlo approach.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: The high-level architecture of the ARN implementing our wavefunction ansatz.
Fig. 2: The operation of a single conditional wavefunction subnetwork.
Fig. 3: Comparison of the energies obtained using a NAQS and traditional QC approaches for the diatomic nitrogen molecule, as a function of the nuclear separation.
Fig. 4: The variational energies obtained over the course of optimization for the NAQS model described in the text (Standard) and the associated ablations of both restricting the optimization space to physically viable determinants (No mask) and the spin-flip symmetries of the final wavefunction (No spin sym.).

Similar content being viewed by others

Data availability

The molecular geometries used in this work are in the STO-3G basis as returned from the PubChem42 database by OpenFermion43. OpenFermion was also used to generate qubit Hamiltonians of the form of equation (4), with the backend calculations and baseline QC methods—Hartree–Fock, configuration interaction, CCSD, CCSD(T)—implemented using Psi444. The exact molecular data generated, along with a notebook to reproduce these steps, can be found in the supporting code at https://github.com/tomdbar/naqs-for-quantum-chemistry and published on Zenodo45.

Code availability

Source code to reproduce the reported results can be found at https://github.com/tomdbar/naqs-for-quantum-chemistry and published on Zenodo45.

References

  1. Whitfield, J. D., Love, P. J. & Aspuru-Guzik, A. Computational complexity in electronic structure. Phys. Chem. Chem. Phys. 15, 397–411 (2013).

    Article  Google Scholar 

  2. O’Gorman, B., Irani, S., Whitfield, J. & Fefferman, B. Electronic structure in a fixed basis is QMA-complete. Preprint at https://arxiv.org/abs/2103.08215 (2021).

  3. Hammond, B. L., Lester, W. A. & Reynolds, P. J. Monte Carlo Methods in Ab Initio Quantum Chemistry Vol. 1 (World Scientific, 1994).

  4. Langhoff, S. Quantum Mechanical Electronic Structure Calculations with Chemical Accuracy Vol. 13 (Springer, 2012).

  5. Piela, L. Ideas of Quantum Chemistry (Elsevier, 2013).

  6. McArdle, S., Endo, S., Aspuru-Guzik, A., Benjamin, S. C. & Yuan, X. Quantum computational chemistry. Rev. Mod. Phys. 92, 015003 (2020).

    Article  MathSciNet  Google Scholar 

  7. Sherrill, C. D. & Schaefer, H. F. III The configuration interaction method: advances in highly correlated approaches. Adv. Quantum Chem. 34, 143–269 (1999).

  8. Coester, F. & Kümmel, H. Short-range correlations in nuclear wave functions. Nucl. Phys. 17, 477–485 (1960).

    Article  MathSciNet  Google Scholar 

  9. Bartlett, R. J. & Musiał, M. Coupled-cluster theory in quantum chemistry. Rev. Mod. Phys. 79, 291–352 (2007).

    Article  Google Scholar 

  10. Bulik, I. W., Henderson, T. M. & Scuseria, G. E. Can single-reference coupled cluster theory describe static correlation? J. Chem. Theory Comput. 11, 3171–3179 (2015).

    Article  Google Scholar 

  11. Foulkes, W., Mitas, L., Needs, R. & Rajagopal, G. Quantum Monte Carlo simulations of solids. Rev. Mod. Phys. 73, 33 (2001).

    Article  Google Scholar 

  12. White, S. R. Density matrix formulation for quantum renormalization groups. Phys. Rev. Lett. 69, 2863 (1992).

    Article  Google Scholar 

  13. White, S. R. & Martin, R. L. Ab initio quantum chemistry using the density matrix renormalization group. J. Chem. Phys. 110, 4127–4130 (1999).

    Article  Google Scholar 

  14. Nightingale, M. P. & Umrigar, C. J. Quantum Monte Carlo Methods in Physics and Chemistry (Springer, 1998).

  15. Neuscamman, E., Changlani, H., Kinder, J. & Chan, G. K.-L. Nonstochastic algorithms for Jastrow–Slater and correlator product state wave functions. Phys. Rev. B 84, 205132 (2011).

    Article  Google Scholar 

  16. Carleo, G. & Troyer, M. Solving the quantum many-body problem with artificial neural networks. Science 355, 602–606 (2017).

    Article  MathSciNet  Google Scholar 

  17. Sharir, O., Levine, Y., Wies, N., Carleo, G. & Shashua, A. Deep autoregressive models for the efficient variational simulation of many-body quantum systems. Phys. Rev. Lett. 124, 020503 (2020).

    Article  Google Scholar 

  18. Hibat-Allah, M., Ganahl, M., Hayward, L. E., Melko, R. G. & Carrasquilla, J. Recurrent neural network wave functions. Phys. Rev. Res. 2, 023358 (2020).

    Article  Google Scholar 

  19. Torlai, G. et al. Neural-network quantum state tomography. Nat. Phys. 14, 447–450 (2018).

    Article  Google Scholar 

  20. Carrasquilla, J., Torlai, G., Melko, R. G. & Aolita, L. Reconstructing quantum states with generative models. Nat. Mach. Intell. 1, 155–161 (2019).

    Article  Google Scholar 

  21. Neugebauer, M. et al. Neural-network quantum state tomography in a two-qubit experiment. Phys. Rev. A 102, 042604 (2020).

    Article  Google Scholar 

  22. Ahmed, S., Muñoz, C. S., Nori, F. & Kockum, A. F. Quantum state tomography with conditional generative adversarial networks. Phys. Rev. Lett. 127, 140502 (2021).

    Article  Google Scholar 

  23. Jónsson, B., Bauer, B. & Carleo, G. Neural-network states for the classical simulation of quantum computing. Preprint at https://arxiv.org/abs/1808.05232 (2018).

  24. Choo, K., Mezzacapo, A. & Carleo, G. Fermionic neural-network states for ab-initio electronic structure. Nat. Commun. 11, 2368 (2020).

    Article  Google Scholar 

  25. LeCun, Y. A theoretical framework for back-propagation. In D. Touresky, G. Hinton, & T. Sejnowski, editors, Proc. 1988 Connectionist Models Summer School 21–28, CMU, Pittsburgh (1988).

  26. Wigner, E. & Jordan, P. Über das paulische äquivalenzverbot. Z. Phys. 47, 631 (1928).

    Article  Google Scholar 

  27. Larochelle, H. & Murray, I. The neural autoregressive distribution estimator. In Proc. Fourteenth International Conference on Artificial Intelligence and Statistics, PMLR 15, 29–37 (2011).

  28. Uria, B., Côté, M.-A., Gregor, K., Murray, I. & Larochelle, H. Neural autoregressive distribution estimation. J. Mach. Learn. Res. 17, 7184–7220 (2016).

    MathSciNet  MATH  Google Scholar 

  29. Morawetz, S., De Vlugt, I. J., Carrasquilla, J. & Melko, R. G. U(1)-symmetric recurrent neural networks for quantum state reconstruction. Phys. Rev. A 104, 012401 (2021).

    Article  MathSciNet  Google Scholar 

  30. Brooks, S., Gelman, A., Jones, G. & Meng, X.-L. Handbook of Markov Chain Monte Carlo (CRC Press, 2011).

  31. Hastings, W. K. Monte Carlo Sampling Methods Using Markov Chains and Their Applications (Oxford University Press, 1970).

  32. Sherrill, C. D. An Introduction to Configuration Interaction Theory http://vergil.chemistry.gatech.edu/notes/ci.pdf (1995).

  33. Choo, K., Carleo, G., Regnault, N. & Neupert, T. Symmetries and many-body excitations with neural-network quantum states. Phys. Rev. Lett. 121, 167204 (2018).

    Article  Google Scholar 

  34. Pfau, D., Spencer, J. S., Matthews, A. G. d. G. & Foulkes, W. M. C. Ab-initio solution of the many-electron Schrödinger equation with deep neural networks. Phys. Rev. Research 2, 033429 (2020).

  35. Hermann, J., Schätzle, Z. & Noé, F. Deep neural network solution of the electronic Schrödinger equation. Nature Chemistry 12, 891–897 (2020).

  36. Seeley, J. T., Richard, M. J. & Love, P. J. The Bravyi–Kitaev transformation for quantum computation of electronic structure. J. Chem. Phys. 137, 224109 (2012).

    Article  Google Scholar 

  37. Bravyi, S. B. & Kitaev, A. Y. Fermionic quantum computation. Ann. Phys. (N. Y.) 298, 210–226 (2002).

    Article  MathSciNet  Google Scholar 

  38. Glorot, X., Bordes, A. & Bengio, Y. Deep sparse rectifier neural networks. In Proc. Fourteenth International Conference on Artificial Intelligence and Statistics, PMLR 15, 315–323 (2011).

  39. Sutton, R. S. & Barto, A. G. Reinforcement Learning: an Introduction (MIT Press, 2018).

  40. Mohamed, S., Rosca, M., Figurnov, M. & Mnih, A. Monte Carlo gradient estimation in machine learning. J. Mach. Learn. Res. 21, 1–62 (2020).

    MathSciNet  MATH  Google Scholar 

  41. Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. In 3rd International Conference on Machine Learning, arXiv preprint arXiv:1412.6980 (2015).

  42. Kim, S. et al. PubChem substance and compound databases. Nucleic Acids Res. 44, D1202–D1213 (2016).

    Article  Google Scholar 

  43. McClean, J. et al. OpenFermion: the electronic structure package for quantum computers. Quantum Sci. Technol. 5, 034014 (2020).

    Article  Google Scholar 

  44. Smith, D. G. et al. Psi4 1.4: open-source software for high-throughput quantum chemistry. J. Chem. Phys. 152, 184108 (2020).

    Article  Google Scholar 

  45. Barrett, T. D. tomdbar/naqs-for-quantum-chemistry: publication code (v1.0.0). https://doi.org/10.5281/zenodo.5973755 (2022).

Download references

Acknowledgements

We are grateful to G. Carleo for his insights regarding RBMs, and to M. Sapova for her assistance with quantum chemical calculations. A.I.L.’s research is partially supported by the Russian Science Foundation (19-71-10092).

Author information

Authors and Affiliations

Authors

Contributions

T.D.B. conceived the research, wrote the code, performed the experiments and cowrote the paper. A.M. assisted in theoretical analysis of the system and in preparing the manuscript. A.I.L. oversaw the entire project, helped interpret the results and cowrote the paper.

Corresponding authors

Correspondence to Thomas D. Barrett or A. I. Lvovsky.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Machine Intelligence thanks Jan Hermann, Rongxin Xia and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Additional information

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

Supplementary information

Supplementary Information

Supplementary Tables 1–4, Figs. 1 and 2 and extended analysis of wall-clock timings.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Barrett, T.D., Malyshev, A. & Lvovsky, A.I. Autoregressive neural-network wavefunctions for ab initio quantum chemistry. Nat Mach Intell 4, 351–358 (2022). https://doi.org/10.1038/s42256-022-00461-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1038/s42256-022-00461-z

This article is cited by

Search

Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing