I did Quantum Teleportation and then Quantum Fourier Transform (QFT) experiments. After the latter, I wondered if it was possible to combine the two experiments. Could I set input states, teleport them, and then perform the QFT on the other end?

For a while, I thought this might not be possible. Teleportation seemed to be undoing the input states. Thanks to trying a suggestion from James Wootton, I discovered that QFT works with SWAP. But, I then had a hard time combining SWAP with teleportation.

Finally, I found a website that graphically shows a SWAP through teleportation. So, I translated the diagram into OpenQASM and then modified it to SWAP three pairs of qubits through teleportation.

OPENQASM 2.0;

include "qelib1.inc";

qreg q[10];

creg c[10];

// set input states for a 001 output

h q[0];

u1(-pi) q[0];

h q[1];

u1(-pi/2) q[1];

h q[2];

u1(-pi/4) q[2];

barrier q; // entangle Alice's (3, 4) and Bob's (5, 6) qubits

h q[3];

cx q[3], q[5];

h q[4];

cx q[4], q[6];

barrier q; // swap q[0] and q[7]

swap q[0], q[3];

cx q[3], q[4];

h q[3];

//measure q[3] -> c[3];

//measure q[4] -> c[4];

swap q[7], q[6];

cx q[6], q[5];

h q[6];

//measure q[5] -> c[5];

//measure q[6] -> c[6];

cx q[4], q[7];

cz q[3], q[7];

cx q[5], q[0];

cz q[6], q[0];

barrier q; // reset Alice's and Bob's qubits

reset q[3];

reset q[4];

reset q[5];

reset q[6];

h q[3];

cx q[3], q[5];

h q[4];

cx q[4], q[6];

barrier q; // swap q[1] and q[8]

swap q[1], q[3];

cx q[3], q[4];

h q[3];

//measure q[3] -> c[3];

//measure q[4] -> c[4];

swap q[8], q[6];

cx q[6], q[5];

h q[6];

//measure q[5] -> c[5];

//measure q[6] -> c[6];

cx q[4], q[8];

cz q[3], q[8];

cx q[5], q[1];

cz q[6], q[1];

barrier q; // reset Alice's and Bob's qubits

reset q[3];

reset q[4];

reset q[5];

reset q[6];

h q[3];

cx q[3], q[5];

h q[4];

cx q[4], q[6];

barrier q; // swap q[2] and q[9]

swap q[2], q[3];

cx q[3], q[4];

h q[3];

//measure q[3] -> c[3];

//measure q[4] -> c[4];

swap q[9], q[6];

cx q[6], q[5];

h q[6];

//measure q[5] -> c[5];

//measure q[6] -> c[6];

cx q[4], q[9];

cz q[3], q[9];

cx q[5], q[2];

cz q[6], q[2];

barrier q; // perform Quantum Fourier Transform (QFT)

h q[7];

cu1(pi/2) q[8], q[7];

cu1(pi/4) q[9], q[7];

barrier q;

h q[8];

cu1(pi/2) q[9], q[8];

barrier q;

h q[9];

barrier q; // measure

measure q[7] -> c[7];

measure q[8] -> c[8];

measure q[9] -> c[9];

I commented out the teleportation-related measurements in order to keep the histogram simple.

This is the longest algorithm I’ve run thus far. Block 1 on the left sets the input states and Block 2 entangles Alice’s and Bob’s qubits. Blocks 3, 5, and 7 perform the teleportations. Blocks 4 and 6 reset, reuse, and recycle Alice’s and Bob’s qubits. Finally, Blocks 8 through 10 perform the Quantum Fourier Transform before the last block measures the results of the experiment.

I know what you’re thinking: it doesn’t make sense to reuse qubits during a teleportation experiment. Bob would have to bring his qubits back to Alice each time so that they could re-entangle their qubits. And, you’re absolutely correct. However, I simply don’t have enough qubits available to me on real hardware to do this in any other way.

On a simulator, the result is perfect. We’re looking at the leftmost three digits; the input states were set to output 001, and that is exactly what we see.

On real hardware, this experiment breaks down. Reusing qubits generates an error, and I don’t yet have the 18 qubits available that I would need in order to perform this experiment without doing that. So, I only teleported one of the input states. The result is disappointing.

However, one of the big news stories recently is that IBM will soon open up more and bigger quantum computers on the cloud. I’m looking forward to trying this again when that happens.