## Ising Number Of States

Program `IsingNumberOfStates` uses the Wang-Landau Monte Carlo algorithm to estimate the
number of microstates $\Omega(E)$ for each value of $E$ of the 2d Ising model on a square lattice. Once $\Omega(E)$ is known from one simulation averages
such as the mean energy can be found at any temperature using
$$\overline{E} = \sum_E EP(E) = \frac{\sum_E E\Omega(E)e^{-E/kT}}{\sum_E\Omega(E)e^{-E/kT}}. $$ The program also calculates the specific heat as a function of temperature from a single simulation.

**Problem: Wang-Landau algorithm for the Ising model**

Program `IsingNumberOfStates` implements the Wang-Landau algorithm for the Ising model on a square lattice.

- Calculate the exact values of $\Omega(E)$ for the $2 \times 2$ Ising model. Run the simulation for $L = 2$ and verify that the computed number of states is close to your exact answer.
- Choose larger values of $L$, for example, $L = 16$, and describe the qualitative energy dependence of $\Omega(E)$.
- The program computes the specific heat as a function of temperature using the estimated value of $\Omega(E)$. Describe the qualitative temperature dependence of the specific heat.

## Resource

Problem 5.20 in*Statistical and Thermal Physics: With Computer Applications*, 2nd ed., Harvey Gould and Jan Tobochnik, Princeton University Press (2021).