2
$\begingroup$

I'm new to using Qiskit Aqua, and I'm trying to get the intermediate values in the VQE algorithm to study the convergence. The documentation mentions an internal callback function, but I can't figure out how to use it. Any help is appreciated.

$\endgroup$
1
$\begingroup$

Check out this tutorial notebook https://github.com/Qiskit/qiskit-community-tutorials/blob/master/aqua/vqe_convergence.ipynb which should answer what you need

$\endgroup$
2
  • $\begingroup$ Thanks. This is exactly what I needed $\endgroup$
    – Jason
    Apr 30 '20 at 21:44
  • $\begingroup$ I had the same question, and found this answer is really useful. I have a followed up question. How can I get the parameters at each intermediate step? I tried to modify "store_intermediate_result" function by adding "para.append( parameters )". However, it seems like only the very last set of parameters are saved. Any ideas? $\endgroup$
    – fagd
    Dec 16 '20 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.