qdk_chemistry.algorithms.term_grouper.commuting module
Commutation-based term groupers (full and qubit-wise).
- class qdk_chemistry.algorithms.term_grouper.commuting.FullCommutingTermGrouper[source]
Bases:
TermGrouperGroup terms by full Pauli commutation (
[P_i, P_j] = 0).The resulting
FlatPartitionstores aQubitOperatorpartition where every pair of terms in the same group commutes globally. Useful for Trotter-style decompositions, which can exponentiate a commuting block as a single ordered product without splitting error.
- class qdk_chemistry.algorithms.term_grouper.commuting.QubitWiseCommutingTermGrouper[source]
Bases:
TermGrouperGroup terms by qubit-wise commutation.
Two labels qubit-wise commute when, on every qubit position, the two single-qubit Paulis individually commute (i.e. one is identity or both are equal). All members of a group can be measured in a single basis, which is the property exploited by
QdkExpectationEstimatorfor measurement-cost reduction.