# Autocorrelation function problem in Monte Carlo simulation of 2D Ising model

Currently, I did a Monte Carlo simulation with the local update and Wolff cluster updated in 2D classical Ising model. I use the autocorrelation function to compare 2 different algorithm in critical temperature (T ~ 2.269). That's what I got. Is it correct? The local updated algorithm didn't show the exponential decay in the beginning. And it will become negative as it pass through 0. What I expect is that it has an exponential decay in the beginning and fluctuate around 0 once the sample become decorrelated. The equation I used to evaluate the autocorrelation function is $$A(\tau)=\frac{\langle Q_kQ_{k+\tau}\rangle-\langle Q_k\rangle^2}{\langle Q_k^2\rangle-\langle Q_k\rangle^2}.$$

First, some general remarks:

• The measurements should be made after the system has equilibrated, i.e., a large number of the first iterations should be discarded before the analysis.

• They should also be averaged over a number of runs, in order to reduce noise.

• This plot is better appreciated with a log scale in the vertical axis.

• Later on, it's important to consider different system sizes. See finite-size analysis.

• Local updates perform very poorly (see taciteloquence's answer) at the critical temperature - so the general relative behavior of both curves seems fine enough.

With respect to

it will become negative as it pass through 0

if it's a robust trend, there seems to be something wrong - you can check a good source such as Janke's book (especially Chap. 3 [pdf]), Sandvik notes, or this question in Physics SE.

@stafusa's answer is great, but there is a specific phenomenon you are encountering here called critical slowing down, which is especially bad for the single-spin-flip Metropolis Algorithm.

Near the critical point, the typical cluster size diverges. For the single-spin-flip algorithm, it's really hard to flip these huge clusters, so the autocorrelation time can increase dramatically. Cluster algorithms sidestep this issue by flipping big groups of spins at once.

What you are seeing for the local updates is an exponential decay with a really long time constant, which causes it to look linear. To see an exponential decay in the autocorrelations for the local updates, try moving away from $$T_c$$.

To learn more you can take a look at "Overcoming critical slowing down", Gould and Tobochnik, Computers in Physics 3, 82 (1989). Or you can look at p. 79 of "Monte Carlo Methods in Statistical Physics" by Newman and Barkema.

• +1 That's a much more complete description than "Local updates perform very poorly at the critical temperature". :) Commented May 27, 2020 at 8:58