ImplementOpsSpec

class guppyft.encode.ImplementOpsSpec(*, ops: ~guppyft.encode._implement_ops.OpReplacements, tys: ~guppyft.encode._implement_ops.TyReplacements = <factory>, build_wrapper: ~collections.abc.Callable[[~guppylang.defs.GuppyFunctionDefinition[(), None]], ~guppylang.defs.GuppyFunctionDefinition[(), None]] = <function ImplementOpsSpec.<lambda>>, libs: list[~hugr.package.Package] = <factory>)[source]

A specification for the implement ops pass, supplying implementations to a set of HUGR extension ops.

__delattr__(name)

Implement delattr(self, name).

__eq__(other)

Return self==value.

__init__(*, ops: ~guppyft.encode._implement_ops.OpReplacements, tys: ~guppyft.encode._implement_ops.TyReplacements = <factory>, build_wrapper: ~collections.abc.Callable[[~guppylang.defs.GuppyFunctionDefinition[(), None]], ~guppylang.defs.GuppyFunctionDefinition[(), None]] = <function ImplementOpsSpec.<lambda>>, libs: list[~hugr.package.Package] = <factory>) None
__repr__()

Return repr(self).

__setattr__(name, value)

Implement setattr(self, name, value).

build_wrapper()

Allows creating a wrapper around the transformed program, e.g. to setup and teardown the environment required for the op implementations.

libs: list[Package]

Additional libraries required to run the transformed program.

ops: OpReplacements

The operations to replace.

tys: TyReplacements

The types to replace.