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

fix: Use RemoveDeadFuncsPass instead of deprecated remove_polyfuncs() #759

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

cqc-alec
Copy link
Collaborator

@cqc-alec cqc-alec commented Jan 27, 2025

Fixes #758 .

@cqc-alec cqc-alec changed the title Fix: Use RemoveDeadFuncsPass instead of deprecated remove_polyfuncs() fix: Use RemoveDeadFuncsPass instead of deprecated remove_polyfuncs() Jan 27, 2025
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.31%. Comparing base (b5f5669) to head (c5751b4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #759   +/-   ##
=======================================
  Coverage   82.31%   82.31%           
=======================================
  Files          63       63           
  Lines        7740     7742    +2     
  Branches     7484     7486    +2     
=======================================
+ Hits         6371     6373    +2     
  Misses        979      979           
  Partials      390      390           
Flag Coverage Δ
python 82.42% <ø> (ø)
rust 82.31% <100.00%> (+<0.01%) ⬆️

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.

@cqc-alec cqc-alec marked this pull request as ready for review January 27, 2025 14:06
@cqc-alec cqc-alec requested a review from a team as a code owner January 27, 2025 14:06
@cqc-alec cqc-alec requested review from lmondada and acl-cqc and removed request for lmondada January 27, 2025 14:06
uv.lock Outdated
Copy link
Collaborator

@aborgna-q aborgna-q Jan 27, 2025

Choose a reason for hiding this comment

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

Outdated uv ? Try uv self update.

@@ -23,6 +23,7 @@ required-features = ["cli"]

[dependencies]
hugr.workspace = true
hugr-passes = "0.14.2"
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • Dependencies should go on the workspace's Cargo.toml, and .workspace = true'd here.

  • We are currently at hugr 0.14.1 on the workspace file, we should use the same versions all around.

@@ -80,7 +81,7 @@ impl QSystemPass {
self.validation_level.run_validated_pass(hugr, |hugr, _| {
let mut owned_hugr = Hugr::default();
mem::swap(&mut owned_hugr, hugr);
owned_hugr = remove_polyfuncs(owned_hugr);
RemoveDeadFuncsPass::default().run(&mut owned_hugr).unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

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

The unwrap here is annoying, but returning the error requires a release with CQCL/hugr#1883.
We should have a TODO here linking to that PR.

#753 should fix it later.

@cqc-alec cqc-alec requested a review from aborgna-q January 27, 2025 15:42
@cqc-alec cqc-alec added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit d59bdaa Jan 27, 2025
17 checks passed
@cqc-alec cqc-alec deleted the ae/fixci branch January 27, 2025 16:46
@hugrbot hugrbot mentioned this pull request Jan 20, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 12, 2025
## 🤖 New release

* `tket2`: 0.7.1 -> 0.7.2 (✓ API compatible changes)
* `tket2-hseries`: 0.8.0 -> 0.9.0 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

## `tket2`

<blockquote>

##
[0.7.1](tket2-v0.7.0...tket2-v0.7.1)
- 2025-01-10

### Bug Fixes

- remove unicode pi symbols in rotation extension (#743)
</blockquote>

## `tket2-hseries`

<blockquote>

##
[0.9.0](tket2-hseries-v0.8.0...tket2-hseries-v0.9.0)
- 2025-02-12

### Bug Fixes

- Use `RemoveDeadFuncsPass` instead of deprecated `remove_polyfuncs()`
(#759)
- nondeterminism in lazify-measure (#766)

### New Features

- *(tket2-hseries)* Add `tket2.wasm` extension (#737)
- force-order qfree early and qalloc late. (#762)
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
@hugrbot hugrbot mentioned this pull request Feb 17, 2025
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.

Error from clippy check on CI due to deprecated remove_polyfuncs
2 participants