Coherent spin-exchange via a quantum mediator