The following code is a simple monte-carlo simulation of the Potts Model Hamiltonian. The ising model is a rite of passage for any aspiring computational/theorectical physicist. In this code, we consider a more general form of the ising model in which the hamiltonian is provided as:
More information and results regarding the critical temperature,