### https://hackernoon.com/quantum-computing-explained-its-rocket-science-55d7766edac2

A couple of years ago, I thought Quantum Mechanics was a bunch of theoretical science with no real world applications: Not anymore

In recent years, we’ve seen the emergence of Quantum Computing; spearheaded by companies such as D-Wave, Rigetti Computing, and IBM. In a nutshell *(**Kurzgesagt*?*)*, **Quantum
Computing will revolutionize computing, allowing us to solve complex
computational problems that would have been impossible on classical
computers.**

In recent years, we’ve seen the emergence of Quantum Computing; spearheaded by companies such as D-Wave, Rigetti Computing, and IBM. In a nutshell *(**Kurzgesagt*?*)*, **Quantum Computing will revolutionize computing, allowing us to solve complex computational problems that would have been impossible on classical computers.**

Today, with classical computers:

**Drug Discovery takes over 10 years**to get to market, costing billions for each drug- Feature spaces in
**Machine Learning**are limited tocomputational constraints

Today, quantum computers:

**Exponentially increase speeds in Drug Discovery,**in areas such as Protein Simulation and Genomics**Exponentially increase speeds in Machine Learning,**in areas such as Quantum Support Vector Machines

And that’s the key word there:

Exponentially

We can’t even fathom the scales at which quantum computing will change our world. It’s almost like we’re in the 1970s, just before PCs came out. We didn’t know where we’d be today, with computers in every industry and household, it’s crazy how much we depend on them now.

#### And since this is exponential, the future is even crazier. In the future, Quantum Computing will:

- Allow us to simulate the effects of specific diseases and potential treatments on yourself as an individual, catalyzing personalized medicine (Imagine living 5, 10, maybe even 100 more years?! ?)
- Power Artificial Super Intelligence (Great Wait But Why article on that), by providing the INSANE amount of computational power needed
- Spark innovation in Genomics, Self Driving Cars, Cellular Agriculture…
*…and much MUCH MORE!*

### Now that you know how important Quantum Computing is, let’s dive into how it works

Quantum Computing is powered by phenomena in Quantum Mechanics. I’m sure we’ve all heard terms such as entanglement or superposition before.

“when a qubit is both one and zero” — said by everyone, understood by no-one

#### Quantum Mechanics behaves so differently to the physics we experience every day, and that’s why it seems so strange

We’ve
been observing classical physics since we were born, and take those
assumptions as first principles. For example, we all know that a dropped
object falls to the ground due to gravity. *But wait,* *that observation is still an assumption.* Gravity is an assumption we made; and that assumption turned out to be false under Einstein’s theory of general relativity!

My
point is, classical physics is all built on assumptions. If you were
born unconscious, and suddenly became conscious 7 years afterwards, *you would not understand the physics around you.* **Quantum physics is not any stranger than classical physics, it’s just different.**

So take an open mindset and challenge your fundamental principles, as we figure out how Quantum Mechanics powers Quantum Computing.

#### One of the fundamental differences between quantum and classical computers lies in the difference between how they store data.

*This is a great place to start understanding the power of Quantum Computers*

**In classical computers:**

- A single unit of data is stored as a 1 or 0, called a bit

**In quantum computers:**

- A single unit of data can be stored as a 1 or 0, but also can be a 1 and 0. This is called a qubit.

*Wait, what does that mean?* *A 1 and 0*? This phenomenon is known as superposition. **You have a superposition of both a 1 and 0 at the same time.**
This is where things get weird. So, we’ll go through the easy way of
understanding this (instead of learning all the math), by taking an
analogy.

**Sidenote — Under
other interpretations, superposition can be understood as a
probabilistic wave function. I may write a more technical article in the
future, but this interpretation is easier to understand; more on that
in the second sidenote*

### How superposition enables Quantum Computers (for dummies)

Let’s
say you’ve organized a dinner, and need to decide where to seat your
guests. For simplicity’s sake, let’s say you only have **3 guests**, and **2 tables** to place them on.

The thing is, some of these guests don’t like each other, but others do.

Let’s say:

- Person A and C are friends ?
- Person A and B are enemies ?
- Person B and C are enemies ?

In this situation, you want to **have the highest number of friends together, while having the lowest number of enemies together.**

### How this would work on a regular computer

Well, we only have 2 tables, so we can assign tables to each guest in binary, with a 1 or 0. So we have Table 1, and Table 0. For example, one combination of placements could be:

001 (Person A and B are placed on Table 0, and Person C is placed on Table 1)

Here are all the possible combinations:

+----------+----------+----------+

| Person A | Person B | Person C |

+----------+----------+----------+

| 0 | 0 | 0 |

| 0 | 0 | 1 |

| 0 | 1 | 0 |

| 0 | 1 | 1 |

| 1 | 0 | 0 |

| 1 | 0 | 1 |

| 1 | 1 | 0 |

| 1 | 1 | 1 |

+----------+----------+----------+

Now, we want to optimize for friends, and against enemies placed on the same table. With this knowledge, we can create a score algorithm. It could be something like this:

