arXiv · 2602.19045
peapods: A Rust-Accelerated Monte Carlo Package for Ising Spin Systems
Abstract
We present peapods (github.com/PeaBrane/peapods), an open-source Python package for Monte Carlo simulation of Ising spin systems with arbitrary coupling constants on periodic Bravais lattices with user-specified neighbor offsets. The computational core is written in Rust and exposed to Python via PyO3, combining the ergonomic interface of Python with the performance of compiled, memory-safe code. The package implements Metropolis and Gibbs single-spin-flip algorithms, Swendsen-Wang and Wolff cluster updates, parallel tempering, and three replica cluster moves for spin glasses: the Houdayer isoenergetic cluster move, the Jorg stochastic variant, and the Chayes-Machta-Redner (CMR) blue-bond algorithm. Overlap statistics between replica pairs enable computation of the spin glass order parameter and Binder ratio. Replica-level parallelism is achieved through the Rayon work-stealing scheduler. We validate the implementation against the exact critical temperatures of the two-dimensional Ising model on the square and triangular lattices via finite-size scaling of the Binder cumulant.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Yan Ru Pei. 2026-02-22. peapods: A Rust-Accelerated Monte Carlo Package for Ising Spin Systems. https://arxiv.org/abs/2602.19045
Cite the original work for its findings. Save a collection to share your selection of sources.