Ising model: Difference between revisions

Content deleted Content added
put all of this into one subheader and tag for split
Line 281:
Several additional statistical mechanical problems of interest remain to be solved for the closed Cayley tree, including the time-dependent case and the external field situation, as well as theoretical efforts aimed at understanding interrelationships with underlying quantum constituents and their physics.
 
== Numerical simulation ==
==Monte Carlo methods for numerical simulation==
[[File:Ising quench b10.gif|framed|right|Quench of an Ising system on a two-dimensional square lattice (500 × 500) with inverse temperature ''β'' = 10, starting from a random configuration]]
 
===Definitions===
The Ising model can often be difficult to evaluate numerically if there are many states in the system. Consider an Ising model with
: ''L'' = |Λ|: the total number of sites on the lattice,
Line 292 ⟶ 291:
Since every spin site has ±1 spin, there are ''2''<sup>''L''</sup> different states that are possible.<ref name = "Newman">{{cite book |last1=Newman |first1=M.E.J. |last2=Barkema |first2=G.T. |title=Monte Carlo Methods in Statistical Physics |publisher=Clarendon Press |year=1999 |isbn=9780198517979 }}</ref> This motivates the reason for the Ising model to be simulated using [[Monte Carlo methods]].<ref name="Newman" />
 
The [[Hamiltonian mechanics|Hamiltonian]] that is commonly used to represent the energy of the model when using Monte Carlo methods is:
 
<math display="block">H(\sigma) = -J \sum_{\langle i~j\rangle} \sigma_i \sigma_j - h \sum_j \sigma_j.</math>
 
Furthermore, the Hamiltonian is further simplified by assuming zero external field ''h'', since many questions that are posed to be solved using the model can be answered in absence of an external field. This leads us to the following energy equation for state σ:
 
<math display="block">H(\sigma) = -J \sum_{\langle i~j\rangle} \sigma_i \sigma_j.</math>
 
Given this Hamiltonian, quantities of interest such as the specific heat or the magnetization of the magnet at a given temperature can be calculated.<ref name="Newman" />
 
=== Metropolis algorithm ===
 
====Overview====
The [[Metropolis–Hastings algorithm]] is the most commonly used Monte Carlo algorithm to calculate Ising model estimations.<ref name="Newman" /> The algorithm first chooses ''selection probabilities'' ''g''(μ, ν), which represent the probability that state ν is selected by the algorithm out of all states, given that one is in state μ. It then uses acceptance probabilities ''A''(μ, ν) so that [[detailed balance]] is satisfied. If the new state ν is accepted, then we move to that state and repeat with selecting a new state and deciding to accept it. If ν is not accepted then we stay in μ. This process is repeated until some stopping criterion is met, which for the Ising model is often when the lattice becomes [[ferromagnetic]], meaning all of the sites point in the same direction.<ref name="Newman" />
 
