cuquantum.custatevec.batch_measure

cuquantum.custatevec.batch_measure(intptr_t handle, intptr_t sv, int sv_data_type, uint32_t n_index_bits, intptr_t bit_string, bit_ordering, uint32_t bit_string_len, double randnum, int collapse)[源代码]

批量单量子比特测量。

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

  • sv (intptr_t) – 状态向量。

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

  • n_index_bits (uint32_t) – 索引位数量。

  • bit_string (intptr_t) – 指向测量位字符串的主机数组的指针。

  • bit_ordering (object) –

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

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

    • 一个 int32_t 的 Python 序列。

  • bit_string_len (uint32_t) – bit_string 的长度。

  • randnum (double) – 随机数,[0, 1)。

  • collapse (CollapseOp) – 坍缩操作。