Code
qcr:2607.59083.1

Molecular Geometry Optimization with VQE

This PennyLane demo shows how to find the equilibrium geometry of a molecule by recasting geometry optimization as a single variational quantum algorithm. The central idea is that the electronic Hamiltonian is a parametrized observable depending on the nuclear coordinates, so the cost function, the expectation value of that Hamiltonian in a trial state prepared by the circuit, depends jointly on the circuit parameters and the atomic positions. Rather than the nested loop used classically, where the electronic state is re-optimized for every candidate geometry, the demo performs a joint gradient-descent optimization that updates circuit parameters and nuclear coordinates simultaneously, using the fact that the gradient with respect to the coordinates is the expectation value of the derivative of the Hamiltonian. It walks through building the parametrized Hamiltonian, designing a variational ansatz for the electronic trial state, defining the joint cost, and optimizing both parameter sets to relax the trihydrogen cation to its equilibrium equilateral-triangle geometry on the potential energy surface. It matters because accurate molecular geometries are the starting point for most quantum chemistry simulations, and this demonstrates a fully quantum, differentiable route to obtaining them without a costly outer optimization loop.
Chemistry
Qubit
Circuit-based
Uploaded 4 weeks ago
8
Views
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

PennyLaneAI/demos
675242
README.md

Molecular Geometry Optimization with VQE

This PennyLane demo shows how to find the equilibrium geometry of a molecule by recasting geometry optimization as a single variational quantum algorithm. The central idea is that the electronic Hamiltonian is a parametrized observable depending on the nuclear coordinates, so the cost function, the expectation value of that Hamiltonian in a trial state prepared by the circuit, depends jointly on the circuit parameters and the atomic positions. Rather than the nested loop used classically, where the electronic state is re-optimized for every candidate geometry, the demo performs a joint gradient-descent optimization that updates circuit parameters and nuclear coordinates simultaneously, using the fact that the gradient with respect to the coordinates is the expectation value of the derivative of the Hamiltonian. It walks through building the parametrized Hamiltonian, designing a variational ansatz for the electronic trial state, defining the joint cost, and optimizing both parameter sets to relax the trihydrogen cation to its equilibrium equilateral-triangle geometry on the potential energy surface. It matters because accurate molecular geometries are the starting point for most quantum chemistry simulations, and this demonstrates a fully quantum, differentiable route to obtaining them without a costly outer optimization loop.

Run it

pip install -r requirements.txt
python demo.py

Source and license

Imported from demonstrations_v2/tutorial_mol_geo_opt/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Publication

doi:10.48550/arxiv.2106.13840
Variational quantum algorithm for molecular geometry optimization

Alain Delgado, Juan Miguel Arrazola, Soran Jahangiri, Zeyue Niu, Josh Izaac, Chase Roberts, Nathan Killoran

Versions

v1 Latest
Jul 14, 2026
qcr:2607.59083.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

Tools used

PennyLane

Keywords

pennylane
quantum-chemistry
vqe
geometry-optimization
variational-quantum-eigensolver
potential-energy-surface

You may also like5