apply_generalized_permutation_matrix_get_workspace_size#
-
cuquantum.
bindings. 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,
Get the extra workspace size required by
apply_generalized_permutation_matrix().- Parameters:
handle (intptr_t) – the handle to the cuStateVec library.
sv_data_type (int) – data type of the state vector.
n_index_bits (uint32_t) – the number of index bits of the state vector.
permutation (object) –
host or device pointer to a permutation table. It can be:
an
intas the pointer address to the array, ora Python sequence of
custatevecIndex_t.
diagonals (intptr_t) – host or device pointer to diagonal elements.
diagonals_data_type (int) – data type of diagonals.
targets (object) –
pointer to a host array of target bits. It can be:
an
intas the pointer address to the array, ora Python sequence of
int32_t.
n_targets (uint32_t) – the number of target bits.
n_controls (uint32_t) – the number of control bits.
- Returns:
extra workspace size.
- Return type:
size_t