The Hamiltonian of a non-relativistic charged particle in a magnetic field is
$$\hat{H}~=~\frac{1}{2m} \left[\frac{\hbar}{i}\vec\nabla - \frac{q}{c}\vec A\right]^2$$.
Under a gauge transformation of the magnetic potential:
$$\vec A ~\rightarrow~ \vec A + \vec\nabla \chi,$$
the wavefunction of the particle transforms as
$$\Psi~\rightarrow~ \Psi\exp(\frac{iq\chi}{\hbar c}).$$
When $\chi$ is real, the wavefunction simply gains an extra phase factor. However, when $\chi$ is imaginary, there is a measurable change to the wavefunction. This seems to contradict the fact that the magnetic field is invariant under the gauge transformation. How do I resolve this?