ModifierResolverPass¶
- class tket.passes.ModifierResolverPass(_scope=GlobalScope.PRESERVE_PUBLIC)[source]¶
Bases:
ComposablePassA pass to resolve Guppy modifiers (control, dagger, power).
Original function nodes replaced by solved modified versions may be removed when no longer needed and allowed by the pass scope. Nodes whose interface is preserved by the scope are kept.
- __call__(hugr, *, inplace=True)¶
Call the pass to transform a HUGR, returning a Hugr.
- Return type:
Hugr
- __init__(_scope=GlobalScope.PRESERVE_PUBLIC)¶
- property name: str¶
Returns the name of the pass.
- run(hugr, *, inplace=True)[source]¶
Run the pass to transform a HUGR, returning a PassResult.
See
implement_pass_run()for a helper function to implement this method.- Return type:
- then(other)¶
Perform another composable pass after this pass.
- Return type:
ComposablePass