Information dynamics of a particle in a magnetic field