ExtensionResolutionResult¶
- class hugr.ext.ExtensionResolutionResult(used_extensions: ExtensionRegistry = <factory>, unresolved_extensions: set[ExtensionId] = <factory>, unresolved_ops: dict[tuple[tys.ExtensionId, str], ops.Custom] = <factory>, unresolved_types: dict[tuple[tys.ExtensionId, str], tys.Opaque] = <factory>)[source]¶
Bases:
objectResult of resolving extensions in a HUGR.
- Parameters:
used_extensions – The extensions used by the HUGR.
unresolved_extensions – A set of extension IDs referenced in the HUGR but not found in the given registry.
unresolved_ops – The Custom operations that could not be resolved to an ExtOp because the operation was not found in the registry. Indexed by (extension ID, operation name).
unresolved_types – The Opaque types that could not be resolved to an ExtType because the type was not found in the registry. Indexed by (extension ID, type name).
Methods
Add the extensions from another result to this result.
Get the set of used extension IDs.
Attributes
used_extensionsunresolved_extensionsunresolved_opsunresolved_types- extend(other: ExtensionResolutionResult) None[source]¶
Add the extensions from another result to this result.
- Parameters:
other – The result of resolving extensions to add.