Net eigenvalue crossings = topological winding number
Spectral flow counts the net number of times eigenvalues of a parametric operator H(θ)
cross zero as θ sweeps from 0 to 2π. This count equals the topological winding number —
a robust integer invariant unchanged by smooth deformations. For a 1D Dirac operator on a ring,
H(θ) = −i∂_x + A(x,θ), the spectral flow = winding of the gauge field. Crossings from
below (orange) and above (blue) contribute ±1 respectively.