network_operator_append_product#

cuquantum.bindings.cutensornet.network_operator_append_product(
intptr_t handle,
intptr_t tensor_network_operator,
double complex coefficient,
int32_t num_tensors,
num_state_modes,
state_modes,
tensor_mode_strides,
tensor_data,
) int64_t[source]#

Appends a tensor product operator component to the tensor network operator.

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

  • tensor_network_operator (intptr_t) – Tensor network operator.

  • coefficient (complex) – Complex coefficient associated with the appended operator component.

  • num_tensors (int32_t) – Number of tensor factors in the tensor product.

  • num_state_modes (object) –

    Number of state modes each appended tensor factor acts on. It can be:

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

    • a Python sequence of int32_t.

  • state_modes (object) –

    Modes each appended tensor factor acts on (length = num_state_modes). It can be:

    • an int as the pointer address to the nested sequence, or

    • a Python sequence of ints, each of which is a pointer address to a valid sequence of ‘int32_t’, or

    • a nested Python sequence of int32_t.

  • tensor_mode_strides (object) –

    Tensor mode strides for each tensor factor (length = num_state_modes * 2). If NULL, the default generalized column-major strides will be used. It can be:

    • an int as the pointer address to the nested sequence, or

    • a Python sequence of ints, each of which is a pointer address to a valid sequence of ‘int64_t’, or

    • a nested Python sequence of int64_t.

  • tensor_data (object) –

    Tensor data stored in GPU memory for each tensor factor. It can be:

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

    • a Python sequence of ints (as pointer addresses).

Returns:

Unique sequential integer identifier of the appended tensor network operator component.

Return type:

int64_t