Skip to main contentIBM Quantum Documentation
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

Observable terms

qiskit_addon_cutting.utils.observable_terms

Utilities for working with the unique terms of a collection of SparsePauliOps.

gather_unique_observable_terms

gather_unique_observable_terms(observables)

GitHub

Inspect the contents of each observable to find and return the unique Pauli terms.

Return type

PauliList

Parameters

observables (Sequence[Pauli | SparsePauliOp] | PauliList)

reconstruct_observable_expvals_from_terms

reconstruct_observable_expvals_from_terms(observables, term_expvals)

GitHub

Reconstruct the expectation values given the expectation value of each unique term.

Return type

list[complex]

Parameters

  • observables (Iterable[Pauli | SparsePauliOp] | PauliList)
  • term_expvals (Mapping[Pauli, float |complex])
Was this page helpful?
Report a bug or request content on GitHub.