We associate to the action of a compact Lie group $G$ on a
line bundle over a compact oriented even-dimensional manifold a
virtual representation of $G$ using a twisted version of the signature
operator. We obtain analogues of various theorems in the more
standard theory of geometric quantization. Some of these results were
announced in Guillemin, Sternberg and Weitsman, 2003.