QWorld Bronze: Quantum Teleportation

Quantum Teleportation
Prepare a few blank sheets of paper
- to draw the circuit of the following protocol step by step and
- to solve some of tasks requiring certain calculations.
Asja wants to send a qubit to Balvis by using only classical communication.
Let be the quantum state.
Discussion: If Asja has many copies of this qubit, then she can collect the statistics based on these qubits and obtain an approximation of a and b, say , respectively. After this, Asja can send and by using many classical bits, the number of which depends on the precision of the amplitudes.
On the other hand, If Asja and Balvis share the entangled qubits in state in advance, then it is possible for Balvis to create in his qubit after receiving two bits of information from Asja.
Protocol
The protocol uses three qubits as specified below:

Asja has two qubits and Balvis has one qubit.
Asja's quantum message (key) is .
The entanglement between Asja's second qubit and Balvis' qubit is .
So, the quantum state of the three qubits is
CNOT operator by Asja
Asja applies CNOT gate to her qubits where q[2] is the control qubit and q[1] is the target qubit.
Task 1
Calculate the new quantum state after this CNOT operator.
Hadamard operator by Asja
Asja applies Hadamard gate to q[2].
Task 2
Calculate the new quantum state after this Hadamard operator.
Verify that the resulting quantum state can be written as follows:
Measurement by Asja
Asja measures her qubits. With probability 41, she can observe one of the basis states.
Depeding on the measurement outcomes, Balvis' qubit is in the following states:
- "00":
- "01":
- "10":
- "11":
As can be observed, the amplitudes a and b are "transferred" to Balvis' qubit in each case.
If Asja sends the measurement outcomes, then Balvis can construct exactly.
Task 3
Asja sends the measurement outcomes to Balvis by using two classical bits: x and y.
For each (x,y) pair, determine the quantum operator(s) that Balvis can apply to obtain exactly.
Task 4
Create a quantum circuit with three qubits as described at the beginning of this notebook and two classical bits.
Implement the protocol given above until Asja makes the measurements (included).
- The state of q[2] can be set by the rotation with a randomly picked angle.
- Remark that Balvis does not make the measurement.
At this point, read the state vector of the circuit by using "statevector_simulator".
_When a circuit having measurement is simulated by "statevector_simulator", the simulator picks one of the outcomes, and so we see one of the states after the measurement._
Verify that the state of Balvis' qubit is in one of these: , , , and .
Guess the measurement outcome obtained by "statevector_simulator".
See the related project for the solution.
Task 5
Implement the protocol above by including the post-processing part done by Balvis, i.e., the measurement results by Asja are sent to Balvis and then he may apply X or Z gates depending on the measurement results.
We use the classically controlled quantum operators.
Since we do not make measurement on q[0], we define only 2 classical bits, each of which can also be defined separated.
q = QuantumRegister(3)c2 = ClassicalRegister(1,'c2')c1 = ClassicalRegister(1,'c1')qc = QuantumCircuit(q,c1,c2)...qc.measure(q[1],c1)...qc.x(q[0]).c_if(c1,1) # x-gate is applied to q[0] if the classical bit c1 is equal to 1
Read the state vector and verify that Balvis' state is after the post-processing.
See the related project for the solution.