operator_term_append_elementary_product#
-
cuquantum.
bindings. cudensitymat. operator_term_append_elementary_product( - intptr_t handle,
- intptr_t operator_term,
- int32_t num_elem_operators,
- elem_operators,
- state_modes_acted_on,
- mode_action_duality,
- double complex coefficient,
- coefficient_callback,
- coefficient_gradient_callback,
Appends a product of elementary tensor operators acting on 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 elementary tensor operators in the tensor operator product.
elem_operators (object) –
Elementary tensor operators constituting the tensor operator product. 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 elementary tensor operators in the same order how they appear in the elem_operators argument. 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, that is, whether the action applies to a ket mode of the quantum state (value zero) or a bra mode of the quantum state (positive value). It can be:
an
int
as the pointer address to the array, ora Python sequence of
int32_t
.
coefficient (complex) – Constant (static) complex scalar coefficient associated with the appended tensor operator product.
coefficient_callback (object) – Optional 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.
coefficient_gradient_callback (object) – Optional user-defined scalar gradient callback function which can be called later to compute the gradients of the complex scalar coefficient with respect to the user-defined real parameters, or NULL.