What is Quantum Computing and how to start with Quantum Programming

Introduction

The purpose of this article is to provide an overview of quantum computing. The below image is of a quantum computer. It needs a small room and operates in temperatures of -272 degrees celsius. It costs around $15 million.

A Definition

Quantum computing is a field of computing that utilises the principles of quantum mechanics, a branch of physics that describes the behavior of matter and energy at extremely small scales. It seeks to harness the unique properties of quantum systems, to perform computational tasks more efficiently than classical computers.

In classical computing, information is processed using bits, which can represent either a 0 or a 1. Quantum computing, on the other hand, uses quantum bits, or qubits, which can represent a 0, a 1, or a superposition of both states simultaneously. This property of superposition allows quantum computers to explore multiple possible solutions to a problem simultaneously, potentially speeding up certain computations.

Another key feature of quantum computing is entanglement, which is the phenomenon where two or more qubits become correlated in such a way that the state of one qubit is dependent on the state of the others. This enables quantum computers to perform certain calculations more efficiently by leveraging the interconnectedness of qubits.

Quantum computing has the potential to revolutionise various fields, including cryptography, optimization, simulation, and drug discovery. It can provide exponential speedup for certain problems compared to classical computers, although not all problems will benefit from quantum algorithms. If this definition was too much allow me to provide a simpler definition.

A Definition for a Six Year Old

Imagine you have a big box filled with a lot of different toys. Each toy can be either red or blue, and you can play with only one toy at a time. That’s how a regular computer works — it can only focus on one thing at a time.

But imagine if you had a special box that could hold toys that are both red and blue at the same time! You could play with two toys at once, and they could even help each other. That’s what quantum computing is like — it uses special toys called qubits that can be both 0 and 1 at the same time.

Because qubits can be in two states simultaneously, it’s like having many boxes of toys all working together to solve a problem. They can explore different solutions at the same time and find the best one much faster than a regular computer.

The magic part is that qubits can also talk to each other and help each other out. It’s like the toys in the box can talk and share their ideas to solve puzzles together. This is called entanglement, and it makes quantum computers really powerful for certain tasks.

But just like the big box of toys needs special care, quantum computers need to be kept very cold and protected from any disruptions. Scientists are still figuring out how to make them work reliably, so we’re still learning and exploring this exciting new way of computing!

So, quantum computing is like having a special box of toys that can do many things at once, talk to each other, and solve problems really fast. It’s a bit like magic, but it’s also a big challenge for scientists to make it work perfectly.

A Visual Definition for All Ages

This amazing video explains the concept of quantum computing. It uses 5 different levels of difficulty.

What Can Quantum Computers Do

Quantum computers are much (much!) faster than classical computers. A quantum computer needs around 1 second to factorise a number of 1000 bits while a fast classical computer needs about 1 year.

I will provide a small example of how numbers are factorised. Let’s take the number 36 as an example and factorise it: To factorise 36, we need to find the prime numbers that multiply together to give us 36. Starting with the smallest prime number, which is 2, we check if it divides evenly into 36. Since 2 divides evenly into 36 (36 ÷ 2 = 18), we continue dividing 18 by 2 until we can no longer divide evenly:

36 ÷ 2 = 18 18 ÷ 2 = 9

Now, we move on to the next prime number, which is 3, and check if it divides evenly into 9. Since it does (9 ÷ 3 = 3), we divide until we cannot divide further:

9 ÷ 3 = 3

At this point, we have reached a prime number (3), and we cannot divide it any further. Therefore, the prime factors of 36 are 2, 2, 3, and 3, which can be written as:

36 = 2 × 2 × 3 × 3

Thus, the factorization of 36 is 2² × 3², where the exponent indicates how many times each prime factor appears.

Factorising numbers is useful in cryptography. The RSA algorithm which is used in cryptography is based in the fact that large numbers are difficult to factorise. In other words a quantum computer can “hack” a secure computer or server in a few seconds. Professor Prof Bill Buchanan OBE wrote an interesting article about Everything You Wanted To Know about Integer Factorization, but Were Afraid To Ask ..

Scientists are aware of this issue and are already trying to find ways so that the Internet does not “break”. More on this here.

Now that you have a general understand of quantum computers I am sure you are thinking “cool, but can I buy one today?”

Can I Buy a Quantum Computer Today

The main companies in the quantum computing domain are IBM, Google, Microsoft and D-Wave. In fact, D-Wave started selling quantum computers. Wired has an interesting article about it.

The rest of the companies focus on selling cloud services that will use quantum computing. For example IBM through Quantum Computing offers cloud access. In fact, IBM has already clients that are using the quantum computing services. In 2020 it had around 100 clients (source) and around half million users (source).

So you can agree that quantum computers are pretty expensive but can you start playing around with them?

How to get started with Quantum Programming

You can start playing around with them using IBM’s platform. Below are the steps required:

1 Sign up for IBM Quantum (free)

2 Read appropriate documentation to get familiar with the platform.

3 To follow one of the oldest traditions of programming the next step is to write a “Hello World!” program

Epilogue

Quantum computers harness the principles of quantum mechanics, leveraging phenomena such as superposition and entanglement to perform computations in ways that surpass the capabilities of classical computers. With their potential to solve complex problems exponentially faster, quantum computers hold the promise of revolutionising fields like cryptography, optimization, drug discovery, and material science.