Overview
Currently there is a transformer (EvaluateMathExpr) which does evaluation of MathExpr objects: https://github.com/OpenQuantumDesign/midstack/blob/13ed42c7c0e37ce6078727403727d18464454f9f/quantumion/compiler/math.py#L25
The logic of this transformer can be move to VerificationFlow graph:
https://github.com/OpenQuantumDesign/midstack/blob/13ed42c7c0e37ce6078727403727d18464454f9f/quantumion/compiler/analog/verification_flow.py#L114
so that the MathExpr objects can be simplified during the Canonicalization process.
Fix
Add a subgraph in VerificationFlow graph to canonicalize and evaluate MathExpr objects.
Overview
Currently there is a transformer (
EvaluateMathExpr) which does evaluation ofMathExprobjects: https://github.com/OpenQuantumDesign/midstack/blob/13ed42c7c0e37ce6078727403727d18464454f9f/quantumion/compiler/math.py#L25The logic of this transformer can be move to
VerificationFlowgraph:https://github.com/OpenQuantumDesign/midstack/blob/13ed42c7c0e37ce6078727403727d18464454f9f/quantumion/compiler/analog/verification_flow.py#L114
so that the
MathExprobjects can be simplified during the Canonicalization process.Fix
Add a subgraph in
VerificationFlowgraph to canonicalize and evaluateMathExprobjects.