Array#
- class Array(data, dtype=None, order=None, backend=None)[source]#
Bases:
NDArrayOperatorsMixinQiskit array class.
This class provides a Numpy compatible wrapper to supported Python array libraries. Supported backends are
"numpy"and"jax".Initialize an
Arraycontainer.- Parameters:
data (
Any) – Anarray_likeinput. 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. IfNonethe 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.