Using the Qiskit textbook I have been using a VQE to find the ground state energy of Hydrogen at different interatomic distances on a quantum machine. However, the average energy value I will always calculate at a interatomic distance of 0.735 A (groundstate) is ~ 1.06 Hartrees while the exact value calculated with the NumpyEigensolver is 1.1373... Hartrees. I am unable to see what is causing this inaccuracy and at higher interatomic distances this inaccuracy increases. In some cases the VQE values for the ground energy are above even above the HartreeFock energy given by:
I was under the impression that the qubits are initialised in the HartreeFock initial state so how can the VQE energy given by:
be above its initial state if the VQE is meant to be minimizing the value? Unless I am miss understanding how the algorithm is working? Is this inaccuracy just an effect of quantum noise and decoherence in NISQ era machinery or is this an error with my method.
This is a graph of my VQE results (Blue) and the exact values (Orange) to demonstrate the inaccuracy:
The main loop of my code which retrieves these values is:
for i in np.arange(0.25,4.25,0.25): molecule = Molecule(geometry=[['H', [0., 0., 0.]], ['H', [0., 0., i]]], charge=0, multiplicity=1) driver = PySCFDriver(molecule = molecule, unit=UnitsType.ANGSTROM, basis='sto3g') #Map fermionic hamiltonian to qubit hamiltonian transformation = FermionicTransformation(qubit_mapping=FermionicQubitMappingType.PARITY, two_qubit_reduction=True, freeze_core=True) numpy_solver = NumPyMinimumEigensolver() #Initialize the VQE solver vqe_solver = VQEUCCSDFactory(QuantumInstance(backend = backend, shots = 1024)) #Ground state algorithm calculation_VQE = GroundStateEigensolver(transformation, vqe_solver) calculation_numpy = GroundStateEigensolver(transformation, numpy_solver) #Calculate results VQE_result = calculation_VQE.solve(driver) VQE_results_array.append(VQE_result.total_energies) hf_energies.append(VQE_result.hartree_fock_energy) NRE.append(VQE_result.nuclear_repulsion_energy) Numpy_result = calculation_numpy.solve(driver) Numpy_result_array.append(Numpy_result.total_energies)