Chapter 6. The on a square lattice

6.1 The basic Ising model

The Ising model is a minimal model to capture the spontaneous emergence of macroscopic from the interaction of individual microscopic magnetic dipole moments.

Consider a two-dimensional system of 1=2 magnetic dipoles arrayed on a square L L  lattice. At each lattice point .i; j /, the dipole can assume only one of two spin states, i;j 1. The dipoles interact with an externally applied constant magnetic field B, and the energyD˙ of a dipole interacting with the external field, Uext, is given by

U .i;j / Hi;j ext D where H is a non-dimensionalized version of B. The energy of each spin (dipole) is lower when it is aligned with the external magnetic field. The dipoles also interact with their nearest neighbors. Due to quantum effects the energy of two spins in a ferromagnetic material is lower when they are aligned with each other1. As a model of this, it is assumed in the Ising model that the interaction energy for the dipole at .i; j / is given by

Uint.i;j / Ji;j .i 1;j i 1;j i;j 1 i;j 1/ D C C C C C where J is a non-dimensionalized coupling strength. Summing over all sites, we get the total energy for a configuration  given by E L L J L L U./ H i;j i;j .i 1;j i 1;j i;j 1 i;j 1/: E D 2 C C C C C i 1 j 1 i 1 j 1 XD XD XD XD The second sum is divided by two to account for each interaction being counted twice. For this exercise, assume the domain is periodic, so for example, 1;j has left neighbor L;j , and i;L has top neighbor i;1, etc. An observable of interest in this case is the magnetization of the system, i.e., the expected value of the alignment with the external field

1 L L M.T / M./p.; T / ; where M./ i;j h i D E E E D L2  i 1 j 1 XE XD XD 1The dipole interaction between classical magnetic dipoles does not lead to ferromagnetic ordering.

©kath2020esam448notes 76 The Ising model on a square lattice and p.; T / is the Boltzmann density function at temperature T that gives the likelihoodE of any particular energy state,

1 U./=kB T p.; T / e E : E D Z Here the partition function Z is given by

U./=kB T Z e E D L L I  1;1  E2fXg

L L this normalizes the Boltzmann . This sum is over 2  terms, a number which becomes very large very quickly as L is increased. Since ferromagnetism (and any phase transition) is a macroscopic phenomenon that arises, strictly speaking, only in the infinite-size limit L , the numerical computation of Z is typically forbiddingly expensive. ! 1

6.2 Metropolis simulation of the Ising model on a square lattice

Computing statistical quantities for the Ising model directly for a given temperature T would require summing over 2L2 configurations, an enormous value for even modest values of L. One therefore uses Markov Chain Monte Carlo integration to compute M.T / , U.T / , etc. The Metropolis algorithm is used to generate a sample of configurationsh with distributioni h i de- termined by p.; T / and the sum becomes

1 K M.T / M. .k// h i  K k 1 XD where  .k/ are the generated sample configurations.

The Metropolis algorithm is constructed using transition probability

1 L L 2 ; if i 1 j 1 i;j0 i;j 2; L D D j j D q. 0 / 8 j D P P <ˆ0 otherwise ; ˆ i.e. only transitions in which a: single, randomly selected spin is flipped are considered. In other words, this transition probability means that one should randomly select one of the L2 sites and flip the spin at that site. The construction of the acceptance probability then follows the discussion in the previous sections. Note, however, that the acceptance probability can be

©kath2020esam448notes 6.3 A very brief overview of thermodynamics and 77 computed efficiently by computing only the change in energy caused by the proposed spin flip at site .i; j /,  .old/  .new/  .old/. This change in energy is given by i;j ! i;j D i;j U U  .new/ U  .old/ Á i;j i;j D  Á  Á .new/ .old/ .old/ .old/ .old/ .old/ i;j i;j H J.i 1;j i 1;j i;j 1 i;j 1/ D C C C C C  .old/ Á.old n / .old/ .old/ .old/ .old/ o 2Hi;j 2Ji;j .i 1;j i 1;j i;j 1 i;j 1/: D C C C C C C One then accepts this proposed change of spin with probability

