To really foul things up, you need a computer - A Quantum Computer
To err is human, but to really foul things up you need a computer.
To err is human, but to really foul things up you need a computer.
Paul Ehrlich
I am a software guy. Therefore, it’s hard to admit that Paul Ehrlich certainly doesn’t refer to hardware but software. Classical computers are fault-tolerant devices. They don’t err.
These computers need to distinguish between zero and one — the difference between high and low voltage. Whenever there is a high voltage, it is one, and if there is a lower voltage, it is zero. This discretization means that errors must be relatively large to be noticeable. As a result, classical computers don’t take a zero for a one or vice versa.
So, whenever a calculation is wrong, it is because of the software. As someone who writes software, it’s a harsh lesson. No, it’s not the computer’s fault. It’s mine.
But, it’s an entirely different situation in the quantum computing realm. Quantum computers keep a continuous quantum state — the quantum superposition. It means that a quantum bit (or qubit) is not zero or one, but it is in a complex (as in complex numbers) linear combination of zero and one. There’s but one caveat. A qubit is only in a state of superposition unless we measure it. Once we measure it, it instantly jumps to either zero or one.
Measuring a qubit collapses its state of superposition.
But what precisely is a measurement? We’re all used to measuring things, such as distances, temperature, and time. It involves some kind of assessment. So, do we need to assess a qubit? If yes, what does assessment imply?
We could play this game quite further. In fact, in the early days of quantum computing, there was a critical discourse on whether measuring a quantum mechanical system involved the human mind.
Today, most scientists agree that we can understand measurement much more broader. Any exchange of information between a quantum mechanical system and its environment qualifies as measurement. And in the sub-atomic world, information is exchanged a lot. If two atoms chemically react, that’s an exchange of information. If an electron moves from one atom to another — something we know as electricity — that’s an exchange of information. Even if two electrons, photons, or any two particles collide, well, that’s an exchange of information, too.
We’re living in a world (earth) that’s full of moving particles. So, you won’t find any natural quantum mechanical system that doesn’t continuously exchange information with its environment. So, we cool down the quantum computer as much as we can so that there are no moving particles anymore. Furthermore, we confine and suspend a particle with electromagnetic fields so that it is in free space with no interaction with its environment.
However, we need to allow some interactions to use this particle as a qubit. We need to control it. It’s easy to imagine that this is a delicate process — the smallest imprecision may make the particle touch its environment. There, you have it—exchange of information.
The best quantum computers we have today suffer from unwanted interactions with the outside world. They materialize as noise and ruin our computations.
So, now that we have a basic understanding of the origin of quantum errors. Let’s look at how they affect our qubits from a programmatical perspective.
A qubit is a two-dimensional quantum system. We can represent it with a vector called “psi” — |𝜓⟩.
The following figure depicts psi’s most important characteristics — 𝛼 and 𝛽. These are the distances to base vectors |0⟩ and |1⟩. These are important because their absolute squares denote the probability of measuring the qubit as 0 (=|𝛼|²) or 1 (=|𝛽|²).
So, let’s assume the qubit is in a state where we measure it as 0 with a probability of 0.25. Accordingly, we measure it as a 1 with a probability of 0.75.
If you look at a hundred qubits in this state, you will count 25 zeros and 75 ones.
Further, let’s say we can work with qubits, such as changing the probabilities. Let’s say we add 0.25 to the probability of measuring them as one. Thus, if we wouldn’t look at a qubit before changing its probabilities, we would end up with a qubit that we always see as one. So, we would count 100 ones.
But if the qubit interacted with its environment before we changed it, it would jump to zero with a probability of 0.25. The following change would bring it from zero to a state with a probability of 0.25 of measuring one.
Let’s say ten qubits interacted with their environment before we could change their probabilities. Then, we would measure seven or eight qubits as zero. So we would count only 92 or 93 ones.
It gets worse!
Didn’t I mention above that the qubit superposition is a complex (as in complex numbers) linear combination of zero and one? I didn’t want just to sound smart.
Geometrically, complex numbers extend the concept of the one-dimensional number line to the two-dimensional complex plane.
i represents the imaginary unit satisfying the equation i²=−1. Because no real number satisfies this equation, the parts a and bi are independent of each other. As a result, we add a third dimension to our hitherto two-dimensional quantum state vector space.
The result looks like a sphere for all the vectors in that space are normalized to the length of 1 (|𝛼|² + |𝛽|² = 1). It is the Bloch Sphere.
This additional dimension — which represents the phase — does not directly affect the distance of the qubit state vector to the basis vectors |0⟩ and |1⟩. Thus, it does not directly affect the measurement probabilities.
However, when you work with a qubit — what we do — its phase matters. For instance, the Hadamard gate turns a qubit with a positive phase (|+⟩) into |0⟩ and a qubit with a negative phase (|-⟩) into |1⟩.
Unfortunately, accidental measurements may not only result in bit flips (mixing zeros and ones) but also in phase flips (mixing plus and minus).
I am a software guy. Yet, I take no satisfaction in the fact that it is the hardware and not the software that causes the errors in quantum computing. In the end, it is up to us software engineers to come up with algorithms that either correct these errors or, even better, algorithms that are immune to errors.
For instance, IBM recently announced a prize totaling $100,000 to simulate a Heisenberg model Hamiltonian for a three-particle system on IBM Quantum’s 7-qubit Jakarta system using Trotterization. The main problem to complete this challenge is coping with the noise.