  Generating entanglement between distant quantum systems is at the core of
quantum networking. In recent years, numerous theoretical protocols for remote
entanglement generation have been proposed, of which many have been
experimentally realized. Here, we provide a modular theoretical framework to
elucidate the general mechanisms of photon-mediated entanglement generation
between single spins in atomic or solid-state systems. Our framework
categorizes existing protocols at various levels of abstraction and allows for
combining the elements of different schemes in new ways. These abstraction
layers make it possible to readily compare protocols for different quantum
hardware. To enable the practical evaluation of protocols tailored to specific
experimental parameters, we have devised numerical simulations based on the
framework with our codes available online.
