network_set_output_tensor#

cuquantum.bindings.cutensornet.network_set_output_tensor(
intptr_t handle,
intptr_t network_desc,
int32_t num_modes,
mode_labels,
int data_type,
)[source]#

Sets the output tensor of the network If this function is not called on the network, the network output tensor metadata will be inferred (using default values where needed).

Parameters:
  • handle (intptr_t) – Opaque handle holding cuTensorNet’s library context.

  • network_desc (intptr_t) – Opaque handle to a tensor network descriptor, created using create_network().

  • num_modes (int32_t) – The number of modes of the tensor. If this value is 0, the network is force reduced.

  • mode_labels (object) –

    Array of size num_modes; mode_labels[j] denotes the label of j-th mode of the tensor. It can be:

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

    • a Python sequence of int32_t.

  • data_type (int) – Denotes the data type of the output tensor.