cuquantum.cutensornet.contraction

cuquantum.cutensornet.contraction(intptr_t handle, intptr_t plan, raw_data_in, intptr_t raw_data_out, intptr_t workspace, int64_t slice_id, 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.

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).

  • workspace (intptr_t) – The workspace descriptor.

  • slice_id (int64_t) – The slice ID.

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

Warning

This function is deprecated and will be removed in a future release. Use contract_slices() instead.

Note

The number of slices can be queried by contraction_optimizer_info_get_attribute().