Quantum computers are machines that use the properties of quantum physics to store data and perform computations. This can be extremely advantageous for certain tasks where they could vastly outperform even our best supercomputers.

Beginners guide to quantum computers

Quantum computers are machines that use the properties of quantum physics to store data and perform computations. This can be extremely advantageous for certain tasks where they could vastly outperform even our best supercomputers.

In this blog, I will try to explain quantum computers from a perspective of a person who knows very little about physics.

I will explain:

  • Why do quantum computers exist?
  • How does quantum computer works abstractly?

Note

I am not a physicist or studying science at a university. But I want to learn more about physics especially quantum physics. I have a passion for quantum computers. So, I am trying to learn about physics and quantum computers. I have a basic understanding of how a quantum computer works. Though I am not 100% correct or accurate, I will still try to explain it to you. I might be wrong but that's fine. Please let me know if I make any mistakes.

Why do quantum computers exist?

We know classical computers have completely changed our world and have enabled us a lot of opportunities. Our modern computers are super fast. They can finish a lot of tasks in a short amount of time. But even the most powerful supercomputers are not fast enough for large problems. They can solve the smaller version of the problem.

What sort of problems can not be solved by a classical computer?

The answer is an Exponential problem or when the size of the problem goes bigger and bigger very quickly. We can divide them into two categories.

  • Optimization
  • Chemistry

Optimization

For example, there are 10 chairs and 10 people in the room. How many ways you can uniquely organize the people?

The answer is 10 factorial (10!)

10! === 3628800

That is a giant number. Number 10 is small but 10 factorial(10!) is an enormous number. Trying out all possible solutions will need a huge amount of computation power.

But you might say that supercomputers can handle this kind of operation. So. let's add another chair.

Now, the answer is 11 factorial (11!)

10! === 3628800
11! === 39916800
Have you noticed the growth of the problem?

We have just increased the problem size by 1.

Let's add more.

Total chairTotal ways to organize
103628800
1139916800
12479001600
136227020800
1487178291200
151.3076744e+12

Image description

You can see that it is growing very rapidly and even our fastest supercomputer will fall quickly.

Chemistry

Image description

On the bottom, you can see some molecules. They are not much complicated. The left molecule is the biggest molecule that our fastest supercomputer can simulate. Because when you add another atom to the molecule, the problem grows exponentially.

Let me give you another example.

Let's take a look at a binary tree.

Binary trees with number of nodes in a level If you don't know anything about Binary trees you can learn it from my blog

In a binary tree, every parent can have at most 2 children.

The maximum number of nodes on every level is 2^l where l is the level number.

The number of nodes grows exponentially like this:

LevelTotal Node
01
12
24
38
416
532
664
7128
8256
101024
1532768
201048576
2533554432
3534359738368
501.1258999e+15

Let's see how our computer will handle this.

A computer works with bits. A bit has to be either 0 or 1. To visit a node we need 1 bit.

  • To visit 0 the level you need 1 bit.
  • For level 1 you need 2 bits. And it grows like this.
LevelTotal NodeTotal bit
011
122
244
388
41616
53232
66464
7128128
8256256
1010241024
153276832768
2010485761048576
253355443233554432
353435973836834359738368
501.1258999e+151.1258999e+15

So, to visit all the nodes in a level you need 2^l amount of bits where l is the level number.

You can see that quickly we will run out of our computational power. So,

How can we solve the problem?

Quantum computers can solve this for us. Let's create a new type of bit and call it a Qubit. A classical bit has to be either 0 or 1. But our qubit is neither 0 nor 1. Qubits are at the superposition of 0 and 1.

Qubit Superposition simply means a qubit is both 0 and 1 at the same time. Now, I know it sounds bizarre but that's how quantum mechanics works. It works with uncertainty.

Image description

So, with the superposition, we can visit two children at the same time and we are only going to be needed only 1 qubit. So,

  • for level 0 we need 1 qubit to visit one node.
  • 1 qubit again for level 1 to visit 2 nodes.
  • Level 2 will need 2 qubits to visit 4 nodes.
  • Level 3 will need 3 qubits to visit 8nodes.

And it grows linearly like this:

LevelTotal NodeTotal bitTotal Qubits
0111
1221
2442
3883
416164
532325
664646
71281287
82562568
101024102410
15327683276815
201048576104857620
25335544323355443225
35343597383683435973836835
501.1258999e+151.1258999e+1550

So, we only need l amount qubits where l is the number of nodes. You can see that how quantum computers can be super fast than classical computers. And it is not just qubits, we have to use quantum entanglement.

Quantum entanglement is a very hard concept and I don't even understand it correctly.

Image description Image description

Entanglement means connected. If two quantum particles, for example, electrons are entangled or you can say connected, they can communicate with each other instantly like there is no space between them. Even if one particle is on earth another particle is on another galaxy.

If we have two qubits entangled, then one qubit will communicate to the next qubit and will tell what to do. I don't understand how entanglement will be used in quantum computers but it is needed.

So, this is very clear that quantum computer will be really fast and it will revolutionize our world.

But,

Why haven't we built it?

Well, building a quantum computer is not easy. It has several problems. For example, to make the qubits work you need to make the temperature 0.015 kelvin which is colder than outer space. That is hard to build and very expensive.

But a lot of company has started their mission like Google, IBM, Intel, and many other companies. And they have earned a lot of success.

When will we have a quantum computer on our desk?

Well, not so fast. It might take decades. Or maybe in the next decade. Who knows what happens in the future. So, we have to wait. And as a developer, you need to be prepared for that. Because

Quantum computers are the future.

So that's all I know about quantum computers. I am always happy to share my knowledge. Please let me know if I have made any mistakes. Also, this Blog is completely open-source. So, you can contribute to the blog.

Shameless Plug

I have made a video about how to build a carousel postcard with React, Material-UI, and Swiper.js. If you are interested you can check the video.

You can also demo the application form here

Screenshot of Insta Carousel

Please like and subscribe to Cules Coding. It motivates me to create more content like this.

If you have any questions, feel free to contact me on any social media as @thatanjan. Stay safe. Goodbye.

About me

Why do I do what I do?

The Internet has revolutionized our life. I want to make the internet more beautiful and useful.

What do I do?

I ended up being a full-stack software engineer.

What can I do?

I can develop complex full-stack web applications like social media applications or e-commerce sites.

What have I done?

I have developed a social media application called Confession. The goal of this application is to help people overcome their imposter syndrome by sharing our failure stories.

Screenshot

Homepage

More screenshots

I also love to share my knowledge. So, I run a youtube channel called Cules Coding where I teach people full-stack web development, data structure algorithms, and many more. So, Subscribe to Cules Coding so that you don't miss the cool stuff.

Want to work with me?

I am looking for a team where I can show my ambition and passion and produce great value for them. Contact me through my email or any social media as @thatanjan. I would be happy to have a touch with you.

Contacts

Blogs you might want to read:

Videos might you might want to watch: