rigetti / grove

Quantum algorithms built using pyQuil.
http://rigetti.com/forest
Apache License 2.0
375 stars 123 forks source link

Bug in vqe_run when disp = True #205

Open diogo-cruz opened 5 years ago

diogo-cruz commented 5 years ago

The documentation of vqe_run in the VQE class indicates that we should use the argument disp = True if we want the expectation and parameters to be printed at each iteration. However, in line 123 of vqe.py:

self._disp_fun = disp if disp is not None else lambda x: None

So we actually have to use disp = print for it to work as intended.