cuquantum.cutensornet.state_apply_unitary_channel

cuquantum.cutensornet.state_apply_unitary_channel(intptr_t handle, intptr_t tensor_network_state, int32_t num_state_modes, state_modes, int32_t num_tensors, tensor_data, tensor_mode_strides, probabilities) int64_t[source]

Applies a tensor channel consisting of one or more unitary tensor operators to the tensor network state.

Parameters
  • handle (intptr_t) – cuTensorNet library handle.

  • tensor_network_state (intptr_t) – Tensor network state.

  • num_state_modes (int32_t) – Number of state modes the tensor channel acts on.

  • state_modes (object) –

    Pointer to the state modes the tensor channel acts on. It can be:

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

    • a Python sequence of int32_t.

  • num_tensors (int32_t) – Number of constituting tensor operators defining the tensor channel.

  • tensor_data (object) –

    Elements of the tensor operators constituting the tensor channel (must be of the same data type as the elements of the state tensor). It can be:

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

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

  • tensor_mode_strides (object) –

    Strides of the tensor data storage layout (note that the supplied tensors have twice more modes than the number of state modes they act on). Passing NULL will assume the default generalized columnwise storage layout. It can be:

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

    • a Python sequence of int64_t.

  • probabilities (object) –

    Probabilities associated with the individual tensor operators. It can be:

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

    • a Python sequence of float.

Returns

Unique integer id (for later identification of the tensor channel).

Return type

int64_t