Conf42 Quantum Computing 2024 - Online

Introducing QC2: A Modular Open-Source Software for Quantum Chemistry with Quantum Computers

Abstract

This presentation features QC2, an open-source software that seamlessly integrates computational chemistry codes with quantum computing frameworks. Designed for hybrid workflows, QC2 relies on ASE calculators to efficiently offload electron integrals for various quantum computing SDKs.

Summary

  • Carlos Boschen is a research software engineer at the Netherlands ESI center. In this talk, he will give you an overview about QC two, a modular open source software for quantum chemistry with quantum computers.
  • Atoms and molecules are indeed true manifestation of quantum offsets. They show discrete characterized by discrete energy levels. This can be naturally described by solving the corresponding Schrodinger equation. Among the most popular strategies to perform these approximate solutions in quantum chemistry is by researching through the so called variational principle.
  • QC two uses popular quantum computing libraries like Qskit, Nature and Benellan Qgan. QC two is also designed to be highly modular and features are built in algorithm package. It's also very user friendly and has a very intuitive interface.

Transcript

This transcript was autogenerated. To make changes, submit a PR.
Hi everyone, I'm really glad to be here. I'm Carlos Boschen. I'm a research software engineer at the Netherlands ESI center. In this talk, I will give you an overview about QC two, a modular open source software for quantum chemistry with quantum computers. Before going on, I will be giving you an overview about my organization. The Netherlands Escience center is the center of spurges in research software in the Netherlands and we are founded by the dutch research Consumpt and Discernment. The Netherlands Design center is a center around two main ambitions, and the first one, we work with researchers collaboratively to develop open source research software, and this is done via open call or even external projects. In the second ambition, we build and seek to provide digital expertise for researchers in the Netherlands. And for this we also provide workshops hanging from basic to intermediate python, good practices in software engineered and also more involved topics like the CudA program and QC two is a direct outcome of one of such projects, QC for QC, which is collaborative effort between the Netherlands Design center surf and a full Amsterdam. The main objective of this project was to develop a dedicated software that I'll be reviewing here as UC two to facilitate the interoperability between traditional quantum chemistry codes and byted quantum computing libraries, essentially to facilitate users to perform quantum chemistry calculations using quantum computers. Quantum chemistry may be abused in various contexts and show several bases as well. So there are researchers that are interested in you study a very big systems, for example like the folding octane. And for this system, because they are so big, the researchers have to rely on very push made mathematical or physical models, for example, relying on classical mechanics. For other medium sized systems, we can indeed apply some formally, physically, mathematically sound quantum mechanical or chemistry methods like the density functional. But it is for these molex systems that we so far can apply or test the most accurate state of the art quantum chemistry and quantum mechanical models. And these are the ones that UC two is currently dealing with and that are focused during this presentation. Atoms and molecules are indeed true manifestation of quantum offsets and they show discrete characterized by discrete energy levels that are actually the discrete spectrum of the corresponding molecular hamiltonian. And this can be naturally described by solving the corresponding Schrodinger equation that I show here in a very simplified form. So as you can see here, this is an eigenvalue problem where a is the molecular hamiltonian, c is the corresponding wave function of your system that completely describe describes your target molecule, and e is associated discrete energy associated with this wave function. Unfortunately, this equation can only be solved exactly for one electron systems, for example, like the hydrogen atom, and for all other atoms and molecules. We must rely therefore on approximate mathematical and physical models that seem only to approximate the exact solution of the Schrodinger equation. Perhaps among the most popular strategies to perform these approximate solutions in quantum chemistry, and perhaps also in quantum mechanics, is by researching through the so called variational principle. And here, the unknown wave function of your system is approximately given as a linear combination of known basis functions, and the corresponding coefficients are then obtained in a variational manner in such a way to minimize as much as possible the energy or the ground state or most stable energy of the system. Essentially, when they are resorting to the quantum chemistry method based on the variational principle, your classical computers are essentially trying to diagonalize very large, very rude matrices and in such a way as to obtain a diagonal matrix containing the corresponding eigenvalue energy values of your ground state or even excited state systems. This process consists certainly the computational bottom end of classical computers. So, just to give you here some idea, one of the prime or most accurate methodologies to perform high degron state or even side state energies, show exponential complexity in relation to the number of the electrons containing your target system. Okay, now that you have overhauled idea on how we approach quantum chemistry using classical computer, let's try to then approach start approaching how we use then quantum chemistry and quantum computing to also perform oplasmate solutions through this Schrodinger equation. In the noisy intermediate scale quantum theorem, quantum chemistry is traditionally approached, and approximate solutions to this Schrodinger equation are traditionally approached using hybrid quantum classical algorithms like the variational quantum eigen solver, in which QC two and several other Python quantum computing libraries are primarily based on. As you may know, in this algorithm, we start with a set of qubits in specific or initial states, and to this we apply a variational form that contains a series of quantum gates that depend on certain rotational qubit rotation parameters. If this parameterized quantum cpu and associated appropriate form of the molecular amygdala, we are then able to measure the spectation values, or in simple words, the energy of the molecular system that depends on the circuit parameters. This is obviously a cost function that we can be optimized. We're sorting to, or using an external classical optimizer that will then guess the best meters which to evaluate the circuit. So this process continues on and on until we obtain via convergence, the lowest possible energy of your system. I'm not going deep into details, but I just would like to let you know that UC two and any VQE algorithm need some initial information to start with and when we are talking about quantum chemistry, this initial information can only be done by running or by resorting before that traditional quantum chemistry goals. This will supply information like those needed, for example the buildup of the reference quantum circuit, and also some physical information that will be later on or physical quantities that will be later on be used to build up the molecular amygdalin in qubit representation. It's obvious that we need to provide a proper variational form or sats that will be used and in compunction chemistry it is very traditional to use physically motivated and satsy like those derived from dario couplet. Just to give you some overview here of the core design principles of QC two. QC two has been primarily designed to leverage existing tools and are as I'll be discussing later on the next slide, it uses very popular quantum chemistry python libraries like atomic simulation environment calculators and also standard data schemas to offload the necessary information. Initial information to build that deep start the quantum algorithm. Also, the CGU has decided to smoothly integrate with popular quantum computing libraries like Qskit, Nature and Benellan Qgan. QC two is also designed to be highly modular and features are built in algorithm package that is designed also to make it easier any extension and advancements individually. It's also very user friendly and has a very intuitive interface. As I'll be discussing later on, that enables users to focus on that research, obviously with minimal technical things. Here just give you an overview also of the workflow of QC two, as you can see here. For example, QC two uses Python bindings or custom atomic simulation environment calculators that run on the back behind the curtains your previewed quantum gems three program. This will then the SCE will then get the relevant information and save this into formatted data files that will be later on read by QC two. For example to build up Erb zeros, quantum circuit Er, molecular hamiltonian incubate representation, and also instantiate algorithm classes that will then be run using Qscape nature and penny lane QK. Here I just give you a very minimal minimal input of QC two to perform a CQE calculation on water. So as you can see here, after importing some important modules, the key aspect of QC two here starts with of its QC two data class that will contain information about the target system that we want to deal with and also provide a file name in which will be all the output of the calculation will be saved and might be also used to restart a new calculation the second step here is to specify and run an appropriate custom QC two is ase calculation calculator for your refuted quantum camp SQL. Here I'm just using the one from Byscf. Here we need to instantiate the corresponding algorithm class that will also be run afterwards. And that's it. Very simple and very straightforward. Here also I show another input which now uses or performs an ortho optimized VQE calculation, which is extension of VQE in which we are not only here optimizing the circuit parameters, but also allowing the initial molecular orbitals to be relaxing throughout the calculation. And as you can see here, the structure of the boot is exactly the same. The only difference here that we are now instantiating corresponding o VQE class. And this certainly reflects the modularity of juice in which we can play around with some blocks or some pieces and maintain the same structure of the input. Finally, I just show here some representative benchmark results using these qc two input examples. And here I show the ground state energy convergence of water in its equilibrium structure as obtained with qc two using CQE algorithm and ortho optimized VQe or oofqe using also qcg. Also here I show the expected convergent energies of ground state water as obtained using traditional quantum chemistry methods. And as you can clearly see here, the OVQE energy is financially well below the corresponding VQE as expected, right? And converges quite nicely and is nearly exactly to the traditional energy obtained using gas SES. So just, just a final remark. QC two is an ever growing open source project that is constantly being enriched by new algorithms and new features. And as an open source software we are warmly welcome any type of contribution, either if it's uncommon, new ideas, new approaches, or even folks. And here I put the link, full link of QC two GitHub free to go and visit and make your contribution. And thank you very much for inviting me and I wish you all an amazing Confi 42 quantum computing congressional.
...

Carlos Murilo Romero Rocha

Research Software Engineer @ Netherlands eScience Center

Carlos Murilo Romero Rocha's LinkedIn account



Awesome tech events for

Priority access to all content

Video hallway track

Community chat

Exclusive promotions and giveaways