What does the magnetic field of the (quantum-mechanical) electron look like? While a treatment of electron spin can be found in any introductory textbook, I've noticed that the electron's magnetic field seems to be treated classically. Presumably this is because a quantum treatment of the electromagnetic field would venture into the much more difficult topic of quantum electrodynamics. However, treating the magnetic field classically also seems to create conceptual difficulties. How can we write something like
$$\mathbf{\mu} = \frac{g_e \mu_b}{\hbar} \mathbf{S}$$
and treat the left-hand side as a vector, while treating the right-hand side as a vector-valued operator?
So, what does really happen when we measure the magnetic field around an electron? For simplicity imagine that the electron is in the ground state of the hydrogen atom, where it has zero orbital angular momentum. It seems to me that we can't observe what looks like a classical dipole field, because such a field would have a definite direction for the electron's magnetic moment, which would appear to contradict the quantum-mechanical properties of spin.
My guess is that measuring any one component of the magnetic field at a point near an electron would collapse the spin part of the electron wave function, and in general the three components of the magnetic field will fail to commute so we cannot indeed obtain a definite direction for the electron magnetic dipole moment. However, I'm not even sure how to begin approaching this problem in a rigorous fashion without breaking out the full machinery of QED. For an electron in a magnetic field we have the Dirac equation. For the magnetic field of the electron I wasn't able to find an answer online or in the textbooks I have at hand.
 A: The magnetic moment of the electron is a magnetic moment, so the right magnetic field around it is
$$ \mathbf{B}({\mathbf{r}})=\nabla\times{\mathbf{A}}=\frac{\mu_{0}}{4\pi}\left(\frac{3\mathbf{r}(\mathbf{\mu}\cdot\mathbf{r})}{r^{5}}-\frac{{\mathbf{\mu}}}{r^{3}}\right). $$
The world is quantum mechanical – and so is any viable description of the spin – so we have to respect the postulates of quantum mechanics. In particular, the magnetic field above corresponds to a "state" (e.g. spin up and spin down) and one may construct complex linear superpositions of such states. It is important to realize that the quantum mechanical superposition of states in the Hilbert space in no way implies that the corresponding magnetic fields are being added according to the classical electromagnetic field's superposition principle.
Indeed, they're linear superpositions of states that contain different profiles of the magnetic field.
The magnetic field around the electron is so weak that indeed, it can in no way be thought of as a classical magnetic field, in the sense that the classical fields are "large". But the classical formula for the magnetic field is still right! This formula defines the magnetic moment. The quantum effects are always important, however. Also, if you try to measure this very weak magnetic field, it will unavoidably influence the state of the measured system, including the electron's spin itself.
It is of course completely wrong to imagine that we could measure such a weak magnetic field by a big macroscopic apparatus, like a fridge magnet. The effect of one electron's magnetic field on such a big object would be nearly zero, of course. In fact, quantum mechanics guarantees quantization of many "phenomena", so instead of predicting a very tiny effect on the fridge magnet, it predicts a finite effect on the fridge magnet that occurs with a tiny probability.
You may "measure" the electron's magnetic field by creating a bound state with another magnet in the form of an elementary particle. For example, the electron and the proton in a hydrogen atom are exerting the same kind of force that you would expect from the usual "classical" formulae – but it's important to realize that all the quantities in the equations are operators with hats.
Let me show you an example of a simple consistency check implying that there is no contradiction. Calculate the expectation value of the magnetic field (an operator) $\vec B(\vec r)$ at some point for the state $c_{up}|up\rangle + c_{down} |down\rangle$. The column vector of the amplitudes $c$ is normalized. The check is that you get the same expectation value of $\vec B(\vec r)$ for each $\vec r$ if you first compute it for the "up" component and "down" component separately, and then you add the terms, or if you first realize that it's a spin state "up" with respect to a new axis $\vec n$, and compute $\vec B$ from that.
It's a nice exercise. The point is that the expectation value of $\vec B(\vec r)$ is a bilinear expression in the bra-vector and ket-vector $|\psi\rangle$, much like the direction $\vec n$. And indeed, $\vec B$ is linear in the direction $\vec n$, according to the formula above, so things will agree. You may insert anything else to the expectation value, in fact, so the check works for all linear expressions in $\vec B$. The higher powers of $\vec B$ also have expectation values but they will behave differently than in classical physics because there will be extra contributions from the "uncertainty principle", analogous to zero-point energies of the harmonic oscillator in quantum mechanics.
It's extremely important to realize that the field $\vec B(\vec r)$ is also an operator – so it has nonzero off-diagonal matrix elements with respect to the "up" and "down" spin states of the electron. In fact, if you just write $\vec \mu$ in the formula for the magnetic field I started with as a multiple of the Pauli matrices (electron's spin), you will exactly see how the "key" term in the magnetic field behaves with respect to the up- and down- spin states. The off-diagonal elements do not contribute to the expectation value in the up state or in the down state but they do impact the "mixed matrix elements between up and down, and those affect the expectation values in spin states polarized along non-vertical axes.
BTW I added a semi-popular blog version of my answer here

http://motls.blogspot.com/2014/07/does-electrons-magnetic-field-look-like.html?m=1

