Julia implementation for Ising model