create_operator_action#

cuquantum.bindings.cudensitymat.create_operator_action(
intptr_t handle,
int32_t num_operators,
operators,
int scope_kind,
int approach_kind,
) intptr_t[source]#

Creates an action descriptor for one or more operators, thus defining an aggregate action of the operator(s) on a set of input quantum states compliant with the operator domains, where all input quantum states can also be batched.

Parameters:
  • handle (intptr_t) – Library handle.

  • num_operators (int32_t) – Number of operators involved (number of operator-state products).

  • operators (object) –

    Constituting operator(s) with the same domain of action. Some of the operators may be set to NULL to represent zero action on a specific input quantum state. It can be:

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

    • a Python sequence of ints (as pointer addresses).

  • scope_kind (StateFittingScopeKind) – Operator action scope (full or split). State-fitting enum cudensitymatStateFittingScopeKind_t; selects the dense (FULL) or factorized (SPLIT, e.g. MPS) state-fitting code path used when applying the operator(s).

  • approach_kind (StateFittingApproachKind) – Operator action approach. State-fitting enum cudensitymatStateFittingApproachKind_t; selects the gauge/orthogonalization strategy used to keep the output state representable in the chosen scope.

Returns:

Operator action.

Return type:

intptr_t