  We study generalizations of the Berry phase for quantum lattice systems in
arbitrary dimensions. For a smooth family of gapped ground states in d
dimensions, we define a closed (d+2)-form on the parameter space which
generalizes the curvature of the Berry connection. Its cohomology class is a
topological invariant of the family. When the family is equivariant under the
action of a compact Lie group G, topological invariants take values in the
equivariant cohomology of the parameter space. These invariants unify and
generalize the Hall conductance and the Thouless pump. A key role in these
constructions is played by a certain differential graded Frechet-Lie algebra
attached to any quantum lattice system. As a by-product, we describe
ambiguities in charge densities and conserved currents for arbitrary lattice
systems with rapidly decaying interactions.
