cuquantum.bindings.cudensitymat.operator_term_append_general_product¶
- cuquantum.bindings.cudensitymat.operator_term_append_general_product(intptr_t handle, intptr_t operator_term, int32_t num_elem_operators, num_operator_modes, operator_mode_extents, operator_mode_strides, state_modes_acted_on, mode_action_duality, int data_type, tensor_data, wrapped_tensor_callbacks, coefficient, wrapped_coefficient_callback)[source]¶
Appends a product of generic dense tensor operators acting on different quantum state modes to the operator term.
- Parameters
handle (intptr_t) – Library handle.
operator_term (intptr_t) – Operator term.
num_elem_operators (int32_t) – Number of dense tensor operators in the given tensor operator product.
num_operator_modes (object) –
Number of modes in each tensor operator (twice the number of state modes it acts on). It can be:
an
int
as the pointer address to the array, ora Python sequence of
int32_t
.
operator_mode_extents (object) –
Mode extents for each dense tensor operator. It can be:
operator_mode_strides (object) –
Mode strides for each dense tensor operator. If a specific element is set to NULL, the corresponding dense tensor operator will assume the default generalized column-wise storage strides. It can be:
state_modes_acted_on (object) –
State modes acted on by the tensor operator product. This is a concatenated list of the state modes acted on by all constituting dense tensor operators in the same order how they appear in the above arguments. It can be:
an
int
as the pointer address to the array, ora Python sequence of
int32_t
.
mode_action_duality (object) –
Duality status of each mode action, whether the action applies to a ket mode of the quantum state (value 0) or a bra mode of the quantum state (value 1 or other non-zero). It can be:
an
int
as the pointer address to the array, ora Python sequence of
int32_t
.
data_type (int) – Data type (for all dense tensor operators).
tensor_data (object) –
GPU-accessible pointers to the elements of each dense tensor operator constituting the tensor operator product. It can be:
an
int
as the pointer address to the array, ora Python sequence of
intptr_t
.
tensor_callbacks (object) –
User-defined tensor callback functions which can be called later to update the elements of each dense tensor operator (any of the callbacks can be NULL). It can be:
an
int
as the pointer address to the array, ora Python sequence of
cudensitymatWrappedTensorCallback_t
.
coefficient (complex) – Constant complex scalar coefficient associated with the tensor operator product.
coefficient_callback (object) – User-defined complex scalar callback function which can be called later to update the scalar coefficient associated with the tensor operator product, or NULL. The total coefficient associated with the tensor operator product is a product of the constant coefficient and the result of the scalar callback function, if defined.