fix: Pytket barrier operations not being decoded#1069
Merged
Conversation
aborgna-q
commented
Aug 25, 2025
Comment on lines
114
to
116
| fn op_types(&self) -> Vec<PytketOptype> { | ||
| vec![PytketOptype::noop, PytketOptype::Measure] | ||
| vec![PytketOptype::noop, PytketOptype::Barrier] | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
This is the bugfix. op_types declares which operations the decoder should be called for, so we were never translating the barriers.
lmondada
approved these changes
Aug 25, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1069 +/- ##
==========================================
+ Coverage 78.98% 79.03% +0.04%
==========================================
Files 115 115
Lines 13389 13415 +26
Branches 12607 12633 +26
==========================================
+ Hits 10575 10602 +27
+ Misses 2160 2156 -4
- Partials 654 657 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 25, 2025
🤖 I have created a release *beep* *boop* --- ## [0.12.4](tket-py-v0.12.3...tket-py-v0.12.4) (2025-08-25) ### Bug Fixes * Pytket barrier operations not being decoded ([#1069](#1069)) ([4b90ffd](4b90ffd)) --- 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>
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 15, 2025
## 🤖 New release * `tket`: 0.14.0 -> 0.15.0 (✓ API compatible changes) * `tket-qsystem`: 0.20.1 -> 0.21.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `tket` <blockquote> ## [0.15.0](tket-v0.14.0...tket-v0.15.0) - 2025-09-15 ### Bug Fixes - [**breaking**] Fix rotation -> float param type conversion ([#1061](#1061)) - Pytket barrier operations not being decoded ([#1069](#1069)) - Always load parameter expressions as half turns in the decoder ([#1083](#1083)) - Move attribute to come after all the cases. ([#1112](#1112)) ### New Features - Capture pytket's output permutation explicitly in the hugr connectivity ([#1075](#1075)) - Add ResourceScope ([#1052](#1052)) - [**breaking**] Remove unnecessary Arc from PytketDecoder method ([#1114](#1114)) - [**breaking**] Remove deprecated definitions ([#1113](#1113)) </blockquote> ## `tket-qsystem` <blockquote> ## [0.21.0](tket-qsystem-v0.20.1...tket-qsystem-v0.21.0) - 2025-09-15 ### Bug Fixes - [**breaking**] Fix rotation -> float param type conversion ([#1061](#1061)) - Pytket barrier operations not being decoded ([#1069](#1069)) - *(qystem)* fix angle bug in CZ decomposition ([#1080](#1080)) - Always load parameter expressions as half turns in the decoder ([#1083](#1083)) ### New Features - Add a `borrow_array` type replacement pass ([#975](#975)) - Add gpu module ([#1090](#1090)) - [**breaking**] Remove unnecessary Arc from PytketDecoder method ([#1114](#1114)) - [**breaking**] Remove deprecated definitions ([#1113](#1113)) ### Refactor - [**breaking**] Factor out wasm extension code into compute module ([#1089](#1089)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). --------- Co-authored-by: Agustín Borgna <121866228+aborgna-q@users.noreply.github.com> Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Merged
This file contains hidden or 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
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.
A dumb typo in the prelude decoder caused it to never get called for barrier operations, so they were always kept as opaque.
This PR fixes the decoder and adds checks to the tests to ensure we are not missing translations in the roundtrip tests.