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

HHL class is deprecated #9436

Closed
zohimchandani opened this issue Jan 23, 2023 · 1 comment · Fixed by #9832
Closed

HHL class is deprecated #9436

zohimchandani opened this issue Jan 23, 2023 · 1 comment · Fixed by #9832
Assignees
Labels
bug Something isn't working mod: algorithms Related to the Algorithms module

Comments

@zohimchandani
Copy link

Environment

  • Qiskit Terra version: 0.22.0
  • Python version: 3.8.15
  • Operating system: Linux

What is happening?

Running the code snippet below

import numpy as np
from qiskit.algorithms.linear_solvers.numpy_linear_solver import NumPyLinearSolver
from qiskit.algorithms.linear_solvers.hhl import HHL


matrix = np.array([[1, -1/3], [-1/3, 1]])
vector = np.array([1, 0])
naive_hhl_solution = HHL().solve(matrix, vector)

which yields the following warning:


/tmp/ipykernel_68331/2608894596.py:6: DeprecationWarning: The HHL class is deprecated as of Qiskit Terra 0.22.0 and will be removed
        no sooner than 3 months after the release date.
        It is replaced by the tutorial at https://qiskit.org/textbook/ch-applications/hhl_tutorial.html"
        
  naive_hhl_solution = HHL().solve(matrix, vector)

However, the tutorial it refers to in the warning message contains the same code as the one I am running.

If the HHL class is being deprecated, what is it being replaced with?

Thanks.

How can we reproduce the issue?

See code snippet above

What should happen?

No warning messages should appear

Any suggestions?

No response

@zohimchandani zohimchandani added the bug Something isn't working label Jan 23, 2023
@woodsp-ibm
Copy link
Member

It seems the page has only been updated in the beta textbook, which is the default on the qiskit docs page, not in the old one. In this new one the HHL section has a different link https://learn.qiskit.org/course/ch-applications/solving-linear-systems-of-equations-using-hhl-and-its-qiskit-implementation and this does include the replacement code (so far its the same code just moved out of Terra into a separate repo)

@woodsp-ibm woodsp-ibm added the mod: algorithms Related to the Algorithms module label Jan 23, 2023
@jlapeyre jlapeyre changed the title HHL class is depracated HHL class is deprecated Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mod: algorithms Related to the Algorithms module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants