An Introduction To Quantum Computing


There is a lot of buzz about Quantum Computing and Microsoft has officially announced Quantum Development Kit and Q#, the language for Quantum computing. In this article, I am going to cover some of the basics of Quantum Computing and also set up an environment on our local machine with Visual Studio 2017 to get started with Quantum programming.

What is Quantum Theory?

Quantum theory is the branch of physics that deals with the world of atoms and the smaller (subatomic) particles inside them. The laws of physics are different at the atomic level and the classical laws of physics that we can observe in our daily life won’t apply here.

Limitation of Classical Computers

Classical computers (the machines we use in our daily life including out laptops, Desktop, Servers etc.) have made our life very simple and fast too. We have achieved a lot of things and the world has completely changed with the advent of computers in the last century. But classical computers have some limitations too.

A classical computer uses transistors to form logical switches which either allow electric current to pass through them (switch ON) or restrict the current flow (switch OFF). Over the time, size of the transistors has become very small which allows us to fit millions of transistors onto a small chip thus giving rise to small portable computers with increased computing power (e.g.: - Smartphones) but we are approaching a physical limit of making the transistor smaller. Today, transistors have already achieved the size of 1 nanometer. On an atomic range (less than 1 nanometer), the electrons behave weirdly and do not follow the principles of physics that are normally applicable to larger objects. On the atomic scale, the electrons show Quantum tunneling effect, i.e., it sometimes behaves like a wave and passes through closed logical switches also thus nullifying the presence of a logical switch. Since we cannot have a perfect transistor switch at such small sizes, we have reached a final limit of how many transistors we can fit in a small area, keeping the transistors just big enough to avoid the Quantum Tunneling effect. This, in turn, holds us back from increasing the computation power of our computers.

There are a lot of problems which grow exponentially in terms of computation and due to the limitation of classical computers, it will take years to solve them. So, we need to look for a more efficient way to solve these problems. The answers lie in Quantum Computers.

What is a Quantum Computer?

Quantum Computers are the machines built on the principles of quantum mechanics, that takes a new approach to processing information, thus making them super powerful. Quantum computers use Qubits to process the information.

What is a Qubit?

The fundamental unit of processing information in a classical computer is a bit which can hold binary values (‘0’ or ‘1’). The analogous to the bit is Qubit (short for “Quantum Bit”) in quantum computers. Qubits have special properties that help them solve complex problems much faster than classical bits. One of these properties is superposition which states that instead of holding one binary value (“0” or “1”) like a classical bit, a qubit can hold a combination of “0” and “1” simultaneously. When multiple qubits interact coherently, they can explore multiple options and process information in a fraction of the time compared to the classical, even the fastest non-quantum, systems.

Fig: - Representation of a Qubit (Image source: - Wikipedia)

In reality, qubits would have to be stored by atoms, ions, or even smaller things such as electrons and photons.

What is Superposition principle?

Superposition is essentially the ability of a quantum system to be in multiple states at the same time — that is, something can be “here” and “there,” or “up” and “down” at the same time. This behavior is only observed at an atomic level.

A Qubit can exist in Superposition of zero and one, i.e., it can store a zero, a one, both, zero and one, or an infinite number of values in between. They can also create a complex superposition of 0 and 1 by interacting with other Qubits. The total number of superpositions that are possible with n Qubits is 2n.

What Is Entanglement?

Entanglement is an extremely strong correlation that exists between quantum particles, so strong, in fact, that two or more quantum particles can be inextricably linked in perfect unison, even if separated by great distances. This means a quantum state of each particle cannot be described independent of each other. The particles are so intrinsically connected, they can be said to “dance” in instantaneous, perfect unison, even when placed at opposite ends of the universe.

The states of entangled Qubits cannot be described independently of each other. This means if we measure one Qubit then we also get some information about what will happen if we measure another Qubit.

Superposition and Entanglement are two fundamental principles of Quantum computing

What Is a Topological Qubits?

The Qubits sounds interesting but they are highly unstable and even a little disturbance in the system can throw up the whole operation. So, Microsoft is working on to create a more stable Qubit called Topological Qubit. It can store information in a more stable form as compared to other Qubits. Topological Qubit will allow Quantum computer to scale with much higher rate and allow us to build a quantum computer large and stable enough to solve our most challenging problems.

What quantum computers are better at than ordinary computers

One important point that we should keep in mind is that Quantum computers are not the replacement of Classical computers. There are few problems that Quantum computer can solve with tremendous speed compared to a Classical computer. One of such problem is the factorization of a large number i.e.

if m=p*q, such that p and q are prime, then given the value of m, find the value of p and q.

Another type of problem is where classical computers are unable to give accurate output such as finding the bond length on chemical compounds such as Calcium monofluoride (CaF) and Sodium diatomic(Na2).

How to setup Quantum Computing development environment on your local machine

Prerequisite: - You need to have Visual Studio 2017 installed on a 64 bit Windows machine. It won’t work for 32-bit installation of Windows or lower versions of Visual Studio.

You can start working on Quantum computing from your local machine also. Microsoft has launched Quantum Development Kit which you can download from here.

Once you click on “Download”, a file “QsharpVSIX.vsix” will be downloaded. You just need to install it like any other program and it will integrate the development kit into your Visual Studio 2017. You need to restart Visual Studio for changes to take effect.

Now open VS 2017 and navigate to File >> New >> Project

It will open a dialog box. Select Visual C# from the left menu and then select “Q# Application” from the installed template. Give your project a name and click OK.

In the solution explorer, you can see the file structure as below.

Here, Operation.qs is the file containing Q# code and Driver.cs is our regular C# code file. This is because a Quantum computer is like a code processor; we will call the code of Q# file from our main method which is in C# file. We can write and simulate a Quantum Program in this solution file, which I will cover in an upcoming article.

Simulating Quantum computing will put a lot of load on your system hardware. So it is recommended to use a system having high RAM (8 GB or more). You can also use Azure Quantum Simulator which is hosted in the cloud and can be used to simulate a high number of Qubits.

What are the current challenges for Quantum Computers

Currently, we have Quantum computers with the strength to manipulate less than 20 Qubits. Google, IBM, and Microsoft are few names that are working to create a large-scale Quantum computer. IBM has even announced a prototype for 50 Qubits Quantum computer. Another challenge is to make the system stable as the number of Qubits increases.

The field of Quantum computer is vast as it incorporates the concepts from Quantum Physics, Superconductors, nanotechnology and others. Each of these is itself a sophisticated field which is still being fully developed, so building a physical system that follows principles of all these fields is a real challenge.

It will still take at least 10 years or even more till we have a Quantum computer large and stable enough to solve most of our challenging problems.


The potential of Quantum computer is tremendous and we can achieve a lot that was thought nearly impossible with classical computers. We can synthesize new medicines, can develop new catalyst, accelerate the development of artificial intelligence and a lot more. In this article, I have covered a few basics of Quantum Computer. Please post your valuable feedback in the comments section.

You can always refer to links given below to get more knowledge on Quantum computers,

You can learn more about Quantum Computing, you can go through the Q# Section also.

Here is a good starting article: Getting started with Q# Programming