Variational Quantum Eigensolver

Variational Quantum Eigensolver

A quantum-classical hybrid algorithm for eigenvalue optimization

June 2023 - July 2023
Completed

Project Overview

At MIT Beaverworks, I implemented the variational quantum eigensolver (VQE), a quantum algorithm that iteratively seeks the ground state configuration of molecules, with applications in material science and medicine. I implemented the qubit-efficient VQE as described in the 2019 Beijing Institute of Physics paper, computing the ground state by iteratively manipulating quantum parameters encoded in our quantum "ansatz" circuit.

Each molecule is represented by a set of Pauli gates, taking in the Jordan-Wigner encoding of a molecule, and is converted to its Hamiltonian matrix representation, whose lowest eigenvalue is then found by tuning the circuit's parameters with the COBYLA optimizer. The outcome is an eigenvalue that represents the final ground state energy of the system (in Hartrees).

Our demonstration was on di-hydrogen (H2), ending within 8.1e-9 Hartree of the exact ground state energy after 83 energy evaluations. My implementation used 4 qubits rather than the standard 16-qubit implementations, achieved by qubit recycling.

VQE's advantage is still theoretical at this scale. Compared with quantum phase estimation (QPE), it needs only short circuits, so it can run on today's noisy hardware instead of waiting for error-corrected machines, and for molecules too large to simulate classically it's a leading candidate for quantum advantage. A molecule as small as H2 is still solved exactly by classical methods.

MIT Beaverworks VQE Implementation Demo

Algorithm Overview

The VQE algorithm combines quantum and classical computation to find ground state energies of molecular systems. The quantum computer prepares trial wavefunctions using a parametrized quantum circuit (ansatz), while a classical optimizer adjusts the parameters to minimize the energy expectation value.

The ansatz circuit

A two-qubit circuit: Hadamard and Rz(theta) on q0, a CNOT to q1, then X on q1

The 2-qubit ansatz from the Qiskit notebook: a Hadamard and a parameterized Rz(θ) on q0, a CNOT entangling q0 and q1, then an X on q1. The classical optimizer only tunes θ.

Energy landscape

Energy of the two-qubit warm-up Hamiltonian as theta sweeps from 0 to 2 pi

Qiskit warm-up on a 2-qubit Hamiltonian H = ½(XX + YY + ZZ): the energy the ansatz produces as θ sweeps from 0 to 2π. Powell's method found θ = 3.148, landing on the exact ground state energy of -1.5.

Research Paper Reference

Qubit-efficient VQE Implementation

Key Achievements

Successfully reduced qubit requirements from 16 to 4 qubits through innovative qubit recycling techniques. Converged to within 8.1e-9 Hartree of the exact H2 ground state energy in 83 energy evaluations. Unlike quantum phase estimation, VQE runs on short circuits suited to today's noisy hardware; its advantage over classical methods is theoretical at H2's scale and only expected for larger molecules.

Converging on H2

Energy at each of 83 COBYLA evaluations approaching the exact H2 ground state energy, with the error on a log scale

H2 ground state energy (STO-3G, 4 qubits, UCCSD ansatz) at each of the 83 energy evaluations COBYLA made. Top: energy against the exact FCI value of -1.13727 Ha. Bottom: the error on a log scale, ending at 8.1e-9 Ha.

Skills & Technologies

Q#QiskitQuantum-Classical Machine LearningQuantum Encoding

Project Info

Duration:

June 2023 - July 2023

Status:

Completed