U=kB T min e ; 1 I h i otherwise one rejects the flip of that spin and the previous configuration is duplicated. One then repeats the steps to generate more configurations. These configurations, of course, are sampled from the Boltzmann distribution at this particular temperature, and thus can be used to compute statistics of interest.

Thus, the algorithm is (using ˇ 1=kB T ) D

1. Pick a random spin .i; j / and propose the candidate spin flip .i;j / .i;j / ! 2. Compute the energy difference U 3. If U < 0, accept the step. ˇU 4. If U > 0, accept the step with probability e < 1. 5. Repeat.

If a spin flip is rejected the previous configuration is duplicated. Iterating this procedure even- tually generates configurations sampled from the Boltzmann distribution at temperature T . Note that when the temperature is lower it is less likely that a spin flip will be accepted if it would raise the energy; thus, the system will be more confined to energy minima and less likely to climb over energy barriers. This is just an overview of the method, of course; there are a number of other practical details associated with a good implementation of the method that we will not discuss in detail here.

6.3 A very brief overview of thermodynamics and statistical mechanics

To understand the key elements of the Ising model we need to have a few basic concepts from statistical mechanics and as they relate to thermodynamics. To use a system for which we have more intuition, consider a gas comprised of many molecules. The molecules are bounc- ing off each other all the time. At any given moment the system can be characterized by its

©kath2020esam448notes 78 The Ising model on a square lattice

microstate, i.e. by the positions ri .t/ and velocities vi .t/ of all of its molecules. All macro- scopic measurements involve a very large number of molecules and take a long time compared to the time between collisions of the molecules. Macroscopic measurements could therefore be considered as time averages over the evolving microstates. However, since computing the temporal average requires knowledge of the dynamics of each individual molecule, it is better to consider an ensemble consisting of a very large number of systems, each having different initial conditions, and to assume that the time average can be replaced by an average across this ensemble at a given time.

1 2 In closed systems the total energy E.rj ; vj / j 2 mvj U.r1; r2;::: rN /, composed of the kinetic and the potential energy of the molecules,Á is conserved.C P Ergodic hypothesis: Since the motion of the molecules is extremely complicated, we assume that they explore the complete energy surface E.rj ; vj / E0 and that they do so uniformly. D How does the notion of a temperature arise? For that we need to consider two separated systems S1;2 with energies E1;2. If they are brought in thermal contact with each other, how will the total energy E E1 E2 be distributed between the two systems? A state with a given value of the macroscopicD C parameters, e.g. the energy, can be realized by a large number ˝ of different microstates. For the two combined systems we have

˝.E/ ˝1.E1/ ˝2.E2/ with E E1 E2: D D C Postulate: The final equilibrium state that is reached when two systems are brought into thermal contact is the state that maximizes the number of microstates compatible with the macrostate (i.e., here, total energy E).

To find how E1 and E2 distribute, we use Lagrange multipliers to extremize

˝1.E1/ ˝2.E2/ .E1 E2/: C We find @˝1 @˝2 ˝2  0 and ˝1  0 ; @E1 D @E2 D or 1 @˝ 1 @˝ 1 2 ; ˝1 @E1 D ˝2 @E2 or @ @ ln ˝1.E1/ ln ˝2.E2/: @E1 D @E2 The final equilibrium is characterized by the equality of the quantity @ ln ˝=@E in both sys- tems, suggesting that this quantity has a special meaning. Thermodynamics relates this quan- tity to the temperature, @ ln ˝.E/ 1

@E D kB T

©kath2020esam448notes 6.3 A very brief overview of thermodynamics and statistical mechanics 79 and defines

S kB ln ˝ D as the . The entropy ‘counts’ the number of microstates compatible with the macro- scopic variables.

To describe a system S at a fixed temperature rather than at a fixed total energy we couple it to a very large second system SR, which acts as a heat reservoir. We need then the probability for that system to have an energy in the interval ŒE; E dE C

