qdk_chemistry.utils.zassenhaus_generation module
Symbolic generator for Zassenhaus exponents and evaluation plans.
This module provides utilities for generating symbolic Zassenhaus exponents and building structured commutator evaluation plans. The generated plans identify shared nested commutator sub-expressions, enabling efficient caching and linear-time evaluation of the commutator DAG.
- class qdk_chemistry.utils.zassenhaus_generation.CommutatorNode(index)[source]
Bases:
objectReference to a nested commutator in a generated evaluation plan.
- Parameters:
index (int)
- qdk_chemistry.utils.zassenhaus_generation.zassenhaus_commutator_plan(leaves, max_order=5)[source]
Compute Zassenhaus exponents and an explicit nested-commutator DAG.
The returned exponents reference either primitive leaves or
CommutatorNodeinstances. The returned plan maps eachCommutatorNodeto its left and right child references. Nodes are inserted after their children, so iteration overplan.items()gives a valid evaluation order.- Return type:
tuple[dict[int,dict[Hashable|CommutatorNode,Fraction]],dict[CommutatorNode,tuple[Hashable|CommutatorNode,Hashable|CommutatorNode]]]- Parameters: