cuquantum.bindings.cudensitymat.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) intptr_t [source]¶
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 degrees of freedom).
space_mode_extents (object) –
Extents of the space modes (dimensions of the 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). Setting the batch size to zero is the same as setting it to 1.
data_type (int) – Representation data type (type of tensor elements).
- Returns
Empty quantum state (or a batch of quantum states).
- Return type
intptr_t
See also