cuquantum.cutensornet.state_apply_tensor¶
- cuquantum.cutensornet.state_apply_tensor(intptr_t handle, intptr_t state, int32_t n_state_modes, state_modes, intptr_t tensor_data, tensor_mode_strides, int32_t immutable, int32_t adjoint, int32_t unitary) int64_t [source]¶
Apply a tensor operator to the tensor network state.
- Parameters
handle (intptr_t) – The library handle.
state (intptr_t) – The tensor network state.
n_state_modes (int32_t) – The number of state modes that the tensor applies on.
state_modes –
A host array of modes to specify where the tensor is applied to. It can be
tensor_data (intptr_t) – The tensor data.
tensor_mode_strides –
A host array of strides for each mode. It can be
immutable (int32_t) – Whether the tensor is immutable
adjoint (int32_t) – Whether the tensor should be considered as adjoint.
unitary (int32_t) – Whether the tensor represents a unitary operation.
- Returns
The id that is assigned to the tensor.
- Return type
tensor_id (int64_t)
See also