# The lecture of Subspace-Search Variational Quantum Eigensolver method for beginners: result of calculation on hydrogen molecule

This entry is the sequel of "The lecture of Subspace-Search Variational Quantum Eigensolver method for beginners | blueqat". I derive the energy levels of hydrogen molecule. I used the UCCSD as a cluster to make the state and both cluster and hamiltonian are transformed by Bravyi-Kitaev transformation. Depth of them are both two. Evaluation function includes the constraint terms in order to derive the desired states,

$F(\theta)=\sum_{j=0}\langle \Phi_j \mid H \mid \Phi_j \rangle + \sum_k \mid \langle \Phi_j \mid (U_k - U_k^{aim.})\mid \Phi_j \rangle \mid$ -(1).

Then, observable $U_k$ and $U_k^{aim.}$ are the observables that are used as constraint and their aimed values. They are magnetic moment, squared spin and number of electrons. The methods to optimize are Powell and BFGS methods and I compare the result of each, respectively. The number of iteration of respective are 2000 and 22 times, respectively.

Fig. 1 shows the result of calculation of ground, triplet, singlet and doubly excited states on hydrogen molecule for diatomic bond length from 0.1 to 2.5(Å) in 0.1 pitch. As shown in Fig.1(Powell) ground and triplet states approximately match the exact value in major area. Though, singlet and doubly excited state deviate from exact them. In contrast, in case optimizer is BFGS method, ground, triplet and singlet states match exact values as shown in Fig. 1(BFGS). Doubly excited state is near on many points.

The result of ordinary VQD method has more high accuracy than that of SSVQE method in case optimizer is Powell method. In contrast, the result of ordinary VQE method is as accurate as that of SSVQE method in case optimizer is BFGS method.

Fig. 1 Calculated energy levels of ground, triplet, singlet and doubly excited states calculated by SSVQE that optimizers are Powell and BFGS method, respectively.

Time for calculation of SSVQE is a little longer than ordinary VQD method for both optimizers.

In addition, in case 4 states are calculated at once, more time is required.

Thus, this algorithm has the room to be improved. I will introduce about the method to calculate the off-diagonal term and show the result of calculation.