Skip to content

Conversation

@acl-cqc
Copy link
Contributor

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

This is the first step towards a new (more efficient) Subcircuit; the current offers no real advantage over SiblingSubgraph, so use that instead.

BREAKING CHANGE: Subcircuit is gone, use SiblingSubgraph instead; .subcircuit() -> .subgraph()

This is not a breaking change for python,

BEGIN_COMMIT_OVERRIDE
refactor: Replace Subcircuit with SiblingSubgraph (#1288)
END_COMMIT_OVERRIDE

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 85.29412% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.56%. Comparing base (0f1d700) to head (f888d39).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
tket/src/portmatching/matcher.rs 33.33% 4 Missing ⚠️
tket/src/rewrite.rs 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1288      +/-   ##
==========================================
+ Coverage   79.46%   79.56%   +0.10%     
==========================================
  Files         160      160              
  Lines       20378    20571     +193     
  Branches    19446    19605     +159     
==========================================
+ Hits        16194    16368     +174     
- Misses       3201     3222      +21     
+ Partials      983      981       -2     
Flag Coverage Δ
python 92.92% <ø> (+0.27%) ⬆️
qis-compiler 100.00% <ø> (ø)
rust 78.89% <85.29%> (+0.07%) ⬆️

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.

cargo-semver-checks summary
    Building tket v0.16.0 (current)
     Built [  41.694s] (current)
   Parsing tket v0.16.0 (current)
    Parsed [   0.095s] (current)
  Building tket v0.16.0 (baseline)
     Built [  40.452s] (baseline)
   Parsing tket v0.16.0 (baseline)
    Parsed [   0.091s] (baseline)
  Checking tket v0.16.0 -> v0.16.0 (assume minor change)
   Checked [   0.097s] 159 checks: 157 pass, 2 fail, 0 warn, 41 skip

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn 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.45.0/src/lints/inherent_method_missing.ron

Failed in:
PatternMatch::subcircuit, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket/src/portmatching/matcher.rs:99
PatternMatch::subcircuit, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket/src/portmatching/matcher.rs:99
CircuitRewrite::subcircuit, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket/src/rewrite.rs:117

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

Failed in:
struct tket::rewrite::Subcircuit, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket/src/rewrite.rs:30

   Summary semver requires new major version: 2 major and 0 minor checks failed
  Finished [  84.105s] tket
  Building tket-qsystem v0.22.0 (current)
     Built [  42.305s] (current)
   Parsing tket-qsystem v0.22.0 (current)
    Parsed [   0.028s] (current)
  Building tket-qsystem v0.22.0 (baseline)
     Built [  42.475s] (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.046s] 159 checks: 159 pass, 41 skip
   Summary no semver update required
  Finished [  87.010s] tket-qsystem

@acl-cqc acl-cqc changed the title refactor!: Remove Subcircuit refactor!: Replace Subcircuit with SiblingSubgraph Nov 28, 2025
Copy link
Contributor

@doug-q doug-q left a comment

Choose a reason for hiding this comment

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

Thanks

@acl-cqc acl-cqc enabled auto-merge December 3, 2025 11:01
@acl-cqc acl-cqc added this pull request to the merge queue Dec 3, 2025
Merged via the queue into main with commit c0d1236 Dec 3, 2025
26 checks passed
@acl-cqc acl-cqc deleted the lm/rm_subcircuit branch December 3, 2025 11:07
This was referenced Nov 28, 2025
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.

5 participants