MPSEnvBounds#

class cuquantum.bindings.cutensornet.MPSEnvBounds(size=1)[source]#

Empty-initialize an array of cutensornetMPSEnvBounds_t.

The resulting object is of length size and of dtype mps_env_bounds_dtype. If default-constructed, the instance represents a single struct.

Parameters:

size (int) – number of structs, default=1.

Methods

__init__(*args, **kwargs)#
static from_data(data)[source]#

Create an MPSEnvBounds instance wrapping the given NumPy array.

Parameters:

data (_numpy.ndarray) – a 1D array of dtype mps_env_bounds_dtype holding the data.

static from_ptr(
intptr_t ptr,
size_t size=1,
bool readonly=False,
)[source]#

Create an MPSEnvBounds instance wrapping the given pointer.

Parameters:
  • ptr (intptr_t) – pointer address as Python int to the data.

  • size (int) – number of structs, default=1.

  • readonly (bool) – whether the data is read-only (to the user). default is False.

Attributes

lower_bound#

Site index to the left of environment (allowed range -1 to number of qudits - 1).

Type:

Union[int32, int]

ptr#

Get the pointer address to the data as Python int.

upper_bound#

Site index to the right of environment (allowed range +1 to number of qudits + 1).

Type:

Union[int32, int]