Demo for HMC algorithm