cuquantum.custatevec.apply_generalized_permutation_matrix_get_workspace_size¶
- cuquantum.custatevec.apply_generalized_permutation_matrix_get_workspace_size(intptr_t handle, int sv_data_type, uint32_t n_index_bits, permutation, intptr_t diagonals, int diagonals_data_type, targets, uint32_t n_targets, uint32_t n_controls) size_t [source]¶
Computes the required workspace size for
apply_generalized_permutation_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.
permutation –
A host or device array for the permutation table. It can be
an
int
as the pointer address to the arraya Python sequence of permutation elements
diagonals (intptr_t) – The pointer address (as Python
int
) to a matrix (on either host or device).diagonals_data_type (cuquantum.cudaDataType) – The data type of the matrix.
targets –
A host array of permutation matrix target bits. It can be
an
int
as the pointer address to the arraya Python sequence of basis bits
n_targets (uint32_t) – The length of
targets
.n_controls (uint32_t) – The length of
controls
andcontrol_bit_values
.
- Returns
The required workspace size (in bytes).
- Return type
size_t