Vector Potential and Gauge Invariance in Quantum Mechanics In classical electromagnetism, we are allowed to use gauge invariance through the argument that the only physical observable fields are the $E$-field and the $B$-field. So in that sense the scalar potential $\phi$ and the vector potential $A$ are to be defined up to an arbitrary constant as long as they give the same E and $B$-field.
But as we know from the Aharonov-Bohm effect, it turned out in quantum mechanics, the $A$-field is also observable. So, by right, we are not allowed to use gauge invariance in quantum mechanics, right? Or is there something wrong with my reasoning?
 A: We are allowed to use gauge invariance in quantum mechanics – even quantum mechanical theories with the electromagnetic 4-potential are gauge-invariant theories. However, it's not quite true that all gauge invariant quantities are functions or functionals of $F_{\mu\nu}$.
Instead, we may consider the phase
$$ \exp\left(i\oint d\vec x\cdot \vec A\right) $$
where the integral goes along a circle surrounding the solenoid. The exponential above may be seen to be gauge-invariant (add the appropriate natural factor of $e$ or $e/c$ to the exponent to fit your normalizations) because $\vec A$ changes by $\nabla \lambda$ and the integral changes by the step of $\lambda$ between the beginning and end of the circular contour. 
But this multiplicative factor is guaranteed to be a multiple of $2\pi$ because the charged fields of unit charge transform by getting multiplied by $\exp(i\lambda)$ and they have to stay single-valued in all directions of the solenoid. So the information given by the exponential – a complex number whose absolute value is one or, equivalently, the integral of $\vec A$ modulo $2\pi$ – remains the same under any gauge transformation. It has observable consequences in quantum mechanics. In particular, it affects the location of the interference patterns behind the solenoid.
Equivalently, you may rewrite the contour integral as
$$\oint d\vec x\cdot \vec A = \int dS\cdot \vec B $$
which only depends on the gauge-invariant field strength $\vec B$. It's the magnetic flux through the solenoid. However, we must know the value of $\vec B$ even in – and especially in – regions that the electron never reaches, where it has a zero probability to be, namely inside the solenoid. Quantum mechanics is sensitive on the magnetic flux because it manifests itself as the relative phase of the wave function of the electron going around the left or right side of the solenoid, respectively.
The first explanation of the AB effect only uses quantities measured along the paths of the electron but one needs to use other gauge-invariant objects than the field strength; the second explanation agrees with the proposition that all gauge-invariant entities are functionals of the field strength but one must "nonlocally" consider the field strength's value in forbidden regions in the solenoid, too. They matter in quantum physics. In the classical limit, the interference patterns go away and the whole sensitivity on the magnetic flux is eliminated, too.
A: It is a magnetic field which is observable, not a vector potential. Although the magnetic field is zero outside the solenoid, in a wave theory all points of space take part in creating the resulting wave, i.e., including points inside the solenoid.
EDIT: Seeing downvoting, I decided to develop my short answer. 
There are no "forbidden regions" in our case. The wave equation solution is zero in this or that region as a solution due to certain interactions that creates zero, let us not forget it! 
If a certain region is never penetrable, we ourselves cannot tell what is in this region. In that case we cannot relate a vector potential outside with a magnetic field inside. In other words, in a wave theory what is accessible to us, is accessible to the electron ;-)
