I want to find the estimate of the ground state energy of my Hamiltonian H
that is implemented as PauliSumOp
in my variable H_op
. I then prepare an ansatz circuit circ_ansatz
with 5 parameters. Then I try to run the thing with
my_vqe = VQE(ansatz = circ_ansatz, optimizer=SPSA, quantum_instance=Aer.get_backend('aer_simulator'), initial_point=[0.5]*N_iters)
and then print(my_vqe.compute_minimum_eigenvalue(H_op))
but I get the following error: print(my_vqe.compute_minimum_eigenvalue(H_op)) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/qiskit/algorithms/minimum_eigen_solvers/vqe.py", line 526, in compute_minimum_eigenvalue opt_result = self.optimizer( # pylint: disable=not-callable TypeError: __init__() got an unexpected keyword argument 'fun'
Any help is highly appreciated!