Skip to content

QNSPSA docstring wrong about callback arg order #243

@BryceFuller

Description

@BryceFuller

Environment

  • Qiskit Algorithms version:
  • Python version:
  • Operating system:

What is happening?

The docstring states that:

callback: A callback function passed information in each iteration step. The
information is, in this order: the parameters, the function value, the number
of function evaluations, the stepsize, whether the step was accepted.

I do not find this to be the case, it looks like it might actually be:# function evals, params, function value, step_size, accepted

How can we reproduce the issue?

Run the tests for SPSA and print out the args to the callback. You can immediate see that the params are not first.

What should happen?

The docstring should be updated.

Any suggestions?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions