  Entanglement swapping between photon pairs is a fundamental building block in
schemes using quantum relays or quantum repeaters to overcome the range limits
of long-distance quantum key distribution. We develop a closed-form solution
for the actual quantum states prepared by realistic entanglement swapping,
which takes into account experimental deficiencies due to inefficient
detectors, detector dark counts, and multiphoton-pair contributions of
parametric down-conversion sources. We investigate how the entanglement present
in the final state of the remaining modes is affected by the real-world
imperfections. To test the predictions of our theory, comparison with
previously published experimental entanglement swapping is provided.
