-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add missing OpTypes #37
Conversation
src/opbox.rs
Outdated
pauli_gadgets: Vec<(Vec<String>, String)>, | ||
/// Synthesis strategy. See [`PauliSynthStrat`]. | ||
#[serde(default)] | ||
synthesis_strategy: PauliSynthStrat, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the names match those used in TKET serialization ( https://github.com/CQCL/tket/blob/a2f6fab8a57da8787dfae94764b7c3a8e5779024/schemas/circuit_v1.json#L832 )?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a full pass on the schema to ensure our definition is up-to-date.
Apparently some of the already-present box definitions where missing or incorrect, so I also fixed them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately #36 won't be able to catch mismatching attributes.
To validate that we'd need to add tests that construct each possible pytket
optype and check it against the rust code 🤔
I may add a low-priority issue for that.
src/optype.rs
Outdated
@@ -207,6 +213,12 @@ pub enum OpType { | |||
/// \end{array} \right] \f$ | |||
CSXdg, | |||
|
|||
/// Controlled \ref OpType::S gate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use rust style for cross-references rather than doxygen style. (Several more examples of this below.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
## 🤖 New release * `tket-json-rs`: 0.3.1 -> 0.4.0 (⚠️ API breaking changes) ###⚠️ `tket-json-rs` breaking changes ``` --- failure enum_missing: pub enum removed or renamed --- Description: A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.30.0/src/lints/enum_missing.ron Failed in: enum tket_json_rs::circuit_json::OpBox, previously in file /tmp/.tmpVNdz4z/tket-json-rs/src/circuit_json.rs:67 enum tket_json_rs::circuit_json::ToffoliBoxSynthStrat, previously in file /tmp/.tmpVNdz4z/tket-json-rs/src/circuit_json.rs:302 --- failure struct_missing: pub struct removed or renamed --- Description: A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.30.0/src/lints/struct_missing.ron Failed in: struct tket_json_rs::circuit_json::BoxID, previously in file /tmp/.tmpVNdz4z/tket-json-rs/src/circuit_json.rs:58 struct tket_json_rs::circuit_json::PauliStabiliser, previously in file /tmp/.tmpVNdz4z/tket-json-rs/src/circuit_json.rs:51 ``` <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## 0.4.0 (2024-04-08) ### Bug Fixes - Add missing OpTypes ([#37](#37)) ### Miscellaneous Tasks - [**breaking**] Update pyo3 to 0.21 ([#33](#33)) ### Refactor - Move `OpBox` to a new module ([#35](#35)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Agustín Borgna <121866228+aborgna-q@users.noreply.github.com>
Adds the missing optypes listed in #36.
Fixes #30.