# Quantization of the Hamiltonian of a particle in a uniform magnetic field

If a particle of mass $m$ and charge $q$ is subject to a uniform magnetic field and if we have a vector potential $\mathbf{A}$ then we know that classically the dynamics of the particle will be described by the Hamiltonian:

$$H = \dfrac{1}{2m}(\mathbf{p}-q\mathbf{A})^2.$$

If the field is uniform we may pick $\mathbf{A}$ as $\mathbf{A}=-\dfrac{1}{2}\mathbf{r}\times \mathbf{B}$.

Now I want to describe the dynamics of this particle in the context of Quantum Mechanics. For that I know I must quantize the Hamiltonian. If we expand it we have:

$$H = \dfrac{1}{2m}(\mathbf{p}^2-q\mathbf{p}\cdot \mathbf{A}+q^2\mathbf{A}^2).$$

The next step would be to substitute everything in terms of $\mathbf{B}$ there. We would end up with

$$H = \dfrac{1}{2m}\left(\mathbf{p}^2-\frac{q}{2}\mathbf{p}\cdot (\mathbf{r}\times \mathbf{B})+\frac{q^2}{4}(\mathbf{r}\cdot \mathbf{B})^2\right).$$

Now I really don't know how we go into quantizing that. I mean, we obviously see there $\mathbf{p}$ and $\mathbf{r}$ which will be promoted to the operators $\mathbf{P}$ and $\mathbf{R}$.

Still we have $\mathbf{B}$. Will $\mathbf{B}$ become an operator? And more than that, how do we deal with terms like $\mathbf{r}\times \mathbf{B}$ when quantizing this Hamiltonian?

I'm really not getting the point on how do we describe this in Quantum Mechanics.

$$[x_i , p_j ] = i \hbar \delta_{ij}.$$
By the way, remember that a function of position $f(x)$ may not commute with the momentum operator $p$. $A_i = A_i(x)$. Do $A_i$ and $p_j$ necessarily commute?
If you are quantizing the system "particle in external electromagnetic field", then no, the electromagnetic fields will not become operators themselves. However, since they are functions in $x$, the vector potential $A$ actually becomes an operator $A(\hat{x})$. It is treated as a fixed addition to the Hamiltonian, it is not a dynamical variable itself.
For the particle in a uniform magnetic field, you can write the second term actually as proportional to $L\cdot B$, i.e. the dot product of the orbital angular momentum with the magnetic field. The $r\cdot B$ term is often neglegible compared to this.
But there's really nothing different from quantizing any other system here. You have $x$ and $p$ with their canonical commutation relations, and you have a Hamiltonian that is a function of $x$ and $p$. That you call one of the terms in $x$ "$A(x)$" doesn't really have much of a bearing on the theory on this level, except that you of course retain the electromagnetic gauge symmetry.