pauli_expansion_view_compute_operator_fused_application#

cuquantum.bindings.cupauliprop.pauli_expansion_view_compute_operator_fused_application(
intptr_t handle,
intptr_t view_in,
intptr_t expansion_out,
int32_t num_quantum_operators,
quantum_operators,
adjoints,
int32_t num_truncation_strategies,
truncation_strategies,
intptr_t workspace,
intptr_t stream,
)[source]#

Computes the application of a sequence of same-kind quantum operators to a Pauli expansion view in a fused fashion.

This is a multi-operator analogue of pauli_expansion_view_compute_operator_application(). The operators quantum_operators[0] through quantum_operators[num_quantum_operators-1] are applied in order, each adjointed according to the corresponding flag in adjoints. Fused application may fail on the fly (e.g. due to insufficient workspace or output expansion capacity, or because the operator sequence exceeds a hardware-imposed fused-launch limitation); such conditions raise cuPauliPropError with the corresponding CUPAULIPROP_STATUS_INSUFFICIENT_* status.

Parameters:
  • handle (intptr_t) – Library handle.

  • view_in (intptr_t) – Pauli expansion view to apply the operator sequence upon.

  • expansion_out (intptr_t) – Pauli expansion to be overwritten with the result.

  • num_quantum_operators (int32_t) – Number of quantum operators to be applied (length of quantum_operators and adjoints).

  • quantum_operators (object) –

    Sequence of quantum operators given in order of their intended application. It can be:

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

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

  • adjoints (object) –

    A sequence of flags indicating whether to adjoint the corresponding operator. It can be:

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

    • a Python sequence of int.

  • num_truncation_strategies (int32_t) – Number of Pauli expansion truncation strategies.

  • truncation_strategies (object) –

    Pauli expansion truncation strategies. It can be:

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

    • a Python sequence of cupaulipropTruncationStrategy_t.

  • workspace (intptr_t) – Workspace descriptor with memory attached per pauli_expansion_view_prepare_operator_fused_application().

  • stream (intptr_t) – CUDA stream to be used for the operation.