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

Improve HHL/Shor deprecated messages #8699

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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