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: TermGrouper

Group terms by full Pauli commutation ([P_i, P_j] = 0).

The resulting FlatPartition stores a QubitOperator partition 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.

name()[source]

Return commuting as the algorithm name.

Return type:

str

class qdk_chemistry.algorithms.term_grouper.commuting.QubitWiseCommutingTermGrouper[source]

Bases: TermGrouper

Group 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 QdkExpectationEstimator for measurement-cost reduction.

name()[source]

Return qubit_wise_commuting as the algorithm name.

Return type:

str