We solve the Jaynes-Cummings Hamiltonian with time-dependent coupling parameters under the dipole and rotating-wave approximations for a three-dimensional photonic crystal (PC) single-mode cavity with a sufficiently high-quality Q factor. We then exploit the results to show how to create a maximally entangled state of two atoms and how to implement several quantum logic gates: a dual-rail Hadamard gate, a dual-rail NOT gate, and a SWAP gate. The atoms in all of these operations are syncronized, which is not the case in previous studies of PCs [J. Mod. Opt. 48, 1495 (2001); Ear. Phys. J. D 10, 285 (2000); Eur. Phys. J. D 18, 247 (2002)]. Our method has the potential for extension to N-atom entanglement, universal quantum logic operations, and the implementation of other useful, cavity QED-based quantum information processing tasks. (c) 2007 Optical Society of America.