Skip to content

Commit

Permalink
Improve HHL/Shor deprecated messages (Qiskit#8699)
Browse files Browse the repository at this point in the history
  • Loading branch information
manoelmarques authored and ewinston committed Sep 8, 2022
1 parent ea4ebed commit ee0a4f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 4 additions & 2 deletions qiskit/algorithms/factorizers/shor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ class Shor:
"""

@deprecate_function(
"The Shor class is deprecated as of Qiskit Terra 0.22.0 "
"and will be removed no sooner than 3 months after the release date. "
"""The Shor 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-algorithms/shor.html
"""
)
def __init__(self, quantum_instance: Optional[Union[QuantumInstance, Backend]] = None) -> None:
"""
Expand Down
13 changes: 10 additions & 3 deletions qiskit/algorithms/linear_solvers/hhl.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,19 @@ class HHL(LinearSolver):
using the conjugate gradient method. Here :math:`\kappa` denotes the condition number of the
system and :math:`\epsilon` the accuracy of the approximation.
The HHL is a quantum algorithm to estimate a function of the solution with running time
The deprecated HHL is a quantum algorithm to estimate a function of the solution with running time
complexity of :math:`\mathcal{ O }(\log(N)s^{2}\kappa^{2}/\epsilon)` when
:math:`A` is a Hermitian matrix under the assumptions of efficient oracles for loading the
data, Hamiltonian simulation and computing a function of the solution. This is an exponential
speed up in the size of the system, however one crucial remark to keep in mind is that the
classical algorithm returns the full solution, while the HHL can only approximate functions of
the solution vector.
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
`HHL <https://qiskit.org/textbook/ch-applications/hhl_tutorial.html>`_
Examples:
.. jupyter-execute::
Expand Down Expand Up @@ -104,8 +109,10 @@ class HHL(LinearSolver):
"""

@deprecate_function(
"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. "
"""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"
"""
)
def __init__(
self,
Expand Down

0 comments on commit ee0a4f1

Please sign in to comment.