  We extend the input-output formalism of quantum optics to analyze few-photon
transport in waveguides with an embedded qubit. We provide explicit analytical
derivations for one and two-photon scattering matrix elements based on operator
equations in the Heisenberg picture.
