Skip to content

Conversation

@acl-cqc
Copy link
Contributor

@acl-cqc acl-cqc commented Nov 28, 2025

Final part of Luca's #1273, following #1288 and #1289.

I've broken these bits out because I think we should probably be doing much less here and should rely on Constant Folding to remove the conversions etc.

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 73.34852% with 234 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.67%. Comparing base (0f1d700) to head (d53f8d5).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
tket/src/subcircuit.rs 74.78% 165 Missing and 14 partials ⚠️
tket/src/resource.rs 69.35% 18 Missing and 1 partial ⚠️
tket/src/rewrite/strategy.rs 5.00% 19 Missing ⚠️
tket/src/resource/scope.rs 85.71% 5 Missing and 2 partials ⚠️
tket/src/portmatching/matcher.rs 33.33% 4 Missing ⚠️
tket/src/resource/types.rs 0.00% 2 Missing ⚠️
tket/src/rewrite.rs 83.33% 1 Missing and 1 partial ⚠️
tket/src/rewrite/trace.rs 0.00% 1 Missing ⚠️
tket/src/subcircuit/interval.rs 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1290      +/-   ##
==========================================
- Coverage   79.46%   78.67%   -0.79%     
==========================================
  Files         160      161       +1     
  Lines       20378    21364     +986     
  Branches    19446    20398     +952     
==========================================
+ Hits        16194    16809     +615     
- Misses       3201     3560     +359     
- Partials      983      995      +12     
Flag Coverage Δ
python 92.92% <ø> (+0.27%) ⬆️
qis-compiler 100.00% <ø> (ø)
rust 77.98% <73.34%> (-0.84%) ⬇️

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.

@hugrbot
Copy link
Collaborator

hugrbot commented Nov 28, 2025

This PR contains breaking changes to the public Rust API.
Please deprecate the old API instead (if possible), or mark the PR with a ! to indicate a breaking change.

cargo-semver-checks summary
    Building tket v0.16.0 (current)
     Built [  44.423s] (current)
   Parsing tket v0.16.0 (current)
    Parsed [   0.102s] (current)
  Building tket v0.16.0 (baseline)
     Built [  42.852s] (baseline)
   Parsing tket v0.16.0 (baseline)
    Parsed [   0.092s] (baseline)
  Checking tket v0.16.0 -> v0.16.0 (assume minor change)
   Checked [   0.082s] 159 checks: 156 pass, 3 fail, 0 warn, 41 skip

--- failure auto_trait_impl_removed: auto trait no longer implemented ---

Description:
A public type has stopped implementing one or more auto traits. This can break downstream code that depends on the traits being implemented.
      ref: https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.45.0/src/lints/auto_trait_impl_removed.ron

Failed in:
type ModifierResolver is no longer Sync, in /home/runner/work/tket2/tket2/PR_BRANCH/tket/src/modifier/modifier_resolver.rs:303
type ModifierResolver is no longer UnwindSafe, in /home/runner/work/tket2/tket2/PR_BRANCH/tket/src/modifier/modifier_resolver.rs:303
type ModifierResolver is no longer RefUnwindSafe, in /home/runner/work/tket2/tket2/PR_BRANCH/tket/src/modifier/modifier_resolver.rs:303

--- 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.45.0/src/lints/function_missing.ron

Failed in:
function tket::modifier::qubit_types_utils::contain_qubits, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket/src/modifier/qubit_types_utils.rs:14
function tket::modifier::qubit_types_utils::contain_qubit_term, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket/src/modifier/qubit_types_utils.rs:54

--- 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.45.0/src/lints/module_missing.ron

Failed in:
mod tket::modifier::qubit_types_utils, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket/src/modifier/qubit_types_utils.rs:1

   Summary semver requires new major version: 3 major and 0 minor checks failed
  Finished [  89.764s] tket
  Building tket-qsystem v0.22.0 (current)
     Built [  44.704s] (current)
   Parsing tket-qsystem v0.22.0 (current)
    Parsed [   0.028s] (current)
  Building tket-qsystem v0.22.0 (baseline)
     Built [  44.556s] (baseline)
   Parsing tket-qsystem v0.22.0 (baseline)
    Parsed [   0.028s] (baseline)
  Checking tket-qsystem v0.22.0 -> v0.22.0 (assume minor change)
   Checked [   0.048s] 159 checks: 159 pass, 41 skip
   Summary no semver update required
  Finished [  91.152s] tket-qsystem

@acl-cqc acl-cqc changed the base branch from main to lm/new_subcircuit November 28, 2025 15:44
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.

4 participants