When implementing the algorithm, one must ensure that ''g''(μ, ν) is selected such that [[ergodicity]] is met. In [[thermal equilibrium]] a system's energy only fluctuates within a small range.<ref name="Newman" /> This is the motivation behind the concept of '''single-spin-flip dynamics''',<ref name="pre0">{{cite journal|url= http://journals.aps.org/pre/abstract/10.1103/PhysRevE.90.032141|title= M. Suzen "Effective ergodicity in single-spin-flip dynamics"|journal= Physical Review E|date= 29 September 2014|volume= 90|issue= 3|page= 032141|doi= 10.1103/PhysRevE.90.032141|language=en-US|access-date=2022-08-09|last1= Süzen|first1= Mehmet|pmid= 25314429|arxiv= 1405.4497|s2cid= 118355454}}</ref> which states that in each transition, we will only change one of the spin sites on the lattice.<ref name="Newman" /> Furthermore, by using single- spin-flip dynamics, one can get from any state to any other state by flipping each site that differs between the two states one at a time. The maximum amount of change between the energy of the present state, ''H''<sub>μ</sub> and any possible new state's energy ''H''<sub>ν</sub> (using single-spin-flip dynamics) is 2''J'' between the spin we choose to "flip" to move to the new state and that spin's neighbor.<ref name="Newman" /> Thus, in a 1D Ising model, where each site has two neighbors (left and right), the maximum difference in energy would be 4''J''. Let ''c'' represent the ''lattice coordination number''; the number of nearest neighbors that any lattice site has. We assume that all sites have the same number of neighbors due to [[periodic boundary conditions]].<ref name="Newman" /> It is important to note that the Metropolis–Hastings algorithm does not perform well around the critical point due to critical slowing down. Other techniques such as multigrid methods, Niedermayer's algorithm, Swendsen–Wang algorithm, or the Wolff algorithm are required in order to resolve the model near the critical point; a requirement for determining the critical exponents of the system.
 
Specifically for the Ising model and using single-spin-flip dynamics, one can establish the following. Since there are ''L'' total sites on the lattice, using single-spin-flip as the only way we transition to another state, we can see that there are a total of ''L'' new states ν from our present state μ. The algorithm assumes that the selection probabilities are equal to the ''L'' states: ''g''(μ, ν) = 1/''L''. [[Detailed balance]] tells us that the following equation must hold:
The maximum amount of change between the energy of the present state, ''H''<sub>μ</sub> and any possible new state's energy ''H''<sub>ν</sub> (using single-spin-flip dynamics) is 2''J'' between the spin we choose to "flip" to move to the new state and that spin's neighbor.<ref name="Newman" /> Thus, in a 1D Ising model, where each site has two neighbors (left and right), the maximum difference in energy would be 4''J''.
 
Let ''c'' represent the '''lattice coordination number'''; the number of nearest neighbors that any lattice site has. We assume that all sites have the same number of neighbors due to [[periodic boundary conditions]].<ref name="Newman" /> It is important to note that the Metropolis–Hastings algorithm does not perform well around the critical point due to critical slowing down. Other techniques such as multigrid methods, Niedermayer's algorithm, Swendsen–Wang algorithm, or the Wolff algorithm are required in order to resolve the model near the critical point; a requirement for determining the critical exponents of the system.
 
Open-source packages implementing these algorithms are available.<ref>{{Cite web|title=For example, SquareIsingModel.jl (in Julia).|website=[[GitHub]] |date=28 June 2022 |url=https://github.com/cossio/SquareIsingModel.jl}}</ref>
 
====Specification====
Specifically for the Ising model and using single-spin-flip dynamics, one can establish the following.
 
Since there are ''L'' total sites on the lattice, using single-spin-flip as the only way we transition to another state, we can see that there are a total of ''L'' new states ν from our present state μ. The algorithm assumes that the selection probabilities are equal to the ''L'' states: ''g''(μ, ν) = 1/''L''. [[Detailed balance]] tells us that the following equation must hold:
 
<math display="block">\frac{P(\mu, \nu)}{P(\nu, \mu)} =
Line 324 ⟶ 317:
 
Thus, we want to select the acceptance probability for our algorithm to satisfy
 
<math display="block">\frac{A(\mu, \nu)}{A(\nu, \mu)} = e^{-\beta(H_\nu - H_\mu)}.</math>
 
Line 334 ⟶ 328:
 
The basic form of the algorithm is as follows:
 
# Pick a spin site using selection probability ''g''(μ,&nbsp;ν) and calculate the contribution to the energy involving this spin.
# Flip the value of the spin and calculate the new contribution.
Line 342 ⟶ 337:
The change in energy ''H''<sub>ν</sub>&nbsp;−&nbsp;''H''<sub>μ</sub> only depends on the value of the spin and its nearest graph neighbors. So if the graph is not too connected, the algorithm is fast. This process will eventually produce a pick from the distribution.
 
===Viewing the Ising model asAs a Markov chain ===
 
It is possible to view the Ising model as a [[Markov chain]], as the immediate probability ''P''<sub>β</sub>(ν) of transitioning to a future state ν only depends on the present state μ. The Metropolis algorithm is actually a version of a [[Markov chain Monte Carlo]] simulation, and since we use single-spin-flip dynamics in the Metropolis algorithm, every state can be viewed as having links to exactly ''L'' other states, where each transition corresponds to flipping a single spin site to the opposite value.<ref>{{cite journal |last=Teif |first=Vladimir B.|title=General transfer matrix formalism to calculate DNA-protein-drug binding in gene regulation |journal=Nucleic Acids Res. |year=2007 |volume=35 |issue=11 |pages=e80 |doi=10.1093/nar/gkm268 |pmid=17526526 |pmc=1920246}}</ref> Furthermore, since the energy equation ''H''<sub>σ</sub> change only depends on the nearest-neighbor interaction strength ''J'', the Ising model and its variants such the [[Sznajd model]] can be seen as a form of a [[Contact process (mathematics)#Voter model|voter model]] for opinion dynamics.