cuquantum.custatevec.measure_batched

cuquantum.custatevec.measure_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, intptr_t bit_strings, bit_ordering, uint32_t bit_string_len, randnums, int collapse)[源代码]

批量状态向量的单量子比特测量。

参数
  • 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) – 批次中状态向量之间的距离。

  • bit_strings (intptr_t) – 指向已测量位串的主机或设备数组的指针。

  • bit_ordering (object) –

    指向位串排序的主机数组的指针。它可以是

    • 一个指向数组地址的 int,或者

    • 一个 int32_t 的 Python 序列。

  • bit_string_len (uint32_t) – bitString 的长度。

  • randnums (object) –

    指向随机数的主机或设备数组的指针。它可以是

    • 一个指向数组地址的 int,或者

    • 一个 double 的 Python 序列。

  • collapse (CollapseOp) – 坍缩操作。