Then, for a given number of
iterations, a new momentum vector is sampled and the current value of
the parameter <span class="math inline">\(\theta\)</span> is updated using the leapfrog integrator with
discretization time <span class="math inline">\(\epsilon\)</span> and number of steps <span class="math inline">\(L\)</span> according to
the Hamiltonian dynamics. Then a Metropolis acceptance step is
applied, and a decision is made whether to update to the new state
<span class="math inline">\((\theta^{*}, \