Array#
- class Array(data, dtype=None, order=None, backend=None)[source]#
Bases:
NDArrayOperatorsMixin
Qiskit array class. This class is deprecated as of version 0.5.0 and will be removed in version 0.6.0.
This class provides a Numpy compatible wrapper to supported Python array libraries. Supported backends are
"numpy"
and"jax"
.Initialize an
Array
container.- Parameters:
data (
Any
) – Anarray_like
input. This can be an object of any type supported by the registered \(asarray\) method for the specified backend.dtype (
Optional
[Any
]) – Optional. The dtype of the returned array. This value must be supported by the specified array backend.order (
Optional
[str
]) – Optional. The array order. This value must be supported by the specified array backend.backend (
Optional
[str
]) – A registered array backend name. IfNone
the default array backend will be used.
- Raises:
ValueError – If input cannot be converted to an
Array
.
Methods
- classmethod available_backends()[source]#
Return a tuple of available array backends.
- Return type:
Set
[str
]
Attributes
- backend#
The backend of the wrapped array class.
- data#
The wrapped array data object.