PennyLane is a Python 3 software framework for optimization and machine learning of quantum and hybrid quantumclassical computations. The library provides a unified architecture for near-term quantum computing devices, supporting both qubit and continuous-variable paradigms. PennyLane's core feature is the ability to compute gradients of variational quantum circuits in a way that is compatible with classical techniques such as backpropagation. PennyLane thus extends the automatic differentiation algorithms common in optimization and machine learning to include quantum and hybrid computations. A plugin system makes the framework compatible with any gate-based quantum simulator or hardware.We provide plugins for Strawberry Fields, Rigetti Forest, Qiskit, and ProjectQ, allowing PennyLane optimizations to be run on publicly accessible quantum devices provided by Rigetti and IBM Q. On the classical front, PennyLane interfaces with accelerated machine learning libraries such as TensorFlow, PyTorch, and autograd. PennyLane can be used for the optimization of variational quantum eigensolvers, quantum approximate optimization, quantum machine learning models, and many other applications.
This work describes the theoretical foundation for all quantum chemistry functionality in PennyLane, a quantum computing software library specializing in quantum differentiable programming. We provide an overview of fundamental concepts in quantum chemistry, including the basic principles of the Hartree-Fock method. A flagship feature in PennyLane is the differentiable Hartree-Fock solver, allowing users to compute exact gradients of molecular Hamiltonians with respect to nuclear coordinates and basis set parameters. PennyLane provides specialized operations for quantum chemistry, including excitation gates as Givens rotations and templates for quantum chemistry circuits. Moreover, built-in simulators exploit sparse matrix techniques for representing molecular Hamiltonians that lead to fast simulation for quantum chemistry applications. In combination with PennyLane's existing methods for constructing, optimizing, and executing circuits, these methods allow users to implement a wide range of quantum algorithms for quantum chemistry. We discuss how PennyLane can be used to implement variational algorithms for calculating ground-state energies, excited-state energies, and energy derivatives, all of which can be differentiated with respect to both circuit and Hamiltonian parameters. We conclude with an example workflow describing how to jointly optimize circuit parameters, nuclear coordinates, and basis set parameters for quantum chemistry algorithms. By combining insights from quantum computing, computational chemistry, and machine learning, PennyLane is the first library for differentiable quantum computational chemistry.
To understand the chemical properties of molecules, it is often important to study derivatives of energies with respect to nuclear coordinates or external fields. Quantum algorithms for computing energy derivatives have been proposed, but only limited work has been done to address the specific challenges that arise in this context, where calculations are more complicated and involve more stringent requirements on accuracy compared to single-point energy calculations. In this work, we introduce a technique to improve the performance of variational quantum circuits calculating energy derivatives. The method, which we refer to as tailgating, is an adaptive procedure that selects gates based on their gradient with respect to the expectation value of Hamiltonian derivatives. These gates are then added at the end of a quantum circuit originally designed to calculate ground-or excited-state energies. A distinguishing feature of this approach is that the appended gates do not need to be optimized: their parameters can be set to zero and varied only for the purpose of computing energy derivatives, via calculating derivatives with respect to circuit parameters. We support the validity of this method by establishing sufficient conditions for a circuit to compute accurate energy gradients. This is achieved through a connection between energy derivatives and eigenstates of Taylor approximations of the Hamiltonian. We illustrate the advantages of the tailgating approach by performing simulations calculating the vibrational modes of beryllium hydride and water: quantities that depend on second-order energy derivatives.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.