jet.state.State¶
-
class
State
(name: str, num_wires: int)[source]¶ Bases:
abc.ABC
State represents a quantum state.
- Parameters
name (str) – Name of the state.
num_wires (str) – Number of wires the state is connected to.
Attributes
Returns the indices of this state.
Returns the number of wires connected to this state.
-
indices
¶ Returns the indices of this state. An index is a label associated with an axis of the tensor representation of a state; the indices of a tensor determine its connectivity in the context of a tensor network.
-
num_wires
¶ Returns the number of wires connected to this state.
Methods
tensor
([dtype])Returns the tensor representation of this state.
-
tensor
(dtype: numpy.dtype = <class 'numpy.complex128'>) → Union[jet.bindings.TensorC64, jet.bindings.TensorC128][source]¶ Returns the tensor representation of this state.
- Parameters
dtype (np.dtype) – Data type of the tensor.
code/api/jet.state.State
Download Python script
Download Notebook
View on GitHub