  For an anyon model in two spatial dimensions described by a modular tensor
category, the topological S-matrix encodes the mutual braiding statistics, the
quantum dimensions, and the fusion rules of anyons. It is nontrivial whether
one can compute the S-matrix from a single ground state wave function. Here, we
define a class of Hamiltonians consisting of local commuting projectors and an
associated matrix that is invariant under local unitary transformations. We
argue that the invariant is equivalent to the topological S-matrix. The
definition does not require degeneracy of the ground state. We prove that the
invariant depends on the state only, in the sense that it can be computed by
any Hamiltonian in the class of which the state is a ground state. As a
corollary, we prove that any local quantum circuit that connects two ground
states of quantum double models (discrete gauge theories) with non-isomorphic
abelian groups, must have depth that is at least linear in the system's
diameter.
  As a tool for the proof, a manifestly Hamiltonian-independent notion of
locally invisible operators is introduced. This gives a sufficient condition
for a many-body state not to be generated from a product state by any small
depth quantum circuit; this is a many-body entanglement witness.
