top of page

Quantum Teleportation & Quantum Algorithms

Once an artist has assembled their paints and brushes in front of their blank canvas, practice having been done and intentions set, they begin. Paint, brush, and canvas meet; intersecting somewhere between creation and destruction and application. The paint actualizes itself as creation in the act of touching the canvas, who's pristine condition is destroyed by the painter's application of will.


Fantastical introductory analogy out of the way, lets get to the quantum.


In this context, the paint being Quantum Physics, while the blank canvas is the Classical Computation Paradigm, the brush -- Quantum Algorithms, and the painter represents the will of the likes of Peter Shor, David Deutsch and Richard Jozsa, Ethan Bernstein and Umesh Vaziriani, and Lov Grover, just to name a few.


Without the hyper-important contributions by these titans of thought, quantum computing would not, or, at least, would look quite differently, be in the state of development and progress it is today. The discovery of simple algorithms that prove the exponential speed up that QC offers is the basis on which the fields of QC and quantum algorithms are built. Thus, the race for quantum supremacy begins and the canvas fills with colors the world lacks language to describe.

__________________________________________________________________________________

Before launching head on into the world of quantum algorithms, I would like to touch on quantum teleportation. It will play a significant role in the algorithms that get used later on and is important to know theoretically and as a bit of house keeping for being prepared to pull out this tool in the future.


Quantum Teleportation is not the same as the "Beam me up, Scotty" technology from the bowels of science fiction, of which most of us have become familiar. In this instance we are not taking one qubit and physically sending it to another location, we are taking information about that particular qubit and sending the information elsewhere and mapping it onto another qubit.


This was easier on classical computers simply because we can look at the bit we would like to copy, either 0 or 1, and then copy it onto another bit. The No-Cloning Theorem states that it is impossible to exactly copy an unknown quantum state to another. This idea is less intuitive and will take some serious thought in order to fully grok. However, this makes sense when thought about in the abstract: what happens when a quantum state is measured?


Collapse of the wave function and the entangled state, thus the teleportation protocol allows us send information from one place to another without destroying the entangled pair of qubits, while collapsing the state of the qubit we are trying to send. Still, this is pretty heady stuff, if you are confused, I would recommend speaking with Alice and Bob, they will be able to explain it more precisely.


Theory now explained, time for code.

__________________________________________________________________________________

As with all other examples I have covered so far, we will be starting this one the same; calling Qiskit and importing "*" everything for ease of use. Syntax for our QuantumCircuit will be different than previous, as this is a more compact version of the code that delivers that same results; setting 3 qubits and 3 classical bits. I will be drawing out the teleportation circuit each step of the way to aid with visualizing what is being done.



Circuit.draw() will draw the circuit, obviously. However, using MatPlotLib will give us a more polished circuit diagram

This is not *technically* part of the protocol, but it will give us an easy point of reference for when we check our answers at the end of the exercise. Including an X-gate on q0 from the onset gives q0 the state of |1>, which will be confirmed in a little bit. Using a barrier is great for visualizing the distinctly different steps of the protocol.


Immediately after the barrier, |q0,2> = {|1>,|0>,|0>}, it is at this step that the protocol is actually initiated. A Bell-pair needs to be created between q1 and q2, this is again done by the application of an H-gate and a CX-gate, identical to the fashion in the "Hello World" circuit I went over a few posts ago.


Now the connection of q0 to q1 is made by the addition of another CX-gate, which is what communicates the information about q0(control) to q1(target), but does not create entanglement, this is the work around to the No-Cloning Theorem which was discussed early in this post. Application of another H-gate reintroduces superposition in q0, allowing for a measurement to take place, collapsing the wave function into information that can me teleported.


It is the measurement at this step that eliminates q0 from the quantum realm. In the code following we measure q0 and q1 to send the information to c0 and c1, thus leaving Bob with a qubit, q2, that has the state of q0 on it, not due to entanglement, but teleportation.


Lastly, after measurement, two more gates need to be added in order for the information to be received and encoded on the last classical bit correctly. Another CX-gate, which will alter q2 dependent upon the state of q1, and CZ-gate, which equivalent to the CX-gate, except that instead of acting on the |0>& |1> basis, it affects the phase of the qubit which exists in the |+> & |-> basis. For the purpose of this explanation, this is the equator of the bloch-sphere, where as |0>& |1> would be considered the poles of the sphere. They are orthogonal to each other, meaning perpendicular to each other in 3-d space, meeting at a 90 degree angle, this is important because the |i>&|-i> basis also exists orthogonally to |0>& |1> and |+> & |->, in the imaginary plane.


I am not a physicist, nor have I taken upper level mathematics or physics classes. So, naturally, all of this talk of basis's was unfamiliar. Taking a while to comprehend all of this was needed, however, if you are confused also, the Wikipedia page for Hilbert Spaces may help There also exists a simplified wiki if the language is to obtuse in the main page. .

Final measurement and testing are all that remain for the teleportation protocol. Here we will set up our simulator to run our quantum teleportation protocol on a local machine. If one were so inclined, they could run this on one of IBM's quantum machines. I have outlined the steps for this in another post previously. We will stick to using a simulator this time for sake of ease.


In order to extract the state sent to Bob from his qubit, we need to measure and collapse the state of his qubit. Next comes the actual experimentation. The code is nearly identical to the last example code used, so I will not go into detail here on it.

Results on the histogram are read from bottom to top. You will notice that there is a '1' in the bottom most position for all possible states on the read out. Summing the totals of all outcomes will equal 1. This means that there is a 100% chance of the qubit Bob owned was in the state |1> after the teleportation occurred. We know this to be certain due to the X-gate that was applied to q0 after initialization. We have successfully sent sent information about one qubit across a large distance to another qubit, while obeying all of the laws of physics.

Quantum computing is still in it's infancy and with time the technology will develop in such a way that this algorithm will become crucial to quantum communication and security.

__________________________________________________________________________________


bottom of page