diff --git a/qiskit/algorithms/__init__.py b/qiskit/algorithms/__init__.py index b9dc8b8a4ed9..272d7be20bc5 100644 --- a/qiskit/algorithms/__init__.py +++ b/qiskit/algorithms/__init__.py @@ -14,6 +14,15 @@ ===================================== Algorithms (:mod:`qiskit.algorithms`) ===================================== + +.. deprecated:: 0.25.0 + + The :mod:`qiskit.algorithms` module has been migrated to an independent package: + https://github.com/qiskit-community/qiskit-algorithms. + The current import path is deprecated and will be removed no earlier + than 3 months after the release date. You can run ``pip install qiskit_algorithms`` + and import ``from qiskit_algorithms`` instead. + It contains a collection of quantum algorithms, for use with quantum computers, to carry out research and investigate how to solve problems in different domains on near-term quantum devices with short depth circuits. @@ -297,6 +306,8 @@ AlgorithmJob """ +import warnings + from .algorithm_job import AlgorithmJob from .algorithm_result import AlgorithmResult from .evolvers import EvolutionResult, EvolutionProblem @@ -412,3 +423,13 @@ "VarQTE", "VarQTEResult", ] + +warnings.warn( + "``qiskit.algorithms`` has been migrated to an independent package: " + "https://github.com/qiskit-community/qiskit-algorithms. " + "The ``qiskit.algorithms`` import path is deprecated as of qiskit-terra 0.25.0 and " + "will be removed no earlier than 3 months after the release date. " + "Please run ``pip install qiskit_algorithms`` and use ``import qiskit_algorithms`` instead.", + category=DeprecationWarning, + stacklevel=2, +) diff --git a/releasenotes/notes/deprecate-algorithms-7149dee2da586549.yaml b/releasenotes/notes/deprecate-algorithms-7149dee2da586549.yaml new file mode 100644 index 000000000000..646b2dfd62d7 --- /dev/null +++ b/releasenotes/notes/deprecate-algorithms-7149dee2da586549.yaml @@ -0,0 +1,22 @@ +--- +deprecations: + - | + The :mod:`qiskit.algorithms` module has been deprecated and will be removed + in a future release. It has been superseded by a new standalone library + ``qiskit-algorithms`` which can be found on PyPi or on Github here: + + https://github.com/qiskit-community/qiskit-algorithms + + The :mod:`qiskit.algorithms` will continue to work as before and bug fixes + will be made to module until its future removal, but active development + of new features has moved to the new package. + If you're relying on :mod:`qiskit.algorithms` you should update your + requirements to also include ``qiskit-algorithms`` and update the imports + from ``qiskit.algorithms`` to ``qiskit_algorithms``. If you have not yet + migrated from ``QuantumInstance``-based to primitives-based algorithms, + you should follow the migration guidelines in https://qisk.it/algo_migration. + The decision to migrate the :mod:`~.algorithms` module to a + separate package was made to clarify the purpose Qiskit and + make a distinction between the tools and libraries built on top of it. + +