Skip to content

Commit

Permalink
writing arraylias api doc to desribe registered libraries and types, …
Browse files Browse the repository at this point in the history
…and arraylias objects
  • Loading branch information
DanPuzzuoli committed Feb 26, 2024
1 parent bd50426 commit 27f2b02
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions qiskit_dynamics/arraylias/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,44 @@
Qiskit Dynamics uses `Arraylias <https://qiskit-extensions.github.io/arraylias/>`_ to manage
dispatching of array operations for different array types coming from different array libraries.
This module contains Qiskit Dynamics-global extensions of the default NumPy and SciPy aliases
provided by Arraylias <https://qiskit-extensions.github.io/arraylias/>`_, which have been configured
to support the `JAX <https://jax.readthedocs.io/en/latest/>`_ `BCOO` sparse array type, as well as
the sparse types offered by SciPy.
provided by `Arraylias <https://qiskit-extensions.github.io/arraylias/>`_. They have been configured
to additionally support both `JAX <https://jax.readthedocs.io/en/latest/>`_ and SciPy sparse types.
The following table summarizes the supported types.
.. list-table:: Supported libraries
:widths: 10 70
:header-rows: 1
* - ``array_library``
- Configured types
* - ``"numpy"``
- Default supported by the Arraylias NumPy and SciPy aliases.
* - ``"jax"``
- Default supported by the Arraylias NumPy and SciPy aliases.
* - ``"jax_sparse"``
- The JAX ``jax.experimental.sparse.BCOO`` array type.
* - ``"scipy_sparse"``
- Subclasses of the ``scipy.sparse.spmatrix`` sparse base class. When instantiating SciPy
sparse arrays, the alias will specifically create ``scipy.sparse.csr_matrix`` instances.
The global configured aliases and the aliased libraries can be imported from
``qiskit_dynamics.arraylias``, and are summarized by the following table.
.. autosummary::
:toctree: ../stubs/
.. list-table:: Configured Arraylias objects
:widths: 10 70
:header-rows: 1
DYNAMICS_NUMPY_ALIAS
DYNAMICS_SCIPY_ALIAS
DYNAMICS_NUMPY
DYNAMICS_SCIPY
* - Arraylias object
- Description
* - ``DYNAMICS_NUMPY_ALIAS``
- Qiskit Dynamics-global NumPy alias.
* - ``DYNAMICS_SCIPY_ALIAS``
- Qiskit Dynamics-global SciPy alias.
* - ``DYNAMICS_NUMPY``
- Qiskit Dynamics-global aliased NumPy library.
* - ``DYNAMICS_SCIPY``
- Qiskit Dynamics-global aliased NumPy library.
"""

from .alias import (
Expand Down

0 comments on commit 27f2b02

Please sign in to comment.