peapods:用于伊辛自旋系统的Rust加速蒙特卡洛包
peapods: A Rust-Accelerated Monte Carlo Package for Ising and XY Spin Systems
AI总结:
peapods是一个基于Rust加速的Python包,用于高效模拟伊辛自旋系统,支持多种蒙特卡洛算法和自旋玻璃计算方法。
摘要:
我们介绍了peapods(github.com/PeaBrane/peapods),一个开源的Python包,用于具有任意耦合常数的伊辛自旋系统蒙特卡洛模拟,这些自旋系统在具有用户指定邻近偏移的周期布拉维晶格上。计算核心用Rust编写,并通过PyO3暴露给Python,结合了Python的优雅接口和编译、内存安全代码的性能。该包实现了Metropolis和Gibbs单自旋翻转算法、Swendsen-Wang和Wolff簇更新、并行退火以及三种用于自旋玻璃的簇移动:Houdayer等能级簇移动、Jorg随机变种和Chayes-Machta-Redner(CMR)蓝键算法。副本对之间的重叠统计可用于计算自旋玻璃序参数和Binder比。通过Rayon工作窃取调度器实现副本级别的并行性。我们通过有限尺寸缩放的Binder累积量验证了实现的准确性,与二维伊辛模型在正方形和三角晶格上的精确临界温度一致。
英文摘要:
We present peapods, an open-source Python package for Monte Carlo simulation of classical spin models with arbitrary couplings, whose sampling loop runs in Rust. It samples Ising models on periodic Bravais lattices given by user-specified neighbor offsets, optionally with open or antiperiodic boundaries, and XY models with signed couplings and site dilution on hypercubic lattices. Besides Metropolis and heat-bath sweeps, Swendsen-Wang and Wolff cluster updates and parallel tempering, it provides a family of replica cluster moves for spin glasses: the Houdayer, Jörg and Chayes-Machta-Redner moves, multi-pair variants of the first two, replica-permutation moves and a gauged form of them, and Swendsen-Wang replica Monte Carlo across temperatures. The same-temperature moves share one construction, a symmetry of the replicas' joint energy applied on clusters, and one-step stationarity tests from exact Boltzmann samples on small lattices check each family of moves that satisfies detailed balance. The package measures overlap distributions, spin-glass correlation lengths, autocorrelation times, equilibration and tempering-flow diagnostics, and jackknife errors over disorder samples. It reproduces the exact critical temperatures of the square and triangular Ising lattices, and its Binder curves for simple-cubic, BCC and FCC lattices agree at the literature critical temperatures. For the three-dimensional $\pm J$ spin glass, the crossings of $ξ_{\mathrm{SG}}/L$ for $L \le 12$ extrapolate, with the Janus correction exponent held fixed, to $T_c = 1.085(42)$, consistent with the Janus value $1.1019(29)$. For the two-dimensional XY model, the helicity modulus, correlation length and structure factor agree with high-precision reference data within $1.9$ standard errors. This article describes version 0.3.0.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。