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:

Learning models of quantum systems from experiments

Abstract

As Hamiltonian models underpin the study and analysis of physical and chemical processes, it is crucial that they are faithful to the system they represent. However, formulating and testing candidate Hamiltonians for quantum systems from experimental data is difficult, because one cannot directly observe which interactions are present. Here we propose and demonstrate an automated protocol to overcome this challenge by designing an agent that exploits unsupervised machine learning. We first show the capabilities of our approach to infer the correct Hamiltonian when studying a nitrogen-vacancy centre set-up. In preliminary simulations, the exact model is known and is correctly inferred with success rates up to 59%. When using experimental data, 74% of protocol instances retrieve models that are deemed plausible. Simulated multi-spin systems, characterized by a space of 1010 possible models, are also investigated by incorporating a genetic algorithm in our protocol, which identifies the target model in 85% of instances. The development of automated agents, capable of formulating and testing modelling hypotheses from limited prior assumptions, represents a fundamental step towards the characterization of large quantum systems.

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: Overview of the QMLA protocol and its principal subroutines.
Fig. 2: QMLA results for simulated and experimental data, describing a NV centre system.
Fig. 3: QMLA applied to systems composed of several interacting spins implementing various exploration strategies.

Similar content being viewed by others

Data availability

Data and analysis scripts are available at https://figshare.com/s/caf2581da7eb2414fc7f. The data are presented in CSV format with analysis in Python using Pandas and NumPy libraries.

Code availability

Our code, written in Python and implemented via the Portable Batch System for parallel processing, is available at https://github.com/flynnbr11/QMLA, with documentation at https://quantum-model-learning-agent.readthedocs.io/en/latest/.

