  We study the possibility of using guided photons to generate, control, and
measure the entanglement of two qubits that is mediated by a one-dimensional
waveguide. We show how entanglement can be generated both with single photon
and with two-photon wavepackets. The introduction of a second photon allows for
a manipulation of the entanglement between the qubits, and phenomena such as
sudden death and revival of entanglement appear. Finally, we propose a
procedure for entanglement detection via the scattering output of a
single-photon over a qubit state.
