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]

Batched single qubit measurement for partial vector.

Parameters
  • handle (intptr_t) – the handle to the cuStateVec library.

  • sv (intptr_t) – partial state vector.

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

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

  • bit_string (intptr_t) – pointer to a host array of measured bit string.

  • bit_ordering (object) –

    pointer to a host array of bit string ordering. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int32_t.

  • bit_string_len (uint32_t) – length of bit_string.

  • randnum (double) – random number, [0, 1).

  • collapse (CollapseOp) – Collapse operation.

  • offset (double) – partial sum of squared absolute values.

  • abs2sum (double) – sum of squared absolute values for the entire state vector.