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.
- What's Going On With IonQ Stock Today? - Benzinga - April 1st, 2025 [April 1st, 2025]
- Quantum computer solves optimization problem at Ford's assembly line - Interesting Engineering - April 1st, 2025 [April 1st, 2025]
- Finnish Quantum Startup IQM in Talks to Raise Over 200 Million - Bloomberg.com - April 1st, 2025 [April 1st, 2025]
- Quantum Computing Approach Generates First Ever Truly Random Number - Discover Magazine - April 1st, 2025 [April 1st, 2025]
- National Quantum Computing Centre Launches Insights Paper Exploring Quantum Computings Transformative Potential in Healthcare and Pharmaceuticals -... - April 1st, 2025 [April 1st, 2025]
- JPMorganChase, Quantinuum, Argonne National Laboratory, Oak Ridge National Laboratory and University of Texas at Austin advance the application of... - April 1st, 2025 [April 1st, 2025]
- Certified randomness using a trapped-ion quantum processor - Nature - April 1st, 2025 [April 1st, 2025]
- What's Going On With Quantum Computing Stock Today? - Benzinga - April 1st, 2025 [April 1st, 2025]
- D-Wave Pushes Back At Critics, Shows Off Aggressive Quantum Roadmap - The Next Platform - April 1st, 2025 [April 1st, 2025]
- Quantum Computing Inc. Secures Quantum Photonic Vibrometer Order with Delft University of Technology - Yahoo Finance - April 1st, 2025 [April 1st, 2025]
- How quantum cybersecurity changes the way you protect data - TechTarget - April 1st, 2025 [April 1st, 2025]
- Pasqal Selected for 140-Qubit Quantum Computer to Be Hosted at CINECA - insideHPC - April 1st, 2025 [April 1st, 2025]
- D-Wave and Japan Tobacco use quantum to build a better AI model for drug discovery - SiliconANGLE - April 1st, 2025 [April 1st, 2025]
- Quantum Computing is a cross industry revolution, and we want to be part of it - CTech - April 1st, 2025 [April 1st, 2025]
- Quantum Computing Stocks Fall. Here's A Look At Upcoming News Events. - Investor's Business Daily - April 1st, 2025 [April 1st, 2025]
- Honeywell May Take Quantinuum Public in Next 2 Years. Its a Quantum Thing. - Barron's - April 1st, 2025 [April 1st, 2025]
- The 6 different types of quantum computing technology - TechTarget - April 1st, 2025 [April 1st, 2025]
- Nvidia to Open Quantum Computing Research Center in Boston This Year in a Landmark for Regions Tech Sector - The Harvard Crimson - April 1st, 2025 [April 1st, 2025]
- Quantum Threats Are HereWhy the Next Cybersecurity Boom May Already Be Underway - Baystreet.ca - April 1st, 2025 [April 1st, 2025]
- D-Wave and Japan Tobacco Validate Quantum and AI Workflow Towards Generative Drug Discovery - The Quantum Insider - April 1st, 2025 [April 1st, 2025]
- The High Cost of Quantum Randomness Is Dropping - Quanta Magazine - April 1st, 2025 [April 1st, 2025]
- Beyond encryption: Why quantum computing might be more of a science boom than a cybersecurity bust - oodaloop.com - April 1st, 2025 [April 1st, 2025]
- NVIDIA (NVDA): One of the Best Quantum Computing Stocks to Buy Right Now? - Yahoo Finance - March 18th, 2025 [March 18th, 2025]
- I work at a leading quantum lab: Here are the qualifications recruiters in the field are looking for - Business Insider - March 18th, 2025 [March 18th, 2025]
- 5 wild things quantum computing could unlock now that Big Tech believes a breakthrough is within reach - Yahoo - March 18th, 2025 [March 18th, 2025]
- Controversy erupts over claims Microsoft invented a new state of matter - Salon - March 18th, 2025 [March 18th, 2025]
- Chinese quantum processor is 1 quadrillion times faster than the best supercomputer and it rivals Google's breakthrough Willow chip - Livescience.com - March 18th, 2025 [March 18th, 2025]
- IQM Quantum wants to be the European answer to Google and IBM - Sifted - March 18th, 2025 [March 18th, 2025]
- Twisting atomically thin materials could advance quantum computers - University of Rochester - March 18th, 2025 [March 18th, 2025]
- D-Wave Quantum Stock Hits $11: Heres What This Top Analyst Predicts Ahead - TipRanks - March 18th, 2025 [March 18th, 2025]
- A Computer Has Achieved "Quantum Supremacy" On Real-World Problem For First Time, Company Claims - IFLScience - March 18th, 2025 [March 18th, 2025]
- INVESTOR ALERT: Pomerantz Law Firm Announces the Filing of a Class Action Against Quantum Computing Inc. and Certain Officers - QUBT - PR Newswire - March 18th, 2025 [March 18th, 2025]
- D-Wave Quantum Sets Benchmark with New Computing Advance - News and Statistics - IndexBox, Inc. - March 18th, 2025 [March 18th, 2025]
- Rigettis Rally Hits a Bump Are Insider Sales a Red Flag? - Wall Street Pit - March 18th, 2025 [March 18th, 2025]
- Quantum AI: What Is It and How Does It Work? - CNET - March 18th, 2025 [March 18th, 2025]
- D-Wave Shares Jump 46.9% on Friday - Should You Buy QBTS Stock? - TradingView - March 18th, 2025 [March 18th, 2025]
- 2 Top Quantum Computing Stocks to Buy in 2025 - The Motley Fool - March 13th, 2025 [March 13th, 2025]
- D-Wave Claims Breakthrough. Quantum Computing Stocks Gain. - Investor's Business Daily - March 13th, 2025 [March 13th, 2025]
- Physicists Just Witnessed a Quantum Phase Flip and Its More Mind-Bending Than Expected - SciTechDaily - March 13th, 2025 [March 13th, 2025]
- Beyond Classical: D-Wave First to Demonstrate Quantum Supremacy on Useful, Real-World Problem - Business Wire - March 13th, 2025 [March 13th, 2025]
- What is quantum computing and how it could change the tech world - Yahoo Finance - March 13th, 2025 [March 13th, 2025]
- Quantum Computing Giant IonQ Is Down More Than 60% From its All-Time High. Should You Buy The Dip? - The Motley Fool - March 13th, 2025 [March 13th, 2025]
- D-Wave Deep Dive: A Look at The Quantum Advantage Findings -- And The Questions That Remain - The Quantum Insider - March 13th, 2025 [March 13th, 2025]
- D-Wave claims to have achieved quantum supremacy at last, but others disagree - SiliconANGLE News - March 13th, 2025 [March 13th, 2025]
- D-Wave Claims It Achieves Quantum Supremacy. What the Breakthrough Means for Quantum Computing. - Barron's - March 13th, 2025 [March 13th, 2025]
- D-Wave Posts Wider-Than-Expected Loss. Why the Stock Is Rising After Earnings. - Barron's - March 13th, 2025 [March 13th, 2025]
- Nu Quantum Partners With The University of Sussex, Cisco, and Infineon to Scale Trapped Ion Quantum Computers - The Quantum Insider - March 13th, 2025 [March 13th, 2025]
- IonQ Could Be a Quantum Computing Powerhouse, but Is It a Buy Right Now? - The Motley Fool - March 13th, 2025 [March 13th, 2025]
- D-Wave Quantum Inc. Reports Fourth Quarter and Year-End 2024 Results - TradingView - March 13th, 2025 [March 13th, 2025]
- Hybrid Quantum Workflow Moves Toward Real-World Applications - IoT World Today - March 13th, 2025 [March 13th, 2025]
- As NVIDIAs Quantum Day Nears, Analysts Suggest Event is More Than a Gesture - The Quantum Insider - March 13th, 2025 [March 13th, 2025]
- D-Wave Posts Wider-Than-Expected Loss. Why the Stock Is Rising Anyway. - MSN - March 13th, 2025 [March 13th, 2025]
- Recent Breakthroughs Accelerate The Race For Quantum Computing - Forbes - March 13th, 2025 [March 13th, 2025]
- An operating system for executing applications on quantum network nodes - Nature.com - March 13th, 2025 [March 13th, 2025]
- D-Wave Reports Quantum Advantage in Materials Simulation Study - HPCwire - March 13th, 2025 [March 13th, 2025]
- Experts Weigh in on Microsofts Topological Qubit Claim - Physics - March 13th, 2025 [March 13th, 2025]
- Quantum Computing Inc. To Attend 37th Annual ROTH Conference - PR Newswire - March 13th, 2025 [March 13th, 2025]
- Quantum leap: Passwords in the new era of computing security - BleepingComputer - March 13th, 2025 [March 13th, 2025]
- Quantum computing will reach its inflection point in 2029: How investors should prepare - Finextra - March 13th, 2025 [March 13th, 2025]
- Quantum computing - Unlocking science, and maybe your bank account - Home Team Science and Technology Agency - March 13th, 2025 [March 13th, 2025]
- SXSW 2025 live coverage: The potential of quantum computing, Ireland's prime minister makes a splash, and a Metallica concert in Apple Vision Pro -... - March 13th, 2025 [March 13th, 2025]
- QuamCore Emerges From Stealth With $9 Million in Seed Funding to Build Worlds First Scalable 1 million Qubit Quantum Computer - The Quantum Insider - March 13th, 2025 [March 13th, 2025]
- QuamCore Emerges with $9M Seed Funding to Build Scalable Million-Qubit Quantum Computer - Quantum Computing Report - March 13th, 2025 [March 13th, 2025]
- QuamCore emerges from stealth with $9 million in Seed funding to build a 1 million qubit quantum computer - Scientific Computing World - March 13th, 2025 [March 13th, 2025]
- D-Wave says it achieved quantum supremacy using its computer - Fast Company - March 13th, 2025 [March 13th, 2025]
- D-Waves Annealing Quantum Computer Just Beat a Supercomputer Heres Why It Matters - Wall Street Pit - March 13th, 2025 [March 13th, 2025]
- Recently, a series of quantum computer-themed exchange-traded funds (ETFs) have been released in the.. - - March 13th, 2025 [March 13th, 2025]
- China unveils quantum computer thats one quadrillion times faster than existing supercomputers - Yahoo Finance UK - March 7th, 2025 [March 7th, 2025]
- China unveils quantum computer that could spell new era of processors - The Independent - March 5th, 2025 [March 5th, 2025]
- Startup PsiQuantum says it is making millions of quantum computing chips - Reuters - March 1st, 2025 [March 1st, 2025]
- A quantum computing startup says it is already making millions of light-powered chips - The Conversation - March 1st, 2025 [March 1st, 2025]
- Quantum Breakthrough: Microsoft and Purdue Unlock the Future of Topological Qubits - SciTechDaily - March 1st, 2025 [March 1st, 2025]
- Interested in Quantum Computing Investing? Here Are 4 Fantastic Picks to Maximize Your Odds of Picking a Winner - The Motley Fool - March 1st, 2025 [March 1st, 2025]
- If I Could Only Buy 1 Quantum Computing Stock, This Would Be It - The Motley Fool - March 1st, 2025 [March 1st, 2025]
- Amazon unveils quantum chip, aiming to shave years off development time - Reuters - March 1st, 2025 [March 1st, 2025]
- Quantum Computing Is Finally Here. But What Is It? - Bloomberg - March 1st, 2025 [March 1st, 2025]
- Microsoft makes quantum computing breakthrough - Drexel University The Triangle Online - March 1st, 2025 [March 1st, 2025]
- Google, Microsoft, and now Amazon: The quantum computing race is heating up - Quartz - March 1st, 2025 [March 1st, 2025]
- Groundbreaking qubit technology reduces errors in quantum computing - The Brighter Side of News - March 1st, 2025 [March 1st, 2025]
- Fortanix Tackles Quantum Computing Threats With New Algorithms - Dark Reading - March 1st, 2025 [March 1st, 2025]