# Derivative of hamiltonian derived by Variational Quantum Eigensolver(VQE) method

Introduction:

Deriving the derivative of observables has been the one of main theme of Variational Quantum Eigensolver(VQE) method since it was bring into the world. The first is the method for UCC proposed by the group read by Dr. Alan Asupuru-Guzik in 2017[1]. For now, ADAPT-VQE[2] that uses the derivatives for optimizing and both Multiscale-Contracted VQE[3] and Subspace-Search VQE[4] have the original method to derive them. Classical computers calculate the derivatives by dividing the Finite-Difference-Method(FDM) of function that is moved given small value forward and backward by small value. Although, this value should also be calculated by quantum computers.

Therefore, I derived the derivatives of each variable on UCC-VQE method and compared to that derived by FDM.

method:

At first, hamiltonian, cluster terms and basis are transformed by Bravyi-Kitaev transformation into Pauli words.

All terms of hamiltonian and cluster are trotterized for the next step.

I wrote the details of treatment before calculation on VQE method in previous entry.

Review of Variational Quantum Eigensolver: part 1 | blueqat

And, the state can be expressed as,

﻿$\mid \Phi \rangle = \Pi_j\Pi_k^{N_{op}^j}exp(-i\theta_j c_k^j P_k)\mid \Phi_{ini.}\rangle=U\mid \Phi_{ini.} \rangle$﻿ .

Then, ﻿$\mid \Phi_{ini.}\rangle$﻿ is the initial state. Derivative of trial energy have the terms for all coefficient with Pauli operators.

Hence, it is expressed as,

﻿$V_j^k(\theta)= exp(-i\theta_n c_{N_{op}^n}^n P_{N_{op}^n}^n)\cdots exp(-\theta_j c_{k+1}^j P_{k+1}^j)P_k^j exp(-i\theta_j c_k^j P_k^j)exp(-i\theta_j c_{k-1}^j P_{k-1}^j)\cdots exp(-i\theta_0 c_0^0 P_0^0)$﻿

﻿$\partial /\partial \theta_j \langle \Phi \mid H \mid \Phi \rangle = \sum_k^{N_{op}^j}c_k^j Im(\langle \Phi_{ini.} \mid UHV_j^k(\theta)\mid \Phi_{ini.} \rangle)$﻿ .

Then, I define hamiltonian as ﻿$H=\sum_{j}h_jO_j$﻿ with coefficient $h_j$ and Pauli operator $O_j$.

As shown in Fig. 1, the derivatives of variable ﻿$\theta_j$﻿ can be calculated by making superpositioned state between ordinary and derivative state by ancilla bit.

Derivative itself can be derived by measuring ancilla bit first and measuring others. Difference between the probability of the state in case ancilla is 0 and 1 is the imaginary part of eq.(2).

Fig. 1 Quantum circuit to derive the derivative of trial energy for ﻿$\theta_j$﻿ .

Result:

In this chapter, I show the result of calculation of derivatives on ground, triplet, singlet and doubly excited states of hydrogen molecules for diatomic bond length r=0.7(Angstrom). I applied the UCCSD for all states except the ground state. The depth of hamiltonian and cluster terms are both two. The optimization method is Powell method that limit of number of iteration is 2000 times.

As shown in Fig.2, derivatives derived by eq. (2) have apparent tendency. Crucial variables have non-negligible values. In contrast, other variables have negligible values. The derivatives derived by FDM have the same tendency. But, converged derivatives that eq. (2) is negligible are non-negligible. Even on classical computers, derivatives derived quantum computers have higher accuracy than those derived by FDM.

In addition, the result of calculation tend to be trapped by local minimums in case derivative of some variable are above 0.1 according to Table. 1.

Fig. 2 The common logarithm of derivations of each variable derived by eq.(2)(blue line) and FDM(orange line) on ground, triplet, singlet and doubly excited state of hydrogen molecule for diatomic bond length r=0.7(Angstrom).

Table. 1 The derived energy levels and common logarithms of difference between energy and exact value of (log error) of ground, triplet, singlet and doubly excited state.

As the result, it is confirmed that deriving derivatives of trial energy is important even for simulation on classical computers. Although, it requires far more times to take than ordinary VQE method. Hence, compromising ideas to improve the accuracy are required for VQE method.

Derivative of hamiltonian derived by Variational Quantum Eigensolver(VQE) method: Suppremental Information | blueqat

[1] J. Romero, and et. al., arXiv:1701.2691v2[quant-ph](2017)

[2] H. R. Grimsey, and et. al., Nat. Comm.10.3007(2019)

[3] Parrish, R. M., and et. al., arXiv:1906.08728v1[quant-ph](2019)

[4] K. Mitarai, and et. al., arXiv:1905.04054v2[quant-ph](2019)