I had a small question. If you look at the energy eigenvalue problem for a particle restricted to a ring, you get $$E_n = \frac{\hbar^2n^2}{2mR^2}.$$ If you then put a solenoid inside the ring, then the values shift to $$E_n = \frac{\hbar^2}{2mR^2}\left( n^2 + \left(\frac{q\Phi}{2\pi\hbar}\right)^2 - \frac{nq\Phi}{\pi\hbar}\right)$$ according to Griffiths. I thought it should be possible to derive Dirac's quantization condition on the charge of magnetic monopoles by demanding that the shift in energy be 0, but this gives me (using $\Phi = 4\pi g$) $$qg = n$$ in units of $\hbar=1$, $not$ $qg = n/2$. Is this a kosher way to derive the Dirac quantization condition? If not, where does my thinking fail?
The reason I tried to derive the quantization condition this way is because I was having trouble actually understanding the Aharonov-Bohm effect in the context of electron interference. In Griffiths explanation, he uses a function $$g(\vec{r}) = \frac{q}{\hbar}\int_{\mathfrak{O}}^{\vec{r}}\vec{A}\cdot d\vec{l}$$ and claims that it is well-defined because $\vec{\nabla}\times\vec{A} = 0$ and so the integral is path independent. He uses $g$ to essentially say that one can solve the problem in the absence of the solenoid, and then tack on a phase factor $e^{ig}$ to that solution to find the wave function which is the solution to the problem when the solenoid is present.
However, I argue that $g$ is not well defined, because the region in which $\vec{\nabla}\times\vec{A} = 0$ is not simply-connected. In fact, is not the entire point that the beams arrive with different phases precisely because they took different paths, i.e. $g$ is path dependent? I would really appreciate some help in understanding this subtle point.