Skip to content
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

chore!: Update to next version of hugr #720

Merged
merged 11 commits into from
Dec 16, 2024
Merged

chore!: Update to next version of hugr #720

merged 11 commits into from
Dec 16, 2024

Conversation

doug-q
Copy link
Contributor

@doug-q doug-q commented Dec 12, 2024

Updates the dependencies to hugr-rs 0.14 and hugr-py 0.10.

Now that hugrs carry their required extensions, we dropped the (internal) extensions field from the Circuit struct.

BREAKING CHANGE: Updated hugr rust dependency to 0.14.0
BREAKING CHANGE: Extension are now defined in hugr 0.14 style. Replaced the ROTATION_TYPE with a method call, and dropped the per-extension registry definitions.

@doug-q doug-q requested a review from aborgna-q December 12, 2024 14:00
IdentList::new(extension).unwrap(),
bound.into(),
)))
todo!()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what to do here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. We can no longer build these, so I just removed the unused method.
Something similar happened with the PyHugrOps in a previous version bump.
I'll have to define some "python extension" if we want to add new ops and types at runtime from the python side.

@hugrbot
Copy link
Collaborator

hugrbot commented Dec 12, 2024

This PR contains breaking changes to the public Rust API.

cargo-semver-checks summary

--- failure auto_trait_impl_removed: auto trait no longer implemented ---

Description:
A public type has stopped implementing one or more auto traits. This can break downstream code that depends on the traits being implemented.
      ref: https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/auto_trait_impl_removed.ron

Failed in:
type Units is no longer UnwindSafe, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/circuit/units.rs:62
type Units is no longer RefUnwindSafe, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/circuit/units.rs:62

--- failure enum_variant_missing: pub enum variant removed or renamed ---

Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It 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.38.0/src/lints/enum_variant_missing.ron

Failed in:
variant RewriterSerialisationError::OpaqueOp, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/rewrite/ecc_rewriter.rs:221

--- failure pub_module_level_const_missing: pub module-level const is missing ---

Description:
A public const is missing, renamed, or changed from const to static.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/pub_module_level_const_missing.ron

Failed in:
ROTATION_TYPE in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/extension/rotation.rs:40
ROTATION_CUSTOM_TYPE in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/extension/rotation.rs:36

--- 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.38.0/src/lints/struct_missing.ron

Failed in:
struct tket2::extension::REGISTRY, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/extension.rs:39

@aborgna-q aborgna-q marked this pull request as ready for review December 16, 2024 15:35
@aborgna-q aborgna-q requested a review from a team as a code owner December 16, 2024 15:35
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 81.25000% with 51 lines in your changes missing coverage. Please review.

Project coverage is 82.80%. Comparing base (9033daa) to head (ca105a8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tket2/src/serialize.rs 50.00% 1 Missing and 6 partials ⚠️
tket2-hseries/src/extension/qsystem.rs 80.00% 3 Missing and 2 partials ⚠️
tket2-hseries/src/extension/result.rs 81.81% 3 Missing and 1 partial ⚠️
tket2-hseries/src/lib.rs 77.77% 1 Missing and 3 partials ⚠️
tket2/src/extension/rotation.rs 87.09% 4 Missing ⚠️
tket2-hseries/src/extension/futures.rs 75.00% 3 Missing ⚠️
tket2/src/extension/sympy.rs 57.14% 3 Missing ⚠️
tket2/src/ops.rs 84.21% 3 Missing ⚠️
tket2/src/serialize/pytket/encoder.rs 78.57% 1 Missing and 2 partials ⚠️
tket2/src/serialize/pytket/op/native.rs 66.66% 1 Missing and 2 partials ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #720      +/-   ##
==========================================
- Coverage   83.10%   82.80%   -0.31%     
==========================================
  Files          62       62              
  Lines        7234     7199      -35     
  Branches     6979     6944      -35     
==========================================
- Hits         6012     5961      -51     
- Misses        850      867      +17     
+ Partials      372      371       -1     
Flag Coverage Δ
python 82.35% <ø> (ø)
rust 82.81% <81.25%> (-0.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aborgna-q aborgna-q requested review from ss2165 and removed request for aborgna-q December 16, 2024 16:13
tket2-py/src/ops.rs Outdated Show resolved Hide resolved
/// Wrapped in an Arc to allow sharing between circuits, specially for borrowed circuits.
///
/// Defaults to an standard set of quantum extensions and Hugr's std set.
required_extensions: Option<Vec<Arc<Extension>>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥

tket2/src/rewrite/ecc_rewriter.rs Outdated Show resolved Hide resolved
aborgna-q and others added 2 commits December 16, 2024 16:22
@aborgna-q aborgna-q requested a review from ss2165 December 16, 2024 16:24
@aborgna-q aborgna-q self-assigned this Dec 16, 2024
@aborgna-q aborgna-q added this pull request to the merge queue Dec 16, 2024
Merged via the queue into main with commit 4a3a5a5 Dec 16, 2024
17 checks passed
@aborgna-q aborgna-q deleted the doug/hugr-next branch December 16, 2024 16:33
github-merge-queue bot pushed a commit that referenced this pull request Dec 16, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.3.0](tket2-exts-v0.2.0...tket2-exts-v0.3.0)
(2024-12-16)


### ⚠ BREAKING CHANGES

* Updated `hugr` rust dependency to `0.14.0` Extension are now defined
in `hugr 0.14` style. Replaced the `ROTATION_TYPE` with a method call,
and dropped the per-extension registry definitions.

### Miscellaneous Chores

* Update to next version of hugr
([#720](#720))
([4a3a5a5](4a3a5a5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Agustín Borgna <[email protected]>
Co-authored-by: Agustín Borgna <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Dec 16, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.3.0](tket2-eccs-v0.2.0...tket2-eccs-v0.3.0)
(2024-12-16)


### ⚠ BREAKING CHANGES

* Updated `hugr` rust dependency to `0.14.0` Extension are now defined
in `hugr 0.14` style. Replaced the `ROTATION_TYPE` with a method call,
and dropped the per-extension registry definitions.

### Features

* move extensions to auxillary package
([#682](#682))
([dd78f9a](dd78f9a))


### Reverts

* "Support python 3.13
([#653](#653))"
([#657](#657))
([3fb67ac](3fb67ac))


### Miscellaneous Chores

* Update to next version of hugr
([#720](#720))
([4a3a5a5](4a3a5a5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Agustín Borgna <[email protected]>
Co-authored-by: Agustín Borgna <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Dec 16, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.6.0](tket2-py-v0.5.1...tket2-py-v0.6.0)
(2024-12-16)


### ⚠ BREAKING CHANGES

* Updated `hugr` rust dependency to `0.14.0` Extension are now defined
in `hugr 0.14` style. Replaced the `ROTATION_TYPE` with a method call,
and dropped the per-extension registry definitions.
* all references to "hseries" including extension, modules and structs
renamed to "qsystem"
* hseries qalloc op replaced with fallible TryQalloc

### Features

* update measurement and alloc operations
([#702](#702))
([a7a0201](a7a0201))


### Miscellaneous Chores

* Update to next version of hugr
([#720](#720))
([4a3a5a5](4a3a5a5))


### Code Refactoring

* rename hseries to qsystem
([#703](#703))
([1e90173](1e90173))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Agustín Borgna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants