cuquantum.custatevec.apply_matrix_batched

cuquantum.custatevec.apply_matrix_batched(intptr_t handle, intptr_t batched_sv, int sv_data_type, uint32_t n_index_bits, uint32_t n_svs, int64_t 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 extra_workspace, size_t extra_workspace_size_in_bytes)[source]

此函数将一个门矩阵应用于一组批量状态向量中的每一个。

参数
  • handle (intptr_t) – cuStateVec 库的句柄。

  • batched_sv (intptr_t) – 在设备上一个连续内存块中分配的批量状态向量。

  • sv_data_type (int) – 状态向量的数据类型。

  • n_index_bits (uint32_t) – 状态向量的索引位数。

  • n_svs (uint32_t) – 状态向量的数量。

  • sv_stride (int64_t) – 两个连续状态向量的距离。

  • map_type (MatrixMapType) – 枚举器,指定分配矩阵的方式。

  • matrix_indices (object) –

    指向矩阵索引的主机或设备数组的指针。它可以是

    • 作为数组的指针地址的 int,或

    • int32_t 的 Python 序列。

  • matrices (intptr_t) – 指向主机或设备上一个连续内存块中分配的矩阵的指针。

  • matrix_data_type (int) – 矩阵的数据类型。

  • layout (MatrixLayout) – 枚举器,指定矩阵的内存布局。

  • adjoint (int32_t) – 应用矩阵的共轭转置。

  • n_matrices (uint32_t) – 矩阵的数量。

  • targets (object) –

    指向目标位的宿主数组的指针。它可以是

    • 作为数组的指针地址的 int,或

    • int32_t 的 Python 序列。

  • n_targets (uint32_t) – 目标位的数量。

  • controls (object) –

    指向控制位的宿主数组的指针。它可以是

    • 作为数组的指针地址的 int,或

    • int32_t 的 Python 序列。

  • control_bit_values (object) –

    指向控制位值的宿主数组的指针。它可以是

    • 作为数组的指针地址的 int,或

    • int32_t 的 Python 序列。

  • n_controls (uint32_t) – 控制位的数量。

  • compute_type (ComputeType) – 矩阵乘法的 compute_type。

  • extra_workspace (intptr_t) – 额外的工作区。

  • extra_workspace_size_in_bytes (size_t) – 额外的工作区大小。