- cuquantum.custatevec.collapse_on_z_basis(intptr_t handle, intptr_t sv, int sv_data_type, uint32_t n_index_bits, int32_t parity, basis_bits, uint32_t n_basis_bits, double norm)[source]¶
Collapse the statevector on the given Z product basis.
handle (intptr_t) – The library handle.
sv (intptr_t) – The pointer address (as Python
int) to the statevector (on device).
sv_data_type (cuquantum.cudaDataType) – The data type of the statevector.
n_index_bits (uint32_t) – The number of index bits.
parity (int32_t) – The parity, 0 or 1.
A host array of Z-basis index bits. It can be
intas the pointer address to the array
a Python sequence of index bits
n_basis_bits (uint32_t) – the number of basis bits.
norm (double) – The normalization factor for the statevector after collapse.