Start with any unitary connection . The Hodge decomposition theorem gives a unique real harmonic differential form representing . Since they have the same de Rham cohomology class, for a smooth real one-form . Set . The vector-bundle curvature difference formula gives
This proves existence of a harmonic-curvature unitary line connection for any metric and any complex line bundle.
Two such unitary connections have the same vector-bundle curvature because harmonic representatives are unique. Their difference is therefore with . When , write globally. The bundle gauge transformation changes to . Thus the harmonic-curvature connection is unique up to gauge. On a general base, closed forms modulo the integral-period forms coming from circle-valued gauge transformations leave the torus of possible gauge classes; the hypothesis removes this freedom.