XanaduAI / QHack2022

QHack—The one-of-a-kind quantum computing hackathon
https://qhack.ai
87 stars 122 forks source link

[AWS Power Up] Parameter shift rule for a parameter dependent Hamiltonian to study convergence properties #18

Closed MQS-mark closed 2 years ago

MQS-mark commented 2 years ago

Team Name:

MQS

Project Description:

In a VQE algorithm, the parameters of the variational circuit are updated by the classical optimizer. Classical optimizers rely on calculating the gradient of the cost function at each iteration. In the case of applying VQE to find the ground state of a molecule, the cost function is the expectation value of the Hamiltonian of the molecular system. There are multiple ways to calculate the gradient of a function, and one of the best ways to do this is using the parameter shift rule. In the most commonly studied case of finding the ground state energy of a molecule, the Hamiltonian itself is independent of the parameters θ. For some models, such as PCM-VQE, which models the ground state energy of a molecule surrounded by an implicit solvent, this is no longer true. In such a model, the Hamiltonian itself is modified by the electronic wavefunction because the electronic structure interacts with the solvent, meaning that we have a parameter dependent Hamiltonian. This means that the parameter-shift rule needs to be modified in order to be used.

Therefore, for situations with a parameter-dependent Hamiltonian, a custom parameter-shift rule needs to be derived. In the code provided in the PCM-VQE preprint, the finite difference method is used for gradient calculation. In the paper it is mentioned that it has not been yet determined how the parameter-dependence of the Hamiltonian affects the convergence properties of the VQE algorithm. As a first step to exploring this topic, it would be beneficial to replace the finite-difference method with a parameter-shift rule. This would disentangle the approximation errors from the genuinely novel effects that the simulation of this model carries with it. To finally assess the convergence properties, there are lots of variables to explore, such as initial parameter values, size of orbital basis set and the gate composition of the circuit.

pdf version with equations and more information: https://github.com/MQSdk/parameter_shift_H_theta/blob/main/description.pdf

Source code:

https://github.com/MQSdk/parameter_shift_H_theta

Resource Estimate:

We will use the AWS credits to evaluate the convergence properties on different quantum computers (IONQ and Rigetti) and do a thorough analysis of different circuit implementations and initial parameter settings. Further, we will also increase the number of orbitals in the basis set which requires increasingly more qubits to evaluate the threshold of possible chemical systems to run on the quantum hardware available in AWS Braket.

isaacdevlugt commented 2 years ago

Thank you for your Power Up submission! As a reminder, the final deadline for your project is February 25 at 17h00 EST. Submissions should be done here: https://github.com/XanaduAI/QHack/issues/new?assignees=&labels=&template=open_hackathon.md&title=%5BENTRY%5D+Your+Project+Title

This issue will be closed shortly.

Good luck!