paulie.classifier.morph_factory.MorphFactory#
- class paulie.classifier.morph_factory.MorphFactory#
Bases:
objectFactory for constructing a canonical graph
- build(generators)#
Transform a connected graph to a canonic type.
- Parameters:
generators (list[PauliString]) – List of Pauli strings.
- Returns:
State of MorphFactory after transformation
- Return type:
Self
- get_morph()#
Get the canonical graph built by the factory.
- Returns:
Canonical graph.
- Return type:
- is_eq(legs, generators)#
Testing for equivalence of two algebras. All Pauli strings of one algebra are dependent on another.
- Parameters:
legs (list[list[PauliString]]) – List of legs of the canonical graph to compare with.
generators (list[PauliString]) – List of Pauli strings to check for inclusion in the canonical graph
- Returns:
- The result of checking for the equivalence
of generators to a given canonical graph.
- Return type:
- select_dependents(legs, generators)#
Selecting generators that are dependent on the canonical graph
- Parameters:
legs (list[list[PauliString]]) – List of legs of the canonical graph to check with.
generators (list[PauliString]) – List of Pauli strings to check for inclusion in the canonical graph
- Returns:
List of dependent generators.
- Return type: