Magnetic flux changed by gauge transformation

This occurred to me when I was reviewing the Laughlin argument. Suppose a gauge transformation $$A\rightarrow A+\nabla{\theta}$$, where $$\theta$$ is the angle defined in a closed loop. When integrating over this loop to get the magnetic flux, this additional $$\theta$$ gives a change of $$2\pi$$. What am I overlooking? Isn't the magnetic flux independent of gauge choice?

• $\theta$ is not a well-defined smooth function. It has a branch cut. So it's not a valid global gauge transformation. – Jahan Claes Jan 21 '19 at 4:29
• @JahanClaes Thank you. I saw in some resources this gauge transformation was used to explain that the Laughlin pump system is left invariant if one increased the threading magnetic flux up to multiples of $2\pi$. So there's quantized charge pumped from one to the other end of the cylinder. – Jason Tao Jan 21 '19 at 4:50
• The point is the magnetic flux is only independent if gauge choice when you do a well-defined gauge transformation. The "gauge transformation" here really isn't a physically valid gauge transformation because it can't be written as the gradient of a function. What this transformation does is relate eigenstates of two DIFFERENT physical systems, one with flux and one without. – Jahan Claes Jan 21 '19 at 19:00