qml.templates.core.AbstractArray¶
- class AbstractArray(shape, dtype=<class 'int'>)[source]¶
Bases:
objectAn abstract representation of an array that contains the shape and dtype attributes necessary for resource calculations.
This class is used with
subroutine_resource_rep()for specifying abstract information about aSubroutinefor purposes of resource calculations used with graph decompositions.- Parameters:
shape (tuple(int)) – the dimensions of the array.
()corresponds to a scalar.dtype (type) – the data type of the array. Defaults to
intfor easier use in specifyingwires.
Attributes
code/api/pennylane.templates.core.AbstractArray
Download Python script
Download Notebook
View on GitHub