-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hugr-py):
AsCustomOp
protocol for user-defined custom op types. (
#1290) Downstream users can implement this protocol to use their own convenience classes. Typically a use wants to implement: - `to_custom` - `__call__` to provide a useful calling signature. - `from_custom` if different instances of the type correspond to different ops (non-singleton). Replace existing custom operation types with this. Follow ups: - Similar thing for custom types. - Optional: allow these types to register themselves with `serialization.ops.CustomOp` so they can be deserialized directly.
- Loading branch information
Showing
5 changed files
with
235 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.