= Solution
<Hamiltonian Monte Carlo> augments the position $x$ by an independent momentum $p\sim N(0,M)$ and uses the <Hamiltonian function>
$$
H(x,p)=-\log\pi(x)+\frac12p^TM^{-1}p.
$$
From the current $x$, draw a fresh $p$, apply a fixed number of <leapfrog integration>[leapfrog steps] to approximate <Hamiltonian flow>, and obtain $(x',p')$. The <Metropolis–Hastings acceptance probability> is
$$
1\wedge\exp\{H(x,p)-H(x',p')\};
$$
otherwise retain $x$. Momentum negation may be included to make the proposal explicitly reversible. The leapfrog map is volume preserving and reversible, while the acceptance step corrects its discretization error, leaving $\pi$ invariant after the momentum is discarded.
Back to article page