ToyK2Instance¶
- class guppyft.code.toy_k2.encode.ToyK2Instance(_spec: EncodeSpec, _options: _ToyK2Options)[source]¶
A ToyK2 architecture instance built by ToyK2Builder.build.
- __eq__(other)¶
Return self==value.
- __init__(_spec: EncodeSpec, _options: _ToyK2Options) None¶
- __repr__()¶
Return repr(self).
- check_may_encode(hugr: Package) None[source]¶
Check whether any issues can be detected that would arise when trying to encode the given package, e.g. the package containing unsupported gates.
Note that this function returning without error is not a guarantee that a subsequent call to encode will succeed.