jet.QuditRegister

class QuditRegister(dim: int, size: int, data: Optional[numpy.ndarray] = None)[source]

Bases: jet.state.State

QuditRegister represents a qudit register state.

Parameters
  • dim (int) – Dimension of the qudits.

  • size (int) – Number of qudits.

  • data (np.ndarray or None) – Optional state vector.

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]

Returns the tensor representation of this state.

Parameters

dtype (np.dtype) – Data type of the tensor.