This project repo was created as part of the Quantum Open Source Foundation (QOSF) Mentorship Program.
Recently, several works, namely Stokes et al., have proposed and investigated the use of "quantum natural gradients" (QNG) to accelerate the optimization step of variational quantum algorithms.
To provide an in-depth and intuitive explanation of quantum natural gradients, we wrote the following blogposts:
-
Rethinking Gradient Descent With Quantum Natural Gradient by Maggie Li
-
Gradient Descent from the Ground Up by Lana Bozanic
In addition, we provide several tutorials in this repo for running and analyzing VQE calculations of small quantum systems using quantum natural gradient. We implemented the code in PennyLane and used routines from QuTiP for visualization.
We investigate the following systems:
- Single qubit rotations (where we can visualize the optimization paths on the Bloch sphere)
- H2 molecule. In this example, we construct the Hamiltonian using PennyLane's
qchem
module. We additionally provide a notebook that runs Yamamoto's simplified Hydrogen example. - LiH molecule
and ran VQE calculations using "vanilla" gradient descent and gradient descent that uses quantum natural gradients for comparison. We provide several methods for visualizing the performance and optimization paths, and we empirically explore the robustness of QNG to parameter initialization here.