Multi-Spins Walker Heat Bath
for Ising S=±1

Spins with one components: S=±1
Energy=S.hlocal=S.h
P(x)=e-Energy/T
       =e-h.S+...
for 4 spins on a plaquette:

P(x)=e -h0S0-h1S1 -h2S2-h3S3 -S0.S1-S1.S3 -S3.S2-S2.S0
There are 81 possible local fields states (34) for the square lattice (two neighbors for each, three possibilities: -2, 0, +2) and for each case 16 possible spins states (2SUP>4).

The Alias Walker (AW) algorithm re-arrange the N probabilities into N boxes of equal weight with 2 possibilities in each box. It is not difficult to choose one of the box with a random number and an (int) command and choose the correct possibility with an if condition. The picture shows one possibility for 5 states. In our case we have 24=16 states.

Download the Multi-Spin Alias Walker (AW) Algorithm:
1.  To use the Alias Walker (AW) you must have :
2.  AND you must have the tables in the file "Ising_walker.res". You must create this file using create_Ising_walker.c

Download the Article:

Probabilities and Performances :
  • Figure: comparison of the time consumption to simulate a two dimensional ferromagnetic square lattice for various algorithms (Metropolis,Me, Restricted metropolis, Med, Direct Heat Bath, DHB, Walter Algorithm for 4 spins on a plaquette, WA4, Restricted Walter Algorithm Hasting for 4 spins on a plaquette, WAH4d)
    The critical temperatures are shown by the squares
    The restricted Metropolis Algorithm is the fastest at the critical temperature. We can show more generally that this conclusion holds whatever the system is. It is mainly due to the presence of zero local field (see article). The Ising ±1 case is the only one where the Metropolis is better than the Heat Bath.
    More...

Algorithms in C