Now we are ready to approach the more complicated algorithm, which is called quantum teleportation. The quantum SWAP algorithm we discussed in the previous video, allows us to exchange the states of two separate particles. But it requires that particles interact during this algorithm because we apply the sequential CNOT operators. Implementation of CNOT involves physical interaction between the particles. Quantum teleportation on the other hand, does not require the physical interaction during such SWAP, but it needs some preliminary preparations. Here is the scheme of the algorithm. As you can see, we have three qubits here. The first qubit is in some unknown state Phi, which is the superposition of zero and one with the unknown coefficients Alpha and Beta, and this is the state that we are going to transfer. The third qubit is in the state zero, and it represents the particle which will receive the state Phi after the application of our algorithm. The second qubit is also in the state zero, and it is an auxiliary particle which we'll need for our algorithm. This algorithm includes several steps. The first step is preliminary, and it requires the interaction of the second auxiliary and the third recipient particles. After this preliminary step, the auxiliary particle must be delivered to the source particle with the state Phi. Well, the third particle can be moved as far as we want. Let's assume that during this preliminary step, all three particles are in the same laboratory. Their states can be written as Phi zero, zero. During the preliminary step, we entangle the second and the third particles. Quantum entanglement is the instrument that we are going to use to transfer the quantum state at the very long distance. First, we apply Hadamard transform to the second qubit to obtain the state plus, which is the sum of vectors 0 and 1 and then we use these qubit as a control for the controlled-NOT operator. The action of CNOT on such state delivers us this wonderful entangled state, which is one of the famous Bell states. You remember that for an entangled state, we cannot write down the separate states for the particles. Now, the particles numbers 2 and 3 don't have separate states, but the particles themselves are separate. Now, we can put the particle number 3 in some container which preserves it's state from interaction with the environment, and we can give this container to a cosmonaut, who's ready to start his journey to Mars. Good. Several months have passed and our cosmonaut has landed on Mars. He sets up a camp, and eventually for some reason, he needs the state Phi. He didn't need it before but now he does. There's no way we can send him the first particle which still holds this state, because the next spaceship to Mars will be ready in several years. But he needs the state now. This leads us to the next step in our algorithm. As you remember, our second auxiliary particle is entangled with the recipient particle, which is now on Mars. But our first particle, which is in the state Phi, did not interact with any of these two entangled particles yet. So it is time for it to join this entangled state. To do this, we apply these two qubits, CZ operator, which entangles the first particle with the other two. After this, the whole state will be entangled and no particle of these three will have its own state. For the sake of clarity, I open brackets and then apply CZ. CZ operator is very gentle, it only changes the sign of one vector that has both first and second component in the state 1. Now, the state of three particles is entangled. They are in some sense connected. However, the particle number 3 is very far away. The next step of the algorithm prescribes us to apply the Hadamard transform to the first and the second particles. This is not a very challenging task, so I advise you to perform it yourselves. All you need to do is to substitute zeros and ones on the first and the second places of each vector by scopes. Zero plus 1 divided by square root of 2, and 0 minus 1 divided by square root of 2. Then open the brackets. For example, the vector 0, 1, 1, is transformed to the expression you can see on the slide. It was a lot of boring work, but now we have this. You can pause the video and check your calculations now. The next step of our algorithm prescribes us to measure the particles 1 and 2 in the 0, 1 buses. As we already know, when we measure two qubits, we can obtain four different results. To see which results can be obtained, I would like to re-group the above expression like this. Now we have all possible measurement outcomes for the first two qubits, and the corresponding state of the third qubit after the measurement. Look, if after the measurement I obtain the value 0, 0, then the third qubit, which I remind you is on Mars, will evolve to this state marked on the slide. It is not the state Phi, but it is quite close to it. If our cosmonaut wants to obtain the state Phi from this, he only needs to apply the Hadamard transform to what he now has in his container. But if he obtained 0, 1 after the measurement, the state in the container evolves to something slightly different, but only slightly. If the cosmonaut applies the gate Z to the container, then the state becomes just the same as on the previous slide, and all he would need to do is to apply Hadamard. With the result 1, 0, the state in the container is again different. But the cosmonaut can fix it with the gate X. After this quantum node gate, the state is ready for final Hadamard to become the state Phi. At last, if we measured the value 1, 1, then the cosmonaut will need to apply both gates, Z and X, before the final Hadamard. This uncertainty in the required cosmonaut's behavior is emphasized by this hollow dot in the scheme of the algorithm. The operator Z and X, which the cosmonaut needs to apply to his state depending on our measurement result, are not conditional like C naught or CZ. They are simple one qubit operators, but they are controlled by a phone call. The measurement of the first two particles changes the state in the cosmonaut container immediately. Even if the cosmonaut was in the Andromeda galaxy, the change of the state of the third particle would be immediate. The distance does not matter from the entanglement, but to obtain exactly what he wants, the state Phi, the cosmonaut needs to contact us and to know our measurement result. We take out the radio and we transmit our measurement result to Mars. As soon as the cosmonaut receives our signal, he will know what additional quantum gates he needs to apply to become the hyperprocessor of the state Phi. Let me emphasize this fact, although sometimes you can hear the opinion that quantum teleportation allows to transfer information faster than light, it is definitely not true. You can see that we need the classical communication procedure to finish the process and to obtain exactly the same state in the reception qubit as it was in the source qubit. Now, you may ask yourselves the following question. To perform the qubit transferring we needed that initial entanglement and we made the reception qubit to interact the auxiliary qubit in our laboratory. Instead of all this complicated process, why couldn't we just put the first particle with the state Phi in the container and give it to cosmonaut? We could, of course. But imagine that to the time of the spaceship start, the state Phi was not yet calculated. The first particle does not take place in the preliminary procedure, so we can't prepare it further even when the third particle is very far. The connection to this third particle is stored in the second auxiliary particle, and as soon as we are ready we entangle our state Phi with it and thus create the connection of all three of them. This reasoning explains that the quantum algorithm of quantum teleportation indeed allows the transfer of quantum data, which couldn't be performed without it.