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

Add deprecation warning to algs module #10406

Merged
merged 8 commits into from
Jul 20, 2023
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
21 changes: 21 additions & 0 deletions qiskit/algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -297,6 +306,8 @@
AlgorithmJob

"""
import warnings

from .algorithm_job import AlgorithmJob
from .algorithm_result import AlgorithmResult
from .evolvers import EvolutionResult, EvolutionProblem
Expand Down Expand Up @@ -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,
)
22 changes: 22 additions & 0 deletions releasenotes/notes/deprecate-algorithms-7149dee2da586549.yaml
Original file line number Diff line number Diff line change
@@ -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.