cuquantum.cutensornet.contract_slices

cuquantum.cutensornet.contract_slices(intptr_t handle, intptr_t plan, raw_data_in, intptr_t raw_data_out, bool accumulate_output, intptr_t workspace, intptr_t slice_group, intptr_t stream)[source]

Perform the contraction of the input tensors.

The input tensors should form a tensor network that is prescribed by the tensor network descriptor that was used to create the contraction plan.

This version of the contraction API takes a group of slices instead of a single slice.

Parameters
  • handle (intptr_t) – The library handle.

  • plan (intptr_t) – The contraction plan handle.

  • raw_data_in

    A host array of pointer addresses (as Python int) for each input tensor (on device). It can be

    • an int as the pointer address to the array

    • a Python sequence of int

  • raw_data_out (intptr_t) – The pointer address (as Python int) to the output tensor (on device).

  • accumulate_output (bool) – Whether to accumulate the data in raw_data_out.

  • workspace (intptr_t) – The workspace descriptor.

  • slice_group (intptr_t) – The slice group descriptor.

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