create_state#
-
cuquantum.
bindings. cudensitymat. create_state( - intptr_t handle,
- int purity,
- int32_t num_space_modes,
- space_mode_extents,
- int64_t batch_size,
- int data_type,
Defines an empty quantum state of a given purity and shape, or a batch of such quantum states.
- Parameters:
handle (intptr_t) – Library handle.
purity (StatePurity) – Desired quantum state purity.
num_space_modes (int32_t) – Number of space modes (number of quantum degrees of freedom).
space_mode_extents (object) –
Extents of the space modes (dimensions of the quantum degrees of freedom). It can be:
an
int
as the pointer address to the array, ora Python sequence of
int64_t
.
batch_size (int64_t) – Batch size (number of equally-shaped quantum states in the batch). Note that setting the batch size to zero is the same as setting it to 1 (no batching).
data_type (int) – Numerical representation data type (type of tensor elements).
- Returns:
Empty quantum state (or a batch of quantum states).
- Return type:
intptr_t
See also