Entanglement swapping with atoms separated by long distance