cuquantum.bindings.cudensitymat.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, coefficient, wrapped_coefficient_callback)[source]

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:

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

    • a Python sequence of ElementaryOperator.

  • 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, or

    • a 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 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, or

    • a Python sequence of int32_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.