Skip to content

Commit

Permalink
suppressing warnigns in Array docs, adding deprecation warnings at th…
Browse files Browse the repository at this point in the history
…e module level documentation for array and dispatch
  • Loading branch information
DanPuzzuoli committed Mar 12, 2024
1 parent 28bce48 commit 6cd401d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions qiskit_dynamics/array/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
.. currentmodule:: qiskit_dynamics.array
.. warning::
The ``array`` and ``dispatch`` submodules of Qiskit Dynamics have been deprecated as of version
0.5.0. The use of the ``Array`` class is no longer required to work with different array
libraries in Qiskit Dynamics, and is broken in some cases. Refer to the user guide entry on
using different array libraries with Qiskit Dynamics. Users can now work directly with the
supported array type of their choice, without the need to wrap them to enable dispatching. The
``array`` and ``dispatch`` submodules will be removed in version 0.6.0.
This module contains an :class:`Array` class that wraps N-dimensional array objects from different
libraries. It enables working with different array libraries through a common NumPy-based interface,
along with other functionality for writing array-library agnostic code.
Expand All @@ -41,6 +51,12 @@
Basic Usage
-----------
.. jupyter-execute::
:hide-code:
# suppress deprecation warnings
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
When using the default ``numpy`` backend :class:`Array`, objects can be used interchangably with
``numpy.ndarray``. When ``numpy`` functions are applied to an :class:`Array` object the return type
will be an :class:`Array` instead of an ``numpy.ndarray``.
Expand Down
9 changes: 9 additions & 0 deletions qiskit_dynamics/arraylias/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
.. currentmodule:: qiskit_dynamics.arraylias
.. warning::
The ``array`` and ``dispatch`` submodules of Qiskit Dynamics have been deprecated as of version
0.5.0. The use of the ``Array`` class is no longer required to work with different array
libraries in Qiskit Dynamics, and is broken in some cases. Refer to the user guide entry on
using different array libraries with Qiskit Dynamics. Users can now work directly with the
supported array type of their choice, without the need to wrap them to enable dispatching. The
``array`` and ``dispatch`` submodules will be removed in version 0.6.0.
This module contains Qiskit Dynamics-global extensions of the default NumPy and SciPy aliases
provided by `Arraylias <https://qiskit-extensions.github.io/arraylias/>`_. These are used to manage
dispatching of array operations for the different array types supported by Qiskit Dynamics. They
Expand Down

0 comments on commit 6cd401d

Please sign in to comment.