- 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 rand_num, int collapse, double offset, double abs2sum)[source]¶
Performs measurement (on a partial statevector) of arbitrary number of single qubits.
handle (intptr_t) – The library handle.
sv (intptr_t) – The pointer address (as Python
int) to the partial statevector (on device).
sv_data_type (cuquantum.cudaDataType) – The data type of the statevector.
n_index_bits (uint32_t) – The number of index bits.
bit_string (intptr_t) – The pointer address (as Python
int) to a host array of measured bit string.
A host array of bit string ordering. It can be
intas the pointer address to the array
a Python sequence of bit ordering
bit_string_len (uint32_t) – The length of
rand_num (double) – A random number in [0, 1).
collapse (Collapse) – Indicate the collapse operation.
offset (double) – partial sum of squared absolute values.
abs2sum (double) – sum of squared absolute values for the entire statevector.