Homework 09: Dynamic Monte Carlo algorithms
Don't hesitate to ask questions and make remarks on this page.


In this short exercise, we apply the simulation method of dynamic Monte Carlo algorithms to the single spin in a field.

A spin in a field

Figure 1. Energy E of one spin in a field h.

Consider a single Ising spin σ=±1 in a magnetic field h, as shown in Figure 1. We consider its Monte Carlo dynamics at inverse temperature β discussed during the lecture.
  1. Compute analytically the mean value of the magnetization for the spin at equilibrium.
  2. Write a 5-line program which implements the ("faster-than-the-clock") rejection-free dynamical algorithm for this model. Compare with the analytical solution for the magnetization. (Notice that if the spin is negative at time t, it will be positive again at time t + 1). Determine the magnetization at low, even at very low temperature.
  3. Write another 5-line program which implements the usual Metropolis algorithm for this model. Compare again with the analytical expression of the magnetization. Can one say that this algorithm is slower than the rejection-free algorithm? Discuss different temperature regimes.
  4. Determine the autocorrelation function C(t,Δt) = ⟨σ(t)σ(t+Δt)⟩ for all times t and Δt, analytically (use the transfer matrix!). Compare your result to numeric evaluations with the two Monte Carlo algorithms, and at both low and high temperatures. You have the freedom to chose the initial condition (e.g. fixed direction, or distributed with the equilibrium distribution), but be consistent: choose the same for the analytical computation and for the numerical evaluation.
  5. Bonus: find the initial distribution(s) which ensure(s) that the autocorrelation funciton C(t,Δt) does not depend on t.
Figure 2. A possible sequence of spin configuration.

[Print this page]