sample#
-
cuquantum.
bindings. custatevecEx. sample( - intptr_t state_vector,
- intptr_t bit_strings,
- bit_string_ordering,
- int32_t bit_string_ordering_len,
- randnums,
- int32_t num_shots,
- int output,
- abs2sums,
Sample bit strings from the state vector.
- Parameters:
state_vector (intptr_t) – State vector instance.
bit_strings (intptr_t) – pointer to a host array to store sampled bit strings.
bit_string_ordering (object) –
pointer to a host array of bit string ordering for sampling. It can be:
an
intas the pointer address to the array, ora Python sequence of
int32_t.
bit_string_ordering_len (int32_t) – length of bit_string_ordering.
randnums (object) –
pointer to an array of random numbers. It can be:
an
intas the pointer address to the array, ora Python sequence of
float.
num_shots (int32_t) – the number of shots.
output (int) – the order of sampled bit strings.
abs2sums (object) –
pointer to a host array of abs2 sums for each sub state vector, or null. It can be:
an
intas the pointer address to the array, ora Python sequence of
float.
See also