  Proposed quantum networks require both a quantum interface between light and
matter and the coherent control of quantum states. A quantum interface can be
realized by entangling the state of a single photon with the state of an atomic
or solid-state quantum memory, as demonstrated in recent experiments with
trapped ions, neutral atoms, atomic ensembles, and nitrogen-vacancy spins. The
entangling interaction couples an initial quantum memory state to two possible
light-matter states, and the atomic level structure of the memory determines
the available coupling paths. In previous work, these paths' transition
parameters determine the phase and amplitude of the final entangled state,
unless the memory is initially prepared in a superposition state, a step that
requires coherent control. Here we report the fully tunable entanglement of a
single 40Ca+ ion and the polarization state of a single photon within an
optical resonator. Our method, based on a bichromatic, cavity-mediated Raman
transition, allows us to select two coupling paths and adjust their relative
phase and amplitude. The cavity setting enables intrinsically deterministic,
high-fidelity generation of any two-qubit entangled state. This approach is
applicable to a broad range of candidate systems and thus presents itself as a
promising method for distributing information within quantum networks.
