Quantum Programming

Getting started with Quantum Programming


What is Quantum Computing?

Since you have landed into this blog, I assume that you have quite an idea what Quantum Computing is. It brought a great revolution in the computing world after personal computers and supercomputers. The personal computers (or called today’s computers in this blog series) calculate using bytes. The quantum computers calculate using laws of quantum mechanics. Instead of bytes, it uses a string of quantum bits called qubits.

The principles of quantum theory

Before we start writing a quantum program, we need to understand a few basic principles of quantum mechanics. Similarly, you might have learned the basics of transistors and binary number systems before learning about today’s computing languages.

  1. Quantum Information: Qubit is the smallest unit of data in the quantum system. The spins of an electron can be used to store a qubit of information.
  2. Quantum State: A quantum state is a measurement (in terms of a probability distribution) used to define a quantum system.
  3. Quantum superposition: Superposition in a system states that the system can be in more than one state at the same time. (Recall that the quantum state is a probability distribution). In today’s computing environment, a bit can represent either zero or one. Whereas, a qubit can represent both zero and one at the same time.
  4. Quantum entanglement: In quantum physics, particles can intertwine (entangle) and share a special bond without any physical connection. Any action performed on one particle simultaneously affects the other, no matter how far they are. This inextricable link between them is a basis for the notion that information can be transmitted faster than the speed of light.

Do I need a quantum computer to write a quantum program?

A quantum program is always written with the help of today’s computers. You need a quantum computer to “execute” your program and get the desired outcome. Don’t worry. You can execute your quantum program in today’s computer also, as a simulated environment.

In this simulation, 2 bits are needed to describe 1 qubit. Not bad huh! 4 bits for 2 qubits, 16 bits for 4 qubits, and so on. To simulate 42 qubits you will need 4 terabits (average storage size of today’s computers). To simulate 1 KiloQubits you will need all the storage present in the world! That sounds pretty impossible to simulate. Well, here is the good news – To handle all the information present in this world, you will need just 1KiloQubit, that can be very well a teeny tiny molecule.

Coming closer to first Quantum Program

So which computing language can I use to write a quantum program?

There are several Programming languages using which you can write your first quantum program. The most popular ones are:

  1. QCL – Resembles C programming language
  2. Q language – Resembles C++
  3. Q# – Developed by Microsoft, resembles C#

There are Quantum development kits too where you can write programs in today’s computing language to manipulate quantum systems. Some of them are:

  1. Cirq – Developed by Google, uses Python.
  2. Qiskit – Developed by IBM, uses Python.
  3. Quantum Development Kit – Developed by Microsoft for its .NET Framework
Stay tuned for my next blog where we start with hello world in Quantum Programming.

Leave A Comment

Your email address will not be published. Required fields are marked *