cuquantum.custatevec.apply_matrix_get_workspace_size(intptr_t handle, int sv_data_type, uint32_t n_index_bits, intptr_t matrix, int matrix_data_type, int layout, int32_t adjoint, uint32_t n_targets, uint32_t n_controls, int compute_type) size_t[source]

This function gets the required workspace size for apply_matrix().

  • handle (intptr_t) – the handle to the cuStateVec context.

  • sv_data_type (int) – Data type of the state vector.

  • n_index_bits (uint32_t) – the number of index bits of the state vector.

  • matrix (intptr_t) – host or device pointer to a matrix.

  • matrix_data_type (int) – data type of matrix.

  • layout (MatrixLayout) – enumerator specifying the memory layout of matrix.

  • adjoint (int32_t) – apply adjoint of matrix.

  • n_targets (uint32_t) – the number of target bits.

  • n_controls (uint32_t) – the number of control bits.

  • compute_type (ComputeType) – compute_type of matrix multiplication.


workspace size.

Return type