**Score = (# Friends) – (# Enemies)**

With this metric, the scores would be:

+----------+----------+----------+-------+

| Person A | Person B | Person C | Score |

+----------+----------+----------+-------+

| 0 | 0 | 0 | -1 | ?

| 0 | 0 | 1 | -1 | ?

| 0 | 1 | 0 | 1 | ?

| 0 | 1 | 1 | -1 | ?

| 1 | 0 | 0 | -1 | ?

| 1 | 0 | 1 | 1 | ?

| 1 | 1 | 0 | -1 | ?

| 1 | 1 | 1 | -1 | ?

+----------+----------+----------+-------+

As you can tell, there are 2 arrangements which would lead to the highest score: 010 & 101.

In this situation, a conventional computer would have to try out all of these configurations separately using 3 bits (one at a time) and compute each score. Then select the highest.

Now of course, this is a really simple problem which would take almost no time on a conventional computer.** However, what if we increased the number of people?**

With 3 people, there are **8** **(2*2*2 = 2³) configurations.** ?

With 20 people, there are **1048576 (2²⁰) configurations.** ?

With 200 people, there are ** 2²⁰⁰ combinations?!** ?

#### That’s about 10⁶⁰ or 10 with 60 zeros behind it.

The
world’s fastest computers can only compute 200,000 trillions
calculations per second (only…). Meaning it would take ~10⁴⁶ seconds,
which is WAY too long. *Actually longer than the age of the universe.*

### How this would work on a Quantum Computer

Remember, there are 8 possible combinations:

+----------+----------+----------+

| Person A | Person B | Person C |

+----------+----------+----------+

| 0 | 0 | 0 |

| 0 | 0 | 1 |

| 0 | 1 | 0 |

| 0 | 1 | 1 |

| 1 | 0 | 0 |

| 1 | 0 | 1 |

| 1 | 1 | 0 |

| 1 | 1 | 1 |

+----------+----------+----------+

With a conventional computer, we had to compute each combination separately, **one at a time**. And that’s where quantum computers pull ahead.

**With a quantum computer, we can** **compute all of these scores at one time, **using 3 qubits. *But how does that happen?!*

Well here’s the thing, remember when I told you to have an open mind? Yeah that’s going to be necessary here.

Of course, quantum mechanics is not a fully fleshed out theory, but a prominent interpretation is that by utilizing 3 qubits in superposition, we are effectively creating 8 parallel realities.

*What. The. *** Hell.**?

Yeah, when you set a qubit to a superposition of both 1 and 0, you are basically unraveling 2 parallel realities, do this for all 3 qubits, and you have 8. In each reality, the combinations of qubits are different, meaning each combination exists in one of the parallel realities.

**When
you apply your computations to the qubits, the computation actually
unravels over all 8 realities in parallel, meaning at the same time. This is how we get an exponential speed up!**

After computing the final scores, we select the reality with the optimized score, and continue along that timeline. In other words, the realities collapses into the optimized state. Just like probability distributions are in multiple states, but collapse into one state after you measure the outcome.

**Sidenote — Some
of you might be skeptical about ‘parallel realities’ aka the
Many-Worlds Interpretation of quantum mechanics. Many others believe in
the **Copenhagen interpretation**,
but that’s harder to grasp, and either theory serves the purpose of
explaining the empirical results observed and utilized in Quantum
Computing today. Of course, Quantum Mechanics may just be an incomplete
theory (Something I hope is true, for all our brains’ sakes), in which
case you’d believe in **Hidden-variable theory**, along with Einstein.*

#### Now what if we increased the number of people?

Well, all we need is the same number of qubits, as there are people. 3 people requires 3 qubits, 200 people requires 200 qubits.

But as long as we have the same number of qubits, as there are people, **we can solve these problems in 1 operation for any number of people.**
You can create 2²⁰⁰ parallel realities, apply the operation to each at
the same time, and collapse them into the reality with the highest
score.

#### But, there are errors when we do quantum computations

In theory, we’d collapse to the optimal state (In this case 010 or 101) every time, but there are errors in quantum computers today, due to the fragility of qubits. (This dumb thing called de-coherence)

To resolve this, we run the same operation numerous times on quantum computers, then select the best result. Errors become more prominent as the problems become more complex, so we repeat a variable amount of time.

You can learn more about quantum error correction here, but that’s not necessary for the purpose of this article.

### Now, this is just the basics of Quantum Computing

There’s
so much more to it, but it really takes a long time to gain an
intuition for how it all works. From the classic Double Split
Experiment, to the EPR Paradox, to Quantum Gates, there’s a **STEEP learning curve.**

But after being exposed to it for long enough, you start to just get it. **Quantum Mechanics is no stranger than Classic Physics. It’s just different.**

“ The ‘paradox’ is only a conflict between reality and your feeling of what reality ‘ought to be’” — Richard Feynman

**If you want to take anything away from this article:**

- Quantum Computing allows us to perform computations that would be impossible on classical computers
- Quantum Computing will revolutionize almost every industry
- Quantum Mechanics isn’t harder, it’s just different

**If you enjoyed this article:**

- follow my Medium, LinkedIn, and Twitter to stay updated with my progress!
- check out how I trained self driving cars with reinforcement learning
- shoot me an email (Jerry2001Qu@gmail.com) I’ll reply ?