marginal_compute#

cuquantum.bindings.cutensornet.marginal_compute(
intptr_t handle,
intptr_t tensor_network_marginal,
projected_mode_values,
intptr_t work_desc,
intptr_t marginal_tensor,
intptr_t cuda_stream,
)[source]#

Computes the requested tensor network state marginal tensor.

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

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

  • projected_mode_values (object) –

    Pointer to the values of the projected modes. Each integer value corresponds to a basis state of the given (projected) state mode. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int64_t.

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

  • marginal_tensor (intptr_t) – Pointer to the GPU storage of the marginal tensor which will be computed in this call.

  • cuda_stream (intptr_t) – CUDA stream.