I’ve Simulated a Molecule With a Quantum Computer. Now What?

Qiskit
Qiskit
Published in
6 min readDec 10, 2020
Ground state energy calculations for the lithium hydride molecule using IBM Quantum Valencia processor showing raw data (plus signs) and data extrapolated for error mitigation (exes)

By Ryan F. Mandelbaum, Senior Technical Writer, IBM Quantum and Qiskit

In only the past few years, researchers on the IBM Quantum team successfully simulated the electronic states of the lithium hydride and beryllium hydride molecules on a quantum computer. Quantum engineers think that one day, quantum computers might trounce classical computers in running this sort of calculation. But what would chemists actually do with this information?

Classical computers falter when it comes to exactly simulating the behavior of molecules, since the resources it takes to run these simulations increases exponentially with the size of the molecule. But some quantum algorithms seem to offer a future potential for speedup for these chemistry problems. Speedups are far on the horizon, but you can already run calculations on toy problems using algorithms designed for today’s quantum computers, namely the variational quantum eigensolver (VQE). Some chemists are already picturing a world where quantum computing is simply part of their daily workflow.

“Quantum computers provide a unique tool for computational modeling that’s different by virtue of the way that they run calculations,” said Jamie Garcia, Senior Manager for Quantum Applications, Algorithms and Theory at IBM Research.

Why Do We Care About This?

Let’s say a chemist wants to synthesize a novel, extremely strong polymer. Today, they’d begin with a literature search to find what chemicals have historically made strong polymers. Then, they’d look up what reactions might produce stronger materials, see who has tried these reactions, and what the environment, temperature, and other variables were in their lab setup. Using their intuition, they combine the literature search and a little creativity to run an experimental reaction and see if the outcome is the strong polymer they’d hoped for. If they didn’t succeed, they would try something else. If they did succeed, they would take their lab notebook to a computational chemist and say hey, what went on between these chemicals in order to make this strong polymer, and how could I make it even stronger?

But the holy grail for chemists would be if quantum computers can flip the script, explained Garcia. Digging deeper into the science, a chemical reaction will only occur if it’s energetically favored, meaning that the energy of the final product is lower than the energy of the chemicals you mix together and the energy barrier to get to the product is low enough to overcome in the reactive environment. You can help tip the scales in your favor by adding a chemical called a catalyst, which changes the energy landscape. But are there ways to know how these chemicals will react before mixing them together — and are there ways to predict the properties of the final product? Well, there are, sort of, but these methods can be computationally expensive, requiring long periods of time on big supercomputers. They also rely on approximations by design. After a certain point, even supercomputers can’t run these simulations with a high level of accuracy. Quantum physicists hope that one day, a quantum computer will help tell chemists how such a reaction will pan out before they go mixing chemicals together.

In the future, chemists might go to their computational chemist peer and ask for a simulation first — what chemicals should I mix to get a strong polymer, and what are the properties of all the chemicals involved (are they toxic, pyrophoric, explosive?). Calculations run with the aid of a quantum computer could drastically cut down on the amount of literature searching, the amount of trial-and-error, and the amount of nebulous “intuition” or serendipity required to figure out how to produce a new molecule.

These kinds of speedups could have important impacts. They could help chemists model molecules including the complex reactions involving transition metals. There’s little predictive potential for catalysts incorporating these metals today, said Garcia. But reactions involving these catalysts can be extremely important for processes like nitrogen fixation, and improving these catalysts could reduce the world’s overall energy consumption by a few percentage points.

Today: Variational Quantum Eigensolver

We’re early enough in the story of quantum computers that we don’t know which algorithms will eventually find widespread use. However, we already have an idea of what quantum chemistry algorithms should do: they should be able to calculate the properties of different molecules accurately, meaning that they match experimental results. Quantum mechanics already has the mathematics to do this. At the core of quantum mechanics is the Schrödinger equation, which describes the possible energy states of a molecule given the set of initial conditions of the system it’s in, with the help of a mathematical tool called the Hamiltonian. Or, in short, molecules are quantum systems, so you should be able to use quantum mechanics (and therefore a quantum computer) to calculate values like the ground and excited state energies.

Today, quantum computers aren’t used to solve these problems faster than classical computers; rather, most of the research goes into advancing the theory, software, and hardware. But scientists are already developing algorithms and running them on these small, noisy devices to get a sense of what the future might hold. Most notably, back in 2014, Peruzzo et al. proposed the Variational Quantum Eigensolver to estimate the minimum eigenvalue (ground state energy).

The algorithm begins with the preparation of a quantum state with a parameterized quantum circuit, also called an ansatz. The introduced parameters correspond to rotations of the qubits, and depending on the set of parameters used, a different wavefunction is generated. A back-and-forth between this quantum circuit and a classical optimizer attempts to optimize this output wavefunction via variation of the corresponding quantum circuit parameters, such that the expected value of the Hamiltonian is at its minimum. This heuristic way, when fully converged, will generate the set of parameters that correspond to the ground state of the molecular system. The IBM team has used the VQE algorithm to create dissociation curves — plots of how the ground state energy varies with the distance between atoms in the molecule — that get close to the exact calculated values for both lithium hydride and beryllium hydride.

As of today, we’re really far away from the VQE algorithm ousting classical computers in any way. The lithium hydride calculation took our team many days to run. Both the IBM Quantum hardware and software teams are working to build better devices, and to create software that removes latencies wherever possible to make code run faster.

The Future: ¯\_(ツ)_/¯

VQE isn’t the only way to find the ground-state energies of a molecule. Quantum phase estimation, among the most important routines in quantum computing, offers a way to estimate the eigenvalues of a matrix, and therefore could potentially find use in chemistry simulations. However, good accuracy for this algorithm requires a very long quantum circuit, so it, too, won’t find use for creating accurate simulations on today’s devices, explained Panagiotis Barkoutsos, researcher at IBM Research, Zurich.

So, what kinds of quantum algorithms will we be using to run the chemistry simulations of the future? “The honest answer to this is that we are still working towards this and we do not have the final answer yet,” Barkoutsos said. We’re still in the infancy, and VQE is an important starting point. We still think classically, and incorporate strong classical computing components into our algorithms, he said. He hopes that one day we’ll be thinking in more quantum-native terms to go beyond what we know today, bolstered by more powerful computers.

Qiskit Chemistry

The only way that quantum computers will beat classical computers at chemistry applications is if people continue to employ these devices to try and solve their problems, devising new solutions along the way. Today, you can check out Qiskit’s recently-updated chemistry module, designed both for quantum software developers as well as chemists with basic quantum knowledge. Try it out, and maybe one day, we’ll be using an algorithm named after you to run chemistry simulations in the future.

Get started with Qiskit here!

--

--

Qiskit
Qiskit

An open source quantum computing framework for writing quantum experiments and applications