{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# ADAPT-VQE algorithm\n", "\n", "\n", "This tutorial explains the implementation of Adaptive Derivative-Assembled Pseudo-Trotter VQE (ADAPT-VQE) algorithm introduced in this [paper](https://www.nature.com/articles/s41467-019-10988-2). \n", "\n", "In VQE (see this [tutorial](https://nvidia.github.io/cuda-quantum/latest/applications/python/vqe_advanced.html)), a parameterized wave-function using UCCSD ansatz is generated and variationally tuned to minimize the expectation value of the molecular electronic Hamiltonian. In VQE approach, we include all possible single and double excitations of electrons from the occupied spin molecular orbitals of a reference state (Hartree Fock) to the unoccupied spin molecular orbitals. The excessive depth of these quantum circuits make them ill-suited for applications in the NISQ regime. \n", "\n", "The VQE issue has led to the ADAPT-VQE proposal in which the ansatz wave-functions is constructed through the action of a selective subset of possible unitary operators , i.e., only those operators whose inclusion in the ansatz can potentially lead to the largest decrease in the expectation value of the molecular electronic Hamiltonian. In ADAPT-VQE, the ansatz is grown iteratively by appending a sequence of unitary operators to the reference Hartree-Fock state. At each iteration, the unitary operator to be applied is chosen according to a simple criterion based on the gradient of the expectation value of the Hamiltonian. Therefore, allowing us to build a compact quantum circuit which can lead to more efficient use of quantum resources.\n", "\n", "The ADAPT-VQE algorithm consists of 8 steps:\n", "\n", "1- On classical hardware, compute one- and two-electron integrals, and transform the fermionic Hamiltonian into a qubit representation using an appropriate transformation: Jordan–Wigner, Bravyi–Kitaev, etc. For this tutorial, we will use Jordan Wigner.\n", "\n", "2- Define an “Operator Pool”. This is simply a collection of operator definitions which will be used to construct the ansatz. For this tutorial, we will use UCCSD.\n", "\n", "3- Initialize qubits to an appropriate reference state. Here, we use HF state to initialize the qubits.\n", "\n", "4- Prepare a trial state with the current ansatz.\n", "\n", "5- Measure the commutator of the Hamiltonian with each operator in the pool to get the gradient. \n", "\n", "6- If the norm of the gradient vector is smaller than some threshold, ε, exit. otherwise, identify the operator with the largest gradient and add this single operator to the left end of the ansatz, with a new variational parameter.\n", "\n", "7- Perform a VQE experiment to re-optimize all parameters in the ansatz.\n", "\n", "8- go to step 4\n", "\n", "Below is a Schematic depiction of the ADAPT-VQE algorithm \n", "\n", "