marginal_prepare#

cuquantum.bindings.cutensornet.marginal_prepare(
intptr_t handle,
intptr_t tensor_network_marginal,
size_t max_workspace_size_device,
intptr_t work_desc,
intptr_t cuda_stream,
)[source]#

Prepares computation of the requested tensor network state marginal tensor.

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

  • tensor_network_marginal (intptr_t) – Tensor network state marginal representation.

  • max_workspace_size_device (size_t) – Upper limit on the amount of available GPU scratch memory (bytes).

  • work_desc (intptr_t) – Workspace descriptor (the required scratch/cache memory sizes will be set).

  • cuda_stream (intptr_t) – CUDA stream.