Quantum Teleportation Using Qiskit

Ethan Selvarajah
4 min readMay 23, 2021

How I Programmed The Quantum Teleportation Algorithm In Qiskit

From drug design to development, there are SO many problems in today’s society. All of these problems have the potential to be solved or even seek advancement in. The only thing stopping us is HUGE, complex calculations that our normal computers can’t handle.

But, what if there was a computer that could solve all of those complex problems?

Introducing QUANTUM COMPUTERS!

A quantum computer

From solving complex calculations to modelling chemical reactions, a quantum computer has the ability to run so many different programs. Today, I will be focusing on a quantum computer’s ability to run a teleportation algorithm (and how I spent 5 hours coding it 😭)!

Before We Begin, Here Are Some Key QC Lingo

In order to explain how I was able to code a teleportation algorithm, first, you’ll need to know some important quantum computing terms.

What is a quantum computer?

A quantum computer is a machine that has the potential to revolutionize the computing industry. It will allow for much faster computation, although it sometimes may be less accurate. Something that could take years to do on a classical computer, could take mere seconds on a quantum computer!

What is a quantum algorithm?

A quantum algorithm is essentially code that you can simulate on a realistic quantum computing model. This code is executed in steps and utilizes the qubits of a quantum computer to run its code.

An example of a quantum algorithm

What does the quantum teleportation algorithm do?

The algorithm isn’t physically transporting something from one place to another, however, it’s taking the data from one qubit to another qubit. Think about it like taking the properties of an object, and transporting that data somewhere else.

How is this useful?

You may be thinking, “What’s the point of this algorithm if it’s not physically transporting anything somewhere else??”. Well, there are actually multiple applications, one of which is sending data to other places quickly and securely. We could use it in our daily life with texting!

Perfect! Now that you have this knowledge stored in your brain, you’re ready to take a look at my code!

My 5 Hour Coding Process In 1 Minute

To code, I used an open-source software for development known as Qiskit. This program allows someone to write code and then simulate it on a (wait for it…) REAL. QUANTUM. COMPUTER.

Now if that’s not the sickest thing you’ve ever heard, I don’t know what to tell you. 😎

After familiarizing myself with Qiskit, I quickly went on to learn the basics of the program and I would start to write. Here is what I found:

  • Quantum Gates: A quantum gate is a circuit operating on a small number of qubits. Some examples include the Hadamard gate and CNOT gate. Have you heard of the “AND”, and “NOT” gates? Those are examples of gates for a classical computer.
  • Python: The code on Qiskit used Python, so it was important to know the fundamentals.

And this is when I finally started building my program. Though the 5 hours were full of trial and error, I managed to create a fully functioning quantum teleportation algorithm.

Here’s my code:

A video of my code on Qiskit

Final Thoughts

All in all, quantum computers have so much potential. From various use cases its many benefits, quantum computers are DEFINITELY a sign of the future. As humans progress, I hope to see more and more of these global problems being solved. And I know, quantum computers will play a large role in this.

Tl;DR:

  • A quantum computer allows for must faster computation of programs. This is done through a quantum algorithm, which is code that can be simulated on a quantum computer.
  • Quantum teleportation algorithms take data from 1 qubit to another.
  • Qiskit is a software that allows people to run their codes on quantum computers.

If you would like to try this out yourself or want to explore this concept more, please:

Hi everyone! My name is Ethan Selvarajah and I am an aspiring quantum computing learner and avid coder. Thanks for reading! I hope you learned something interesting and valuable today. Feel free to reach out to me on Twitter @EthanSelvarajah if you want to talk!

Hopefully, you enjoyed this article! :)

--

--