Ising Model Code form PHYS-302