  Matter qubit to traveling photonic qubit conversion is the cornerstone of
numerous quantum technologies such as distributed quantum computing, as well as
several quantum internet and networking protocols. We formulate a theory for
stimulated Raman emission which is applicable to a wide range of physical
systems including quantum dots, solid state defects, and trapped ions, as well
as various parameter regimes. We find the upper bound for the photonic pulse
emission efficiency of arbitrary matter qubit states for imperfect emitters and
show a path forward to optimizing the fidelity. Based on these results we
propose a paradigm shift from optimizing the drive to directly optimizing the
temporal mode of the flying qubit using a closed-form expression. Protocols for
the production of time-bin encoding and spin-photon entanglement are proposed.
Furthermore, the mathematical idea to use input-output theory for pulses to
absorb the dominant emission process into the coherent dynamics, followed by a
non-Hermitian Schr\"odinger equation approach has great potential for studying
other physical systems.
