Aharonov-Bohm Effect and Flux Quantization in superconductors Why is the magnetic flux not quantized in a standard Aharonov-Bohm (infinite) solenoid setup, whereas in a superconductor setting, flux is quantized?
 A: According to Wigner, the wave function of a quantum particle can be
multivalued, i.e., can acquire a nontrivial phase around a closed loop.
A phase is nontrivial when it cannot be removed using a gauge
transformation by $e^{i \alpha(\theta)}$, with a true function $\alpha$, 
i.e., $\alpha(2\pi) = \alpha(0)$. The wave functions having this property are sections of nontrivial line bundles over the configuration manifold. 
The reason that a wave function is not required to be a true function is because its overall phase and magnitude are nonphysical, if one defines quantum expectations as:$$
\left< X \right>~~=~~ \frac{\int \Psi \hat{X} \Psi}{\int \Psi \Psi}
\,.$$
Such wave functions arise when the configuration manifold is not simply
connected with a nontrivial cohomology group $\mathcal{H}^{1}(M,\mathbb{R})$ (This is the case of the circle). In this case, there will exist vector potentials on the manifold which are not the gradients of a true function on the manifold. $A \ne d\alpha(\theta)$. with, $\alpha(2\pi) =\alpha(0)$. However, there is no need for the flux to be quantized as the wave function needs not be a true function on the configuration manifold. On the contrary, if the flux had been quantized, then no Aharonov-Bohm effect would not have observed. A quantization condition occurs when  $\mathcal{H}^{2}(M,\mathbb{R})$ (The Dirac quantization condition), but this is the case of a particle moving on a sphere rather than on a circle.
However, this is not the case in superconductivity. The difference between the two situations lies in the fact that the "macroscopic wave function" of a superconductor is not a "wave function".
i.e., it is not the coordinate representation of a state vector in a Hilbert space. It is a quantum field describing Goldstone bosons (Cooper pair) of the superconducting phase (usually called an order parameter). The modulus of the macroscopic wave function $\left|\Psi \left( \theta \right) \right|^2$ describes the number density operator of the Goldstone bosons. Its two point functions describe the (long range) correlations. This quantum field couples minimally to electromagnetism, and this is the reason why its equation of motion is similar to the Schrodinger equation of a particle coupled to electromagnetism. But the main difference this field is a true scalar field and not a section of a line bundle. This gives us the reason why the phase it acquires in a full loop should vanish because otherwise for example, its correlation functions would depend on how many times the circle was wrapped.
A: While both the answers given in some sense are correct, the true reason has to do with energetic considerations. It is a matter of what is stronger and can be phrased as the following question: Will the wavefunction alter itself to accommodate the flux, or will the flux quantize itself because the wavefunction is trying to remain single valued?
As an example of what I mean: flux is quantized in the superconducting case up to a point. One can ramp up the flux inside the superconducting ring until superconductivity is destroyed (even though the magnetic field itself is not in contact with the superconductor). This will occur purely because the superconducting condensate will not have enough energy to keep the flux quantized at large values of the flux. 
It is because the superconductor in some sense can be thought of as a macroscopic wavefunction with a lot of energy that the flux is quantized in the superconducting case. In the Aharonov-Bohm case, we have a single electron (or a beam of incoherent electrons), which does not have enough energy to alter the flux.
A: Just adding to @Xcheckr's answer, which I think is the most correct: quantum fields are always single-valued. In a superconductor, it is energetically favorable to minimize the kinetic term $|D_A\psi|^2$, where $\psi$ is the superconducting order parameter. $D_A\psi=0$ implies that the phase of $\psi$ is determined through parallel transport by exponentiating $iq\int A$, and this together with the single-valuedness of $\psi$ enforces flux quantization. 
In an AB effect setup by contrast, there is no energetic reason to set $D_A\psi=0$, and so the phase of $\psi(x)$ will not be determined by $\exp(iq\int A)$. This means that for some generic value of the flux, the magnitude $|\psi|$ will not be constant (e.g. it will pass through zero at some point), which is where the interference in the AB effect comes from. In a superconductor $|\psi|$ must be constant for energetic reasons, and this is why the flux is quantized in a SC. 
A: The whole Aharonov-Bohm effect – a nontrivial phase – is actually due to nothing else than a deviation from the flux quantization rule. The angle we may measure as the shift of the interference pattern in the Aharonov-Bohm effect is
$$ \Delta\phi = \frac{q\Phi_B}{\hbar}, \quad \Phi_B \equiv\int d\vec S\cdot \vec B $$
So the conventional flux quantization rule is $\Delta \phi = 2\pi k$ for $k\in{\mathbb Z}$ which means nothing else than "the solenoid behaves as exactly as if there were no solenoid".
That's how we derive the flux quantization in the first place. The magnetic monopoles, for example (an important third situation I am adding where the flux quantization deserves to be discussed), have to obey the Dirac quantization rule which is equivalent to the flux quantization rule for the flux through the surface surrounding them. And they have to obey it exactly for the Dirac string – a semi-infinite line starting from the magnetic monopole where $\vec A$ is inevitably singular and which must exists because ${\rm div}\,\vec B\neq 0$ anymore – to be unobservable. The Dirac string is nothing else than an Aharonov-Bohm solenoid, however one that we know to be unobservable because there's no matter over there and we required the location of the Dirac string to be a pure convention.
Note that there is a difference between the surfaces above. The flux quantization (which doesn't hold) in the Aharonov-Bohm effect counts the flux through an open, disk-shaped region; in the Dirac quantization rule, it's a closed surface, a sphere around a monopole. It's only the latter flux through a closed surface that has to be quantized.
Now, in superconductor, electron pairs act as bosons that effectively produce a complex classical scalar field $\Psi$. Its charge is $2e$ because it is composed of electron pairs. Now, the vacuum expectation value of $|\Psi|^2$ is a nonzero constant but the phase of $\Psi$ is arbitrary. In particular, when you study how the phase of $\Psi$ changes if you encircle the boundary of a ring, you will find out it comes back to the original phase but it may "wind around zero" $w$ times, a winding number, and this integer $w$ exactly measures the magnetic flux in the units of the superconductor magnetic flux (which is $1/2$ times the minimum magnetic monopole dual to the electron).
This condition that "the phase of $\Psi$ has to return to itself" is mathematically equivalent to what we used in the magnetic-monopole, Dirac quantization discussion: its phase is changing as much as when an electron was encircling the Dirac string (or solenoid) in the previous two examples. A difference is that now, an electron pair must be allowed to peacefully encircle the ring without changing the wave function – because it's still the same state. So the phase is changing twice as quickly and the allowed unit of flux is $1/2$ of what it was before.
In the superconductor case, the phase must return to its original value (after the electron pair makes a round trip around the ring) because this situation is close to the "Dirac string". In particular, we require that there is no observable effect of the material inside the disk simply because there's nothing – there's no solenoid etc. – inside the ring. So much like for the Dirac string, the matter inside the ring has to be invisible – there isn't any – which means that the wave function has to return to its original value after a 360-degree rotation by the electron pair.
Summary
One could just dismiss these three situations as entirely different situations but the key maths is still analogous in the three situations, with some differences:


*

*the Dirac string or the interior of the superconducting ring must act as if there were nothing, so the wave functions must return to themselves, and therefore impose the quantization rule; it's important to distinguish the open/closed topology of the surfaces over which the fluxes are measured

*the Aharonov-Bohm solenoid contains stuff so there's no valid proof that the solenoid has to be invisible to the electrons running around it, and indeed, their interference pattern is allowed to shift as a result

*one must be careful about the diffferent elementary charges, $e$ (or $e/3$ if quarks are included) in the Dirac string and/or the Aharonov-Bohm solenoid, and $2e$ in the superconducting case

