  Two photons in free space pass each other undisturbed. This is ideal for the
faithful transmission of information, but prohibits an interaction between the
photons as required for a plethora of applications in optical quantum
information processing. The long-standing challenge here is to realise a
deterministic photon-photon gate. This requires an interaction so strong that
the two photons can shift each others phase by pi. For polarisation qubits,
this amounts to the conditional flipping of one photon's polarisation to an
orthogonal state. So far, only probabilistic gates based on linear optics and
photon detectors could be realised, as "no known or foreseen material has an
optical nonlinearity strong enough to implement this conditional phase
shift..." [Science 318, 1567]. Meanwhile, tremendous progress in the
development of quantum-nonlinear systems has opened up new possibilities for
single-photon experiments. Platforms range from Rydberg blockade in atomic
ensembles to single-atom cavity quantum electrodynamics. Applications like
single-photon switches and transistors, two-photon gateways, nondestructive
photon detectors, photon routers and nonlinear phase shifters have been
demonstrated, but none of them with the ultimate information carriers, optical
qubits. Here we employ the strong light-matter coupling provided by a single
atom in a high-finesse optical resonator to realise the Duan-Kimble protocol of
a universal controlled phase flip (CPF, pi phase shift) photon-photon quantum
gate. We achieve an average gate fidelity of F=(76.2+/-3.6)% and specifically
demonstrate the capability of conditional polarisation flipping as well as
entanglement generation between independent input photons. Our gate could
readily perform most of the hitherto existing two-photon operations. It also
discloses avenues towards new quantum information processing applications where
photons are essential.
