Skip to content

Conversation

@doug-q
Copy link
Contributor

@doug-q doug-q commented May 20, 2025

No description provided.

@doug-q doug-q changed the base branch from main to ts/replace-bool May 20, 2025 08:14
Base automatically changed from ts/replace-bool to main May 21, 2025 13:21
@doug-q doug-q force-pushed the doug/replace-static-array branch from 9de417f to a93a1ac Compare May 22, 2025 08:31
@codecov
Copy link

codecov bot commented May 22, 2025

Codecov Report

Attention: Patch coverage is 90.09434% with 21 lines in your changes missing coverage. Please review.

Project coverage is 82.71%. Comparing base (5ae0ab9) to head (18460af).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tket2-hseries/src/replace_bools/static_array.rs 90.33% 9 Missing and 11 partials ⚠️
tket2-hseries/src/replace_bools.rs 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #885      +/-   ##
==========================================
+ Coverage   82.54%   82.71%   +0.17%     
==========================================
  Files          72       73       +1     
  Lines        8827     9039     +212     
  Branches     8555     8767     +212     
==========================================
+ Hits         7286     7477     +191     
- Misses       1098     1107       +9     
- Partials      443      455      +12     
Flag Coverage Δ
rust 82.75% <90.09%> (+0.18%) ⬆️

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.

@doug-q doug-q changed the title Doug/replace static array feat(tket2-hseries): Remove static_array<tket2.bool> before replace_booling. May 22, 2025
@doug-q doug-q marked this pull request as ready for review May 22, 2025 10:34
@doug-q doug-q requested a review from a team as a code owner May 22, 2025 10:34
@doug-q doug-q requested a review from ss2165 May 22, 2025 10:34
Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

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

Happy to approve as is but want to note that in qsystem::barrier there is a load of code to lazily define functions for particular A->B lowerings and reuse them, this PR inserts local HUGRs for everything. You may wish to consider the function approach to reduce code bloat.

type Result<T> = std::result::Result<T, ReplaceStaticArrayBoolPassError>;

/// Provides a `ReplaceStaticArrayBoolPass` which replaces static arrays
/// containing `tket2.bool` with static arrays containing `bool_t` values.
Copy link
Member

Choose a reason for hiding this comment

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

could be clearer what bool_t is

@doug-q doug-q added this pull request to the merge queue May 22, 2025
Merged via the queue into main with commit 8b8de86 May 22, 2025
20 checks passed
@doug-q doug-q deleted the doug/replace-static-array branch May 22, 2025 14:03
@hugrbot hugrbot mentioned this pull request May 21, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 22, 2025
## 🤖 New release

* `tket2`: 0.10.0 -> 0.11.0 (✓ API compatible changes)
* `tket2-hseries`: 0.13.0 -> 0.14.0 (⚠ API breaking changes)

### ⚠ `tket2-hseries` breaking changes

```text
--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself 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.41.0/src/lints/enum_missing.ron

Failed in:
  enum tket2_hseries::lazify_measure::LazifyMeasurePassError, previously in file /tmp/.tmpd3CB3X/tket2-hseries/src/lazify_measure.rs:63
  enum tket2_hseries::lazify_measure::LazifyMeasureRewrite, previously in file /tmp/.tmpd3CB3X/tket2-hseries/src/lazify_measure.rs:110

--- 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.41.0/src/lints/enum_variant_missing.ron

Failed in:
  variant QSystemPassError::LazyMeasureError, previously in file /tmp/.tmpd3CB3X/tket2-hseries/src/lib.rs:58

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself 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.41.0/src/lints/function_missing.ron

Failed in:
  function tket2_hseries::lazify_measure::replace_measure_ops, previously in file /tmp/.tmpd3CB3X/tket2-hseries/src/lazify_measure.rs:79

--- failure module_missing: pub module removed or renamed ---

Description:
A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/module_missing.ron

Failed in:
  mod tket2_hseries::lazify_measure, previously in file /tmp/.tmpd3CB3X/tket2-hseries/src/lazify_measure.rs:1

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself 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.41.0/src/lints/struct_missing.ron

Failed in:
  struct tket2_hseries::lazify_measure::LazifyMeasurePass, previously in file /tmp/.tmpd3CB3X/tket2-hseries/src/lazify_measure.rs:46

--- failure trait_added_supertrait: non-sealed trait added new supertraits ---

Description:
A non-sealed trait added one or more supertraits, which breaks downstream implementations of the trait
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#generic-bounds-tighten
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/trait_added_supertrait.ron

Failed in:
  trait tket2_hseries::extension::qsystem::QSystemOpBuilder gained ArrayOpBuilder in file /tmp/.tmpYKdcGW/tket2/tket2-hseries/src/extension/qsystem.rs:222
```

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

## `tket2`

<blockquote>

##
[0.11.0](tket2-v0.10.0...tket2-v0.11.0)
- 2025-05-22

### New Features

- [**breaking**] Add `ReplaceBoolPass`
([#854](#854))

### Refactor

- Use black_box from standard library.
([#878](#878))
</blockquote>

## `tket2-hseries`

<blockquote>

##
[0.14.0](tket2-hseries-v0.13.0...tket2-hseries-v0.14.0)
- 2025-05-22

### Bug Fixes

- *(tket2-hseries)* ensure deterministic lowering using maps
([#884](#884))

### New Features

- *(tket2-hseries)* [**breaking**] insert RuntimeBarrier across qubits
in a Barrier ([#866](#866))
- [**breaking**] Add `ReplaceBoolPass`
([#854](#854))
- *(tket2-hseries)* Remove `static_array<tket2.bool>` before
`replace_bool`ing. ([#885](#885))

### Refactor

- *(tket2-hseries)* use smaller angle decompositions for CZ and CCX
([#883](#883))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: Seyon Sivarajah <[email protected]>
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.

3 participants