Abstract:
The article presents a novel algorithm for the complete enumeration of spin configurations in the Ising model on a
square lattice. Particular attention is given to the parallel algorithmization of computations on central processing
units (CPUs) using OpenMP and on graphics processing units (GPUs) using CUDA. The structure of the algorithm is
described, including its main implementation steps, as well as its application to solving problems in statistical
thermodynamics, specifically the calculation of the density of states. A performance comparison is conducted between
the proposed algorithm and sequential enumeration algorithms implemented in Python and C. The results demonstrate that
the proposed approach significantly accelerates computations and enables efficient analysis of square-lattice spin
systems in the Ising model with sizes up to $10 \times 10$ nodes (100 spins) and with an arbitrary distributions of
exchange constants.