exponentiate_commuting_pauli_sum

pyquil.paulis.exponentiate_commuting_pauli_sum(pauli_sum)[source]

Returns a function that maps all substituent PauliTerms and sums them into a program. NOTE: Use this function with care. Substituent PauliTerms should commute.

Parameters

pauli_sum (PauliSum) – PauliSum to exponentiate.

Return type

Callable[[Union[float, MemoryReference]], Program]

Returns

A function that parametrizes the exponential.