cuquantum.custatevec.collapse_by_bit_string¶
- cuquantum.custatevec.collapse_by_bit_string(intptr_t handle, intptr_t sv, int sv_data_type, uint32_t n_index_bits, bit_string, bit_ordering, uint32_t bit_string_len, double norm)[source]¶
Collapse state vector to the state specified by a given bit string.
- Parameters
handle (intptr_t) – the handle to the cuStateVec library.
sv (intptr_t) – state vector.
sv_data_type (int) – data type of state vector.
n_index_bits (uint32_t) – the number of index bits.
bit_string (object) –
pointer to a host array of bit string. It can be:
an
int
as the pointer address to the array, ora Python sequence of
int32_t
.
bit_ordering (object) –
pointer to a host array of bit string ordering. It can be:
an
int
as the pointer address to the array, ora Python sequence of
int32_t
.
bit_string_len (uint32_t) – length of bit string.
norm (double) – normalization constant.
See also