Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPSA doc string out of date #106

Closed
Durd3nT opened this issue Nov 24, 2023 · 1 comment · Fixed by #148
Closed

SPSA doc string out of date #106

Durd3nT opened this issue Nov 24, 2023 · 1 comment · Fixed by #148
Labels
bug Something isn't working

Comments

@Durd3nT
Copy link
Contributor

Durd3nT commented Nov 24, 2023

Environment

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

What is happening?

The small code examples in the doc string of qiskit_algorithms/optimizers/spsa.py still show the old signature of optimizers in qiskit instead of the new scipy-style optimizers. This includes a method optimize that is now called minimize, returning point, value, niter instead of OptimizationResult objects, etc.

How can we reproduce the issue?

--

What should happen?

The code examples shout show the new way of using optimizers in qiskit.

Any suggestions?

No response

@Durd3nT Durd3nT added the bug Something isn't working label Nov 24, 2023
@woodsp-ibm
Copy link
Member

Thanks for noticing and raising this issue. It is also using StateFn which was part of qiskit.opflow which was deprecated and will no longer be present in the upcoming Qiskit 1.0. The first part could be re-done showing it used with an Estimator. Though I do not know how much value there is in that given its usage is no different syntactically than any other optimizer in that regard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants