cuquantum.cutensornet.network_operator_append_mpo¶
- cuquantum.cutensornet.network_operator_append_mpo(intptr_t handle, intptr_t tensor_network_operator, double complex coefficient, int32_t num_state_modes, state_modes, tensor_mode_extents, tensor_mode_strides, tensor_data, int boundary_condition) int64_t [source]¶
Appends a Matrix Product Operator (MPO) 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_state_modes (int32_t) – Number of state modes the MPO acts on (number of tensors in the MPO).
state_modes (object) –
State modes the MPO acts on. It can be:
an
int
as the pointer address to the array, ora Python sequence of
int32_t
.
tensor_mode_extents (object) –
Tensor mode extents for each MPO tensor. It can be:
tensor_mode_strides (object) –
Storage strides for each MPO tensor or NULL (default generalized column-wise strides). It can be:
tensor_data (object) –
Tensor data stored in GPU memory for each MPO tensor factor. It can be:
boundary_condition (BoundaryCondition) – MPO boundary condition.
- Returns
Unique sequential integer identifier of the appended tensor network operator component.
- Return type
int64_t