cuquantum.bindings.cudensitymat.state_attach_component_storage¶
- cuquantum.bindings.cudensitymat.state_attach_component_storage(intptr_t handle, intptr_t state, int32_t num_state_components, component_buffer, component_buffer_size)[source]¶
Attaches a user-owned GPU-accessible storage buffer for each component (tensor) constituting the quantum state representation (on the current process in multi-process runs).
- Parameters
handle (intptr_t) – Library handle.
state (intptr_t) – Quantum state (or a batch of quantum states).
num_state_components (int32_t) – Number of components (tensors) in the quantum state representation (on the current process).
component_buffer (object) –
Pointers to user-owned GPU-accessible storage buffers for all components (tensors) constituting the quantum state representation (on the current process). It can be:
an
int
as the pointer address to the array, ora Python sequence of
intptr_t
.
component_buffer_size (object) –
Sizes of the provded storage buffers for all components (tensors) constituting the quantum state representation (on the current process). It can be:
an
int
as the pointer address to the array, ora Python sequence of
size_t
.