operator_term_append_elementary_product_batch#
-
cuquantum.
bindings. cudensitymat. operator_term_append_elementary_product_batch( - intptr_t handle,
- intptr_t operator_term,
- int32_t num_elem_operators,
- elem_operators,
- state_modes_acted_on,
- mode_action_duality,
- int64_t batch_size,
- intptr_t static_coefficients,
- intptr_t total_coefficients,
- coefficient_callback,
- coefficient_gradient_callback,
Appends a batch of elementary tensor operator products 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 (each elementary tensor operator may or may not be batched). 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
intas 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
intas the pointer address to the array, ora Python sequence of
int32_t.
batch_size (int64_t) – Batch size (>= 1).
static_coefficients (intptr_t) – GPU-accessible array of constant (static) complex scalar coefficients associated with the appended batch of elementary tensor operator products (of length
batch_size).total_coefficients (intptr_t) – GPU-accessible storage for the array of total complex scalar coefficients associated with the appended batch of elementary tensor operator products (of length
batch_size). Each coefficient will be a product of a static coefficient and a dynamic coefficient generated by the provided scalar callback during the computation phase. If the scalar callback is not supplied here (NULL), this argument can also be set to NULL.coefficient_callback (object) – Optional user-defined batched complex scalar callback function which can be called later to update the array of dynamic scalar coefficients associated with the defined batch of elementary tensor operator products, or NULL. The total coefficient associated with an elementary tensor operator product is a product of the constant (static) coefficient and the result of the scalar callback function, if defined.
coefficient_gradient_callback (object) – Optional user-defined batched scalar gradient callback function which can be called later to compute the gradients of the batched complex scalar coefficients with respect to the batched user-defined real parameters, or NULL.