  We show that the simultaneous interaction of two single-photon fields with a
single atom in the V configuration can in principle produce a conditional phase
gate of arbitrarily high fidelity, for an appropriate choice of the interaction
time, as long as the fields con be described by a single temporal mode (as in
an optical cavity); this requires a ``gated'' interaction, where, e.g.,
dynamical coupling techniques could be used to get the fields in and out of the
cavity, and a large detuning induced by a strong external field could be used
to turn the atom-field interaction on and off at the right times. With these
assumptions, our analysis shows that the largest gate fidelities are obtained
for a cavity containing a single atom, and that adding more atoms in effect
``dilutes'' the system's nonlinearity. We also study how spontaneous emission
losses into non-cavity modes degrade the fidelity, and consider as well a
couple of alternate atomic level schemes, namely two- and five-level systems.
