A New Method for Chemistry Simulation on Near-Term Quantum Computers

Qiskit
Qiskit
Published in
4 min readApr 28, 2022

By Jeffrey Cohn and Mario Motta, IBM, and Robert M. Parrish, QCWare

Chemical simulation will be among quantum computing’s most important applications, and one where we may even see benefits over classical computers on noisy quantum devices. Given the potential for nearer-term applications, it’s important that we look for algorithms we can implement on near-term hardware.

A central component of simulating chemistry is modeling the mathematical object that describes the behavior of their electrons, called the electronic structure Hamiltonian. However, it’s difficult to translate this Hamiltonian onto a near-term quantum computer, as it comes with a large number of terms and therefore long circuits. In our paper, we used a combination of techniques to compress and truncate the information in electronic structure Hamiltonians so that we can simulate them using significantly shorter quantum circuits. Our experiments demonstrated that our method could accurately predict the low-energy behavior of a variety of molecular systems with reasonably low resources. We hope that this work could help realize chemical simulation on real quantum hardware sooner.

The key advance of our work is called the “compressed” double factorization (C-DF) approximate representation of the Hamiltonian. While it’ll be difficult to dig too deeply into the mathematics in this blog post, you can see the full electronic structure Hamiltonian below.

The full electronic structure Hamiltonian (check the paper for more details)

If we naively expanded each part of this equation out, simulating it would scale with n⁴ electronic orbitals — in other words, attempting to simulate this equation without any truncation would quickly become unwieldy as the size of the molecules we wanted to simulate increased in size.

Previous papers have noticed that we can reap performance gains to simulating the electronic structure Hamiltonian with a method called double factorization. The crux of the n⁴ scaling exists in the piece of the Hamiltonian responsible for the electromagnetic interactions between all of the system’s electrons. Double factorization essentially allows us to shuffle around the piece of the Hamiltonian responsible for these interactions into a sum over a user-specified number of factors, where including more factors lowers your error. By truncating the number of terms properly, we can maintain a tolerable level of error and achieve n³ scaling. Our paper, in the simplest language, beats even the n³ scaling by compressing this piece of the Hamiltonian even further such that we can truncate the sum into an even smaller number of factors.

The molecules we studied in the paper: cis- and trans-stilbene, bacteriochlorophyll a (BChl a), and ethylene

The devil is in the details, and you can find the full description of the technique in our paper published open source in PRX quantum, linked here. We used the method to study several species of molecule, showed above. For a particular example, the active space of bacteriochlorophyll, we found that we could bring the error to nearly zero with only 7 or 8 factors, versus for the explicit method which required 20 factors, as shown in in the plots below.

Most importantly, we thought about how to implement this method on quantum hardware, and devised a quantum algorithm capable of simulating molecules without requiring the classical/quantum back-and-forth of VQE. There exists an algorithm called quantum filter diagonalization (QFD) which approximates the eigenvalues of the electronic structure Hamiltonian. By using our new compressed Hamiltonian in the algorithm, we were able to significantly reduce the size of the circuit required by QFD alone, as well as the number of measurements required in order to calculate the Hamiltonian’s expectation values. We also found ways to significantly reduce the number of CNOT gates in these circuits, and to improve the performance of this algorithm with postselection. Finally, it would be straightforward to plug the C-DF Hamiltonian into other quantum algorithms such as VQE or quantum phase estimation.

Exact and computed energies for cis-stilbene, trans stilbene and BChl a using Jordan-Wigner representation (red, blue crosses for raw and corrected results) and parity representation with two-qubit reduction (green stars). The gray band has a width of 10 milliHartree. Computations were carried out on ibmq mumbai and ibmq

While accurate time evolution simulations with C-DF+QFD are still beyond the ability of today’s quantum processors, ever-improving hardware combined with methods like these could bring better molecular simulations about sooner. We hope to begin constructing a user friendly Qiskit module soon so that others will be able to try it out.

This is a collaboration between QC Ware and IBM. QFD comes from previous work at QC Ware, and C-DF was developed jointly by QC Ware and IBM.

--

--

Qiskit
Qiskit

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