PytketHugrPass

class tket.passes.PytketHugrPass(*pytket_passes)[source]

Bases: ComposablePass

__call__(hugr, *, inplace=True)

Call the pass to transform a HUGR, returning a Hugr.

Return type:

Hugr

__init__(*pytket_passes)[source]

Initialize a PytketHugrPass from a BasePass instance.

property name: str

Returns the name of the pass.

pytket_passes: list[BasePass]

A class which provides an interface to apply pytket passes to Hugr programs.

The user can create a PytketHugrPass object from any serializable member of pytket.passes.

run(hugr, *, inplace=True)[source]

Run the pytket pass as a HUGR transform returning a PassResult.

Return type:

PassResult

then(other)[source]

Perform another composable pass after this pass.

Return type:

ComposablePass

with_scope(_scope)[source]

Set the scope of this pass and return self.

Return type:

ComposablePass