  For a general self-adjoint Hamiltonian operator $H_0$ on the Hilbert space
$L^2(\RE^d)$, we determine the set of all self-adjoint Hamiltonians $H$ on
$L^2(\RE^d)$ that dynamically confine the system to an open set $\Omega \subset
\RE^d$ while reproducing the action of $ H_0$ on an appropriate operator
domain. In the case $H_0=-\Delta +V$ we construct these Hamiltonians explicitly
showing that they can be written in the form $H=H_0+ B$, where $B$ is a
singular boundary potential and $H$ is self-adjoint on its maximal domain. An
application to the deformation quantization of one-dimensional systems with
boundaries is also presented.
