Skip to content

Commit

Permalink
@deprecate_arguments and @deprecate_function add deprecation to d…
Browse files Browse the repository at this point in the history
…ocstring (Qiskit#9790)
  • Loading branch information
Eric-Arellano committed Mar 15, 2023
1 parent b5b6de5 commit 3773fd0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
7 changes: 3 additions & 4 deletions qiskit/algorithms/factorizers/shor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ 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.
It is replaced by the tutorial at https://qiskit.org/textbook/ch-algorithms/shor.html
""",
"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",
since="0.22.0",
)
def __init__(self, quantum_instance: Optional[Union[QuantumInstance, Backend]] = None) -> None:
Expand Down
7 changes: 3 additions & 4 deletions qiskit/algorithms/linear_solvers/hhl.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ 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.
It is replaced by the tutorial at https://qiskit.org/textbook/ch-applications/hhl_tutorial.html"
""",
"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",
since="0.22.0",
)
def __init__(
Expand Down
6 changes: 3 additions & 3 deletions qiskit/algorithms/phase_estimators/phase_estimation_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def circuit_result(self) -> Result:

@property
@deprecate_function(
"""The 'PhaseEstimationResult.most_likely_phase' attribute
is deprecated as of 0.18.0 and will be removed no earlier than 3 months
after the release date. It has been renamed as the 'phase' attribute.""",
"The 'PhaseEstimationResult.most_likely_phase' attribute is deprecated as of 0.18.0 and "
"will be removed no earlier than 3 months after the release date. It has been renamed as "
"the 'phase' attribute.",
since="0.18.0",
)
def most_likely_phase(self) -> float:
Expand Down

0 comments on commit 3773fd0

Please sign in to comment.