operator_compute_action_backward_diff#

cuquantum.bindings.cudensitymat.operator_compute_action_backward_diff(
intptr_t handle,
intptr_t superoperator,
double time,
int64_t batch_size,
int32_t num_params,
intptr_t params,
intptr_t state_in,
intptr_t state_out_adj,
intptr_t state_in_adj,
intptr_t params_grad,
intptr_t workspace,
intptr_t stream,
)[source]#

Computes backward differentiation of the operator action on a given quantum state.

Parameters:
  • handle (intptr_t) – Library handle.

  • superoperator (intptr_t) – Operator.

  • time (double) – Time value.

  • batch_size (int64_t) – Batch size (>=1).

  • num_params (int32_t) – Number of variable real parameters defined by the user.

  • params (intptr_t) – GPU-accessible pointer to an F-order 2d-array of user-defined real parameter values: params[num_params, batch_size].

  • state_in (intptr_t) – Input quantum state (or a batch).

  • state_out_adj (intptr_t) – Adjoint of the output quantum state (or a batch).

  • state_in_adj (intptr_t) – Adjoint of the input quantum state (or a batch). Note that this array will not be zeroed out on entrance, it will be accumulated into.

  • params_grad (intptr_t) – GPU-accessible pointer where the partial derivatives with respect to the user-defined real parameters will be accumulated (same shape as params). Note that this array will not be zeroed out on entrance, it will be accumulated into.

  • workspace (intptr_t) – Allocated workspace descriptor.

  • stream (intptr_t) – CUDA stream.