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.

indices

Returns the indices of this state.

num_wires

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.

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.