Towards Quantum Computing (I)
This is the beginning of a series about quantum computing. In this first chapter we'll explore some details of quantum and computation theory.
Hello, Hypers!
Since the last decades of the past century, some physics and computer scientists have started to publish results based on the possibility of quantum computers. In this century, those computers are a reality. Quantum Computing has the potential to transform many fields like Optimization, Cryptography, Drug Discovery, etc.
This series will explain the main aspects of Quantum Computers. For example:
What is Quantum Computing?
Are Quantum Computers better than classical computers?
What problems do Quantum Computers solve?
What is the state of the field and what can we expect to see in the future?
How does Quantum Computing impact Computational Theory?
In this first issue, we will learn the basic principles of Quantum Mechanics that make possible the existence of quantum computers. Let’s get started!
Superposition
Classical Physic is deterministic. That means that a system can be only in one state at a particular instant. Also, if under some conditions the system goes from state A to state B, then the system will always go from state A to state B under the same conditions.
For example, let’s consider our Solar System. We can say that the state of this system is the position and the velocity of each celestial body that forms it at a given instant. The position and velocity of the Sun, the Earth, the comets and asteroids, etc. If we know all that information at a given time, we can predict what the state would be in the future. We can predict the position of the Earth tomorrow, or whether or not some asteroid can collide with the Moon.
About a century ago, physics discovered that the tiniest particles that form our universe don’t behave deterministically. An atom is not in a single state at a given time and its future states are quite unpredictable. This is when Quantum Theory comes in.
It seems counterintuitive but it is what happens in the subatomic world. An electron, for example, is not like a planet orbiting around an atom's nucleus. That’s an oversimplification that we learn in school to get a practical understanding of some physical, chemical, and biological processes. But what is happening is that the electron is in many positions and traveling at different velocities at the same time. Whaaaaaaat!?
Yes, that’s how the atomic and subatomic world works. This phenomenon is called superposition. That is the property of the particles being at different positions with different velocities simultaneously. Although it seems very rare, superposition explains many events that happen in practice and classical physics cannot explain them. For example, read about the Double-Slit Experiment.
But the chaotic nondeterminism ends when we measure what is happening. For example, if we emit a photon (the subatomic particle that is the building block of light) and make it pass through a beam splitter (a device that deviates the trajectory with a 50% probability), the photon will follow both trajectories (the initial and the deviated one) at the same time, entering in a superposition. But if we place a photon detector in both trajectories, only one of them will detect the photon. The act of “seeing” the photon makes the superposition collapse into a single trajectory. Again, whaaaaat!?
This collapse can be shown with some version of the mentioned Double-Slit Experiment.
Summarizing, subatomic particles and atoms are in different positions and have different velocities at the same time. This is a phenomenon of Quantum Mechanics called superposition. The superposition collapses and the particles start to be in a single location if we try to locate them. And that’s how this tiny world works.
But what do all these crazy behaviors have to do with computation?
Qubits
Algorithms can be seen as sophisticated state machines. We have an initial state and an input. Given the same input and a state, the next state of an algorithm is always the same. Also, an algorithm is only in one state at a time. Algorithms are deterministic.
In a computer, the states of the algorithms are described with bits. A bit can be zero or one. Then, a state can be described as a combination of zeros and ones. But what would happen if the bits of a computer could be in superposition like photons?
This way, a bit is not zero or one but zero and one at the same time! (until we measure it). So, an algorithm could be in different states at the same time. For example, an algorithm to search for an element in a list could search in the first and last half of the list at the same time, which would increase the algorithm's efficiency. This is just an illustrative example, do not take it too seriously. But it shows the idea behind the potential of quantum computers.
It’s like we could have the ability to look for our keys in our bedroom and our living room at the same time.
Today we have computers with these quantum bits (qubits) precisely because superposition is a fact. We use photons and other subatomic particles to create these qubits.
Before the end of this post, let’s talk about another crazy quantum phenomenon that is used to implement quantum algorithms.
Entanglement
Albert Einstein was one of the major contributors to Quantum Theory at its first stage. But he was also one of its major detractors. That’s not a surprise. After all, he was the creator of a theory that explains how the Universe works at a large scale. This beautiful and powerful theory is General Relativity, and Einstein was sure that his theory will also explain what was happening in the subatomic universe without including the indeterminism and the crazy effects of Quantum Mechanics. That’s where one of his famous phrases comes from: “God does not play dice with the universe“.
He was mainly concerned about the phenomenon known as entanglement in Quantum Physics. Imagine that we have two qubits and both of them are in superposition. Also, let’s suppose that we know that if we measure one of them and it collapses to one, then the other should be a zero and vice-versa. This type of correlation can be simulated with subatomic particles.
Now let’s suppose Alice takes one of the qubits and goes to Neptune with it. Meanwhile, Bob will stay on Earth with the other qubit. None of them have measured their qubit. Then Alice measures her qubit in Neptune and her qubit collapses to a one. What happens with the qubit of Bob? If we follow the rules of Quantum Mechanics, it will immediately collapse into a zero. This is what was so concerning to Einstein. Nothing can travel faster than light, but somehow, the influence of one qubit in Neptune over another qubit in Earth seems to be faster. It takes more than four hours for light to travel from Neptune to Earth. But the influence of the entanglement is instantaneous.
After some decades, it was proved that Einstein was quite wrong and entanglement is real. A simplified explanation would be that both qubits are part of the same system no matter if they were separated. So, there is no state of qubit 1 and state of qubit 2, but a single joint state of the system of both qubits. When Alice measures her qubit, she is measuring the state of the whole system.
We can also take advantage of entanglement in Quantum Algorithms. But this is material for a future post.
This is all for now! If you enjoyed this post and want me to keep writing this quantum computing series, please let me know by reacting and commenting. Also, don’t forget to recommend Under the Hype to your friends and colleagues to keep our community growing. Thank you so much for reading.
See you next week!
very cool to think about bits being 0 and 1 until they're measured - great article!
Great article!! Now I wonder how does the code that takes advantage of quantum computers looks like.