SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
86 stars 19 forks source link

Trial Langevin updates that can be accepted or rejected #76

Closed kbarros closed 9 months ago

kbarros commented 1 year ago

Currently the step! function for a Langevin update always performs an in-place update. We should allow for Langevin to only propose a trial update, which would be stored in a separate state array. That proposal could be accepted or rejected by a subsequent algorithm. For example, this would allow for statistically exact sampling of the MALA algorithm. This could in turn, allow us to automatically adapt the step-size dt. We would also need trial updates to use Langevin updates within the context of Wang-Landau.

A difficult question -- where should these proposal updates be stored? Currently our Langevin objects carry no state and can be applied to any system. Should we change that?

kbarros commented 1 year ago

This might be harder than I initially realized -- because the canonical variables (p,q) are not separable for our spin system, we may not be able to achieve an HMC-like accept/reject step that satisfies the balance condition.

kbarros commented 9 months ago

To build an HMC-style accept reject step, we would need to:

  1. Have a way to estimate the determinant of the Jacobian of the transformation $|d\mathbf{Z}' / d\mathbf{Z}|$ when timestepping from $\mathbf{Z}$ to $\mathbf{Z}'$.
  2. Incorporate a Metropolis accept/reject step. Upon rejection, the spin configuration would somehow need to be "time-reversed" to achieve detailed balance. In traditional HMC, "time reversal" means flipping momentum variables, which appear quadratically. In our context, we have a non-separable Hamiltonian, and it's not clear to me how HMC can be generalized.

This seems like a hard problem, and the usual Langevin dynamics is working reasonably well, so closing for now.