cuquantum.custatevec.batch_measure_with_offset

cuquantum.custatevec.batch_measure_with_offset(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, double offset, double abs2sum)[source]

用于部分向量的批量单量子比特测量。

参数
  • 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) – Collapse 操作。

  • offset (double) – 平方绝对值的偏和。

  • abs2sum (double) – 整个态向量的平方绝对值之和。