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)[source]

Batched single qubit measurement.

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

  • sv (intptr_t) – 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.