References

  1. Schmidt, M. & Lipson, H. Distilling free-form natural laws from experimental data. Science 324, 81–85 (2009).

    Article  ADS  Google Scholar 

  2. Carleo, G. et al. Machine learning and the physical sciences. Rev. Mod. Phys. 91, 045002 (2019).

    Article  ADS  Google Scholar 

  3. Poulsen Nautrup, H. et al. Operationally meaningful representations of physical systems in neural networks. Preprint at https://arxiv.org/pdf/2001.00593.pdf (2020).

  4. Hills, D. J., Grütter, A. M. & Hudson, J. J. An algorithm for discovering Lagrangians automatically from data. PeerJ Comput. Sci. 1, e31 (2015).

    Article  Google Scholar 

  5. Carrasquilla, J. & Melko, R. G. Machine learning phases of matter. Nat. Phys. 13, 431–434 (2017).

    Article  Google Scholar 

  6. Iten, R., Metger, T., Wilming, H., Delrio, L. & Renner, R. Discovering physical concepts with neural networks. Phys. Rev. Lett. 124, 010508 (2020).

    Article  ADS  Google Scholar 

  7. Greydanus, S., Dzamba, M. & Yosinski, J. Hamiltonian Neural Networks (Curran Associates, 2019).

  8. Flurin, E., Martin, L. S., Hacohen-Gourgy, S. & Siddiqi, I. Using a recurrent neural network to reconstruct quantum dynamics of a superconducting qubit from physical observations. Phys. Rev. X 10, 011006 (2020).

    Google Scholar 

  9. Mohseni, M., Rezakhani, A. T. & Lidar, D. A. Quantum-process tomography: resource analysis of different strategies. Phys. Rev. A 77, 032322 (2008).

    Article  ADS  Google Scholar 

  10. Spagnolo, N. et al. Learning an unknown transformation via a genetic approach. Sci. Rep. 7, 14316 (2017).

    Article  ADS  Google Scholar 

  11. Lanyon, B. P. et al. Efficient tomography of a quantum many-body system. Nat. Phys. 13, 1158–1162 (2017).

    Article  Google Scholar 

  12. Huang, H.-Y., Kueng, R. & Preskill, J. Predicting many properties of a quantum system from very few measurements. Nat. Phys. 16, 1050–1057 (2020).

    Article  Google Scholar 

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

    Article  ADS  MathSciNet  MATH  Google Scholar 

  14. Dunjko, V. & Briegel, H. J. Machine learning and artificial intelligence in the quantum domain: a review of recent progress. Rep. Prog. Phys. 81, 074001 (2018).

    Article  ADS  MathSciNet  Google Scholar 

  15. Fösel, T., Tighineanu, P., Weiss, T. & Marquardt, F. Reinforcement learning with neural networks for quantum feedback. Phys. Rev. X 8, 031084 (2018).

    Google Scholar 

  16. Poulsen Nautrup, H., Delfosse, N., Dunjko, V., Briegel, H. J. & Friis, N. Optimizing quantum error correction codes with reinforcement learning. Quantum 3, 215 (2019).

    Article  Google Scholar 

  17. Santagati, R. et al. Magnetic-field learning using a single electronic spin in diamond with one-photon readout at room temperature. Phys. Rev. X 9, 021019 (2019).

    Google Scholar 

  18. Lumino, A. et al. Experimental phase estimation enhanced by machine learning. Phys. Rev. Appl. 10, 044033 (2018).

    Article  ADS  Google Scholar 

  19. Aharon, N. et al. NV center based nano-NMR enhanced by deep learning. Sci. Rep. 9, 17802 (2019).

    Article  ADS  Google Scholar 

  20. Liu, G., Chen, M., Liu, Y.-X., Layden, D. & Cappellaro, P. Repetitive readout enhanced by machine learning. Mach. Learn. Sci. Technol. 1, 015003 (2020).

    Article  Google Scholar 

  21. Banchi, L., Pancotti, N. & Bose, S. Quantum gate learning in qubit networks: Toffoli gate without time-dependent control. npj Quantum Inf. 2, 16019 (2016).

    Article  ADS  Google Scholar 

  22. Stenberg, M. P. V., Köhn, O. & Wilhelm, F. K. Characterization of decohering quantum systems: machine learning approach. Phys. Rev. A 93, 012122 (2016).

    Article  ADS  Google Scholar 

  23. Darulová, J. et al. Autonomous tuning and charge-state detection of gate-defined quantum dots. Phys. Rev. Appl. 13, 054005 (2020).

    Article  ADS  Google Scholar 

  24. Krenn, M., Malik, M., Fickler, R., Lapkiewicz, R. & Zeilinger, A. Automated search for new quantum experiments. Phys. Rev. Lett. 116, 090405 (2016).

    Article  ADS  Google Scholar 

  25. DiFranco, C., Paternostro, M. & Kim, M. S. Hamiltonian tomography in an access-limited setting without state initialization. Phys. Rev. Lett. 102, 187203 (2009).

    Article  ADS  Google Scholar 

  26. Schirmer, S. G. & Oi, D. K. L. Two-qubit Hamiltonian tomography by Bayesian analysis of noisy data. Phys. Rev. A 80, 022333 (2009).

    Article  ADS  Google Scholar 

  27. Seveso, L. & Paris, M. G. A. Estimation of general Hamiltonian parameters via controlled energy measurements. Phys. Rev. A 98, 032114 (2018).

    Article  ADS  Google Scholar 

  28. Wiebe, N., Granade, C., Ferrie, C. & Cory, D. G. Hamiltonian learning and certification using quantum resources. Phys. Rev. Lett. 112, 190501 (2014).

    Article  ADS  Google Scholar 

  29. Evans, T., Harper, R. & Flammina, S. Scalable Bayesian Hamiltonian learning. Preprint at https://arxiv.org/pdf/1912.07636.pdf (2019).

  30. Hou, P.-Y. et al. Experimental Hamiltonian learning of an 11-qubit solid-state quantum spin register. Chin. Phys. Lett. 36, 10030 (2019).

    Article  Google Scholar 

  31. Valenti, A., Vannieuwenburg, E., Huber, S. & Greplova, E. Hamiltonian learning for quantum error correction. Phys. Rev. Res. 1, 033092 (2019).

    Article  Google Scholar 

  32. Hincks, I., Granade, C. & Cory, D. G. Statistical inference with quantum measurements: methodologies for nitrogen vacancy centers in diamond. New J. Phys. 20, 013022 (2018).

    Article  ADS  MathSciNet  Google Scholar 

  33. Wang, J. et al. Experimental quantum Hamiltonian learning. Nat. Phys. 13, 551–555 (2017).

    Article  Google Scholar 

  34. Granade, C. E., Ferrie, C., Wiebe, N. & Cory, D. G. Robust online Hamiltonian learning. New J. Phys. 14, 103013 (2012).

    Article  ADS  MathSciNet  MATH  Google Scholar 

  35. Kass, R. E. & Raftery, A. E. Bayes factors. J. Am. Stat. Assoc. 90, 773–795 (1995).

    Article  MathSciNet  MATH  Google Scholar 

  36. Myung, I. J. Applying Occam’s razor in modeling cognition: a Bayesian approach. Psychon. Bull. Rev. 4, 79–95 (1997).

    Article  Google Scholar 

  37. Granade, C. et al. QInfer: statistical inference software for quantum applications. Quantum 1, 5 (2017).

    Article  Google Scholar 

  38. Smeltzer, B., Childress, L. & Gali, A. 13C hyperfine interactions in the nitrogen-vacancy centre in diamond. New J. Phys. 13, 025021 (2011).

    Article  ADS  Google Scholar 

  39. Kalb, N., Humphreys, P. C., Slim, J. J. & Hanson, R. Dephasing mechanisms of diamond-based nuclear-spin memories for quantum networks. Phys. Rev. A 97, 062330 (2018).

    Article  ADS  Google Scholar 

  40. Rowan, L. G., Hahn, E. L. & Mims, W. B. Electron-spin-echo envelope modulation. Phys. Rev. 137, A61–A71 (1965).

    Article  ADS  Google Scholar 

  41. Childress, L. et al. Coherent dynamics of coupled electron and nuclear spin qubits in diamond. Science 314, 281–285 (2006).

    Article  ADS  Google Scholar 

  42. Sweke, R., Sinayskiy, I. & Petruccione, F. Simulation of single-qubit open quantum systems. Phys. Rev. A 90, 022331 (2014).

    Article  ADS  Google Scholar 

  43. Gali, A., Fyta, M. & Kaxiras, E. Ab initio supercell calculations on nitrogen-vacancy center in diamond: electronic structure and hyperfine tensors. Phys. Rev. B 77, 155206 (2008).

    Article  ADS  Google Scholar 

  44. Gurudev, D. M. V. et al. Quantum register based on individual electronic and nuclear spin qubits in diamond. Science 316, 1312–1316 (2007).

    Article  Google Scholar 

  45. Brunner, N., Navascués, M. & Vértesi, T. Dimension witnesses and quantum state discrimination. Phys. Rev. Lett. 110, 150501 (2013).

    Article  ADS  Google Scholar 

  46. Granade, C. & Wiebe, N. Structured filtering. New J. Phys. 19, 083014 (2017).

    Article  ADS  Google Scholar 

  47. Álvarez, G. A. et al. Local and bulk 13C hyperpolarization in nitrogen-vacancy-centred diamonds at variable fields and orientations. Nat. Commun. 6, 8456 (2015).

    Article  ADS  Google Scholar 

  48. Li, Z., Zou, L. & Hsieh, T. H. Hamiltonian tomography via quantum quench. Phys. Rev. Lett. 124, 160502 (2020).

    Article  ADS  Google Scholar 

  49. Chertkov, E. & Clark, B. K. Computational inverse method for constructing spaces of quantum models from wave functions. Phys. Rev. X 8, 031029 (2018).

    Google Scholar 

  50. Shabani, A., Mohseni, M., Lloyd, S., Kosut, R. L. & Rabitz, H. Estimation of many-body quantum Hamiltonians via compressive sensing. Phys. Rev. A 84, 012107 (2011).

    Article  ADS  Google Scholar 

  51. Bairey, E., Arad, I. & Lindner, N. H. Learning a local Hamiltonian from local measurements. Phys. Rev. Lett. 122, 020504 (2019).

    Article  ADS  Google Scholar 

  52. Nielsen, E. et al. Gate set tomography. Preprint at https://arxiv.org/pdf/2009.07301.pdf (2020).

  53. Torlai, G. et al. Quantum process tomography with unsupervised learning and tensor networks. Preprint at https://arxiv.org/pdf/2006.02424.pdf (2020).

  54. Scerri, E., Gauger, E. M. & Bonato, C. Extending qubit coherence by adaptive quantum environment learning. New J. Phys. 22, 035002 (2020).

    Article  ADS  Google Scholar 

  55. Reiter, F. & Sørensen, A. S. Effective operator formalism for open quantum systems. Phys. Rev. A 85, 032111 (2012).

    Article  ADS  Google Scholar 

  56. Gali, A. Identification of individual 13C isotopes of nitrogen-vacancy center in diamond by combining the polarization studies of nuclear spins and first-principles calculations. Phys. Rev. B 80, 241204 (2009).

    Article  ADS  Google Scholar 

  57. Dinani, H. T., Berry, D. W., Gonzalez, R., Maze, J. R. & Bonato, C. Bayesian estimation for quantum sensing in the absence of single-shot detection. Phys. Rev. B 99, 125413 (2019).

    Article  ADS  Google Scholar 

  58. Goldberg, D. E. Genetic Algorithms in Search, Optimization and Machine Learning (Addison-Wesley,1989).

  59. Balian, S. J., Wolfowicz, G., Morton, J. J. L. & Monteiro, T. S. Quantum-bath-driven decoherence of mixed spin systems. Phys. Rev. B 89, 045403 (2014).

    Article  ADS  Google Scholar 

  60. Breuer, H.-P. & Petruccione, F. The Theory of Open Quantum Systems (Oxford Univ. Press, 2007).

  61. Liu, J. & West, M. Combined Parameter and State Estimation in Simulation-Based Filtering (Springer, 2001).

  62. Broadway, D. A. et al. Quantum probe hyperpolarization of molecular nuclear spins. Nat. Commun. 9, 1246 (2018).

    Article  ADS  Google Scholar 

