  In this paper we propose a Hamiltonian approach to gapped topological phases
on an open surface with boundary. Our setting is an extension of the Levin-Wen
model to a 2d graph on the open surface, whose boundary is part of the graph.
We systematically construct a series of boundary Hamiltonians such that each of
them, when combined with the usual Levin-Wen bulk Hamiltonian, gives rise to a
gapped energy spectrum which is topologically protected; and the corresponding
wave functions are robust under changes of the underlying graph that maintain
the spatial topology of the system. We derive explicit ground-state
wavefunctions of the system and show that the boundary types are classified by
Morita-equivalent Frobenius algebras. We also construct boundary quasiparticle
creation, measuring and hopping operators. These operators allow us to
characterize the boundary quasiparticles by bimodules of Frobenius algebras.
Our approach also offers a concrete set of tools for computations. We
illustrate our approach by a few examples.
