slaps roof of code this baby can fit so much hamiltonian curves in it
adapted from monte carlo process in Mansfield, Marc. (2006). Unbiased sampling of lattice Hamilton path ensembles. The Journal of chemical physics. 125. 154103. 10.1063/1.2357935.