Download references

Acknowledgements

We thank C. Bonato, F. Jelezko, F. Marquardt, T. Fösel, C. Woods, J. Wang, M. G. Thompson, A. Paiement, A. Cimarelli, P. Yard and J. Bulmer for useful discussions and feedback. A.A.G., S.K., S.P. and R.S. acknowledge support from the Engineering and Physical Sciences Research Council (EPSRC), programme grant no. EP/L024020/1. B.F. acknowledges support from Airbus and EPSRC grant EP/P510427/1. N.W. was funded by a grant from Google Quantum AI, the NQI center for Quantum Co-Design, the Pacific Northwest National Laboratory LDRD programme and the ‘Embedding Quantum Computing into Many-Body Frameworks for Strongly Correlated Molecular and Materials Systems’ project, funded by the US Department of Energy (DOE). J.G.R. acknowledges support from EPSRC (EP/M024458/1). A.L. acknowledges fellowship support from EPSRC (EP/N003470/1). This work is supported by the UK Hub in Quantum Computing and Simulation, part of the UK National Quantum Technologies Programme with funding from UKRI EPSRC grant no. EP/T001062/1, and by the European project QuCHIP (Quantum Simulation on a Photonic Chip; grant agreement no. 641039). This work was carried out using the computational facilities of the Advanced Computing Research Centre, University of Bristol (http://www.bristol.ac.uk/acrc/).

Author information

Authors and Affiliations

Authors

Contributions

R.S., A.A.G. and N.W. conceived the methodology. B.F., A.A.G. and R.S. performed simulations with support from N.W., S.P. and C.E.G. S.K. built the set-up and performed the experiments under the guidance of J.G.R. A.A.G., R.S., B.F. and S.P. analysed and interpreted the data with support from N.W., S.K. and C.E.G. A.A.G., R.S., B.F., S.K., N.W., S.P., C.E.G. and A.L. wrote the manuscript. R.S. and A.L. supervised the project.

Corresponding author

Correspondence to Raffaele Santagati.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Nature Physics thanks Dong-Ling Deng and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

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

Supplementary information

Supplementary Information

Supplementary Figs. 1–7, discussion and analysis, Tables 1 and 2.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gentile, A.A., Flynn, B., Knauer, S. et al. Learning models of quantum systems from experiments. Nat. Phys. 17, 837–843 (2021). https://doi.org/10.1038/s41567-021-01201-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1038/s41567-021-01201-7

This article is cited by

Search

Quick links

Nature Briefing AI and Robotics

Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.

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