Arraylias (qiskit_dynamics.arraylias)#

This module contains Qiskit Dynamics-global extensions of the default NumPy and SciPy aliases provided by Arraylias. These are used to manage dispatching of array operations for the different array types supported by Qiskit Dynamics. They have been configured beyond the Arraylias defaults to additionally support both JAX and SciPy sparse types. The following table summarizes the registered libraries and respective types.

Table 5 Supported libraries#

array_library

Registered 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.

Table 6 Configured Arraylias objects#

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 SciPy library.