Someone smarter can explain it better if they want but this is how I understand it.
Think about it this way. One bit, if it’s 0 or 1 gives you 2 possibilities.
Now imagine if a bit could have a value or 0-9. It gives you 10 possibilities.
Quantum computers each bit can have more than 2 value 0 or 1. So if you need to count to 10 on binary 1 bit, you can’t. It’s too small. But if you had 0-9 possibilities per bit, you can count to 10 on that bit. Quantum computing just lets you use multiple values per bit and thus gives you exponential more power than regular computer.
Edit: I should add more. Quantum bit is like tracking a position of an atom which is more or less infinite. So instead of 2 operations per bit, it lets you have infinite operations per bit. Idk if that helps or makes it worse.
Very carefully.
All joking aside, quantum computers take advantage of what is colloquially known as “quantum weirdness” to compute in different ways from traditional computers. The two pertinent parts of quantum weirdness are superposition – what you called “being both on and off” and entanglement – what Einstein called “spooky action at a distance.”
Superposition is an attribute of quantum systems, basically it means that until you measure the state of the system it exists in a kind of fuzzy state where it’s all of the values and none of the values simultaneously. There’s more to it than that and I’m glossing over the finer points, but this is ELI5 so we’ll just roll with it.
Entanglement is another attribute of quantum systems. When two quantum systems are entangled, it basically means that the state of one is correlated with the state of the other. When you eventually “collapse” the entanglement, the two systems will be either correlated – they’ll both be in the same state – or anti-correlated – they’ll both be in an opposite state. Exactly which way it will be depends on the type of entanglement, but it always holds true.
We’re almost to the answer, the final bit you need to know before we get there is that quantum states are *very* sensitive to outside interference. This is why building a quantum computer is difficult – it’s hard to build a large system that exhibits quantum effects without accidentally collapsing it before your calculation is complete.
So, to make a quantum computer, you need to create a vast number of independent quantum entities, entangle them together, line them up such that their states will propagate in accordance with the algorithm you’re running, allow them to compute as long as possible in an entangled and superposed state, and then finally read out the results of your algorithm to find the answer.
The advantage of doing this is that the superposition allows you to calculate multiple possible answers at once. Specifically, you can use every single possible value simultaneously. To use an example – imagine you wanted to factor a number. Let’s say… 2,257. If you don’t know what the factors are of that number, you would need to check each potential factor to find them. In a classical computer, assuming you don’t know a more efficient factoring algorithm, you would need to brute-force check every prime number until you found the prime factors of that number. In this case, you would need to run your algorithm 12 times before you found 37 and 61 as the factors.
With just an 12 quantum bits (or qubits), you could find that answer in a single pass, because your qubits could take on every value from 0 to 4096. So instead of running a 12-bit system 12 times, you just run the 12-bit system once. And obviously, the more bits you have and the larger the problem you’re tackling, the advantages of a quantum computer become more pronounced.
In practice, though, it’s not quite as efficient for a number of reason. The first is that quantum results are *probabilistic*, not deterministic. In other words, quantum calculations don’t give you an exact answer. They give you a range of potential results from your calculation. Sometimes, because of this nature, your quantum system will give you the wrong answer. The real answer to the factors of 2,257 are 37 and 61, but sometimes a quantum system would tell you that it’s 35 and 63 (or any other figure). 37 and 61 are the *likeliest* answer, but any other answer is possible. So to combat this, you often have to run your calculation multiple times so that you can identify the “correct” answer.
The second reason it’s not as efficient is because calculating on quantum states is *hard*. There are a number of ways to create qubits, but all of them require rather extreme situations. Something like… 150 cesium atoms suspended in an ultracold state at 0.1 degrees Kelvin in a laser trap, with calculations performed by nudging individual electrons with a laser pulse. And each attempt to manipulate the system risks collapsing the quantum state into a classical state. And finally, while a quantum system can calculate many states at once, it doesn’t compute those states as quickly as a traditional computer will. Yes, I can calculate my factors in one pass instead of 12, but it probably took me longer to do that one pass than it did my 12 passes on a modern computer.
So, the tl;dr: Quantum computers work by manipulating quantum elements to perform calculations for you. This lets you take advantage of massive parallelism to do multiple calculations at once. That’s why quantum computers are a subject of research. But the drawback is that quantum computers, at present, are finicky, difficult and expensive to deliver performance that isn’t even comparable to modern computers.
Quantum bits are not “both on and off”. It’s better think in terms of the types of numbers the can represent. Traditional digital bits can only represent two numbers, 0 or 1. You can do a lot with that, but there are some things that will “take forever” if you tried doing it on a regular computer because of how many calculations you’d need to make.
Think of quantum bits (“qubits) as being able to represent *any* number from 0 to 1. We’re no longer stuck with just 0 or 1, we can set our qubits to whatever value we need. And that opens up some wild possibilities: even though a single qubit represents a single number, that number can be so precise that we can treat them as patterns instead of just numbers. For example, 0.124512331277 is just a number, but we can *also* treat it as a convenient way to represent the seven different values 12, 45, 12, 33, 12, and 77 in a single number.
If we can then figure out a way to perform calculations such that the pattern is preserved (e.g. the first two digits are one value, the next two digits another, and so on) then we can calculate seven different things at the same time. And that scales: this allows us to run certain calculations using quantum computers thousands, millions, or even more times faster than a traditional computer, because we don’t have to rerun the same computation again and again until we’ve processed all the inputs one by one. The quantum computer does the work on all our inputs at the same time.
That does come with a downside: while we can “prepare” a qubit to be a specific number (there are some operations that we can perform on them to change them by some know amount, so we can get them in the initial state that we need, similar to how you would prepare a traditional set of bits to represent your starting values) we can’t just look at a qubit to see what value it is: when we try to read it, we’re essentially rounding the number to a whole number again, so quantum computers are used to run algorithms where the computations need to run for lots of inputs all at the same time, but result in something that be represented as 1s and 0s, representing one outcome. That may sound like a deal breaker, but a lot of computational tasks be phrased as “give me _an_ answer to this problem” rather than “give me _the_ answer to this problem”, and plenty of tasks exists where there is only one answer to find, if there is one.
So quantum computers are useless for everyday computing because they work completely different from “normal” computers, but they’re incredibly important to science, and things that rely on science (which a lot of industries do) for the same reason.
the (likely) way oversimplified answer is….
regular computers take an input then calculate the ouput
quantum computers are basically computing all the possible outputs at the same time based on all of the possible inputs.
regular computer would play out all of the possible scenarios individually using a lot of processing, while a quantum computer is essentially playing them out all at once since the qubit is representing both the 0 and 1 simultaneously along all of the possible outcomes.
Imagine you are trying to solve a giant maze the size of the globe. If you are a conventional computer, you would follow the path to discover the exit in…. a very very long time. If you are a very fast conventional computer with parallel processing, you would multiply yourself say 10, 100, 1000, 10,000, or even 1,000,000 times, but a million of you in the world will still take a long time to solve the maze. There are an estimated 200 Billion computers in the world, even if every computer had 10 parallel processing cores, you would have only 2000 Billion of “you” running around.
In a quantum computer, each additional qubit doubles the number of you running around. So with 500 qubits, there are 327,339,060,789,614,187,001,318,969,682,759,915,221,664,204,604,306,478,948,329,136,809,613,379,640,467,455,488,327,009,232,590,415,715,088,668,412,756,007,100,921,725,654,588,539,305,332,852,758,9376 of you. Meanwhile, there is approximately 7.91×10^17 square inches on the surface of the globe, which is a much smaller number than the previous one. You are essentially everywhere on the globe all at once, including at the exit that solves the maze. So you would instantaneously solve the maze.
Latest Answers