annotate_encoding

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

Annotate a HUGR package with encoding parameters.

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

  • params – The serializable encoding parameters.

Raises:

ValueError – If params cannot be serialized as JSON.