operator_term_append_matrix_product_batch#
-
cuquantum.
bindings. cudensitymat. operator_term_append_matrix_product_batch( - intptr_t handle,
- intptr_t operator_term,
- int32_t num_matrix_operators,
- matrix_operators,
- matrix_conjugation,
- action_duality,
- int64_t batch_size,
- intptr_t static_coefficients,
- intptr_t total_coefficients,
- coefficient_callback,
- coefficient_gradient_callback,
Appends a batch of full matrix operators to the operator term, each full matrix operator acting on all quantum state modes. This is a batched version of the
cudensitymatOperatorTermAppendMatrixProductAPI function.- Parameters:
handle (intptr_t) – Library handle.
operator_term (intptr_t) – Operator term.
num_matrix_operators (int32_t) – Number of full matrix operators in the matrix operator product.
matrix_operators (object) –
Full matrix operators constituting the matrix operator product (each full matrix operator may or may not be batched). It can be:
matrix_conjugation (object) –
Hermitean conjugation status of each matrix in the matrix operator product (zero means normal, positive integer means conjugate-transposed). For real matrices, hermitean conjugation reduces to a mere matrix transpose since there is no complex conjugation involved. It can be:
an
intas the pointer address to the array, ora Python sequence of
int32_t.
action_duality (object) –
Duality status of each matrix operator action, that is, whether it acts on all ket modes of the quantum state (value zero) or on all bra modes of the quantum state (positive integer 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 full matrix 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 full matrix 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 full matrix 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.