qdk_chemistry.algorithms.term_grouper.base module

Abstract base class and factory for term-grouper algorithms.

class qdk_chemistry.algorithms.term_grouper.base.TermGrouper[source]

Bases: Algorithm

Abstract base class for algorithms that partition Hamiltonian terms.

A TermGrouper consumes a QubitOperator and returns a new QubitOperator whose term_partition is populated with the grouping computed by the strategy.

Subclasses implement _run_impl, which must return a new QubitOperator (the input must not be mutated).

__init__()[source]

Initialise the term grouper with default settings.

type_name()[source]

Return term_grouper as the algorithm type name.

Return type:

str

class qdk_chemistry.algorithms.term_grouper.base.TermGrouperFactory[source]

Bases: AlgorithmFactory

Factory for TermGrouper instances.

algorithm_type_name()[source]

Return term_grouper as the algorithm type name.

Return type:

str

default_algorithm_name()[source]

Return commuting as the default term-grouper algorithm.

Return type:

str