Closed tomohiro-soejima closed 1 year ago
I would like to investigate this problem?
This appears to have been resolved via Qiskit/qiskit-aer#1595. Please re-open an issue on either Aer or qiskit_algorithms
if there are still problems.
Thank you!
Informations
3.8.13
What is the current behavior?
When running VQE for the two spin Heisenberg model with the Hamiltonian
H = -(X^X) - (Y^Y) - (Z^Z)
, whose ground state energy is-1
. However, when I use a custom ansatz and run VQE withdensity_matrix
backend, VQE reports an energy of-3
, which is lower than the ground state energy.I attach the circuit diagram of the ansatz below:![image](https://user-images.githubusercontent.com/29153822/183784133-f7faaaa5-a129-4ca8-a985-0c38d5e20688.png)
Note that this is a rather pathological ansatz, in that the final state is independent of the parameter
theta
. Perhaps that is a cause of the problem?Steps to reproduce the problem
Here is the MWE to reproduce the problem:
This prints out the following:
What is the expected behavior?
VQE finds the energy of
-1
, which is the energy of the state00
.Suggested solutions
If we uncomment the final line of the MWE (
statevector_simulator
computation) and run it, it prints the following result and runtime warning messages:This seems to signal there is a divide by zero error lurking around. Perhaps what is happening with the
density_matrix
calculation is some kind of silent divide by zero error?