cuquantum.custatevec.compute_expectation_batched_get_workspace_size¶
- cuquantum.custatevec.compute_expectation_batched_get_workspace_size(intptr_t handle, int sv_data_type, uint32_t n_index_bits, uint32_t n_svs, int64_t sv_stride, intptr_t matrices, int matrix_data_type, int layout, uint32_t n_matrices, uint32_t n_basis_bits, int compute_type) size_t[source]¶
This function gets the required workspace size for
compute_expectation_batched().- Parameters
handle (intptr_t) – the handle to the cuStateVec context.
sv_data_type (int) – Data type of the state vector.
n_index_bits (uint32_t) – the number of index bits of the state vector.
n_svs (uint32_t) – the number of state vectors.
sv_stride (int64_t) – distance of two consecutive state vectors.
matrices (intptr_t) – pointer to allocated matrices in one contiguous memory chunk on host or device.
matrix_data_type (int) – data type of matrices.
layout (MatrixLayout) – enumerator specifying the memory layout of matrix.
n_matrices (uint32_t) – the number of matrices.
n_basis_bits (uint32_t) – the number of basis bits.
compute_type (ComputeType) – compute_type of matrix multiplication.
- Returns
size of the extra workspace.
- Return type
size_t