- cuquantum.custatevec.test_matrix_type(intptr_t handle, int matrix_type, intptr_t matrix, int matrix_data_type, int layout, uint32_t n_targets, int32_t adjoint, int compute_type, intptr_t workspace, size_t workspace_size) double [source]¶
Test the deviation of a given matrix from a certain matrix type (Hermitian or unitary).
handle (intptr_t) – The library handle.
matrix_type (MatrixType) – The matrix type of the gate matrix.
matrix (intptr_t) – The pointer address (as Python
int) to a matrix (on either host or device).
matrix_data_type (cuquantum.cudaDataType) – The data type of the matrix.
layout (MatrixLayout) – The memory layout the the matrix.
n_targets (uint32_t) – The length of
adjoint (int32_t) – Whether the adjoint of the matrix would be applied.
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).
The residual norm for the deviation from certain matrix type.
- Return type