Skip to content

Conversation

@tatiana-s
Copy link
Contributor

Closes #832

@tatiana-s tatiana-s requested a review from a team as a code owner April 7, 2025 08:32
@tatiana-s tatiana-s requested a review from lmondada April 7, 2025 08:32
@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

Attention: Patch coverage is 91.20879% with 8 lines in your changes missing coverage. Please review.

Project coverage is 82.28%. Comparing base (8d3be98) to head (588ca71).

Files with missing lines Patch % Lines
tket2/src/extension/debug.rs 93.10% 5 Missing and 1 partial ⚠️
tket2-exts/src/tket2_exts/__init__.py 66.66% 1 Missing ⚠️
tket2-hseries/src/bin/tket2-hseries.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #843      +/-   ##
==========================================
- Coverage   82.41%   82.28%   -0.14%     
==========================================
  Files          66       67       +1     
  Lines        8167     8258      +91     
  Branches     7898     7986      +88     
==========================================
+ Hits         6731     6795      +64     
- Misses       1049     1075      +26     
- Partials      387      388       +1     
Flag Coverage Δ
python 81.61% <66.66%> (-0.17%) ⬇️
rust 82.30% <92.04%> (-0.14%) ⬇️

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.

Copy link
Contributor

@lmondada lmondada left a comment

Choose a reason for hiding this comment

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

Nice! I haven't ever defined an extension myself, I must say the interface is very clean 👌

@tatiana-s tatiana-s added this pull request to the merge queue Apr 23, 2025
Merged via the queue into main with commit 64bbe88 Apr 23, 2025
18 checks passed
@tatiana-s tatiana-s deleted the ts/debug-ext branch April 23, 2025 10:31
This was referenced Apr 23, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 7, 2025
## 🤖 New release

* `tket2`: 0.8.0 -> 0.9.0 (✓ API compatible changes)
* `tket2-hseries`: 0.11.0 -> 0.12.0 (⚠ API breaking changes)

### ⚠ `tket2-hseries` breaking changes

```text
--- failure enum_no_repr_variant_discriminant_changed: enum variant had its discriminant change value ---

Description:
The enum's variant had its discriminant value change. This breaks downstream code that used its value via a numeric cast like `as isize`.
        ref: https://doc.rust-lang.org/reference/items/enumerations.html#assigning-discriminant-values
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/enum_no_repr_variant_discriminant_changed.ron

Failed in:
  variant QSystemOp::ZZPhase 6 -> 5 in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:90
  variant QSystemOp::TryQAlloc 7 -> 6 in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:91
  variant QSystemOp::QFree 8 -> 7 in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:92
  variant QSystemOp::Reset 9 -> 8 in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:93
  variant QSystemOp::MeasureReset 10 -> 9 in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:94

--- failure enum_variant_missing: pub enum variant removed or renamed ---

Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/enum_variant_missing.ron

Failed in:
  variant QSystemOp::ZZMax, previously in file /tmp/.tmpHMF0Rb/tket2-hseries/src/extension/qsystem.rs:90

--- failure trait_method_missing: pub trait method removed or renamed ---

Description:
A trait method is no longer callable, and may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#major-any-change-to-trait-item-signatures
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/trait_method_missing.ron

Failed in:
  method add_zz_max of trait QSystemOpBuilder, previously in file /tmp/.tmpHMF0Rb/tket2-hseries/src/extension/qsystem.rs:189

--- warning partial_ord_enum_variants_reordered: enum variants reordered in #[derive(PartialOrd)] enum ---

Description:
A public enum that derives PartialOrd had its variants reordered. #[derive(PartialOrd)] uses the enum variant order to set the enum's ordering behavior, so this change may break downstream code that relies on the previous order.
        ref: https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html#derivable
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/partial_ord_enum_variants_reordered.ron

Failed in:
  QSystemOp::ZZPhase moved from position 7 to 6, in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:90
  QSystemOp::TryQAlloc moved from position 8 to 7, in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:91
  QSystemOp::QFree moved from position 9 to 8, in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:92
  QSystemOp::Reset moved from position 10 to 9, in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:93
  QSystemOp::MeasureReset moved from position 11 to 10, in /tmp/.tmpKdgXs0/tket2/tket2-hseries/src/extension/qsystem.rs:94
```

<details><summary><i><b>Changelog</b></i></summary><p>

## `tket2`

<blockquote>

##
[0.9.0](tket2-v0.8.0...tket2-v0.9.0)
- 2025-05-06

### New Features

- Add `tket2.bool` extension
([#823](#823))
- Add llvm codegen for `tket2.rotation` extension
([#851](#851))
- Add debug extension with state result op
([#843](#843))

### Refactor

- Better error message on allocation failure.
([#827](#827))
- [**breaking**] Remove node parameter from Circuit
([#824](#824))
</blockquote>

## `tket2-hseries`

<blockquote>

##
[0.12.0](tket2-hseries-v0.11.0...tket2-hseries-v0.12.0)
- 2025-05-06

### New Features

- Add `tket2.bool` extension
([#823](#823))
- *(hseries)* [**breaking**] remove ZZMax operation from Qsystem
extension ([#852](#852))
- Add debug extension with state result op
([#843](#843))

### Refactor

- Better error message on allocation failure.
([#827](#827))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
github-merge-queue bot pushed a commit that referenced this pull request May 16, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.7.0](tket2-exts-v0.6.0...tket2-exts-v0.7.0)
(2025-05-16)


### ⚠ BREAKING CHANGES

* bump to hugr 0.20
* **hseries:** ZZMax removed from Qsystem extension. Use ZZPhase(pi/2).

### Features

* Add `tket2.bool` extension
([#823](#823))
([8818d2f](8818d2f))
* Add debug extension with state result op
([#843](#843))
([64bbe88](64bbe88)),
closes [#832](#832)
* **hseries:** remove ZZMax operation from Qsystem extension
([#852](#852))
([b488125](b488125))


### Miscellaneous Chores

* Bump to hugr-0.20 ([#862](#862))
([652a7d0](652a7d0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Add debug extension

3 participants