  We propose a new discrete model---the twisted quantum double model---of 2D
topological phases based on a finite group $G$ and a 3-cocycle $\alpha$ over
$G$. The detailed properties of the ground states are studied, and we find that
the ground--state subspace can be characterized in terms of the twisted quantum
double $D^{\alpha}(G)$ of $G$. When $\alpha$ is the trivial 3-cocycle, the
model becomes Kitaev's quantum double model based on the finite group $G$, in
which the elementary excitations are known to be classified by the quantum
double $D(G)$ of $G$. Our model can be viewed as a Hamiltonian extension of the
Dijkgraaf--Witten topological gauge theories to the discrete graph case with
gauge group being a finite group. We also demonstrate a duality between a large
class of Levin-Wen string-net models and certain twisted quantum double models,
by mapping the string--net 6j symbols to the corresponding 3-cocycles. The
paper is presented in a way such that it is accessible to a wide range of
physicists.
