  By a quasi-representation of a group $G$ we mean an approximately
multiplicative map of $G$ to the unitary group of a unital $C^*$-algebra. A
quasi-representation induces a partially defined map at the level $K$-theory.
  In the early 90s Exel and Loring associated two invariants to
almost-commuting pairs of unitary matrices $u$ and $v$: one a $K$-theoretic
invariant, which may be regarded as the image of the Bott element in
$K_0(C(\mathbb{T}^2))$ under a map induced by quasi-representation of
$\mathbb{Z}^2$ in U(n); the other is the winding number in $\mathbb{C}\setminus
\{0\}$ of the closed path $t\mapsto \det(tvu + (1-t)uv)$. The so-called
Exel-Loring formula states that these two invariants coincide if $\|uv - vu\|$
is sufficiently small.
  A generalization of the Exel-Loring formula for quasi-representations of a
surface group taking values in U(n) was given by the second-named author. Here
we further extend this formula for quasi-representations of a surface group
taking values in the unitary group of a tracial unital $C^*$-algebra.
