cuquantum.cutensornet.marginal_compute

cuquantum.cutensornet.marginal_compute(intptr_t handle, intptr_t marginal, projected_mode_values, intptr_t workspace, intptr_t marginal_tensor, intptr_t stream)[source]

Computes the tensor network state marginal distribution.

Parameters
  • handle (intptr_t) – The library handle.

  • marginal (intptr_t) – The tensor network marginal computation handle.

  • projected_mode_values

    A host array of values for the projected modes. It can be

    • an int as the pointer address to the array

    • a Python sequence of int

  • workspace (intptr_t) – The workspace descriptor.

  • marginal_tensor (intptr_t) – The pointer address (as Python int) for storing the computed marginals.

  • stream (intptr_t) – The CUDA stream handle (cudaStream_t as Python int).