Skip to content

Bug in vqe_run when disp = True #205

@diogo-cruz

Description

@diogo-cruz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions