-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor: Move python bindings from tket2
to tket2-py
#235
Merged
Conversation
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
aborgna-q
force-pushed
the
feat/node-bindings
branch
from
November 10, 2023 15:44
5b150c5
to
53d5b15
Compare
ss2165
approved these changes
Nov 10, 2023
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.
nice :)
Codecov Report
@@ Coverage Diff @@
## main #235 +/- ##
==========================================
+ Coverage 76.23% 78.62% +2.38%
==========================================
Files 31 30 -1
Lines 4280 4150 -130
Branches 4280 4150 -130
==========================================
Hits 3263 3263
+ Misses 830 700 -130
Partials 187 187
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 24, 2024
## 🤖 New release * `tket2`: 0.1.0-alpha.1 <details><summary><i><b>Changelog</b></i></summary><p> ## `tket2` <blockquote> ## [0.0.0-alpha.1](https://github.com/CQCL/tket2/releases/tag/tket2-v0.0.0-alpha.1) - 2024-05-24 ### Bug Fixes - Check for rewrite composition in badger ([#255](#255)) - induced cycles in depth optimisation ([#264](#264)) - Encode opaque symbolic constants ([#273](#273)) - Correctly detect custom ops by name ([#281](#281)) - Track input linear units in `Command` ([#310](#310)) - Don't convert tket2 measurements into tket1 ops ([#331](#331)) ### Documentation - Expand the main module and README docs ([#298](#298)) ### New Features - add angle type to tket2 extension ([#231](#231)) - bindings for circuit cost and hash ([#252](#252)) - Implement `PyErr` conversion locally in `tket2-py` ([#258](#258)) - Add a "progress timeout" to badger ([#259](#259)) - [**breaking**] Add lexicographic cost ([#270](#270)) - rewrite tracing ([#267](#267)) - Move pre/post rewrite cost to the RewriteStrategy API ([#276](#276)) - [**breaking**] Lexicographic cost fn ([#277](#277)) - Return rewrite strategies as a generator ([#275](#275)) - add qalloc, qfree, reset ops ([#284](#284)) - [**breaking**] Support any ops in portmatching ([#293](#293)) - Add `PatternMatch::nodes` and `subcircuit` + matching example ([#299](#299)) - Use `IncomingPort` and `OutgoingPort` instead of `Port` where possible. ([#296](#296)) - expose Tk2Op name ([#307](#307)) ### Refactor - Move tket2 code to a workspace member ([#210](#210)) - Restructure the python code ([#211](#211)) - s/taso/badger/ ([#228](#228)) - Move python bindings from `tket2` to `tket2-py` ([#235](#235)) - rename t2op ([#256](#256)) ### Testing - Add small parallel badger test ([#237](#237)) - fix non-deterministic badger test ([#245](#245)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Agustin Borgna <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds transparent wrappers on
tket2-py
that derive pyclass themselves.This has multiple goals:
Cleans up the code. Python stuff goes into the python crate.
Now
tket2:pyo3
andhugr:pyo3
are only used for the python error implementations.(We could potentially move this too, and avoid us the
pyo3
dependency headache).Let's us use the
tket2-py
conversion methods for tket1 and tket2 circuits. This is required for Use tket1 circuit and Hugr interchangeably #178, which is in turn required for all the python bindings in Tracking issue: Python bindings UX #204 that require stable indices.Closes #148
The code is mostly the same, asides from:
PyPatternMatch
with a transparent wrapper. (There was a TODO for this).Python::with_gil
)