-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Add emitters for tket-qsystem #1039
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1039 +/- ##
==========================================
- Coverage 78.47% 78.45% -0.02%
==========================================
Files 98 102 +4
Lines 12461 12641 +180
Branches 12182 12362 +180
==========================================
+ Hits 9779 9918 +139
- Misses 2035 2072 +37
- Partials 647 651 +4
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:
|
f8f71f0
to
6a8c187
Compare
6a8c187
to
6a273e9
Compare
tket-qsystem/src/pytket/qsystem.rs
Outdated
QSystemOp::LazyMeasureReset => PytketOptype::Measure, | ||
QSystemOp::MeasureReset => PytketOptype::Measure, |
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.
Not sure if these are right -- pytket Measure
doesn't necessarily imply Reset
. Also not sure if it matters.
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.
Right. It should probable be translated into two commands.
There's no utility to write that quickly yet, so I'll leave them as unsupported for now.
tket-qsystem/src/pytket/tests.rs
Outdated
for (key, value) in &perm { | ||
let valid_qubits = circ.qubits.contains(®ister::Qubit::from(key.clone())) | ||
&& circ.qubits.contains(®ister::Qubit::from(value.clone())); | ||
let valid_bits = circ.bits.contains(®ister::Bit::from(key.clone())) |
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.
The implicit permutation should contain qubits only, no bits.
Depends on #1039 - Adds an optional config parameter to all the `load_tk1` / `save_tk1` utilities, so we don't use the default by mistake. - Uses the new qsystem encoder/decoders in `tket-py`, so now we can load `ZZMax`/`ZZPhase`/`PhasedX` BREAKING CHANGE: Added encode/decode config arguments to pytket load/store utilities This is not a breaking change for the python lib, so I'll override the flag for release-please: BEGIN_COMMIT_OVERRIDE feat: Support qsystem native operations when loading pytket circuits END_COMMIT_OVERRIDE
## 🤖 New release * `tket`: 0.13.2 -> 0.14.0 (✓ API compatible changes) * `tket-qsystem`: 0.18.1 -> 0.19.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `tket` <blockquote> ## [0.14.0](tket-v0.13.2...tket-v0.14.0) - 2025-08-18 ### New Features - [**breaking**] Allow PytketTypeTranslators to translate nested types ([#1038](#1038)) - Define a wire tracker for the new pytket decoder ([#1036](#1036)) - [**breaking**] Reworked pytket decoder framework ([#1030](#1030)) - [**breaking**] Use qsystem encoder/decoders in tket-py ([#1041](#1041)) - [**breaking**] Avoid eagerly cloning SerialCircuits when decoding from pytket ([#1048](#1048)) ### Refactor - [**breaking**] Rename tk2 encoder names to tket ([#1037](#1037)) </blockquote> ## `tket-qsystem` <blockquote> ## [0.19.0](tket-qsystem-v0.18.1...tket-qsystem-v0.19.0) - 2025-08-18 ### New Features - Add emitters for tket-qsystem ([#1039](#1039)) - [**breaking**] Avoid eagerly cloning SerialCircuits when decoding from pytket ([#1048](#1048)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
Implements encoder/decoders for the
tket.qsystem
andtket.futures
extensions.Currently I'm only translating
PhasedX
,ZZPhase
andZZMax
from pytket, as those are the operations that can be represented directly withQSystemOp
s.Should we include more?