cuquantum.cutensornet.sampler_prepare

cuquantum.cutensornet.sampler_prepare(intptr_t handle, intptr_t tensor_network_sampler, size_t max_workspace_size_device, intptr_t work_desc, intptr_t cuda_stream)[源代码]

准备张量网络状态采样器。

参数
  • handle (intptr_t) – cuTensorNet 库句柄。

  • tensor_network_sampler (intptr_t) – 张量网络状态采样器。

  • max_workspace_size_device (size_t) – 可用 GPU scratch 内存量的上限(字节)。

  • work_desc (intptr_t) – 工作区描述符(将设置所需的 scratch/cache 内存大小)。

  • cuda_stream (intptr_t) – CUDA 流。