Description Usage Arguments Details Value Examples
diff_flipped_hamilton_ising
is a fast-computation method for energy
difference, used in the case where only one variable is flipped.
1 | diff_flipped_hamiltonian_ising(u, j, h, J = NULL)
|
u |
a binary (-1, 1-valued) vector or matrix. If |
j |
the (column) index of the variable to be flipped over |
h |
a vector giving the external field. |
J |
a symmetric matrix with zero diagonals giving the interaction. If
|
Δ_j E(u \vert h, J) = H(\tilde{u}; h, J) - H(u; h, J),
where \tilde{u}_j = - u_j and \tilde{u}_{-j} = u_{-j}. It can be shown that Δ_j E(u \vert h, J) = 2 u_j (h_j + J_{j, -j} u_{-j}).
a vector giving the energy difference
1 2 3 4 5 6 7 | h <- c(2, 3)
J <- matrix(c(0, -1, -1, 0), 2, 2)
u <- c(-1, +1)
diff_flipped_hamiltonian_ising(u, 2, h, J)
u <- matrix(c(-1, +1, +1, -1), 2, 2, byrow = TRUE)
diff_flipped_hamiltonian_ising(u, 1, h, J)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.