  The steady increase in control over individual quantum systems has backed the
dream of a quantum technology that provides functionalities beyond any
classical device. Two particularly promising applications have been explored
during the past decade: First, photon-based quantum communication, which
guarantees unbreakable encryption but still has to be scaled to high rates over
large distances. Second, quantum computation, which will fundamentally enhance
computability if it can be scaled to a large number of quantum bits. It was
realized early on that a hybrid system of light and matter qubits could solve
the scalability problem of both fields - that of communication via quantum
repeaters, that of computation via an optical interconnect between smaller
quantum processors. To this end, the development of a robust two-qubit gate
that allows to link distant computational nodes is "a pressing challenge". Here
we demonstrate such a quantum gate between the spin state of a single trapped
atom and the polarization state of an optical photon contained in a faint laser
pulse. The presented gate mechanism is deterministic, robust and expected to be
applicable to almost any matter qubit. It is based on reflecting the photonic
qubit from a cavity that provides strong light-matter coupling. To demonstrate
its versatility, we use the quantum gate to create atom-photon,
atom-photon-photon, and photon-photon entangled states from separable input
states. We expect our experiment to break ground for various applications,
including the generation of atomic and photonic cluster states,
Schr\"odinger-cat states, deterministic photonic Bell-state measurements, and
quantum communication using a redundant quantum parity code.
