  The generation and distribution of entanglement are key resources in quantum
repeater schemes. Temporally multiplexed systems offer time-bin encoding of
quantum information which provides robustness against decoherence in fibers,
crucial in long distance communication. Here we demonstrate the direct
generation of entanglement in time between a photon and a collective spin
excitation in a rare earth ion doped ensemble. We analyze the entanglement by
mapping the atomic excitation onto a photonic qubit and by using time-bin
qubits analyzers implemented with another doped crystal using the atomic
frequency comb technique. Our results provide a solid-state source of entangled
photons with embedded quantum memory. Moreover, the quality of the entanglement
is high enough to enable a violation of a Bell inequality by more than two
standard deviations.
