  We provide a diagrammatic formulation of perturbative quantum field theory in
a finite interval of time $\tau $, on a compact space manifold $\Omega $. We
explain how to compute the evolution operator $U(t_{\text{f}},t_{\text{i}})$
between the initial time $t_{\text{i}}$ and the final time
$t_{\text{f}}=t_{\text{i}}+\tau $, study unitarity and renormalizability, and
show how to include purely virtual particles, by rendering some physical
particles (and all the ghosts, if present) purely virtual. The details about
the restriction to finite $\tau $ and compact $\Omega $ are moved away from the
internal sectors of the diagrams (apart from the discretization of the
three-momenta), and coded into external sources. So doing, the diagrams are as
similar as possible to the usual $S$ matrix diagrams, and most known theorems
extend straightforwardly. Unitarity is studied by means of the spectral optical
identities, and the diagrammatic version of the identity
$U^{\dag}(t_{\text{f}},t_{\text{i}})U(t_{\text{f}},t_{\text{i}})=1$. The
dimensional regularization is extended to finite $\tau $ and compact $\Omega$,
and used to prove, under general assumptions, that renormalizability holds
whenever it holds at $\tau =\infty $, $\Omega =\mathbb{R}^{3}$. Purely virtual
particles are introduced by removing the on-shell contributions of some
physical particles, and the ghosts, from the core diagrams, and trivializing
their initial and final conditions. The resulting evolution operator
$U_{\text{ph}}(t_{\text{f}},t_{\text{i}})$ is unitary, but does not satisfy the
more general identity
$U_{\text{ph}}(t_{3},t_{2})U_{\text{ph}}(t_{2},t_{1})=U_{\text{ph}}(t_{3},t_{1})$.
As a consequence, $U_{\text{ph}}(t_{\text{f}},t_{\text{i}})$ cannot be derived
from a Hamiltonian in a standard way, in the presence of purely virtual
particles.
