In some aspects, a mesoscopic system is used to generate entanglement, for example, on a pair of qubits. In some implementations, the mesoscopic system includes a first spin, a second spin and multiple other spins. The initial state of the first and second spins can be separable (non-entangled) states. Measurement outcomes are obtained by performing projective measurements on the mesoscopic system. Based on the measurement outcomes, an entangled state of the first and second spins is detected. The entangled state is transferred from the first and second spins to the first and second qubits.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A method of entangling qubits, the method comprising: preparing a mesoscopic system in an initial state, the mesoscopic system comprising a first spin, a second spin and other spins, the initial state comprising separable states of the first and second spins; after preparing the mesoscopic system in the initial state, obtaining measurement outcomes by performing projective measurements on the mesoscopic system, wherein performing the projective measurements causes the first and second spins to transition from the separable states to an entangled state; detecting, based on the measurement outcomes, that the first spin and the second spin are in the entangled state; and transferring the entangled state from the first spin and the second spin to a first qubit and a second qubit that are external to the mesoscopic system. 2. The method of claim 1, further comprising preparing the first qubit and the second qubit in separable initial states before transferring the entangled state from the first spin and the second spin to the first qubit and the second qubit. 3. The method of claim 2, wherein transferring the entangled state from the first spin and the second spin to the first qubit and the second qubit comprises: applying a first swap gate to the first spin and the first qubit; and applying a second swap gate to the second spin and the second qubit. 4. The method of claim 1, wherein applying the projective measurements comprises: applying a first projective measurement to the first spin, the second spin and the other spins in the mesoscopic system; and applying a second projective measurement to only the other spins in the mesoscopic system, wherein the first and second projective measurements cause the first and second spins to transition from the separable states to the entangled state. 5. The method of claim 4, wherein detecting that the first spin and the second spin are in the entangled state comprises detecting equal measurement outcomes from the first projective measurement and the second projective measurement. 6. The method of claim 1, wherein the mesoscopic system comprises an electron spin system subject to a polarizing magnetic field, and performing projective measurements comprises measuring magnetization of the electron spin system along an axis of polarization defined by the polarizing magnetic field. 7. The method of claim 6, wherein the first qubit comprises a first NV center in diamond material, and the second qubit comprises a second NV center in diamond material. 8. The method of claim 1, wherein the initial state of the mesoscopic system comprises the first spin in the |+ state, the second spin in the |+ state and the other spins in the mesoscopic system in a mixed state. 9. The method of claim 1, wherein the initial state of the mesoscopic system comprises the first spin in the |+ state, the second spin in the |− state and the other spins in the mesoscopic system in a mixed state. 10. The method of claim 1, wherein the entangled state comprises the triplet zero state. 11. The method of claim 1, wherein the entangled state comprises the singlet state. 12. The method of claim 1, wherein the entangled state is transferred from the first spin and the second spin to the first qubit and the second qubit independent of direct coupling between the first qubit and the second qubit. 13. The method of claim 1, wherein the entangled state is transferred from the first spin and the second spin to the first qubit and the second qubit through a first coupling between the first spin and the first qubit and a second coupling between the second spin and the second qubit. 14. A system comprising: a mesoscopic system comprising a first spin, a second spin and other spins; first and second qubits, the first qubit coupled to the first spin by a first coupling, the second qubit coupled to the second spin by a second coupling; a measurement apparatus configured to entangle the first and second spins by performing projective measurements on the mesoscopic system; a control system configured to: prepare the mesoscopic system in an initial state that comprises separable states of the first and second spins; detect an entangled state of the first and second spins based on a series of measurement outcomes obtained by the measurement apparatus after the mesoscopic system has been prepared in the initial state; and transfer the entangled state from the first and second spins to the first and second qubits through the first and second couplings. 15. The system of claim 14, wherein the first qubit is configured to interact with the first spin through a first dipolar coupling between first qubit and the first spin, and the second qubit is configured to interact with the second spin through a second dipolar coupling between second qubit and the second spin. 16. The system of claim 14, wherein the mesoscopic system comprises an electron spin system in a diamond material. 17. The system of claim 16, wherein the first qubit comprises a first NV center in the diamond material, and the second qubit comprises a second NV center in the diamond material. 18. The system of claim 14, wherein the mesoscopic system is configured to detect a single spin flip in the mesoscopic system. 19. The system of claim 14, wherein the measurement apparatus is configured to entangle the first and second spins by: applying a first projective measurement to the first spin, the second spin and the other spins in the mesoscopic system; and applying a second projective measurement to only the other spins in the mesoscopic system, wherein the series of measurement outcomes comprises a first measurement outcome from the first projective measurement and a second measurement outcome from the second projective measurement.