# How does the teleportation circuit work after the initial entanglement?

I'm trying to understand why we do what we do when we teleport a state from Alice's first qubit to Bob's qubit. I understand the initial entanglement, but could use help walking through the program.

I have a teleportation circuit,

circuit = QuantumCircuit(3,3)


First, I create the bell pair for Alice and Bob:

circuit.h(1)
circuit.cx(1,2)


Then, I flip alices first qubit to a 1 state; this is the qubit whose state is to be teleported:

circuit.x(0)


Then, my understanding gets fuzzy, and I have a few questions.

1) I seem to entangle Alice's to-be-teleported state qubit with her qubit that is entangled with Bob's. But what exactly am I doing when I conditionally flip this to-be-teleported qubit and then put a hadamard on it?

circuit.cx(0,1)
circuit.h(0)


and then 2) how does my measurement affect Bob's qubit?

circuit.measure([0,1],[0,1])


finally, 3) why do I again conditionally flip Alice's second qubit with Bob's qubit and then conditionally rotate Alice's to-be-teleported qubit with Bob's qubit?

circuit.cx(1,2)
circuit.cz(0,2)


Here is the whole circuit, for reference:

## 1 Answer

1) In this step, you connect a teleported qubit with entangled qubits between Alice and Bob. This means, Bob now has an "access" to the teleported qubit.

2) Here you get some information about the teleported qubit and "partially colapse" Bob's qubit according to a state of the teleported qubit.

3) In this last step you bring information about the teleported state via classical channel from Alice to Bob. This is the actual teleportation - Alice's state disapper, it is transformed to classical information and based on this classical data, it is recreated on Bob's side by influencing formelly entangled qubits.

This description is unfortunately inaccurate because plain English is not sufficient to described such phenomena like a quantaum teleportation. See this thread for mathematical description of the whole teleportation process, it is clearer from my point of view.

• for 1) why do i place a hadamard on the qubit? it is already in superposition . . . – neutrino Mar 22 at 23:16
• @VP9: Because you measure in Bell basis. Application of Hadamard and CNOT make the connection between teleported qubit and entangled pair and allow measuring in Bell basis. But as I mentioned at the end of my answer, this is a intuitive explanation. See mathematical description in the link I provided for full understanding. – Martin Vesely Mar 23 at 5:12