cuquantum.custatevec.apply_matrix_batched¶
- cuquantum.custatevec.apply_matrix_batched(intptr_t handle, intptr_t batched_svs, int sv_data_type, uint32_t n_index_bits, uint32_t n_svs, _Index sv_stride, int map_type, matrix_indices, intptr_t matrices, int matrix_data_type, int layout, int32_t adjoint, uint32_t n_matrices, targets, uint32_t n_targets, controls, control_bit_values, uint32_t n_controls, int compute_type, intptr_t workspace, size_t workspace_size)[source]¶
Apply the specified gate matrices to the batched statevectors.
- Parameters
handle (intptr_t) – The library handle.
batched_svs (intptr_t) – The pointer address (as Python
int
) to the batched statevectors (on device).sv_data_type (cuquantum.cudaDataType) – The data type of the statevectors.
n_index_bits (uint32_t) – The number of index bits.
n_svs (uint32_t) – The number of batched statevectors.
sv_stride (int64_t) – The stride between each state vector in the batch.
map_type (MatrixMapType) – Specify the way to assign matrices.
matrix_indices –
An array of matrix indices to indicate, in order, which matrix is to be applied to the statevectors in the batch. It can be
an
int
as the pointer address to the array (on host or device)a Python sequence of bits on host
matrices (intptr_t) – The pointer address (as Python
int
) to the matrices (on either host or device).matrix_data_type (cuquantum.cudaDataType) – The data type of the matrix.
layout (MatrixLayout) – The memory layout the the matrix.
adjoint (int32_t) – Whether the adjoint of the matrix would be applied.
n_matrices (uint32_t) – The number of matrices.
targets –
A host array of target bits. It can be
an
int
as the pointer address to the arraya Python sequence of target bits
n_targets (uint32_t) – The length of
targets
.controls –
A host array of control bits. It can be
an
int
as the pointer address to the arraya Python sequence of control bits
control_bit_values –
A host array of control bit values. It can be
an
int
as the pointer address to the arraya Python sequence of control bit values
n_controls (uint32_t) – The length of
controls
.compute_type (cuquantum.ComputeType) – The compute type of matrix multiplication.
workspace (intptr_t) – The pointer address (as Python
int
) to the workspace (on device).workspace_size (size_t) – The workspace size (in bytes).
See also