  We analyse the problem of a single mode field interacting with a pair of two
level atoms. The atoms enter and exit the cavity at different times. Instead of
using constant coupling, we use time dependent couplings which represent the
spatial dependence of the mode. Although the system evolution is adiabatic for
most of the time, a previously unstudied energy crossing plays a key role in
the system dynamics when the atoms have a time delay. We show that conditional
atom-cavity entanglement can be generated, while for large photon numbers the
entangled system has a behaviour which can be mapped onto the single atom
Jaynes-Cummings model. Exploring the main features of this system we propose
simple and fairly robust methods for entangling atoms independently of the
cavity, for quantum state mapping, and for implementing SWAP and C-NOT gates
with atomic qubits.
