sampler_sample#

cuquantum.bindings.cutensornet.sampler_sample(
intptr_t handle,
intptr_t tensor_network_sampler,
int64_t num_shots,
intptr_t work_desc,
intptr_t samples,
intptr_t cuda_stream,
)[source]#

Performs sampling of the tensor network state, that is, generates the requested number of samples.

Parameters:
  • handle (intptr_t) – cuTensorNet library handle.

  • tensor_network_sampler (intptr_t) – Tensor network state sampler.

  • num_shots (int64_t) – Number of samples to generate.

  • work_desc (intptr_t) – Workspace descriptor (the required scratch/cache memory buffers must be set by the user).

  • samples (intptr_t) – Host memory pointer where the generated state tensor samples will be stored at. The samples will be stored as samples[SampleId][ModeId] in C notation and the originally specified order of the tensor network state modes to sample from will be respected.

  • cuda_stream (intptr_t) – CUDA stream.