**Entanglement, Qubits, Superposition? What’s is quantum computing?**

Recently someone told me how difficult it is trying to understand a subject when it is abstract and complex especially when there is zero or almost zero knowledge about it. Well, I would agree with the same reasons and this is why I decided to write this article.

Below there are two examples of why classic computing would solve well small types of these problems but by the time the problem gets big enough so the world needs something more than classic computing.

**Example #1** – The wedding table (**optimization**)

Many tables with ten people around each table over dinner. How many different ways are there to configure ten people around a table? The answer is 10 factorial each is 3.6 million ways to arrange 10 people for dinner and this is a tiny scenario. Adding people to a table massive exponentially grow the number of possible configurations.

**Problem #1**: Classic computing can’t do well optimization on a large scale combined with fast-growing.

**Example #2** – The fable of the chess and the rice (**scale**)

To represent the exponential scaling there is a classic fable about the creator of the game of chess brought the chessboard to the King and the King said:

I love this game, what can I give you as a reward? The craftsman said: there are 64 squares on the chessboard so you can give me just one grain of rice and every day after the double number of grains of rice I get.

Day one: **one**, next day: **two**, next day: **four**, next day: **eight**, next week: **he had a teaspoon full of rice**, next month: **a small rice production of a city**, next full 64 square: **The Everest Mountain of full rice**.

The number 64 is nothing but two of the 64 is a big number and it grows really fast.

**Problem #2**: Classic computing can’t do well exponential scaling.

**Why the world needs quantum computing?**

**To optimize things that grow faster on an exponential scale.**

### What’s is quantum computing?

The simplest definition of “quantum mechanics” that I found: **the description of the smallest things in our universe** **and how it interacts with light. **The short version would be **the description of the smallest things in our universe **(like a planck length). Check this video (https://youtu.be/bjVfL8uNkUk) if you want to have an idea of the size of a planck length. This video is really interesting and it might make you think differently regarding the size of elements.

### How is it work?

In classic computing classical states is basically a string of zeros and ones. In quantum computing states can exist in a superposition of 0 and 1 so you can start to be able to explore a much richer and complex set of states.

This is the representation of two qubits in four-dimensional linear vector space:

To perform complex computing key fundaments principles of quantum-mechanical phenomena are used such as **superposition **and **entanglement**.

**Entanglement**: quantum states of two or more objects have to be described with reference to each other, even though the individual objects may be spatially separated. **If someone in Tokyo tosses a dice at the same time when another person tosses a dice in New York no matter how these people toss them, they always added up to seven**.

**Superposition**: states in a physical system that partially exists in all possible states before its measure but after measured or observed the physical system became in a unique state which means: something that is everywhere before you see it or measure it but after both, it will be in a unique state. **When someone tosses a dice before it measures the dice exists in all possible “states” (numbers) at the same time.**

Erwin Schrödinger was a Nobel-Prize winning Austrian physicist who developed several fundamental results in quantum theory and the **schrödinger’s cat theory **experiment (50% alive 50% dead) at the same time before open the box and **electron orbitals** to exemplify a superposition. There are tons of videos explaining both experiments.

The superposition can be represented as an example below as 1Qubit (Bloch Sphere) and 5Qubits (Qsphere).

### The practical approach of how to solve a problem using classic vs quantum computing

Elements: 2 taxis and 3 people that may or may not hate each other.

Premises

**The goals:**

#1 – **Maximize # of friend pairs inside the taxi**

#2 – **Minimize # of hate pairs inside the taxi**

To solve this problem using classic computing:

You will need to use the combination of bits 0 and 1 to store relevant information:

Below we have one possibility of the combination:

- A goes to Taxi #0 (Friends) = 0
- B goes to Taxi #0 (Friends) = 0
- C goes to Taxi #1 (No friends) = 1

****Below is the full table in bits representation with eight possibilities to divide 3 people into 2 taxis. 8=2.2.2=2³.

Now we need to determine what is the best configuration from the table above following the rules mentioned above: friends, hate. We can use a score to find the best match.

**Score = # friend pairs sharing the same taxi – hate pairs sharing the same taxi.**

Applying the same logic it will find a score per possibility

These two lines highlighted in green are the highest scores for the solution. For this configuration, the classic computing is able to handle. As we add more people to this setup the complexity gets bigger and difficult to handle because it will take more and more time to solve it.

### How can we solve this problem using quantum computing?

The presentation of a Qbit will be this symbol below to represents 0 & 1 at the same time.

3 Bits 0 or 1

A representation of 1 Qubit with 2 states (before it measures will be 0 and 1 at the same time).

A representation of 2 Qubits with 2 states (before it measures will be 0 and 1 at the same time)

These 3 Qubits below together will represent all the 8 possible configurations at the same time:

When you apply computation in these 3 Qubits in quantum computing the results of these 8 possible configurations are computed all at the same time. In this case, you can apply a function that turns the states in a single score on these 3 Qubits and the quantum computing will be able to find the best score/solution in a matter of milliseconds.

For this problem specifically, it will be necessary:

- A quantum computing with 3 Qubits.
- A function to determine the score.
- Convert the dataset to a format that quantum computing can understand.

* Leonardo Bissoli.*