QSystemPass¶
- class tket.passes.QSystemPass(*, constant_fold=True, monomorphize=True, force_order=True, lazify=True, hide_funcs=True, _scope=GlobalScope.PRESERVE_PUBLIC)[source]¶
Bases:
ComposablePassA pass to convert quantum ops to qsystem ops.
Parameters:
constant_fold: Whether to perform constant folding.
monomorphize: Whether to monomorphize generic functions.
force_order: Whether to enforce total ordering of all HUGR operations.
lazify: Whether to replace measurements with lazy measurements.
hide_funcs: Whether to mark all functions as private.
- __call__(hugr, *, inplace=True)¶
Call the pass to transform a HUGR, returning a Hugr.
- Return type:
Hugr
- __init__(*, constant_fold=True, monomorphize=True, force_order=True, lazify=True, hide_funcs=True, _scope=GlobalScope.PRESERVE_PUBLIC)¶
- constant_fold: bool = True¶
- force_order: bool = True¶
- hide_funcs: bool = True¶
- lazify: bool = True¶
- monomorphize: bool = True¶
- 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