# Does the Hamiltonian always represent the total energy of a system in quantum mechanics?

A simple question. In classical mechanics, the Hamiltonian is not always equal to the total energy of the system, cf. e.g. this Phys.SE post. Is this also the case in quantum mechanics, or does something 'fix' it in this case?

• The Hamiltonian in non-relativistic mechanics doesn't know about the relativistic rest energy $$mc^2$$ of the particles.