Quantum computer calculates ground state of hydrogen with just two qubits

Hydrogen molecule falls to quantum computer

We are at the beginning of a revolution. I’ve been going on about quantum computing for as long as I’ve been writing, but it has always been in the future tense. Nothing useful could be done as researchers stepped through all the foothills on their way to the peaks, but now the summit is in view. Just two months ago, we reported on a quantum computer that mashed digital aspects of quantum computing together with analog aspects. In doing so, the researchers came up with a more robust architecture. While this is promising, it’s not much more than what others have done with different types of quantum computers.

Now, the same device has been used to do real quantum chemistry calculations, and it seems scarily accurate.

## Chemistry? I came here for physics

As any physicist will tell you, chemistry is just physics. And as any chemist will tell you, unsolvable equations are worthless when you’re staring down the barrel of a synthesis that has gone wrong (I’ve paraphrased what a chemist would actually say, which Ars editorial standards would not allow me to print).

Both physicists and chemists are right. Molecules have a fixed shape, they require certain fixed amounts of energy to pull apart, and they release or require a given amount of energy to react. The rate at which a reaction occurs, for instance, is finely dependent on the structure of the molecules involved.

And a molecule’s structure is set by the rules of quantum mechanics. In principle, if you could solve Schroedinger’s equation for a molecule, you would know everything about it. You would know how much energy it takes to pull it apart and, therefore, how quickly it would undergo a given reaction. This would then open the way to changing things in the environment and allow us to determine (for example) how a catalyst changes the molecule’s shape to make it easier to pull apart.

The problem is that the energy required to pull a molecule apart changes with bond length. So, miscalculating the shape of a molecule changes the predicted reaction rates (e.g., the speed at which things happen) exponentially. Tiny errors matter a lot.

Errors wouldn’t be a problem if we could obtain exact solutions to Schroedinger’s equation. But, with the exception of hydrogen—not the hydrogen molecule, the hydrogen atom—we can’t. Instead, we have to use approximations, which introduce errors. Calculating those approximations is also one of those problems that scales very, very badly with size. For more complicated molecules, doing these calculations quickly becomes unreasonable. To overcome this, layers of approximation are applied, which balance accuracy against the time it takes to obtain a solution.

These models are remarkably good at calculating many things. But they aren’t good at calculating the energy required to pull molecules apart and, accordingly, reaction rates.

## You scale so bad

The reason why quantum chemistry calculations are so hard is simply the number of things you have to keep track of. Consider a hydrogen atom. You need to track one electron and one proton, and the electron only feels a force of attraction toward the proton. For a hydrogen molecule, you have two protons that repel each other and two electrons that are attracted to both protons and repelled by each other. Additionally, the two electrons have spin, which influences the state as well. Suddenly, things start to get complicated.

An analogy might be a party: it’s not enough to keep track of who is dancing with whom *right now*. You have to track whom everyone danced with previously, whom they’ve avoided dancing with, and who is refusing to dance at all. You also have to distinguish slow dances from fast dances and group dances from pairs and solo acts. Tracking all this quickly becomes a mess.

This is where the power of quantum algorithms comes in. Over the years, people have developed a number of quantum algorithms that can efficiently solve for the structure and lowest energy state of molecules. Although quantum algorithms might or might not be faster than algorithms from a classical computer, we’ve lacked the hardware with which to test them.

Why are quantum algorithms faster? I think it’s because the electrons in a molecule are not free to take on any state. First, the energy landscape in which they find themselves only allows them to take on certain fixed energies. The second reason is that, if one electron is in a particular state, it prohibits a second electron from occupying the same state.

Let’s put this in terms of waves, because electrons in a molecule or atom have a wave-like character. An electron’s wave spreads out around the nucleus and back to the same location again. If it has the wrong energy, it will not have the same amplitude or phase when it returns (so the peaks of the wave don’t line up). Since the electron will keep oscillating around the nucleus, this difference accumulates, reducing the amplitude to zero. Essentially, an electron with the wrong energy is represented by a wave that has zero amplitude. The electron, therefore, doesn’t exist.

Likewise, if two electrons try to enter the same state, they will find the waves that represent them do not add up nicely—instead, they sum to zero. Basically, if electron A occupies state A, electron B cannot and will not enter state A. To do so would require that neither electron exists.

The consequence is that there are correlations between electrons: if electron B enters state A, then electron A enters state B. And quantum mechanics can track this sort of correlation via the entanglement of two qubits.

I’ve stated this in terms of certainties: electron A is in state A. But before a measurement is made, we should actually express this in terms of probabilities: electron A has a 75-percent chance of being in state A and a 25-percent chance of being in state B. For electron B, it is precisely reversed: it has a 75-percent chance of being in state B and a 25-percent chance of being in state A. These are called superposition states and can be naturally represented by a qubit that is in a superposition state. By entangling two qubits, this superposition state automatically updates itself, maintaining the correlation between the two electrons at the same time.

On a classical computer, all of this behavior has to be calculated. The number of computational steps scales exponentially with the number of electrons. Hence molecular hydrogen, with just two electrons, is solvable while even the smallest protein is well out of reach.

Of course, there are plenty of details that make quantum calculations difficult in practice. For instance, for the entanglement and superposition state between the electrons to accurately represent the molecule you are interested in, you need to couple them together just right. But that is exactly what the researchers have demonstrated with this latest result.

## Let’s vary some stuff

The researchers used two qubits of a multiqubit quantum computer to solve for ground state and bond length of a hydrogen molecule. With this information, the energy required to pull hydrogen apart was also calculated. Since molecular hydrogen can be solved on a classical computer, the results could be checked. To summarize: the results were very accurate.

How did they do it? They tried two different methods, but I will only discuss one, called the variational principle. The idea goes like this—if I have a molecule, it will have a ground state that corresponds to some mathematical function. Given any mathematical function, I can calculate the energy of a state associated with that function. This energy will always be higher or equal to that of the ground state.

If you think about it, you will see why: the ground state is the lowest possible energy for a molecule, so no mathematical function associated with that ground state can end up giving a lower energy, only a higher one. This provides the way to iteratively get closer and closer to the ground state: choose some function that has some parameters that you can play with. Calculate the ground state energy, and then vary those parameters to minimize the energy. Repeat until the absolute minimum is found. The resulting function will be a very close approximation to the true ground state.

Now that you have the function, you can calculate everything you would like to know about the molecule. In the researchers’ calculations, they obtained energies with accuracies to within one part in 10,000, which is very good (one part in 1,000 is required to obtain reaction rates that are within an order of magnitude of the correct value).

## The world is their slimy mollusk

OK, so molecular hydrogen is no big deal. But this only took two computational qubits, and their computer has *nine*. In principle, they can calculate more complicated molecules but probably not more than can already be calculated classically. The researchers claim that this is a *scalable*architecture. Seeing as managing nine qubits requires 1,000 supporting qubits, I’m skeptical. But if the researchers are correct, then we are likely to see rapid progress in this direction.

*Physical Review X*, 2016, DOI: 10.1103/PhysRevX.6.031007. (About DOIs).

Via Chris Lee • ars technica