# What would be the procedure if I wish to code entanglement swapping?

Most of the methods that I have seen in various papers all take single examples and then proceed to manually perform swapping by re-writing the states on a different basis and then performing a measurement to swap entanglement.

Or entanglement is spoken about very briefly, such as in: Horodecki, R., Horodecki, P., Horodecki, M., & Horodecki, K. (2009). Quantum entanglement. Reviews of Modern Physics, 81(2), 865–942. - Page 12

I wish to code entanglement swapping for some arbitrary state of 4 qubits, of which A-B and C-D are entangled. I wish to perform the swapping leaving A-D entangled. How would I go about doing the same? I was unable to find any detailed resources on swapping or a generalized entanglement swapping procedure anywhere.

• Is entanglement swapping the same as quantum teleportation? Aug 22 '21 at 23:32
• @Mauricio entanglement swapping is teleportation of qubits that are entangled. Aug 23 '21 at 2:25
• Aug 23 '21 at 7:43
• @Mauricio thanks, but that doesn't solve the question I asked. It would be helpful if I wanted to code it using qiskit, but it does not help with the procedure that I would have to follow for entanglement swapping if I wanted to perform symbolic computation. Aug 24 '21 at 0:13

Look at the "Bell fusion" in Fig 2. Basically you measure $$X_BX_C$$ and $$Z_B Z_C$$ and that leaves $$q_A q_D$$ entangled.