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

Single qubit measurements for batched state vectors.

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

  • batched_sv (intptr_t) – batched state vectors.

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

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

  • n_svs (uint32_t) – the number of state vectors in the batched state vector.

  • sv_stride (int64_t) – the distance between state vectors in the batch.

  • bit_strings (intptr_t) – pointer to a host or device array of measured bit strings.

  • 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 bitString.

  • randnums (object) –

    pointer to a host or device array of random numbers. It can be:

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

    • a Python sequence of double.

  • collapse (CollapseOp) – Collapse operation.