Skip to content

feat: Expose NormalizeGuppy::squash_borrows flag in python#1412

Merged
acl-cqc merged 3 commits intomainfrom
acl/squ_bor_py
Mar 10, 2026
Merged

feat: Expose NormalizeGuppy::squash_borrows flag in python#1412
acl-cqc merged 3 commits intomainfrom
acl/squ_bor_py

Conversation

@acl-cqc
Copy link
Copy Markdown
Contributor

@acl-cqc acl-cqc commented Feb 20, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.64%. Comparing base (c8f34fa) to head (07c0924).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1412   +/-   ##
=======================================
  Coverage   79.64%   79.64%           
=======================================
  Files         157      157           
  Lines       20455    20456    +1     
  Branches    19466    19466           
=======================================
+ Hits        16291    16292    +1     
  Misses       3184     3184           
  Partials      980      980           
Flag Coverage Δ
python 93.00% <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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

remove_dead_funcs: bool = True,
inline_dfgs: bool = True,
remove_redundant_order_edges: bool = True,
squash_borrows: bool = True,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had to add this myself, not sure if there was an automatic way to regenerate this that I missed? (It does look like it should be a function of the pyo3 directives in passes.rs ??)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

They are working on it, but it's not stable yet

https://pyo3.rs/v0.28.0/python-typing-hints

@acl-cqc acl-cqc requested a review from aborgna-q February 20, 2026 12:30
@acl-cqc acl-cqc marked this pull request as ready for review February 20, 2026 12:30
@acl-cqc acl-cqc requested a review from a team as a code owner February 20, 2026 12:30
@acl-cqc acl-cqc added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit ba25fa1 Mar 10, 2026
23 checks passed
@acl-cqc acl-cqc deleted the acl/squ_bor_py branch March 10, 2026 14:00
github-merge-queue Bot pushed a commit that referenced this pull request Apr 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.13.0](tket-py-v0.12.16...tket-py-v0.13.0)
(2026-04-07)


### ⚠ BREAKING CHANGES

* Removed `Tk2Circuit` use `CompilationState` instead. Non-stable APIs
have been marked as internal. They will be re-designed and stabilized in
future releases.
* Moved `tket::modifier::ModifierResolverPass` to
* Renamed
* Updated public `hugr` dependency to `0.26.0`.
* Minimum supported Rust version bumped to 1.91
* Removed `CircuitHash` trait, use `Circuit::circuit_hash` or
`hugr::algorithms::hash::HugrHash` instead.
* Removed `tket::passes::lower_to_pytket`. Use `NormalizeGuppy` instead.
* Renamed `TKETDecode::decode_inplace` to `decode_into`.
* Removed deprecated `find_tuple_unpack_rewrites`. Use

### Features

* expose ModifierResolverPass to Python
([#1502](#1502))
([9e3e0de](9e3e0de)),
closes [#1452](#1452)
* Expose NormalizeGuppy::squash_borrows flag in python
([#1412](#1412))
([ba25fa1](ba25fa1))
* Follow pass scopes in composable passes
([#1429](#1429))
([ae0016c](ae0016c))
* Move hugr-passes implementations to tket::passes
([#1487](#1487))
([cc5ca5c](cc5ca5c))
* Pass scopes in python API, update to hugr-py 0.16
([#1464](#1464))
([369aba2](369aba2))
* Print full traceback for rust-originated errors
([#1435](#1435))
([9c03ee0](9c03ee0))
* Remove deprecated unpack tuple pass
([#1387](#1387))
([86ac8f9](86ac8f9))
* Remove unused `lower_to_pytket` pass
([#1431](#1431))
([a214abc](a214abc))
* Reorganize `tket::passes` and add `hugr_passes` re-exports
([#1472](#1472))
([b3bc669](b3bc669))
* Replace `Tk2Circuit` with a simpler `CompilationState` definition
([#1482](#1482))
([e814f35](e814f35))
* Replace CircuitHash with hugr's implementation
([#1420](#1420))
([e2b4991](e2b4991))
* Update MSRV to rust 1.91
([#1446](#1446))
([b82a771](b82a771))
* Update to hugr 0.26.0
([#1448](#1448))
([f43a877](f43a877))
* Use raw Hugrs in pytket encoding/decoding API
([#1418](#1418))
([9df9993](9df9993))

---
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 <agustin.borgna@quantinuum.com>
Co-authored-by: Agustín Borgna <121866228+aborgna-q@users.noreply.github.com>
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.

2 participants