cuquantum.custatevec.apply_matrix_buffer_size¶
- cuquantum.custatevec.apply_matrix_buffer_size(intptr_t handle, int sv_data_type, uint32_t n_index_bits, intptr_t matrix, int matrix_data_type, int layout, int32_t adjoint, uint32_t n_targets, uint32_t n_controls, int compute_type) size_t ¶
-
Computes the required workspace size for
apply_matrix()
.- Parameters
-
handle (intptr_t) – The library handle.
sv_data_type (cuquantum.cudaDataType) – The data type of the statevector.
n_index_bits (uint32_t) – The number of index bits.
matrix (intptr_t) – The pointer address (as Python
int
) to a matrix (on either host or device).matrix_data_type (cuquantum.cudaDataType) – The data type of the matrix.
layout (MatrixLayout) – The memory layout the the matrix.
adjoint (int32_t) – Whether the adjoint of the matrix would be applied.
n_targets (uint32_t) – The length of
targets
.n_controls (uint32_t) – The length of
controls
.compute_type (cuquantum.ComputeType) – The compute type of matrix multiplication.
- Returns
-
The required workspace size (in bytes).
- Return type
-
size_t
See also