cuquantum.custatevec.sampler_sample¶
- cuquantum.custatevec.sampler_sample(intptr_t handle, intptr_t sampler, intptr_t bit_strings, bit_ordering, uint32_t bit_string_len, rand_nums, uint32_t n_shots, int order)[source]¶
Sample bit strings from the statevector.
- Parameters
handle (intptr_t) – The library handle.
sampler (intptr_t) – The pointer address (as Python
int
) to the sampler descriptor.bit_strings (intptr_t) – The pointer address (as Python
int
) for storing the sampled bit strings (on host).bit_ordering –
A host array of bit string ordering. It can be
an
int
as the pointer address to the arraya Python sequence of bit ordering
bit_string_len (uint32_t) – The number of bits in
bit_ordering
.rand_nums –
A host array of random numbers in [0, 1). It can be
an
int
as the pointer address to the arraya Python sequence of random numbers
n_shots (uint32_t) – The number of shots.
order (SamplerOutput) – The order of sampled bit strings.
See also