the cavity output path branches at a polarizing beamsplitter into two measurement paths , and the detection efficiencies of these paths are unequal . we compensate for this imbalance by performing two measurements for a given choice of ion and photon basis and sum the results ; between the measurements , a rotation of the output waveplates swaps the two paths . at each measurement setting , we record on average 4722 events in which a single photon has been detected . while a photon is detected in 5.7% of sequences , the atom is always measured . correlations of the photon polarization and the atomic state are the input for maximum likelihood reconstruction of the most likely states . error bars are one standard deviation derived from non - parametric bootstrapping assuming a multinomial distribution . the phase of the entangled atom - photon state is inferred from the measurements of photon polarization and atomic - state phase . in the experiments of refs . , although the phase of the entangled state is time independent before photon detection , the phase of the atomic state after photon detection evolves due to larmor precession . it is thus necessary to fix the time between photon detection and atomic state readout in order to measure the same  for all realizations of the experiment . in contrast , for the case of raman fields 1e and 2e , the correct choice of frequency 1  2 = d  d means that both the phase of the entangled atom - photon state before photon detection and the phase of the atomic state after photon detection are independent of photon - detection time . we define a model system with bases { |s , n , |d , n , |d , n } , where n = { 0 , 1 } is the photon number in either of the two degenerate cavity modes . the excited state has been adiabatically eliminated , so that g1eff couples |s , 0 to |d , 1 and g2eff couples |s , 0 to |d , 1 ) . after transformation into a rotating frame u = e 
 e , the hamiltonian is 
 ( s1)ss+ddd+(d(12))dd+c11+(g1effd,1s,0+g2effd,1s,0+h.c . ) , 
 where  = 1 , { s ; d ; d } are the state frequencies , c is the cavity frequency , and terms rotating at 12gieff are omitted . in this frame , the couplings gieff are time - independent , and the states |d and |d are degenerate . therefore , the phase between |d , 1 and |d , 1 remains fixed during raman transfer , and the phase between |d , 0 and |d , 0 stays constant after photon detection . the cavity mirrors have transmission t1 = 13 ppm and t2 = 1:3 ppm , with combined losses of 68 ppm . state - of - the - art combined losses at this wavelength are l = 4 ppm . in our cavity , these losses would correspond to an output coupling efficiency of t1=(t1+t2+l ) = 71% . to improve this efficiency , an output mirror with higher transmission t1 could be used ; for example , t1 = 500 ppm corresponds to an efficiency of 99% . the cavity decay rate  would also increase , but single - photon generation with near - unit efficiency is valid in the bad - cavity regime the cavity output path branches at a polarizing beamsplitter into two measurement paths , and the detection efficiencies of these paths are unequal . we compensate for this imbalance by performing two measurements for a given choice of ion and photon basis and sum the results ; between the measurements , a rotation of the output waveplates swaps the two paths . at each measurement setting , we record on average 4722 events in which a single photon has been detected . while a photon is detected in 5.7% of sequences , the atom is always measured . correlations of the photon polarization and the atomic state are the input for maximum likelihood reconstruction of the most likely states . error bars are one standard deviation derived from non - parametric bootstrapping assuming a multinomial distribution . the phase of the entangled atom - photon state is inferred from the measurements of photon polarization and atomic - state phase . in the experiments of refs . , although the phase of the entangled state is time independent before photon detection , the phase of the atomic state after photon detection evolves due to larmor precession . it is thus necessary to fix the time between photon detection and atomic state readout in order to measure the same  for all realizations of the experiment . in contrast , for the case of raman fields 1e and 2e , the correct choice of frequency 1  2 = d  d means that both the phase of the entangled atom - photon state before photon detection and the phase of the atomic state after photon detection are independent of photon - detection time . we define a model system with bases { |s , n , |d , n , |d , n } , where n = { 0 , 1 } is the photon number in either of the two degenerate cavity modes . 0 to |d , 1 and g2eff couples |s , 0 to |d , 1 ) . after transformation into a rotating frame u = e 
 e , the hamiltonian is 
 ( s1)ss+ddd+(d(12))dd+c11+(g1effd,1s,0+g2effd,1s,0+h.c . ) , 
 where  = 1 , { s ; d ; d } are the state frequencies , c is the cavity frequency , and terms rotating at 12gieff are omitted . in this frame , the couplings gieff are time - independent , and the states |d and |d are degenerate . therefore , the phase between |d , 1 and |d , 1 remains fixed during raman transfer , and the phase between |d , 0 and |d , 0 stays constant after photon detection . the cavity mirrors have transmission t1 = 13 ppm and t2 = 1:3 ppm , with combined losses of 68 ppm . state - of - the - art combined losses at this wavelength are l = 4 ppm . in our cavity , these losses would correspond to an output coupling efficiency of t1=(t1+t2+l ) = 71% . to improve this efficiency , an output mirror with higher transmission t1 could be used ; for example , t1 = 500 ppm corresponds to an efficiency of 99% . the cavity decay rate  would also increase , but single - photon generation with near - unit efficiency is valid in the bad - cavity regime
proposed quantum networks require both a quantum interface between light and matter and the coherent control of quantum states1,2 . 
 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 ions3,4 , neutral atoms5,6 , atomic ensembles7,8 , and nitrogen - vacancy spins9 . 
 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 state4 , 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 .