This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Statistical mechanics (vp.statmech)

The two-dimensional Ising model, sampled by Monte Carlo.

  • Metropolis or Wolff updates
  • each run reports the exact values it can be compared with: Onsager's critical temperature and infinite-lattice energy, and the finite lattice's exact energy

Part of the distribution vipyr; it runs from a checkout of the repository. Planned on PyPI as pip install vipyr.

Functions

vp.statmech.ising
The two-dimensional Ising model on an L by L square lattice with periodic edges, sampled by Metropolis (checkerboard order) or Wolff clusters at temperature T, coupling J and field h. A run returns the energy per site, |m|, the susceptibility, the specific heat and Binder's cumulant with error bars from binning, the autocorrelation times, the time series and the final spins, beside the exact results it can be checked against: Onsager's T_c and infinite-lattice energy, Yang's spontaneous magnetization, and Kaufman's energy and specific heat of the same finite lattice. Every random number is a Philox4x32-10 word of a counter, so a run is bit-identical in every engine.

Examples in the gallery