Skip to content

Commuting Pauli Exponentiation

The CommutingPauliExponentiation function produces the exponent of a commuting pauli strings.

Syntax

Function: CommutingPauliExponentiation

Parameters:

  • pauli_operator: PauliOperator
    • pauli_list: List[Tuple[str, complex]]
  • evolution_coefficient: Union[float, Parameter]

Example

{
  "functions": [
      {
          "name": "main",
          "body": [
              {
                  "function": "CommutingPauliExponentiation",
                  "function_params": {
                      "pauli_operator": {
                          "pauli_list": [
                              ["IYX", 0.5],
                              ["ZIX", 0.7],
                              ["ZII", 0.3]
                          ]
                      },
                      "evolution_coefficient": "x"
                  }
              }
          ]
      }
  ]
}
from classiq.applications.chemistry import PauliOperator
from classiq.builtin_functions import (
    CommutingPauliExponentiation,
)

from classiq import Model, synthesize

pauli_list = [("IYX", 0.5), ("ZIX", 0.7), ("ZII", 0.3)]
exponentiation = CommutingPauliExponentiation(
    pauli_operator=PauliOperator(pauli_list=pauli_list), evolution_coefficient="x"
)
model = Model()
model.CommutingPauliExponentiation(params=exponentiation)
synthesize(model.get_model())

 Commuting_Pauli_Exponentiation_Example