- Open Access
Neural-Network-Assisted Monte Carlo Sampling Trained by Quantum Approximate Optimization Algorithm
PRX Quantum 7, 010338 – Published 24 February, 2026
DOI: https://doi.org/10.1103/9nhx-5pym
Abstract
Sampling problems are widely regarded as the task for which quantum computers can most readily provide a quantum advantage. Leveraging this feature, the quantum-enhanced Markov chain Monte Carlo [Layden et al., Nature 619, 282–287 (2023)] has been proposed recently, where sampling from a quantum computer is used as a proposal distribution and convergence to a target distribution is accelerated. However, guaranteeing convergence to the target distribution typically forces one to impose restrictive symmetry constraints on the quantum circuit, which makes it hard to design good proposal distributions and prevents making full use of the advantage of a quantum computer. We explore a hybrid quantum-classical Markov chain Monte Carlo framework that combines a quantum circuit with a generative neural sampler (GNS). The GNS is trained on quantum samples and acts as a classical surrogate to efficiently emulate quantum outputs, thereby lifting circuit constraints. We apply this method to Boltzmann sampling of spin glasses using proposals trained with a quantum approximate optimization algorithm circuit. This approach outperforms conventional methods, showing a polynomial speedup (over cubic) in spectral gap compared with uniform proposals. Notably, it maintains similar acceleration even without parameter optimization. These results establish the method as a viable sampling-based quantum algorithm for noisy intermediate-scale quantum devices and highlight its potential for solving practical problems with quantum computation.
Physics Subject Headings (PhySH)
Popular Summary
Quantum computers are especially good at generating samples, meaning random examples from complicated distributions. We explore a way to use that strength to speed up Markov chain Monte Carlo (MCMC), a standard tool for estimating properties of complex systems. Earlier hybrid quantum-classical MCMC methods needed specially restricted circuits, which limited performance. We pair an ordinary quantum circuit with a trainable generative neural network that learns from the circuit’s samples and then stands in for it when making Monte Carlo moves. On challenging spin-glass tasks, this led to much faster convergence, roughly a 100-fold improvement over simple baselines, and it worked even without tuning circuit parameters.
MCMC repeatedly proposes a new state and then accepts or rejects it to keep the sampling unbiased. Prior approaches forced the circuit into a special form only so the accept or reject step could be computed. We instead train a neural sampler on outputs from a quantum approximate optimization algorithm circuit, a shallow circuit designed to produce useful samples for hard optimization problems. The neural model mimics the circuit’s distribution closely enough that the accept or reject step can be done on a classical computer, while the quantum circuit remains flexible and hardware friendly.
Looking ahead, this hybrid strategy could scale to larger systems and other models, be tested more extensively on real hardware, and be paired with different neural samplers. It may become a general recipe for speeding up sampling in physics, optimization, and machine learning.
Article Text
References (78)
- P. W. Shor, in Proceedings of the 35th Annual Symposium on Foundations of Computer Science, SFCS ’94 (IEEE Computer Society, Santa Fe, NM, USA, 1994), p. 124.
- L. K. Grover, Quantum mechanics helps in searching for a needle in a haystack, Phys. Rev. Lett. 79, 325 (1997).
- D. S. Abrams and S. Lloyd, Quantum algorithm providing exponential speed increase for finding eigenvalues and eigenvectors, Phys. Rev. Lett. 83, 5162 (1999).
- A. W. Harrow, A. Hassidim, and S. Lloyd, Quantum algorithm for linear systems of equations, Phys. Rev. Lett. 103, 150502 (2009).
- J. Preskill, Quantum computing in the NISQ era and beyond, Quantum 2, 79 (2018).
- F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G. Brandao, D. A. Buell et al., Quantum supremacy using a programmable superconducting processor, Nature 574, 505 (2019).
- Z. Han-Sen, W. Hui, D. Yu-Hao, C. Ming-Cheng, P. Li-Chao, L. Yi-Han, Q. Jian, W. Dian, D. Xing, H. Yi et al., Quantum computational advantage using photons, Science 370, 1460 (2020).
- L. S. Madsen, F. Laudenbach, M. F. Askarani, F. Rortais, T. Vincent, J. F. F. Bulmer, F. M. Miatto, L. Neuhaus, L. G. Helt, M. J. Collins et al., Quantum computational advantage with a programmable photonic processor, Nature 606, 75 (2022).
- M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan, L. Cincio et al., Variational quantum algorithms, Nat. Rev. Phys. 3, 625 (2021).
- E. Farhi, J. Goldstone, and S. Gutmann, A quantum approximate optimization algorithm, arXiv:1411.4028.
- A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’brien, A variational eigenvalue solver on a photonic quantum processor, Nat. Commun. 5, 4213 (2014).
- E. Farhi and H. Neven, Classification with quantum neural networks on near term processors, arXiv:1802.06002.
- K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, Quantum circuit learning, Phys. Rev. A 98, 032309 (2018).
- J. F. Gonthier, M. D. Radin, C. Buda, E. J. Doskocil, C. M. Abuan, and J. Romero, Measurements as a roadblock to near-term practical quantum advantage in chemistry: Resource analysis, Phys. Rev. Res. 4, 033154 (2022).
- J. R. McClean, S. Boixo, V. N. Smelyanskiy, R. Babbush, and H. Neven, Barren plateaus in quantum neural network training landscapes, Nat. Commun. 9, 4812 (2018).
- D. Hangleiter and J. Eisert, Computational advantage of quantum random sampling, Rev. Mod. Phys. 95, 035001 (2023).
- S. Aaronson and L. Chen, Complexity-theoretic foundations of quantum supremacy experiments, arXiv:1612.05903.
- Y. Kim, A. Eddins, S. Anand, K. X. Wei, E. van den Berg, S. Rosenblatt, H. Nayfeh, Y. Wu, M. Zaletel, K. Temme, and A. Kandala, Evidence for the utility of quantum computing before fault tolerance, Nature 618, 500 (2023).
- K. Kechedzhi, S. Isakov, S. Mandrà, B. Villalonga, X. Mi, S. Boixo, and V. Smelyanskiy, Effective quantum volume, fidelity and computational cost of noisy quantum processing experiments, Future Gener. Comput. Syst. 153, 431 (2024).
- K. Kanno, M. Kohda, R. Imai, S. Koh, K. Mitarai, W. Mizukami, and Y. O. Nakagawa, Quantum-selected configuration interaction: Classical diagonalization of Hamiltonians in subspaces selected by quantum computers, arXiv:2302.11320.
- J. Robledo-Moreno, M. Motta, H. Haas, A. Javadi-Abhari, P. Jurcevic, W. Kirby, S. Martiel, K. Sharma, S. Sharma, T. Shirakawa et al., Chemistry beyond the scale of exact diagonalization on a quantum-centric supercomputer, Sci. Adv. 11, eadu9991 (2025).
- D. Layden, G. Mazzola, R. V. Mishmash, M. Motta, P. Wocjan, J.-S. Kim, and S. Sheldon, Quantum-enhanced Markov chain Monte Carlo, Nature 619, 282 (2023).
- N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller, Equation of state calculations by fast computing machines, J. Chem. Phys. 21, 1087 (1953).
- W. K. Hastings, Monte Carlo sampling methods using Markov chains and their applications, Biometrika 57, 97 (1970).
- Y. Nakano, H. Hakoshima, K. Mitarai, and K. Fujii, Markov-chain Monte Carlo method enhanced by a quantum alternating operator ansatz, Phys. Rev. Res. 6, 033105 (2024).
- J. Christmann, P. Ivashkov, M. Chiurco, and G. Mazzola, From quantum-enhanced to quantum-inspired Monte Carlo, Phys. Rev. A 111, 042615 (2025).
- A. Orfi and D. Sels, Bounding the speedup of the quantum-enhanced Markov-chain Monte Carlo algorithm, Phys. Rev. A 110, 052414 (2024).
- H. Larochelle and I. Murray, in Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics (PMLR, Fort Lauderdale, FL, USA, 2011), Vol. 15, p. 29.
- B. Uria, M.-A. Côté, K. Gregor, I. Murray, and H. Larochelle, Neural autoregressive distribution estimation, J. Mach. Learn. Res 17, 1 (2016).
- M. Germain, K. Gregor, I. Murray, and H. Larochelle, in Proceedings of the 32nd International Conference on Machine Learning (PMLR, Lille, France, 2015),Vol. 37, p. 881.
- P. C. Lotshaw, G. Siopsis, J. Ostrowski, R. Herrman, R. Alam, S. Powers, and T. S. Humble, Approximate Boltzmann distributions in quantum approximate optimization, Phys. Rev. A 108, 042411 (2023).
- P. Díez-Valle, D. Porras, and J. J. García-Ripoll, Quantum approximate optimization algorithm pseudo-Boltzmann states, Phys. Rev. Lett. 130, 050601 (2023).
- S. Leontica and D. Amaro, Exploring the neighborhood of 1-layer QAOA with instantaneous quantum polynomial circuits, Phys. Rev. Res. 6, 013071 (2024).
- E. Farhi and A. W. Harrow, Quantum supremacy through the quantum approximate optimization algorithm, arXiv:1602.07674.
- F. G. S. L. Brandao, M. Broughton, E. Farhi, S. Gutmann, and H. Neven, For fixed control parameters the quantum approximate optimization algorithm’s objective function value concentrates for typical instances, arXiv:1812.04170.
- A. Galda, X. Liu, D. Lykov, Y. Alexeev, and I. Safro, in 2021 IEEE International Conference on Quantum Computing and Engineering (QCE) (IEEE, Broomfield, CO, USA, 2021), p. 171.
- J. Wurtz and D. Lykov, Fixed-angle conjectures for the quantum approximate optimization algorithm on regular MaxCut graphs, Phys. Rev. A 104, 052419 (2021).
- R. Shaydulin, P. C. Lotshaw, J. Larson, J. Ostrowski, and T. S. Humble, Parameter transfer for quantum approximate optimization of weighted MaxCut, ACM Trans. Quantum Comput. 4, 1 (2023).
- G. Parisi, Field Theory, Disorder and Simulations (World Scientific, Singapore, 1992).
- K. Binder and A. P. Young, Spin glasses: Experimental facts, theoretical concepts, and open questions, Rev. Mod. Phys. 58, 801 (1986).
- R. H. Swendsen and J.-S. Wang, Nonuniversal critical dynamics in Monte Carlo simulations, Phys. Rev. Lett. 58, 86 (1987).
- U. Wolff, Collective Monte Carlo updating for spin systems, Phys. Rev. Lett. 62, 361 (1989).
- J. Houdayer, A cluster Monte Carlo algorithm for 2-dimensional spin glasses, Eur. Phys. J. B 22, 479 (2001).
- R. H. Swendsen and J.-S. Wang, Replica Monte Carlo simulation of spin-glasses, Phys. Rev. Lett. 57, 2607 (1986).
- K. Hukushima and K. Nemoto, Exchange Monte Carlo method and application to spin glass simulations, J. Phys. Soc. Jpn. 65, 1604 (1996).
- Z. Zhu, A. J. Ochoa, and H. G. Katzgraber, Efficient cluster algorithm for spin glasses in any space dimension, Phys. Rev. Lett. 115, 077201 (2015).
- D. H. Ackley, G. E. Hinton, and T. J. Sejnowski, A learning algorithm for Boltzmann machines, Cognit. Sci. 9, 147 (1985).
- P. Smolensky, in Parallel Distributed Processing, Volume 1: Explorations in the Microstructure of Cognition: Foundations (The MIT, Cambridge, 1986).
- G. E. Hinton, Training products of experts by minimizing contrastive divergence, Neural Comput. 14, 1771 (2002).
- G. E. Hinton and R. R. Salakhutdinov, Reducing the dimensionality of data with neural networks, Science 313, 504 (2006).
- D. P. Kingma and J. Ba, Adam: A method for stochastic optimization, in 3rd International Conference on Learning Representations, ICLR 2015, Conference Track Proceedings, edited by Y. Bengio and Y. LeCun (San Diego, CA, USA, 2015).
- K. A. Nicoli, S. Nakajima, N. Strodthoff, W. Samek, K.-R. Müller, and P. Kessel, Asymptotically unbiased estimation of physical observables with neural samplers, Phys. Rev. E 101, 023304 (2020).
- B. McNaughton, M. V. Milošević, A. Perali, and S. Pilati, Boosting Monte Carlo simulations of spin glasses using autoregressive neural networks, Phys. Rev. E 101, 053312 (2020).
- D. Wu, R. Rossi, and G. Carleo, Unbiased Monte Carlo cluster updates with autoregressive neural networks, Phys. Rev. Res. 3, L042024 (2021).
- M. Hibat-Allah, E. M. Inack, R. Wiersema, R. G. Melko, and J. Carrasquilla, Variational neural annealing, Nat. Mach. Intell. 3, 952 (2021).
- S. Ciarella, J. Trinquier, M. Weigt, and F. Zamponi, Machine-learning-assisted Monte Carlo fails at sampling computationally hard problems, Mach. Learn.: Sci. Technol. 4, 010501 (2023).
- E. M. Inack, S. Morawetz, and R. G. Melko, Neural annealing and visualization of autoregressive neural networks in the Newman–Moore model, Condens. Matter 7, 38 (2022).
- J. Rajakumar, J. Golden, A. Bärtschi, and S. Eidenbenz, in Proceedings of the 21st ACM International Conference on Computing Frontiers (Association for Computing Machinery, New York, NY, USA, 2024), p. 199.
- E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser, Quantum computation by adiabatic evolution, arXiv:quant-ph/0001106.
- T. Kadowaki and H. Nishimori, Quantum annealing in the transverse Ising model, Phys. Rev. E 58, 5355 (1998).
- J. Marshall, E. G. Rieffel, and I. Hen, Thermalization, freeze-out, and noise: Deciphering experimental quantum annealers, Phys. Rev. Appl. 8, 064025 (2017).
- J. Nelson, M. Vuffray, A. Y. Lokhov, T. Albash, and C. Coffrin, High-quality thermal Gibbs sampling with quantum annealing hardware, Phys. Rev. Appl. 17, 044046 (2022).
- M. Vuffray, C. Coffrin, Y. A. Kharkov, and A. Y. Lokhov, Programmable quantum annealers as noisy Gibbs samplers, PRX Quantum 3, 020317 (2022).
- S. Arai and T. Kadowaki, Quantum annealing enhanced Markov-chain Monte Carlo, Sci. Rep. 15, 21427 (2025).
- G. Mazzola, Sampling, rates, and reaction currents through reverse stochastic quantization on quantum computers, Phys. Rev. A 104, 022431 (2021).
- G. Scriva, E. Costa, B. McNaughton, and S. Pilati, Accelerating equilibrium spin-glass simulations using quantum annealers via generative deep learning, SciPost Phys. 15, 018 (2023).
- A. D. King, J. Raymond, T. Lanting, R. Harris, A. Zucca, F. Altomare, A. J. Berkley, K. Boothby, S. Ejtemaee, C. Enderud et al., Quantum critical dynamics in a 5000-qubit programmable spin glass, Nature 617, 61 (2023).
- M. S. Könz, W. Lechner, H. G. Katzgraber, and M. Troyer, Embedding overhead scaling of optimization problems in quantum annealing, PRX Quantum 2, 040322 (2021).
- D. A. Levin and Y. Peres, Markov Chains and Mixing Times (American Mathematical Society, Providence, 2017), 2nd ed.
- J. Basso, E. Farhi, K. Marwaha, B. Villalonga, and L. Zhou, in 17th Conference on the Theory of Quantum Computation, Communication and Cryptography (TQC 2022) (Schloss Dagstuhl—Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 2022), Vol. 232, p. 7:1.
- A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. u. Kaiser, and I. Polosukhin, in Advances in Neural Information Processing Systems (Curran Associates, Inc., Long Beach, CA, USA, 2017), Vol. 30.
- Y. Nagai and A. Tomiya, Self-learning Monte Carlo with equivariant transformer, J. Phys. Soc. Jpn. 93, 114007 (2024).
- I. Biazzo, The autoregressive neural network architecture of the Boltzmann distribution of pairwise interacting spins systems, Commun. Phys. 6, 296 (2023).
- Y. Nakano, https://doi.org/10.5281/zenodo.15545949 (2025).
- Y. Suzuki, Y. Kawase, Y. Masumura, Y. Hiraga, M. Nakadai, J. Chen, K. M. Nakanishi, K. Mitarai, R. Imai, S. Tamiya et al., Qulacs: A fast and versatile quantum circuit simulator for research purpose, Quantum 5, 559 (2021).
- R. H. Byrd, P. Lu, J. Nocedal, and C. Zhu, A limited memory algorithm for bound constrained optimization, SIAM J. Sci. Comput. 16, 1190 (1995).
- P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright et al., SciPy 1.0: Fundamental algorithms for scientific computing in Python, Nat. Methods 17, 261 (2020).
- A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga et al., in Advances in Neural Information Processing Systems (Curran Associates, Inc., Vancouver, Canada, 2019), Vol. 32.
