VQE, Variational Quantum Eigensolver

Dear All,

I am a fresher to the field of quantum computing and I am going through VQE. I have a fundamental question regarding VQE.

From classical computational chemistry point of view, does the VQE find the global minimum for the given molecular input by doing what is called GEOMETRY OPTIMIZATION or simply does the SINGLE POINT CALCULATION for the given molecular geoemetry.

Thank you

1 Like

Hi @raghavv, and welcome to the forum!

Usually with VQE, single point calculations are the normal route, however, it is possible to use VQE for geometry optimzation.

When calculating a single VQE instance energy, one usually chooses a fixed geometry starting point for the molecule to generate a given Hamiltonian.
An optimization step is then performed over a set of parameters used to prepare a quantum state which is then used to calculate the energy for the Hamiltonian.

As an example, we can calculate the energy using:
E = \langle\Psi(\theta)|H|\Psi(\theta)\rangle = \langle 0 | U^{\dagger}_{\theta} H U_{\theta} | 0 \rangle

By optimizing over the parameters \theta we can find the quantum state |\Psi(\theta)\rangle that minimizes the energy of the Hamiltonian for our fixed geometry, and from the above expectation value calculation, the resulting numerical value.

If you wanted to find the optimal geometry configuration, we can calculate more energies with different geometries, giving us a new Hamiltonian for each.
It is then possible to use the differences in these energies in an outer optimization stage to find the optimal positions for a molecule.

It can also be noted that you are free to optimize over any parameter you’d like.

I hope this helped!

3 Likes

@mlxd. Thank you sir for detailed response. Is there any way we can do geometry optimization using VQE and get the cartesian coordinate of the optimized geometry using Pennylane. Thank you

Hi @raghavv, glad to help. Here is a tutorial on performing geometry optimization with PennyLane for the trihydrogen cation (H3+). This should be a good starting place to try with other molecules too.

1 Like

Thank you so much @mlxd . Wil take into look into it.

1 Like

Let us know how it goes @raghavv!

Sure.! Thank you @CatalinaAlbornoz

@raghavv - were you able to make progress in generalizing from the tutorial to other molecules. I’m (very) new to quantum chemistry myself. I wonder if there is a straightforward way to apply this approach to H2O or other more complex molecules. I’d be very interested to hear your experience

Hi @paul and welcome to the forum!

It is easy and straightforward to apply the geometry optimisation algorithm outlined in this tutorial for the trihydrogen cation, as a case study, to other molecules.

There are basically two parts of the workflow that need to be updated. The first part includes the molecular properties such as atomic symbols and coordinates and the second part is the circuit. For a molecule such as LiH, as an example, you can replace the trihydrogen cation information with:

symbols = ["Li", "H"]
geometry = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 2.969280527])   

and the circuit might be built adaptively following this tutorial. Then you can follow the procedure in the geometry optimisation tutorial to optimise the geometry of LiH.

We have used the same procedure to optimise the geometry of H2, H3 cation, BeH2 and H2O and the results are discussed in this paper.

Please feel free to let us know if you have any questions.

Thanks so much. I’m trying to help my high-school aged son with a quantum chemistry project. It’s a steep learning curve for me also, and your guidance here is very helpful!

Thanks again for the links to the tutorials. Is the CCCBDB a good source for initial geometry data for input into the adaptive circuit procedure? And is there a similar source of information for the number of active orbitals? Thanks!

@paul . I have not really tried the code optimizing other molecules (apart from H3+), however I think @sjahangiri has shared the appropriate material for such an effort. In case you are looking for geometry, (source other than CCCBDB, to build new molecules of your choice), you can use a couple of open source molecule builders such as Avogadro(https://avogadro.cc/) or IQmol (http://iqmol.org/). These can be really handy. Hope this helps.

1 Like