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(). :param handle: the handle to the cuStateVec context. :type handle: intptr_t :param sv_data_type: Data type of the state vector. :type sv_data_type: int :param n_index_bits: the number of index bits of the state vector. :type n_index_bits: uint32_t :param n_svs: the number of state vectors. :type n_svs: uint32_t :param sv_stride: distance of two consecutive state vectors. :type sv_stride: int64_t :param matrices: pointer to allocated matrices in one contiguous memory chunk on host or device. :type matrices: intptr_t :param matrix_data_type: data type of matrices. :type matrix_data_type: int :param layout: enumerator specifying the memory layout of matrix. :type layout: MatrixLayout :param n_matrices: the number of matrices. :type n_matrices: uint32_t :param n_basis_bits: the number of basis bits. :type n_basis_bits: uint32_t :param compute_type: compute type of matrix multiplication. :type compute_type: ComputeType

Returns

size of the extra workspace.

Return type

size_t