cuquantum.cutensornet.create_sampler

cuquantum.cutensornet.create_sampler(intptr_t handle, intptr_t state, int32_t n_modes_to_sample, modes_to_sample) intptr_t[source]

Creates a tensor network state sampler.

Parameters
  • handle (intptr_t) – The library handle.

  • state (intptr_t) – The tensor network state.

  • n_modes_to_sample (int32_t) – The number of modes to sample for the sampler.

  • modes_to_sample

    A host array of modes for the sampler. It can be

    • an int as the pointer address to the array

    • a Python sequence of int

Returns

An opaque tensor network state sampler handle (as Python int).

Return type

intptr_t