98
5 Sampling
The denominator would be an integral if the state were continuous. Since this form
is the principle of detailed balance itself, it is always possible to update the states
while satisfying the principle of detailed balance. The heatbath method also has the
feature that, by definition, updating is not dependent on the current state. On the
other hand, it is necessary to calculate the transition probabilities to all states, or in
a physics terminology the local partition function (local free energy). In the case of
a physical system, this is feasible if the Hamiltonian is written as a local sum as will
be described below. In this case, the nearest neighbors connected to the degree of
freedom (a single spin in the Ising model) of interest are regarded as a heat bath,
which is the origin of the term.
As a specific example, we explain the heatbath method for the Ising model. The
Hamiltonian of the Ising model is, on site i,
H i = −S i
j ∈∈i,j
S j + (terms not related to i).
(5.74)
If we take the sum over all i, it gives the Hamiltonian of the whole system. Here,
S i is the Ising spin, and i, j means the set of the points of the nearest neighbor of
i. In the case of the Ising model, we can write the Hamiltonian for each site in this
way, and also write down the local Boltzmann weight exp(−βH i ) accompanying it.
The value that the spin S i at the site i can take in the next step can be determined
as follows. From the definition of the transition probability for one spin at site i, we
find, for any state ∗,
P i (+|∗) =
exp[−βR i ]
exp[−βR i ] + exp[βR i ]
(the spin becomes + 1 at the next step),
(5.75)
P i (−|∗) =
exp[βR i ]
exp[−βR i ] + exp[βR i ]
(the spin becomes − 1 at the next step).
(5.76)
Here, the energy contribution from the nearest neighbor is R i = −
j ∈ S j . A
closer look, P i (+|∗) = 1 − P i (−|∗), can further simplify the expression.
To summarize the above steps, we define
ω
(i)
=
exp[−βR i ]
exp[−βR i ] + exp[βR i ]
,
(5.77)
then we use the uniform random number ξ ∈ [0, 1) to perform the update by the
rule
S
next
i
=
1
(ξ < ω (i) ),
−1 other than that.
(5.78)
Précédent

- 106/211

Suivant