-
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
feat!: get pauli propagation + examples working with new hugr builder #465
Conversation
pyproject.toml
Outdated
@@ -36,7 +38,8 @@ mypy = "^1.10.1" | |||
hypothesis = "^6.105.1" | |||
graphviz = "^0.20" | |||
pre-commit = "^3.7.1" | |||
guppylang = "^0.6.0" | |||
# guppylang = "^0.6.0" | |||
guppylang = { git = "https://github.com/CQCL/guppylang", rev = "3da3936" } |
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.
needed for hugr-py compatibility
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.
This will prevent us from releasing new tket2-py versions. Can we do a guppy release soon?
@@ -178,7 +178,7 @@ impl Tk2Circuit { | |||
Ok(self.clone()) | |||
} | |||
|
|||
fn node_op(&self, node: PyNode) -> PyResult<PyCustomOp> { | |||
fn node_op(&self, node: PyNode) -> PyResult<Cow<[u8]>> { |
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.
temporary hack
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.
😬
Currently requires some horrible hacks like converting nodes via ints and loading operations from bytes. This will be cleared up by fully using the `hugr` package Node, Wire, ops, types in the `TK2Circuit` interface instead of ad-hoc bindings in a follow up PR.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #465 +/- ##
==========================================
- Coverage 82.22% 82.19% -0.04%
==========================================
Files 60 60
Lines 5919 5920 +1
Branches 5410 5399 -11
==========================================
- Hits 4867 4866 -1
- Misses 793 798 +5
+ Partials 259 256 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
I'm not a fan of the [:]
prefix after CircBuild.add
, but things look much cleaner now.
pyproject.toml
Outdated
@@ -36,7 +38,8 @@ mypy = "^1.10.1" | |||
hypothesis = "^6.105.1" | |||
graphviz = "^0.20" | |||
pre-commit = "^3.7.1" | |||
guppylang = "^0.6.0" | |||
# guppylang = "^0.6.0" | |||
guppylang = { git = "https://github.com/CQCL/guppylang", rev = "3da3936" } |
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.
This will prevent us from releasing new tket2-py versions. Can we do a guppy release soon?
@@ -178,7 +178,7 @@ impl Tk2Circuit { | |||
Ok(self.clone()) | |||
} | |||
|
|||
fn node_op(&self, node: PyNode) -> PyResult<PyCustomOp> { | |||
fn node_op(&self, node: PyNode) -> PyResult<Cow<[u8]>> { |
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.
😬
tket2-py/tket2/circuit/build.py
Outdated
FLOAT_T = tys.Opaque( | ||
extension="arithmetic.float.types", | ||
id="float64", | ||
args=[], | ||
bound=tys.TypeBound.Copyable, | ||
) |
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.
This should be defined in hugr-py
. Open an issue there?
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.
will do a PR adding some standard extension types
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.
Will wait for hugr-py 0.4 release before mergin |
🤖 I have created a release *beep* *boop* --- ## [0.1.0a2](tket2-py-v0.1.0...tket2-py-v0.1.0a2) (2024-07-10) ### ⚠ BREAKING CHANGES * `Dfg` binding removed, replaced with builder from `hugr` package. ### Features * Add `lhs` and `rhs` bindings to `Rule` ([#440](#440)) ([49b1c89](49b1c89)) * get pauli propagation + examples working with new hugr builder [#465](#465) ([cab0d87](cab0d87)) --- 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: Agustin Borgna <[email protected]>
BEGIN_COMMIT_OVERRIDE
feat!: get pauli propagation + examples working with new hugr builder #465
Currently requires some horrible hacks like converting nodes via ints and loading operations from bytes. This will be cleared up by fully using the
hugr
package Node, Wire, ops, types in theTK2Circuit
interface instead of ad-hoc bindings in a follow up PR.Release-As: 0.1.0a1
BREAKING CHANGE:
Dfg
binding removed, replaced with builder fromhugr
package.END_COMMIT_OVERRIDE