  We propose a scheme to implement quantum controlled SWAP gates by directing
single-photon pulses to a two-sided cavity with a single trapped atom. The
resultant gates can be used to realize quantum fingerprinting and universal
photonic quantum computation. The performance of the scheme is characterized
under realistic experimental noise with the requirements well within the reach
of the current technology.
