  We systematically extend the elementary differential and Riemannian geometry
of classical $\mathrm{U}(1)$-gauge theory to the noncommutative setting by
combining recent advances in noncommutative Riemannian geometry with the theory
of coherent $2$-groups. We show that Hermitian line bimodules with Hermitian
bimodule connection over a unital pre-$\mathrm{C}^\ast$-algebra with
$\ast$-exterior algebra form a coherent $2$-group, and we prove that weak
monoidal functors between coherent $2$-groups canonically define bar or
involutive monoidal functors in the sense of Beggs--Majid and Egger,
respectively. Hence, we prove that a suitable Hermitian line bimodule with
Hermitian bimodule connection yields an essentially unique differentiable
quantum principal $\mathrm{U}(1)$-bundle with principal connection and vice
versa; here, $\mathrm{U}(1)$ is $q$-deformed for $q$ a numerical invariant of
the bimodule connection. From there, we formulate and solve the interrelated
lifting problems for noncommutative Riemannian structure in terms of abstract
Hodge star operators and formal spectral triples, respectively; all the while,
we account precisely for emergent modular phenomena of geometric nature. In
particular, it follows that the spin Dirac spectral triple on quantum
$\mathbf{C}\mathrm{P}^1$ does not lift to a twisted spectral triple on
$3$-dimensional quantum $\mathrm{SU}(2)$ with the $3$-dimensional calculus but
does recover Kaad--Kyed's compact quantum metric space on quantum
$\mathrm{SU}(2)$ for a canonical choice of parameters.
