
% BB Oct 16 2008.
% BB Oct 16 2007.
% BB Sep 20 2004.

\documentclass[20pt,landscape,footrule]{foils}
\usepackage[dvips]{graphicx}
\usepackage[pdftex]{geometry}
\geometry{headsep=3ex,hscale=0.9}
\usepackage[pdftex]{color} % for the colored block
\date{\color{blue} Singapore MCMC Meeting, March 2004}
\usepackage[ignore]{pause}
%\usepackage{pause}
\usepackage{background}
%\usepackage{pp4slide}
%\MyLogo{AV HEP,CSIT}
\LogoOff
\begin{document}
\def\r{\color{red}}
\def\b{\color{blue}}
\def\s{\color{black}}

\foilhead{\r Continuous Systems: Heisenberg Spin Model} \b
\vskip -30pt

We give an example of a model with a continuous energy function. The 
$\s 2d$ version of the model is known as $\s \sigma$-model and of 
interest in field theory because of its analogies with $\s 4d$
Yang-Mills theory. In statistical physics the $\s d$-dimensional model 
is known as Heisenberg ferromagnet. Expectation values are calculated 
with respect to the partition function
\begin{equation} \label{O3_Z} \s
 Z\ =\ \int \prod_i ds_i\ e^{-\beta E(\lbrace s_i \rbrace )}\ .
\end{equation}
\begin{equation} \label{O3_spin} \s
{\rm The\ spins}~~ \vec{s}_i = 
  \left( \matrix{ s_{i,1} \cr s_{i,2} \cr s_{i,3} \cr}
  \right) ~~{\rm are\ normalized\ to}~~ (\vec{s}_i)^2=1
\end{equation}
\begin{equation} \label{O3_measure} \s
{\rm and\ the\ measure}\ ds_i\ {\rm is\ defined\ by}\
 \int ds_i\ =\ {1\over 4\pi} \int_{-1}^{+1} d \cos (\theta_i) 
                              \int_0^{2\pi}  d \phi_i\ , 
\end{equation}
where the polar {\s ($\theta_i$)} and azimuth {\s ($\s \phi_i$)}
angles define the spin $\s s_i$ on the unit sphere. 
\newpage

The energy is
\begin{equation} \label{O3_energy} \s
 E\ =\ \sum_{<ij>} ( 1 - \vec{s}_i \vec{s}_j )\ ,  
\end{equation}
where the sum goes over the nearest neighbor sites of the lattice. 
\bigskip

{\bf\r Metropolis Updating} \medskip

