annotate_encoding

guppyft.encode.annotate_encoding(hugr: Package | Hugr[Any], encoding_name: str, params: Mapping[str, Any]) → None[source]

Annotate a HUGR package with encoding parameters.

Parameters:
  • hugr – The package or HUGR to annotate.

  • encoding_name – The name of the encoding to annotate.

  • params – The serializable encoding parameters.

Raises:

ValueError – If params cannot be serialized as JSON.