Long-distance entanglement distribution using individual atoms in optical cavities