  We investigate atom-photon entangling gates based on cavity quantum
electrodynamics (QED) for a finite photon-pulse duration, where not only the
photon loss but also the temporal mode-mismatch of the photon pulse becomes a
severe source of error. We analytically derive relations between cavity
parameters, including transmittance, length, and effective cross-sectional area
of the cavity, that minimize both the photon loss probability and the error
rate due to temporal mode-mismatch by taking it into account as state-dependent
pulse delay. We also investigate the effects of pulse distortion using
numerical simulations for the case of short pulse duration.
