-
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.
refactor: Cleanup tket1 serialized op structures (#419)
This is a noisy internal refactor of `::serialize::pytket::op::JsonOp`, extracted from the work towards #379. `JsonOp` was a temporary structure used during the encoding/decoding of pytket circuits that represented two different kinds of operation: - pytket operations with a direct tket2 counterpart - other operations that have to be encoded as OpaqueOps This mixed up the two definitions, and made applying custom logic to one of the variants more annoying. (E.g. the special handling of bit input/outputs for tket2 ops needed for #379). This PR splits the structs into a `Native` and an `Opaque` variant, so we can keep the implementation clean. The code is functionally the same. --------- Co-authored-by: doug-q <[email protected]>
- Loading branch information
Showing
12 changed files
with
643 additions
and
450 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
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.