See https://arxiv.org/abs/1402.4102.
To use, download the hmc.py
file and use the following imports:
from hmc import hmc # standard HMC
from hmc import nsghmc # naive SGHMC
from hmc import sghmc # proper SGHMC
See the documentation for how to use these functions.