The Hamiltonian in terms of B
Start with the Hamiltonian
Now write the Schrödinger equation.
The second term vanishes in the Coulomb gauge i.e.,
Now for constant
, we choose the vector potential
it gives the right field and satisfies the Coulomb gauge condition.
Substituting back, we obtain
Now let's work on the vector arithmetic.
So, plugging these two equations in, we get
We see that there are two new terms due to the magnetic field.
The first one is the magnetic moment term we have already used and the second will be negligible in atoms.