What is a quantum computer? Explained with a simple example.
by YK Sugi
Hi everyone!
The other day, I visited D-Wave Systems in Vancouver, Canada. Its a company that makes cutting-edge quantum computers.
I got to learn a lot about quantum computers there, so Id like to share some of what I learned there with you in this article.
The goal of this article is to give you an accurate intuition of what a quantum computer is using a simple example.
This article will not require you to have prior knowledge of either quantum physics or computer science to be able to understand it.
Okay, lets get started.
Edit (Feb 26, 2019): I recently published a video about the same topic on my YouTube channel. I would recommend watching it (click here) before or after reading this article because I have added some additional, more nuanced arguments in the video.
Here is a one-sentence summary of what a quantum computer is:
There is a lot to unpack in this sentence, so let me walk you through what it is exactly using a simple example.
To explain what a quantum computer is, Ill need to first explain a little bit about regular (non-quantum) computers.
Now, a regular computer stores information in a series of 0s and 1s.
Different kinds of information, such as numbers, text, and images can be represented this way.
Each unit in this series of 0s and 1s is called a bit. So, a bit can be set to either 0 or 1.
A quantum computer does not use bits to store information. Instead, it uses something called qubits.
Each qubit can not only be set to 1 or 0, but it can also be set to 1 and 0. But what does that mean exactly?
Let me explain this with a simple example. This is going to be a somewhat artificial example. But its still going to be helpful in understanding how quantum computers work.
Now, suppose youre running a travel agency, and you need to move a group of people from one location to another.
To keep this simple, lets say that you need to move only 3 people for now Alice, Becky, and Chris.
And suppose that you have booked 2 taxis for this purpose, and you want to figure out who gets into which taxi.
Also, suppose here that youre given information about whos friends with who, and whos enemies with who.
Here, lets say that:
And suppose that your goal here is to divide this group of 3 people into the two taxis to achieve the following two objectives:
Okay, so this is the basic premise of this problem. Lets first think about how we would solve this problem using a regular computer.
To solve this problem with a regular, non-quantum computer, youll need first to figure out how to store the relevant information with bits.
Lets label the two taxis Taxi #1 and Taxi #0.
Then, you can represent who gets into which car with 3 bits.
For example, we can set the three bits to 0, 0, and 1 to represent:
Since there are two choices for each person, there are 2*2*2 = 8 ways to divide this group of people into two cars.
Heres a list of all possible configurations:
A | B | C0 | 0 | 00 | 0 | 10 | 1 | 00 | 1 | 11 | 0 | 01 | 0 | 11 | 1 | 01 | 1 | 1
Using 3 bits, you can represent any one of these combinations.
Now, using a regular computer, how would we determine which configuration is the best solution?
To do this, lets define how we can compute the score for each configuration. This score will represent the extent to which each solution achieves the two objectives I mentioned earlier:
Lets simply define our score as follows:
(the score of a given configuration) = (# friend pairs sharing the same car) - (# enemy pairs sharing the same car)
For example, suppose that Alice, Becky, and Chris all get into Taxi #1. With three bits, this can be expressed as 111.
In this case, there is only one friend pair sharing the same car Alice and Becky.
However, there are two enemy pairs sharing the same car Alice and Chris, and Becky and Chris.
So, the total score of this configuration is 1-2 = -1.
With all of this setup, we can finally go about solving this problem.
With a regular computer, to find the best configuration, youll need to essentially go through all configurations to see which one achieves the highest score.
So, you can think about constructing a table like this:
A | B | C | Score0 | 0 | 0 | -10 | 0 | 1 | 1 <- one of the best solutions0 | 1 | 0 | -10 | 1 | 1 | -11 | 0 | 0 | -11 | 0 | 1 | -11 | 1 | 0 | 1 <- the other best solution1 | 1 | 1 | -1
As you can see, there are two correct solutions here 001 and 110, both achieving the score of 1.
This problem is fairly simple. It quickly becomes too difficult to solve with a regular computer as we increase the number of people in this problem.
We saw that with 3 people, we need to go through 8 possible configurations.
What if there are 4 people? In that case, well need to go through 2*2*2*2 = 16 configurations.
With n people, well need to go through (2 to the power of n) configurations to find the best solution.
So, if there are 100 people, well need to go through:
This is simply impossible to solve with a regular computer.
How would we go about solving this problem with a quantum computer?
To think about that, lets go back to the case of dividing 3 people into two taxis.
As we saw earlier, there were 8 possible solutions to this problem:
A | B | C0 | 0 | 00 | 0 | 10 | 1 | 00 | 1 | 11 | 0 | 01 | 0 | 11 | 1 | 01 | 1 | 1
With a regular computer, using 3 bits, we were able to represent only one of these solutions at a time for example, 001.
However, with a quantum computer, using 3 qubits, we can represent all 8 of these solutions at the same time.
There are debates as to what it means exactly, but heres the way I think about it.
First, examine the first qubit out of these 3 qubits. When you set it to both 0 and 1, its sort of like creating two parallel worlds. (Yes, its strange, but just follow along here.)
In one of those parallel worlds, the qubit is set to 0. In the other one, its set to 1.
Now, what if you set the second qubit to 0 and 1, too? Then, its sort of like creating 4 parallel worlds.
In the first world, the two qubits are set to 00. In the second one, they are 01. In the third one, they are 10. In the fourth one, they are 11.
Similarly, if you set all three qubits to both 0 and 1, youd be creating 8 parallel worlds 000, 001, 010, 011, 100, 101, 110, and 111.
This is a strange way to think, but it is one of the correct ways to interpret how the qubits behave in the real world.
Now, when you apply some sort of computation on these three qubits, you are actually applying the same computation in all of those 8 parallel worlds at the same time.
So, instead of going through each of those potential solutions sequentially, we can compute the scores of all solutions at the same time.
With this particular example, in theory, your quantum computer would be able to find one of the best solutions in a few milliseconds. Again, thats 001 or 110 as we saw earlier:
A | B | C | Score0 | 0 | 0 | -10 | 0 | 1 | 1 <- one of the best solutions0 | 1 | 0 | -10 | 1 | 1 | -11 | 0 | 0 | -11 | 0 | 1 | -11 | 1 | 0 | 1 <- the other best solution1 | 1 | 1 | -1
In reality, to solve this problem, you would need to give your quantum computer two things:
Given these two things, your quantum computer will spit out one of the best solutions in a few milliseconds. In this case, thats 001 or 110 with a score of 1.
Now, in theory, a quantum computer is able to find one of the best solutions every time it runs.
However, in reality, there are errors when running a quantum computer. So, instead of finding the best solution, it might find the second-best solution, the third best solution, and so on.
These errors become more prominent as the problem becomes more and more complex.
So, in practice, you will probably want to run the same operation on a quantum computer dozens of times or hundreds of times. Then pick the best result out of the many results you get.
Even with the errors I mentioned, the quantum computer does not have the same scaling issue a regular computer suffers from.
When there are 3 people we need to divide into two cars, the number of operations we need to perform on a quantum computer is 1. This is because a quantum computer computes the score of all configurations at the same time.
When there are 4 people, the number of operations is still 1.
When there are 100 people, the number of operations is still 1. With a single operation, a quantum computer computes the scores of all 2 ~= 10 = one million million million million million configurations at the same time.
As I mentioned earlier, in practice, its probably best to run your quantum computer dozens of times or hundreds of times and pick the best result out of the many results you get.
However, its still much better than running the same problem on a regular computer and having to repeat the same type of computation one million million million million million times.
Special thanks to everyone at D-Wave Systems for patiently explaining all of this to me.
D-Wave recently launched a cloud environment for interacting with a quantum computer.
If youre a developer and would like actually to try using a quantum computer, its probably the easiest way to do so.
Its called Leap, and its at https://cloud.dwavesys.com/leap. You can use it for free to solve thousands of problems, and they also have easy-to-follow tutorials on getting started with quantum computers once you sign up.
Footnote:
Read more:
What is a quantum computer? Explained with a simple example.
- Quantum Technologies Forum navigates present and future of quantum at USC - University of Southern California - November 16th, 2024 [November 16th, 2024]
- New 'gold-plated' superconductor could be the foundation for massively scaled-up quantum computers in the future - Livescience.com - November 16th, 2024 [November 16th, 2024]
- Quantum Technologies Could Have 8 Billion of Impact on UK Transport by 2035 - The Quantum Insider - November 16th, 2024 [November 16th, 2024]
- IBM launches R2 Heron processors that performs 5,000 two-qubit gate operations - Inceptive Mind - November 16th, 2024 [November 16th, 2024]
- Rigetti Computing Reports Third Quarter 2024 Financial Results and Business Updates - GlobeNewswire - November 16th, 2024 [November 16th, 2024]
- Qiskit Fall Fest brings the fun to quantum technology - The Lafayette - November 16th, 2024 [November 16th, 2024]
- Quantum computers touted as AI accelerator at Daesung Haegang Science Forum - The Korea JoongAng Daily - November 16th, 2024 [November 16th, 2024]
- IonQ Strengthens Technical Moat with its Latest Series of Issued Patents - Business Wire - November 16th, 2024 [November 16th, 2024]
- RIKEN, NTT, and Amplify Inc. Introduce General-Purpose Optical Quantum Computer - The Quantum Insider - November 12th, 2024 [November 12th, 2024]
- The Incredible Power of Quantum Memory - WIRED - November 10th, 2024 [November 10th, 2024]
- What Is Quantum AI? Everything to Know About This Far-Out Twist - CNET - November 10th, 2024 [November 10th, 2024]
- IonQ to Increase Performance and Scale of Quantum Computers with Photonic Integrated Circuits in Collaboration with imec - Yahoo Finance - November 10th, 2024 [November 10th, 2024]
- Why IonQ Stock Is Skyrocketing Today - The Motley Fool - November 10th, 2024 [November 10th, 2024]
- Weighty Subject: Is The Universe a Giant Quantum Gravity Computer? - The Quantum Insider - November 10th, 2024 [November 10th, 2024]
- Massachusetts is launching a new quantum computing project. An expert explains why that's a big deal not just for the state but the world -... - November 10th, 2024 [November 10th, 2024]
- IonQ Strengthens Quantum Computing Capabilities through Partnerships with imec and NKT Photonics - The Quantum Insider - November 10th, 2024 [November 10th, 2024]
- Quantum Computing Inc. 3Q Report: Focus on Loss Reduction While Building Partnerships - The Quantum Insider - November 10th, 2024 [November 10th, 2024]
- Chasing Impossible Vortices: Supersolid Discovery and the Future of Quantum Technology - The Quantum Insider - November 10th, 2024 [November 10th, 2024]
- IonQ and Ansys Partner to Integrate Quantum Computing for Accelerating CAE Simulations and Also to Use Ansys Tools for Designing Ions Quantum... - November 10th, 2024 [November 10th, 2024]
- IonQ to Increase Performance and Scale of Quantum Computers with Photonic Integrated Circuits in Collaboration with imec - Business Wire - November 10th, 2024 [November 10th, 2024]
- Calling All Gamers: Valens Games Reimagination of Gaming for a World With LLM, AI, and Quantum Computing - HSToday - November 10th, 2024 [November 10th, 2024]
- IBM, Guarding Against Tomorrows Threats Today - The Quantum Insider - November 10th, 2024 [November 10th, 2024]
- Yonsei University Establishes South Koreas First 127-Qubit Quantum Computing Center for Industry and Research - The Quantum Insider - November 10th, 2024 [November 10th, 2024]
- Building the future of chips in the USA - IBM Research - November 10th, 2024 [November 10th, 2024]
- Chinese superconducting quantum computing power sold to overseas client - Global Times - November 10th, 2024 [November 10th, 2024]
- IonQ's Third-Quarter Results: Revenue Guidance Raised Amid Strategic Acquisitions, Partnerships - The Quantum Insider - November 10th, 2024 [November 10th, 2024]
- ASEAN FinTech funding grew more than 10-fold in past decade, GenAI and Quantum Computing to power new era: FinTech in ASEAN 2024 report - Yahoo... - November 10th, 2024 [November 10th, 2024]
- Ansys and IonQ Are Bringing the Power of Quantum to the $10 Billion Dollar Computer-Aided Engineering Industry - Business Wire - November 8th, 2024 [November 8th, 2024]
- Computer Engineering faculty awarded to advance the compilation process in quantum computing - Rochester Institute of Technology - November 8th, 2024 [November 8th, 2024]
- Ansys and IonQ Are Bringing the Power of Quantum to the $10 Billion Dollar Computer-Aided Engineering Industry - StockTitan - November 8th, 2024 [November 8th, 2024]
- Quantum Machines and Nvidia use machine learning to get closer to an error-corrected quantum computer - TechCrunch - November 4th, 2024 [November 4th, 2024]
- Quantum computers are here but why do we need them and what will they be used for? - Livescience.com - November 2nd, 2024 [November 2nd, 2024]
- Rigetti and Riverlane Achieve Real-Time Quantum Error Correction on 84-Qubit System - The Quantum Insider - November 2nd, 2024 [November 2nd, 2024]
- Quantum Computing Announces Strategic Partnerships and Pre-Orders Ahead of 2025 Foundry Opening - Yahoo Finance - November 2nd, 2024 [November 2nd, 2024]
- Where Will IonQ Be in 3 Years? - The Motley Fool - November 2nd, 2024 [November 2nd, 2024]
- In the Fight Against Noisy Quantum Computing, CVaR Proves a Worthy Opponent - The Quantum Insider - November 2nd, 2024 [November 2nd, 2024]
- Riverlane CEO Asks: What Will We Do With Error-Corrected Quantum Computers? - The Quantum Insider - November 2nd, 2024 [November 2nd, 2024]
- Gulf bets on a quantum computing leap - Arabian Gulf Business Insight - November 2nd, 2024 [November 2nd, 2024]
- Fully Operational Rigetti QPU Included in UKs Recently Opened National Quantum Computer Centre - GlobeNewswire - November 2nd, 2024 [November 2nd, 2024]
- Guest EditorialQuantum Computing: A Beacon of Transformation for the Oil and Gas Industry - Society of Petroleum Engineers (SPE) - November 2nd, 2024 [November 2nd, 2024]
- A Race to The End of Time - Brown Political Review - November 2nd, 2024 [November 2nd, 2024]
- Study observes a phase transition in magic of a quantum system with random circuits - Phys.org - November 2nd, 2024 [November 2nd, 2024]
- Securing tomorrow: What you should know about protecting data in the future - Clemson News - November 2nd, 2024 [November 2nd, 2024]
- Heres the paper no one read before declaring the demise of modern cryptography - Ars Technica - November 2nd, 2024 [November 2nd, 2024]
- Rigetti and Riverlane Progress Towards Fault Tolerant Quantum Computing with Real-Time and Low Latency Error Correction on Rigetti QPU - StockTitan - November 2nd, 2024 [November 2nd, 2024]
- NIST approves 14 new quantum encryption algorithms for standardization - Nextgov/FCW - November 2nd, 2024 [November 2nd, 2024]
- ORCA Computing Unveils The PT-2: Delivering Quantum-Enhanced Generative AI Capabilities - The Quantum Insider - November 2nd, 2024 [November 2nd, 2024]
- UK quantum computer cluster opens on site of Cold War atomic "holy of holies" - The Stack - November 2nd, 2024 [November 2nd, 2024]
- D-Wave Announces Appointment of Two New Board Members - Business Wire - November 2nd, 2024 [November 2nd, 2024]
- IonQs Quantum Surge: Ride the Wave or Cash Out? - MarketBeat - November 2nd, 2024 [November 2nd, 2024]
- D-Wave Deemed Awardable Vendor for US Department of Defense Chief Digital and Artificial Intelligence Offices Tradewinds Solutions Marketplace -... - November 2nd, 2024 [November 2nd, 2024]
- Challenges and opportunities in quantum optimization - Nature.com - November 2nd, 2024 [November 2nd, 2024]
- Quantum Computing, Inc. Announces Strategic Partnerships and Pre-Orders Ahead of 2025 Quantum Photonic Chip Foundry Opening - PR Newswire - November 2nd, 2024 [November 2nd, 2024]
- Bridging Cities with Quantum Links in Pursuit of the Quantum Internet - The Quantum Insider - November 2nd, 2024 [November 2nd, 2024]
- Quantum Computing, Inc. Announces Strategic Partnerships and Pre-Orders Ahead of 2025 Quantum Photonic Chip Foundry Opening - StockTitan - November 2nd, 2024 [November 2nd, 2024]
- UK's Newly Opened National Quantum Computing Centre Designed to Push The Boundaries of What is Possible With Quantum - The Quantum Insider - November 2nd, 2024 [November 2nd, 2024]
- Scientists build the smallest quantum computer in the world it works at room temperature and you can fit it on your desk - Livescience.com - October 24th, 2024 [October 24th, 2024]
- No, China Isnt a Decade Ahead of The U.S. in Quantum Computing (Probably) - The Quantum Insider - October 24th, 2024 [October 24th, 2024]
- Quantum Computing, Inc. to Host Third Quarter 2024 Shareholder Call on Wednesday, November 6, 2024 - StockTitan - October 24th, 2024 [October 24th, 2024]
- Quantum Computing, Inc. to Host Third Quarter 2024 Shareholder Call on Wednesday, November 6, 2024 - Quantisnow - October 24th, 2024 [October 24th, 2024]
- One Skyrmion to Rule Them All: Noise Resilience and Data Storage Solutions for Quantum Computing and Spintronics - The Quantum Insider - October 24th, 2024 [October 24th, 2024]
- Plotting the inevitable rise of quantum computing - Business Weekly - October 24th, 2024 [October 24th, 2024]
- The Netherlands to host an EU quantum computer in Amsterdam - DutchNews.nl - October 24th, 2024 [October 24th, 2024]
- Qubits Manipulated on the Fly - Physics - October 24th, 2024 [October 24th, 2024]
- Quantum Computing, Inc. to Host Third Quarter 2024 Shareholder Call on Wednesday, November 6, 2024 - WV News - October 24th, 2024 [October 24th, 2024]
- Scientists build the smallest quantum computer in the world it works at room temperature and you can fit it on your desk - MSN - October 24th, 2024 [October 24th, 2024]
- Scalable Silicon Spin Qubits Achieve Over 99% Fidelity for Quantum Computing with CMOS Technology - The Quantum Insider - October 24th, 2024 [October 24th, 2024]
- Multiverse Computing Expands to US with New San Francisco Office to Drive Quantum AI Adoption - HPCwire - October 24th, 2024 [October 24th, 2024]
- LUCI in The Surface Codes With Drop Outs: Google Quantum AI Researchers Report Framework Could Help Reduce Errors - The Quantum Insider - October 24th, 2024 [October 24th, 2024]
- Chinese scientists claim they broke RSA encryption with a quantum computer but there's a catch - Livescience.com - October 23rd, 2024 [October 23rd, 2024]
- Riverlanes Quantum Error Correction Report: Defining the Path to Fault-Tolerant Computing and the MegaQuOp Milestone - The Quantum Insider - October 23rd, 2024 [October 23rd, 2024]
- Quantum Computing, Inc. Enters Final Stage of Commissioning Quantum Photonic Chip Foundry in Tempe, Arizona - Yahoo Finance - October 23rd, 2024 [October 23rd, 2024]
- Why experts are warning businesses to prepare for quantum now or face critical cyber risks when it arrives - ITPro - October 23rd, 2024 [October 23rd, 2024]
- Quantum Computers Expected to Be Useful by 2026, Survey - IoT World Today - October 23rd, 2024 [October 23rd, 2024]
- ParTec AG and HZDR to Build AI Supercomputer Supporting Research in AI, Quantum Computing, and HPC - The Quantum Insider - October 23rd, 2024 [October 23rd, 2024]
- Pete Shadbolt on Tackling the Challenges of Quantum Computing & Its Future Impact on Everyday Life - The Quantum Insider - October 23rd, 2024 [October 23rd, 2024]
- How to build a quantum computer that's actually useful - Space Daily - October 23rd, 2024 [October 23rd, 2024]
- Quantum Algorithms for Faster Pattern Matching in Genomics and Text Processing, and Data-Intensive Applications - The Quantum Insider - October 23rd, 2024 [October 23rd, 2024]
- 2025 Tech Trends Report: New Insights on IT Investment in AI, Quantum Computing, and Cybersecurity Published by Info-Tech Research Group - PR Newswire - October 23rd, 2024 [October 23rd, 2024]
- Next Quantum Computer Comes To Netherlands - Mirage News - October 23rd, 2024 [October 23rd, 2024]