Geometric phase for entangled spin pairs