˝R.Etot E/ ˝.E/ dE p.E/ dE D 1 ˝R.Etot E/ ˝.E/ dE 0 where R SR.Etot E/=kB ˝R.Etot E/ e : D We are looking for a description of system S without explicit reference to SR. We therefore want to extract the relevant dependence of ˝R on E. Since the reservoir is assumed to be much larger than S changes in the energy E of SR will be small, and we can expand

@SR 1 SR.Etot E/ SR.Etot/ E ::: SR.Etot/ E :::: D @E C D T C ˇEtot E ˇ ˇ In the above we have used TR T ; since theˇ reservoir SR and S are in equilibrium they have the same temperature. We thenD have

SR.Etot/=kB E=kB T ˝R.Etot E/ e e D and obtain the Boltzmann distribution for the microstates of the system as a function of the temperature 1 E=kB T p.E/ dE ˝.E/ e dE ; D Z where Z is the ‘canonical partition function’

1 ˇE 1 Z ˝.E/ e dE with ˇ : D D k T Z0 B

Going back to the Ising spin system, in terms of the individual spins the energy of the system is given by

L L J L L U./ H i;j i;j .i 1;j i 1;j i;j 1 i;j 1/ E D 2 C C C C C i; 1 j 1 i 1 j 1 XD XD XD XD

©kath2020esam448notes 80 The Ising model on a square lattice and the partition function is U./=kB T Z e E ; D  XE where the sum over all the spin configurations  counts the total number of microstates, suit- ably weighted, corresponding to the integral in theE partition function.

The partition function contains a lot of information. If we take the derivative with respect to ˇ 1=kB T , we get D

@Z ˇU./ @ U./e E U Z; or U ln Z; @ˇ D E D h i h i D @ˇ  XE where 1 ˇU./ U U./e E : h i D Z E  XE Differentiating both sides of the equation again with respect to ˇ, we get

2 @ Z 2 ˇU./ 2 @ U 2 U ./e E U Z h iZ U Z: @ˇ2 D E D h i D @ˇ C h i  XE Thus, @ U h i U 2 U 2 : @ˇ D h i h i Since @=@ˇ kT 2@=@T , we have for the total specific heat of S D

@ U 1 2 2 cV;total h i 2 U U Á @T D kB T h i h i   and for the specific heat per spin of theL L lattice 

1 1 2 2 cV 2 2 U U D kB T L h i h i   Similarly, since @U=@H M , we have D

@Z ˇU./ ˇ M./e E ˇ M Z: @H D E D h i  XE Thus, the magnetization per spin is given by

1 1 1 @ m M ln Z: h i D L2 h i D L2 ˇ @H

©kath2020esam448notes 6.4 More general Ising models 81

Differentiating again,

2 @ Z 2 2 ˇU./ 2 2 @ M 2 2 ˇ M ./e E ˇ M Z ˇ h i Z ˇ M Z @H 2 D E D h i D @H C h i  XE This yields for the total magnetic susceptibility

@ M 2 2 1 2 2 total h i ˇ M M M M Á @H D h i h i D kB T h i h i     and the susceptibility per spin in terms of the magnetization per spin @ m 1 @ M h i h i L2ˇ m2 m 2 : Á @H D L2 @H D h i h i   The Ising model is of interest because it is a relatively simple example of a system that under- goes a phase transition: without an external magnetic field the two-dimensional and the three- dimensional Ising model exhibit spontaneous magnetization at a finite temperature Tc > 0:

T > Tc M 0 W h i D T < Tc M 0 W h i ¤ This phase transition is second order, i.e., the magnetization as a function of T is continuous, but not differentiable at Tc. This — as any other phase transition — arises strictly speaking only as the system size goes to infinity. At this phase transition the susceptibility diverges,

T Tc , with a critical exponent . In one dimension the Ising model does not show a phase/ j transition j at any finite temperature.

6.4 More general Ising models

One can generalize the Ising model. Again we will start with N spins labeled i 1; :::; N that can either point up or down, D si 1 : D ˙ As before, the state space is N dimensional, and the total number of configurations of the N entire system is 2 . Spins typically interact by means of a coupling matrix Jij that denotes interactions between neighbors and the energy of a state s is given by

