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.
- Scientists use quantum machine learning to create semiconductors for the first time and it could transform how chips are made - Live Science - July 30th, 2025 [July 30th, 2025]
- IonQ Just Nabbed a Former JPMorgan Research Leader. How Should You Play the Quantum Computing Stock Here? - Yahoo Finance - July 30th, 2025 [July 30th, 2025]
- Quantum computing occurs naturally in the human brain, study finds - The Brighter Side of News - July 30th, 2025 [July 30th, 2025]
- Xanadu Advances TFLN Photonic Chips with HyperLight for Quantum Hardware Scaling - HPCwire - July 30th, 2025 [July 30th, 2025]
- D-Wave Quantum Announces Strategic Development Initiative for Advanced Cryogenic Packaging - TechPowerUp - July 30th, 2025 [July 30th, 2025]
- Prepping for the quantum threat requires a phased approach to crypto agility - csoonline.com - July 30th, 2025 [July 30th, 2025]
- Navigating The Quantum Revolution In A Year Of Transformation - Semiconductor Engineering - July 30th, 2025 [July 30th, 2025]
- QUBT or RGTI: Which Quantum Stock Offers the Better Upside Now? - TradingView - July 30th, 2025 [July 30th, 2025]
- Entanglement-induced provable and robust quantum learning advantages - Nature - July 30th, 2025 [July 30th, 2025]
- Researchers zero in on a new material for quantum information storage - anl.gov - July 30th, 2025 [July 30th, 2025]
- The best ways to play the emergence of quantum computing, according to Rosenblatt - CNBC - July 30th, 2025 [July 30th, 2025]
- Quantum Could be Threat And Shield For Tomorrows Warfighters, Strategists Suggest - The Quantum Insider - July 30th, 2025 [July 30th, 2025]
- QBTS or IONQ? Rosenblatt Picks the Better Quantum Computing Stock - TipRanks - July 30th, 2025 [July 30th, 2025]
- IonQ's Global Push: Will Asia Deals Spark the Next Growth Wave? - Yahoo Finance - July 28th, 2025 [July 28th, 2025]
- Variational Eigensolver Accurately Simulates Lattice Gauge Theory Ground States and String Breaking - Quantum Zeitgeist - July 28th, 2025 [July 28th, 2025]
- 'The era of quantum supremacy is just around the corner,' IonQ CEO says - CNBC - July 28th, 2025 [July 28th, 2025]
- Illinois is trying to get Canadian quantum firms to scale in Chicago - The Logic - July 28th, 2025 [July 28th, 2025]
- Prediction: Quantum Computing Stock Will Be Worth This Much in 2030 - Nasdaq - July 28th, 2025 [July 28th, 2025]
- SuperQ Quantum and Economic Development Lethbridge Hosting Masterclass on Business Optimization Using Quantum Computing with Approximately One Hundred... - July 28th, 2025 [July 28th, 2025]
- Why This Startup Is Building a $50 Million Computer - Inc.com - July 27th, 2025 [July 27th, 2025]
- Could a Quantum Computing Bubble Be About to Pop? History Offers a Clear Answer - The Globe and Mail - July 27th, 2025 [July 27th, 2025]
- Could Metasurfaces be The Next Quantum Information Processors? - The Quantum Insider - July 27th, 2025 [July 27th, 2025]
- Why Some Investors Are Betting Big on Quantum Computing as a Moonshot Artificial Intelligence (AI) Play - Yahoo Finance - July 27th, 2025 [July 27th, 2025]
- IonQ CEO drops bold call on quantum computings tipping point - TheStreet - July 27th, 2025 [July 27th, 2025]
- Worlds most powerful quantum computer to be invested in by Denmark - IceNews - Daily News - July 27th, 2025 [July 27th, 2025]
- Buy D-Wave Quantum Stock, Analyst Says. Its a Compelling Investment Opportunity. - Barron's - July 24th, 2025 [July 24th, 2025]
- Pacific Northwest tech pioneers team up in quantum realms and on the space frontier - GeekWire - July 24th, 2025 [July 24th, 2025]
- Quantum Computing Inc. (QUBT): A Bear Case Theory - MSN - July 24th, 2025 [July 24th, 2025]
- Can Unisys Capitalize Early With Looming Quantum Threats? - TradingView - July 24th, 2025 [July 24th, 2025]
- Quantum Beach 2025 to Spotlight Floridas Role in the Global Quantum Economy - The Quantum Insider - July 24th, 2025 [July 24th, 2025]
- EXPLAINER - What is quantum computing, and why does it matter? - AnewZ - July 24th, 2025 [July 24th, 2025]
- D-Wave or IonQ: Which Quantum Stock Has More Upside in 2025? - Yahoo Finance - July 24th, 2025 [July 24th, 2025]
- Infleqtion to Build Neutral Atom Quantum Computer in Illinois, Backed by $50 Million Partnership - The Quantum Insider - July 24th, 2025 [July 24th, 2025]
- The worlds most powerful quantum computer is coming to Denmark - Evertiq - July 24th, 2025 [July 24th, 2025]
- Microsoft and Atom Computing to build "worlds most powerful quantum computer" in Denmark - Data Center Dynamics - July 24th, 2025 [July 24th, 2025]
- Billionaires Are Buying This Quantum Computing Stock Hand Over Fist (Hint: It's Not IonQ or D-Wave Quantum) - The Motley Fool - July 22nd, 2025 [July 22nd, 2025]
- Quantum Stocks Slide: Is the Hype-Fueled Rally Over? - 24/7 Wall St. - July 22nd, 2025 [July 22nd, 2025]
- Apply to host an event at Qiskit Fall Fest 2025! - IBM - July 22nd, 2025 [July 22nd, 2025]
- 'NSF was there at the start' an experimental quantum chip may yield more robust qubits - National Science Foundation (.gov) - July 22nd, 2025 [July 22nd, 2025]
- Want to Invest in Quantum Computing? 4 Stocks That Are Great Buys Right Now - The Motley Fool - July 22nd, 2025 [July 22nd, 2025]
- Will IonQ's Hardware Push Drive the Next Wave of Quantum Monetization? - TradingView - July 22nd, 2025 [July 22nd, 2025]
- Billionaires Are Buying This Quantum Computing Stock Hand Over Fist (Hint: It's Not IonQ or D-Wave Quantum) - AOL.com - July 22nd, 2025 [July 22nd, 2025]
- JPMorgan Overhauls Quantum Team, Rehires Former Exec - IoT World Today - July 22nd, 2025 [July 22nd, 2025]
- 54-qubit superconducting quantum processor from IQM now avaialable on Amazon Braket - Scientific Computing World - July 22nd, 2025 [July 22nd, 2025]
- 2 Top Quantum Computing Stocks to Buy in July - MSN - July 22nd, 2025 [July 22nd, 2025]
- New trapped-atom qubit technology translates to industry-ready quantum computing product - College of Engineering | University of Wisconsin-Madison - July 22nd, 2025 [July 22nd, 2025]
- D-Wave Quantum (QBTS) Capitalizes on Annealing Advantage to Extend Bullish Outlook - TipRanks - July 22nd, 2025 [July 22nd, 2025]
- Google Research Award Calls For Scientists to Probe Quantum Effects in The Brain - The Quantum Insider - July 22nd, 2025 [July 22nd, 2025]
- Quantum Computing Threatens Blockchains, Driving Development Of Resistant Systems - Quantum Zeitgeist - July 22nd, 2025 [July 22nd, 2025]
- Quantum Computing: What We Know Ahead Of Q2 (NASDAQ:QUBT) - Seeking Alpha - July 22nd, 2025 [July 22nd, 2025]
- SpinQ's Quantum Computing Breakthrough: 100-Qubit Machine by Year-End - News and Statistics - IndexBox - July 22nd, 2025 [July 22nd, 2025]
- QED-C holds second annual Quantum Technologies Showcase on Capitol Hill - Scientific Computing World - July 22nd, 2025 [July 22nd, 2025]
- The Quantum Bitcoin Summit: A Grounded Look At The Issues - Bitcoin Magazine - July 22nd, 2025 [July 22nd, 2025]
- Why Shares of Rigetti Computing Have Blasted 41% Higher This Week - The Motley Fool - July 22nd, 2025 [July 22nd, 2025]
- Quantum computing will soon crack todays encryption methods.Here are 3 ways businesses can prepare - The World Economic Forum - July 22nd, 2025 [July 22nd, 2025]
- 7M Bitcoin at Risk as Quantum Computing Set to Break Crypto in 3 Years | Interview - Cryptonews - July 22nd, 2025 [July 22nd, 2025]
- QED-C Holds Second Annual Quantum Technologies Showcase on Capitol Hill - The Quantum Insider - July 22nd, 2025 [July 22nd, 2025]
- PsiQuantums Chicago quantum computer to begin operations in 2028 - Bloomberg - Investing.com - July 22nd, 2025 [July 22nd, 2025]
- Chicagos $1 Billion Quantum Computer Set to Go Live in 2028 - Bloomberg.com - July 22nd, 2025 [July 22nd, 2025]
- Are We in a Quantum Computing Bubble? - MSN - July 20th, 2025 [July 20th, 2025]
- Quantum computing is so fire No, seriously. BofA says it could be humanity's biggest breakthrough since the discovery of fire - Fortune - July 20th, 2025 [July 20th, 2025]
- 2 Top Quantum Computing Stocks to Buy in July - The Motley Fool - July 20th, 2025 [July 20th, 2025]
- Bitcoin News: How Quantum Computing Threatens the Math Behind Satoshi Nakamoto's Creation - CoinDesk - July 20th, 2025 [July 20th, 2025]
- Should You Invest $1,000 in Quantum Computing Competitor Rigetti Computing? - The Motley Fool - July 20th, 2025 [July 20th, 2025]
- Google solves septillionyear problem This quantum chip is the end of computers - El Diario 24 - July 20th, 2025 [July 20th, 2025]
- Researchers Push for Open-Source Quantum Tools to Break Critical Industry Bottlenecks - The Quantum Insider - July 20th, 2025 [July 20th, 2025]
- Quantum Leap or Overpriced Hype? D-Wave's $400M Raise and the Future of Quantum Computing - AInvest - July 20th, 2025 [July 20th, 2025]
- Want to Invest in Quantum Computing Without the Crazy Risk? Buy These 3 Stocks. - The Globe and Mail - July 20th, 2025 [July 20th, 2025]
- Quantum computing edges closer to biotech reality in Moderna-IBM pact - R&D World - July 20th, 2025 [July 20th, 2025]
- Scientists achieve 'magic state' quantum computing breakthrough 20 years in the making quantum computers can never be truly useful without it -... - July 20th, 2025 [July 20th, 2025]
- Guest Post -- Practical Quantum Advantage in the Context of Quantum AI: Rise of the Hybrid Systems - The Quantum Insider - July 20th, 2025 [July 20th, 2025]
- Warren Buffett Is Invested in These Three Magnificent Quantum Computing Stocks. Here's the Best of the Bunch. - Yahoo Finance - July 20th, 2025 [July 20th, 2025]
- After Plummeting by 18%, Could This Quantum Computing Stock Stage a Second-Half Comeback? - The Motley Fool - July 20th, 2025 [July 20th, 2025]
- Scientists make 'magic state' breakthrough after 20 years without it, quantum computers can never be truly useful - Live Science - July 18th, 2025 [July 18th, 2025]
- D-Wave Quantum Skyrocketed Today. Is the Stock a Buy? - Yahoo Finance - July 18th, 2025 [July 18th, 2025]
- EIFO and the Novo Nordisk Foundation Acquire the Worlds Most Powerful Quantum Computer - Novo Nordisk Fonden - July 18th, 2025 [July 18th, 2025]
- Israel and US to forge $200m tech hub for AI and quantum science development - The Times of Israel - July 18th, 2025 [July 18th, 2025]
- Quantum code breaking? You'd get further with an 8-bit computer, an abacus, and a dog - theregister.com - July 18th, 2025 [July 18th, 2025]
- Is quantum computing the next big thing in stocks? - TheStreet - July 18th, 2025 [July 18th, 2025]
- What to do while pursuing the promise of quantum computing - Brookings - July 18th, 2025 [July 18th, 2025]