Hosted with nbsanity. See source notebook on GitHub.

Why?

Why Quantum Computing?

Quantum Computing is a fascinating computing paradigm still in its infancy. Quantum mechanics pre-dates artificial intelligence, but (to the best of my knowledge) people only started working on quantum as a basis for computation in the early 1970s. One of the seminal papers was written by Richard Feynman in 1982. This paper proposed a conjecture that quantum systems require quantum computers to be simulated efficiently, which was proved by Seth Lloyd in 1996. This has huge implications as many systems in nature are quantum systems. There is strong evidence that quantum algorithms can perform some tasks faster than can ever be achieved on a classical computer.

Many problems in physics, materials science, chemistry and drug discovery have to deal with quantum systems and simulating these systems on classical computers requires huge amounts of compute. Besides the physical world, there are also core computer science problems that can benefit greatly from quantum computing. The main research areas here are search, where quantum can provide a quadratic speedup, and cryptography/factoring, where exponential speedups can be obtained. Once we discussed the basic on quantum computing we will also discuss the applications in more details.

Quantum computing has 3 main features it can leverage that are not available on classical computers:

  1. Superposition: While classical bits can only be in a 0 or 1 state, a quantum bit (qubit) can have values between 0 and 1. These intermediate values can be described as a probability distribution of obtaining a 0 or 1. It is therefore sometimes said that the quantum computer’s memory can have many classical states “at the same time”. The qubit and superposition are explained in detail in the next notebook.
  2. Interference: Quantum computation allows superpositions to combine, similar to have waves can amplify each other or cancel each other out. This allows for powerful parallel computation which can be leveraged to obtain potentially exponential speedups over classical algorithms. A great example of the power of interference is the Quantum Fourier Transform, which we will also discuss in this notebook series.
  3. Entanglement: The behavior of multiple qubits can become correlated to each other in a way not possible on a classical computer. The amount of correlation can vary from completely uncorrelated to perfectly correlated. A quantum computer can also get entangled with its environment, a phenomenon called quantum decoherence. For quantum computers this is often unwanted and is mitigated by quantum error correction. Error correction is a very important topic in quantum computing which we will also discuss in this notebook series.

Why this Quantum Computing for Python (q2p) series?

There are excellent courses in Quantum Mechanics and Quantum Computing available on the Internet. Unfortunately, in my personal experience, many of the existing courses come with limitations:

  1. Courses can be overly theoretical and mainly focused on the physics. This might resonate with people studying physics, but alienates programmers in general. The student often has to work through a lot of physics details before implementing something practical.
  2. Courses offered by quantum computing companies often lock the student in to their own (Python) programming library/framework. Most of these libraries seem to be designed for physicists and do not leverage Python as a dynamic language. Quantum computing libraries are also generally not interoperable, so if you want to try out a different framework you have to learn the intricacies and syntax of that framework. Often the quantum circuits you made cannot be converted easily converted to another framework.

It seems to me many people are interested in quantum computing, but:

  1. Don’t know where to start.
  2. Feel they are not smart enough to do quantum computing.
  3. Think they have to do a lot of physics.

This course will approach quantum computing from the perspective of a Python programmer. In the Python world we want to iterate fast, distill complex problems down to its essence and make use of the dynamic nature of the language to solve problems efficiently in a simple way. By learning from and playing with these series of notebooks you will be able to build your own quantum circuits from scratch. We will even discuss converting these quantum circuits to other quantum computing frameworks automatically so you can run these circuits on cloud quantum computers from different providers.

The essence of quantum computing can be well understood with basic linear algebra and probability theory concepts, and this course assumes you have some familiarity with these topics. Therefore this course is especially well suited for data scientists. Data scientists are generally used to iterate fast in Jupyter Notebooks, use Python as a dynamic language and are familiar with vector-matrix multiplication. Quantum computing involves some complex numbers, but you definitely don’t have to be an expert in them. For solving practical problems, we can mainly focus on linear algebra and probability theory concepts.

Hope you are excited to learn more about quantum computing! The next notebook will discuss how to work with qubits and we will build our first quantum circuit.