We would like to update a single spin $\s \vec{s}$. The sum of its 
$\s 2d$ neighbors is
$$\s \vec{S} = \vec{s}_1+\vec{s}_2+\dots +\vec{s}_{2d-1}+\vec{s}_{2d}\ .$$
Hence, the contribution of spin $\s \vec{s}$ to the action is
$\s 2d-\vec{s} \vec{S}.$ We propose a new spin $\s \vec{s}^{\,'}$ with 
the measure~(\ref{O3_measure}) by drawing two uniformly distributed 
random numbers
\begin{eqnarray} \nonumber
\s \phi^r \in [0,2\pi)& &{\rm for\ the\ azimuth\ angle\ and} \\
\s \cos (\theta^r) = x^r \in [-1,+1)& &{\rm for\ the\ cosine\ of\
   the\ polar\ angle}\,. \nonumber
\end{eqnarray}
This defines the probability function $\s f(\vec{s}^{\,'},\vec{s})$ of 
the Metropolis process, which accepts the proposed spin
$\s \vec{s}^{\,'}$ with probability 
$$\s w(\vec{s}\to \vec{s}^{\,'})\ =\ \left\{ \matrix{ 1 & {\rm for}
 & \vec{S} \vec{s}^{\,'} > \vec{S} \vec{s} , \cr
 e^{ -\beta (\vec{S} \vec{s} - \vec{S}\vec{s}^{\,'}) } & {\rm for} &
 \vec{S}\vec{s}^{\,'} < \vec{S}\vec{s} . \cr } \right.    $$
If sites are chosen with the uniform probability distribution $\s 1/N$ 
per site, where $\s N$ is the total number of spins, it is obvious that 
the procedure fulfills detailed balance. \medskip

It is noteworthy that the procedure remains valid when the spins are 
chosen in the systematic order $\s 1,\dots ,N$, then $\s 1,\dots ,N$ 
again, and so on. Balance still holds, whereas detailed balance is 
violated (exercise). 
\newpage

{\bf\r Heathbath Updating}

Repeating the Metropolis algorithm again and again for the same
spin $\s \vec{s}$ leads to the equilibrium distribution of this spin, 
which reads
$$\s P(\vec{s}^{\,'};\vec{S}) = {\rm const}\,
  e^{\beta \vec{S}\vec{s}{\,'}} ~~{\rm with}~~
   \int P(\vec{s}^{\,'};\vec{S})\, ds' = 1\ .  $$
One would prefer to choose $\s \vec{s}^{\,'}$ directly with the
probability
$$\s W(\vec{s}\to \vec{s}^{\,'})\ =\ P(\vec{s}^{\,'};\vec{S})\ 
  =\ {\rm const}\, e^{\beta\, \vec{s}^{\,'} \vec{S}}\ , $$
as $\s \vec{s}^{\,'}$ is then Boltzmann distributed with respect to 
its neighbor spins. The algorithm, which creates this distribution, 
is called the {\bf heatbath algorithm} (in Math {\bf Gibbs sampler}).

Implementation of this algorithm becomes feasible when the energy 
function is sufficiently simple to allow for an explicit calculation 
of the probability $\s P(\vec{s}^{\,'};\vec{S})$. 
\newpage 

This is an easy task for the Heisenberg model. Let
$$\s \alpha = {\rm angle} (\vec{s}^{\,'},\vec{S}),\ \
     x=\cos (\alpha )\ \ {\rm and}\ \  S=\beta |\vec{S}|\ . $$
For $\s S=0$ a new spin $\s \vec{s}^{\,'}$ is simply obtained by 
random sampling. We assume in the following $\s S>0$. The Boltzmann 
weight becomes $\s \exp (x S)$ and the normalization constant follows 
from
$$\s \int_{-1}^{+1} dx\, e^{x S}\ =\ {2\over S}\, \sinh (S)\ .$$
\smallskip

\noindent
Therefore, the desired probability is
$$\s P(\vec{s}^{\,'};\vec{S})\ =\  
  {S \over 2\sinh (S)}\, e^{x S}\ =: f(x) $$
and the method of the first lecture can be used to generate events 
with the probability density $\s f(x)$. 

\newpage 
With
$$\s y = F(x) = \int_{-1}^x dx'\, f(x') = \int_{-1}^x dx'\,
   {S \over 2\sinh (S)}\, e^{x' S} =
   {\exp(+xS)-\exp(-S)\over 2\,\sinh (S)}\ $$
a uniformly distributed random number $\s y^r\in [0,1)$ translates
into
\begin{equation} \label{O3_heat_bath-xr} \s
  x^r = \cos{\alpha^r} = {1\over S} \ln\, [\, \exp (+S) -
  y^r\, \exp (+S) + y^r\, \exp (-S) ]\ . 
\end{equation}
Finally, one has to give $\s \vec{s}^{\,'}$ a direction in the plane
orthogonal to $\s S$. This is done by choosing a random angle $\s 
\beta^r$ uniformly distributed in the range $\s 0\le\beta^r < 2\pi$. 
Then, $\s x^r=\cos{\alpha^r}$ and $\beta^r$ completely determine
$\s \vec{s}^{\,'}$ with respect to $\vec{S}$. Before storing
$\s \vec{s}^{\,'}$ in the computer memory, we have to calculate
coordinates of $\s \vec{s}^{\,'}$ with respect to a Cartesian
coordinate system, which is globally used for all spins of the
lattice. This is achieved by a linear transformation. We define
$$\s \cos \theta = {S_3\over S},\
   \sin \theta = \sqrt{1-\cos^2\theta},\
   \cos\phi = {S_1\over S\,\sin\theta} ~~{\rm and}~~
   \sin\phi = {S_2\over S\,\sin\theta}\ . $$
Unit vectors of a coordinate frame $\s K'$, with $\s \hat{z}$ in 
the direction of $\s \hat{S}$ and $\s \hat{y}$ in the $\s x-y$ plane, 
are then defined by
$$\s \hat{z}'= \left( \matrix{ \sin\theta\,\cos\phi \cr
             \sin\theta\,\sin\phi \cr \cos\theta } \right),~~
   \hat{x}'= \left( \matrix{ \cos\theta\,\cos\phi \cr
            \cos\theta\,\sin\phi \cr -\sin\theta } \right)
~~{\rm and}~~ \hat{y}'= \left( \matrix{ - \sin\phi \cr
                          \cos\phi \cr 0 } \right)\ . $$
Expanding $\s \vec{s}^{\,'}$ in these units vectors, we have
$$\s \vec{s}^{\, '} = \sin\alpha^r\,\cos\beta^r\,\hat{x}^{\,'} +
   \sin\alpha^r\sin\beta^r\,\hat{y}{\,} +
   \cos\alpha^r\,\hat{z}^{\,'} $$
\begin{equation} \label{stored_vector} \s
   = \left( \matrix{
   \sin\alpha^r\cos\beta^r\,\cos\theta\,\cos\phi
 - \sin\alpha^r\sin\beta^r\,\sin\phi
 + \cos\alpha^r\,\sin\theta\,\cos\phi \cr
   \sin\alpha^r\cos\beta^r\,\cos\theta\,\sin\phi
 + \sin\alpha^r\cos\beta^r\,\cos\phi
 + \cos\alpha^r\,\sin\theta\,\sin\phi \cr
 - \sin\alpha^r\cos\beta^r\,\sin\theta
 + \cos\alpha^r\,cos\theta } \right)
\end{equation}
and the three numbers of the column vector (\ref{stored_vector}) are 
stored in the computer.
\newpage

{\r Self-Averaging Illustration for the $2d$ $O(3)$ model}

We compare the peaked distribution function of the mean action per 
link for different lattice sizes. The property of {\bf self-averaging} 
is observed: The larger the lattice, the smaller the confidence range.
The other way round, the peaked distribution function is very well 
suited to exhibit observables for which self-averaging does not work, 
as for instance encountered in spin glass simulations.
%
\begin{figure} \begin{center}
\includegraphics[height=0.45\textheight]{figures/qdf_o3.pdf}
\caption{$O(3)$ $\sigma$-model at $\beta=1.1$ (assignments 
{\tt a0304\_06} and {\tt a0304\_08}).}
\end{center} \end{figure}
% \newpage

\foilhead{\r 3D 3-state Potts model} \b \vskip -30pt

\begin{figure} \begin{center}
\includegraphics[height=0.55\textheight]{figures/3d3q_h.pdf}
\end{center} \end{figure}

To illustrate features of a first order phase transition for the 
$\s 3d$ {\s 3}-state Potts model on a $\s 24^3$ lattice. We use the 
{\s 1}-hit Metropolis algorithm to simulate at \s $\beta = 0.275229525$, 
\b perform \s 20$\,$000 \b sweeps for reaching equilibrium, then \s $64
\times 10$\,$000$ \b sweeps with measurements and plot an ``action 
variable'' histogram with its error bars (assignment {\tt a0303\_10}
of the book).
% \newpage

The histogram exhibits a {\bf double peak} structure which is 
typically obtained when systems with first order transitions are 
simulated on finite lattices in the neighborhood of so called 
{\bf pseudo-transition temperatures}. These are finite lattice 
temperature definitions, which converge with increasing system size 
towards the infinite volume transition temperature.
Equal heights of the maxima of the two peaks is a popular definition
of a pseudo-transition temperature for first order phase transitions.

Homework: A finite size scaling (FSS) determination of pseudocritical
beta values defined by equal heights plots.
% Our $\s \beta$ value needs to be re-weighted to a slightly higher 
% value to arrange for equal heights % (assignment {\tt a0303\_10} 
% of the book).

\end{document}
