Abstract
It is a long-standing challenge to accurately and efficiently compute thermodynamic quantities of many-body systems at thermal equilibrium. The conventional methods, e.g., Markov chain Monte Carlo (MCMC), require many steps to equilibrate. The recently developed deep learning methods can perform direct sampling, but only work on single trained temperature point. Here, we propose a variational method for canonical ensembles with differentiable temperature, which gives thermodynamic quantities as continuous functions of temperature akin to an analytical solution. Using a generative model, the free energy is estimated and minimized in a continuous temperature range. At optimal, this model is a Boltzmann distribution with temperature dependence. This method requires no dataset, and works with arbitrary explicit density generative models. We applied our method to study the phase transitions (PTs) in the Ising and XY models, and showed that our direct-sampling simulations are as accurate as MCMC, but more efficient. Moreover, our differentiable free energy aligns closely with the exact one to the second-order derivative, indicating the variational model captured the subtle thermal transitions at the PTs. The functional dependence on external parameters along with the exceptional fitting ability of deep learning models sheds light on the direct simulation of physical systems.
*S.-H.L. acknowledges support from Hong Kong Research Grants Council (GRF-16302423). D.P. acknowledges support from the Croucher Foundation through the Croucher Innovation Award, Hong Kong Research Grants Council (GRF-16301723), National Natural Science Foundation of China through the Excellent Young Scientists Fund (22022310), and the Hetao Shenzhen/Hong Kong Innovation and Technology Cooperation (HZQB-KCZYB-2020083). Part of this work was carried out using computational resources from the National Supercomputer Center in Guangzhou, China, and the X-GPU cluster supported by the HKRGC Collaborative Research Fund C6021-19EF.