  Markov chain Monte Carlo (MCMC) algorithms offer various strategies for
sampling; the Hamiltonian Monte Carlo (HMC) family of samplers are MCMC
algorithms which often exhibit improved mixing properties. The recently
introduced magnetic HMC, a generalization of HMC motivated by the physics of
particles influenced by magnetic field forces, has been demonstrated to improve
the performance of HMC. In many applications, one wishes to sample from a
distribution restricted to a constrained set, often manifested as an embedded
manifold (for example, the surface of a sphere). We introduce magnetic manifold
HMC, an HMC algorithm on embedded manifolds motivated by the physics of
particles constrained to a manifold and moving under magnetic field forces. We
discuss the theoretical properties of magnetic Hamiltonian dynamics on
manifolds, and introduce a reversible and symplectic integrator for the HMC
updates. We demonstrate that magnetic manifold HMC produces favorable sampling
behaviors relative to the canonical variant of manifold-constrained HMC.