1 1 t E H si si Jij sj HN s s Js: D 2 D h i 2 O i i;j X X

Here one thinks of the set of spins si 1 with i 1; :::; N as the state of the system, D ˙ D

s .s1; :::; sN /: D

©kath2020esam448notes 82 The Ising model on a square lattice

Various choices of this coupling matrix correspond to different systems. Typically Jij J0 if D spins i and j are connected and Jij 0 otherwise. This is quite a general approach. We can, for instance, construct systems in whichD all the spins are neatly arranged on a grid or a line and only couple to their nearest neighbors. We could also, however, just construct networks in which spins are randomly connected by the coupling matrix Jij : This way one can construct a whole set of systems that fall into the Ising model class. In any case the energy between two coupled spins is given by Eij si Jij sj D which means J0 if si sj Eij D D J0 if si sj ( D i.e. alignment is energetically preferred. We could also generalize this whole idea and permit that Jij is either J0 for coupled spins. That means if Jij J0 anti-alignment is energeti- cally preferred. Many˙ variations are possible. D The partition function is then given by ˇ Z exp ˛ s st Js D h i 2 O s ˝ Ä  X2 1 where ˛ HN=kB T and ˇ .kB T/ . Even for a moderately-sized sample space ˝, N 1000Dsay, there are huge numberD (10301) of terms in the sum. Doing the sum would take anD impossibly long time, even though for each energy computation we only need to multiply vectors and a 1000 1000 matrix. So although we know that the probability of finding a particular configuration is proportional to ˇ p.s/ exp ˛ s st Js / h i 2 O Ä  we don’t know the exact probability. As before, however, for two states we can compute the likelihood ratio p.s1/ ˇ t t exp ˛ s1 s2 s1Js1 s2Js2 p.s2/ D h i 2 O O Ä  Á and use the Metropolis algorithm (also called M(RT)2 because the full set of authors are Metropolis, Rosenbluth, Rosenbluth, Teller and Teller) to simulate this system. To do so, we note that the interaction energy that one spin has with all the others is given by

Ei si Jij sj : D j i X¤ Now we do a Metropolis walk through state space. We consider a change from the current state to a different one, s s0 : !

©kath2020esam448notes 6.5 Wolff algorithm 83

It is simplest to just flip single spins, so that if

s .s1; :::; sk; :::sN / D then s0 .s1; :::; sk; :::sN / D for some spin k. Note that in this high dimensional state space we are just taking a step in one of the N directions. In taking the step, we must make a choice about the proposed probability density for such state changes (q.s0 s/), of course. The simplest choice is to assume that this is constant, that is, the proposal probabilityj of going into any of the new states defined by just flipping one spin is the same. Therefore we just have to pick the spin k that we flip with uniform probability 1=N . The energy change caused by the proposed change of state is then

Ek E.s0/ E.s/ 2Hsk sk Jkj sj sk Jkj sj 2Hsk 2sk Jkj sj : D D C C D C j k j k j k X¤ X¤ X¤ Thus, the algorithm is

1. Pick a random spin k with prob. 1=N and propose sk sk ! 2. Compute the energy difference E 3. If E < 0, accept the step

ˇE 4. if E > 0, accept with probability e exp ˇsk 2H j k Jkj sj D C ¤ 5. Repeat.  P 

6.5 Wolff algorithm

Improvements can be made by changing the algorithm by which spins are flipped. One par- ticular algorithm, the Wolff algorithm, is reasonably simple. This algorithm grows a cluster of spins and flips them all. In particular, in the case of no applied magnetic field, the algorithm is:

1. Pick a spin at random 2. For each of the four neighboring spins, if it is in the same direction, add it to the cluster 2J=T with probability p 1 e Q . D 3. For each new added spin, recursively check its neighbors as in (2). 4. When the cluster stops growing, flip all of the spins.

This algorithm samples configuration space much more efficiently than the regular Metropolis sampling. Also note that it is fundamentally different, in that here there are no rejected moves.

©kath2020esam448notes