Quantum Computing Explained — It’s Rocket Science

But rocket science is easier than you think 😉

Jerry Qu
Jerry Qu
Apr 11, 2019 · 9 min read
Image for post
Image for post

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 😉),

Today, with classical computers:

  • to get to market, costing billions for each drug
  • Feature spaces inare limited tocomputational constraints

Today, quantum computers:

And that’s the key word there:

Image for post
Image for post
Yeah, I drew the stick figure

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!

Image for post
Image for post
In general relativity, gravity is just a byproduct of objects following geodesics in curved 4D space-time. In case you’re interested, this VSauce video explains it SO well!

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.

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

Image for post
Image for post
Kurzgesagt, aka: An absolute legend

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

  • 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. 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)

Image for post
Image for post
Big Bang Theory (The age old problem of dinner seatings 😮)

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 , and 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

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:

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.

With 3 people, there are 😜

With 20 people, there are 😤

With 200 people, there are 😱

Vsauce Explains the ridiculousness of 52 factorial. (About ⁶⁰) It’s absurd…

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

Image for post
Image for post
Quantum Computer I saw at CES this year. Thanks to Living in Digital Times and TKS for bringing us down there!

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, . And that’s where quantum computers pull ahead.

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. 😲

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.

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, 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

Image for post
Image for post
My mind right now. But hey, mental fortitude

But after being exposed to it for long enough, you start to just get it.

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

  • 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

HackerNoon.com

#BlackLivesMatter

Sign up for Get Better Tech Emails via HackerNoon.com

By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Jerry Qu

Written by

Jerry Qu

Passionate about Machine Learning, understanding the world, and other exponential technologies.

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Jerry Qu

Written by

Jerry Qu

Passionate about Machine Learning, understanding the world, and other exponential technologies.

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store