Today, we will use a few coins to explain to you the basic principles of quantum computers.
The computer software we are using now has lines of code behind it, which are eventually transformed into various logic gates, controlling the underlying binary numbers-0 and 1.
This basic unit is called a bit. In a classic computer, each bit is either 0 or 1. Unlike quantum computers, each qubit can be either 0 or 1, or it can become a superposition of 0 and 1.
What is a superposition state? Let us take out a coin and see what pattern it has on its surface.
Throw it ten thousand times, see the flower five thousand times, and see the word five thousand times. So, the pattern on the surface of the coin has both flowers and words? Not necessarily. If the surface of the coin has both flowers and words, why do the flowers and words of a coin never appear in front of us at the same time, but unpredictable and random?
The scholars scratched their heads, and finally responded rigorously: the pattern of the coin is both a flower and a character. The flower and character forms coexist in the coin. But it does not exist at the same time in general, but is a superposition of 50% flower style and 50% character style. The state of the pattern is the superposition state of the flower state and the character state.
Does it feel outrageous?
In fact, the superposition state is just such a helpless description. When the researcher uses the same experimental method, the ejected electrons are sometimes here and sometimes there, and the photons sometimes go through this seam and sometimes go through that seam. In the end, they can only scratch their heads and say that their movement mode and final position are both It is superimposed by different state probabilities.
The seemingly incompatible state, but symbiosis, we describe it as: superposition state-the state where the probability of different states is superimposed. No one knows why this happens.
Turning the coin of God over and over at your fingertips, in such a three-dimensional space, the flower and the character are on both sides, and simultaneously exist on the surface of the coin. But by looking at it with the naked eye, or taking a two-dimensional photo of a coin, we can only see one side of the coin.
Therefore, scholars speculate that perhaps because our world is precisely a projection of a higher-dimensional world, every time we observe and measure the position and velocity, we just randomly see its different projections.
But rest assured, this phenomenon can only be clearly observed in the microcosm. For an object as big as a dollar coin, as long as the angle and strength remain the same, the thrown colors are the same.
Okay, let’s continue. Take out three more coins to make a computer.
Using the two sides of three coins to represent 0 and 1, then there are a total of 8 binary combinations, representing 0~7. The ability is limited, just do a simple test to find out the even numbers.
A simple analysis with the human brain: the three-digit binary is converted to decimal, and it is quickly discovered that as long as the third digit is 0, the number is even, and if it is 1, it is odd.
If you hand this problem to a classic computer, it will do this:
First put the coin in 000 and judge the third coin. If it is 0, let the fourth coin display 1, indicating that the number is even; otherwise, let the fourth coin display 0, indicating an odd number.
Press 001 to put it away and judge.
Press 111 to put it away and judge.
Until 8 numbers have been passed, the judgment is over, and the following results are obtained:
Isn’t it a bit dumb? The quantum computer does this:
Similarly, first put the coin as 000, and use a basic logic gate operation-Hadamard Gate, so that each coin becomes a superposition state of 50% of 0 and 50% of 1s.
The simple 000 is now a long superposition state:
In this way, only three coins can carry the information of the 8 numbers from 0 to 7 at the same time.
The fourth coin comes on stage, first press 1 and put it up.
Next, do something to make the fourth coin listen to the third coin. As long as the third coin is 1, the fourth coin will turn over and display 0; otherwise, keep 1 unchanged.
Here is another logic gate operation-CNOT Gate, which allows the state of the third coin to affect the fourth coin. They are like a positive and negative entanglement, forming an entangled state.
At this point, the coins have carried the complete 8 numbers and their respective judgment results:
Classical computers need to run eight times, while quantum computers only need to run it once. This is the reason for the high speed of quantum computers: all probabilities are calculated at the same time, which is true, parallel operation.
After the above operations, the four coins of the quantum computer have obtained a superposition state: 12.5% (000 1+001 0+010 1+011 0+100 1+101 0+110 1+111 0).
Design an algorithm to make the state where the fourth bit is 0 disappear and get 25% (000 1+010 1+100 1+110 1). At this time, the superposition states are the even numbers we are looking for.
So far, satisfied. When I was preparing to output the results, the problem came.
The four states, that is, the four even numbers, can only get a random even number at a time. Just like tossing a coin, you can only see one suit randomly after the auction.
Once measured, the superposition state will be destroyed, and the second output can only be done from the beginning. If you are unlucky, the result of the second time is the same as the last time. You have to run the third time…I don’t know the year of the monkey to gather all the solutions.
Back to reality, this is one of the problems facing quantum algorithms. Even if the algorithm is optimized so that it outputs a different result each time, it will take at least four times to get a complete answer. Compared to the eight times of a classic computer, it seems not much easier.
After all, quantum computers are not artifacts, and their computing power is only one of the best on some problems.
Finding one or two solutions that meet the conditions in the massive data, such as large number decomposition prime factor (bank password cracking), data search and other problems are very suitable for using quantum computers.
On the contrary, just let them perform a mathematical addition, quantum computers can not show much advantage.
In addition, hardware is also key.
Quantum computers need to find a microscopic physical system with obvious quantum effects to realize the basic functions of computers. It is like using the high and low energy levels of electrons to represent 0 and 1, to realize the basic logic gate mentioned above.
But it is not easy to find such a physical system that can be precisely controlled.
First, the superposition state is not stable. The slight interference of the external electric field and magnetic field or the activeness of oneself will cause the superposition state to change from 50% of 1 + 50% of 0 to 40% of 0 + 60% of 1. The time from doing good to this state to deteriorating is called the coherence time.
The coherence time is not long enough, and it may not be completed even once.
Second, the calculation results may be inaccurate. Despite the subtle design, due to environmental interference and operational errors in the calculation process, only 80% of the success rate can calculate the correct result. This 80% is called fidelity.
The fidelity is not high enough, and the calculated answer is not credible.
Today, the physical systems being explored and developed include ion traps, superconductors, semiconductors, and so on.
Each physical system represents 0 and 1. The way to implement logic gates is very different. They also have their own advantages and disadvantages in coherence time, fidelity, and scalability.
Therefore, rather than talking about the development of quantum computers, it is better to say that scholars have blossomed and developed functions on their respective physical systems. No one knows which system can truly develop a mature and commercially available quantum computer.