For a particle of mass and charge , the Hamiltonian of a charged particle in an electromagnetic field is
The canonical momentum is . Hamilton's equations are equivalent to the Lorentz force law