cuquantum.custatevec.apply_generalized_permutation_matrix¶
- cuquantum.custatevec.apply_generalized_permutation_matrix(intptr_t handle, intptr_t sv, int sv_data_type, uint32_t n_index_bits, permutation, intptr_t diagonals, int diagonals_data_type, int32_t adjoint, basis_bits, uint32_t n_basis_bits, mask_bit_string, mask_ordering, uint32_t mask_len, intptr_t workspace, size_t workspace_size)¶
-
Apply a generalized permutation matrix.
- Parameters
-
handle (intptr_t) – The library handle.
sv (intptr_t) – The pointer address (as Python
int
) to the statevector (on device).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.
adjoint (int32_t) – Whether the adjoint of the matrix would be applied.
-
basis_bits –
A host array of permutation matrix basis bits. It can be
an
int
as the pointer address to the arraya Python sequence of basis bits
n_basis_bits (uint32_t) – The length of
basis_bits
.-
mask_bit_string –
A host array for a bit string to specify mask. It can be
an
int
as the pointer address to the arraya Python sequence of index bit ordering
-
mask_ordering –
A host array of mask ordering. It can be
an
int
as the pointer address to the arraya Python sequence of index bit ordering
mask_len (uint32_t) – The length of
mask_ordering
.workspace (intptr_t) – The pointer address (as Python
int
) to the workspace (on device).workspace_size (size_t) – The workspace size (in bytes).