read_envelope_hugr¶
- hugr.envelope.read_envelope_hugr(envelope: bytes, resolve_from: ExtensionRegistry | None = None) Hugr[source]¶
Decode a HUGR from an envelope.
- Parameters:
envelope – The byte string representing a Hugr envelope.
resolve_from – If not None, an extension registry to resolve the custom operations and types.
- Returns:
The deserialized Hugr object.
- Raises:
ValueError – If the envelope does not contain a single module.