cuquantum.bindings.cudensitymat.create_matrix_operator_dense_local¶
- cuquantum.bindings.cudensitymat.create_matrix_operator_dense_local(intptr_t handle, int32_t num_space_modes, space_mode_extents, int data_type, intptr_t matrix_data, matrix_callback, matrix_gradient_callback) intptr_t [source]¶
Creates a full matrix operator acting on all quantum state modes (aka space modes) from a dense matrix stored (replicated) locally on each process.
- Parameters
handle (intptr_t) – Library handle.
num_space_modes (int32_t) – Number of the (state) space modes acted on. It must coincide with the total number of space modes in the Hilbert space.
space_mode_extents (object) –
Extents of the (state) space modes acted on. It can be:
an
int
as the pointer address to the array, ora Python sequence of
int64_t
.
data_type (int) – Matrix operator data type.
matrix_data (intptr_t) – GPU-accessible pointer to the matrix operator elements storage.
matrix_callback (object) – Optional user-defined tensor callback function which can be called later to fill in the matrix elements in the provided storage, or NULL.
matrix_gradient_callback (object) – Optional user-defined tensor gradient callback function which can be called later to compute the Vector-Jacobian Product (VJP) for the matrix operator, to produce gradients with respect to the user-defined real parameters, or NULL.
- Returns
Full matrix operator.
- Return type
intptr_t