Skip to content

Fix ConstrainedReschedule barrier handling#16151

Open
TSS99 wants to merge 2 commits intoQiskit:mainfrom
TSS99:fix-constrained-reschedule-barrier
Open

Fix ConstrainedReschedule barrier handling#16151
TSS99 wants to merge 2 commits intoQiskit:mainfrom
TSS99:fix-constrained-reschedule-barrier

Conversation

@TSS99
Copy link
Copy Markdown
Contributor

@TSS99 TSS99 commented May 7, 2026

Summary

Fix ConstrainedReschedule so compiler directives such as barriers are not rejected during rescheduling. Fix #16135.

Details

The Rust implementation now treats directives as unconstrained operations, matching the pass documentation and the previous Python behavior. Unknown non-directive operations still raise the existing error.

Tests

  • .venv/bin/python reproducer_issue_16135.py
  • .venv/bin/python -m unittest test.python.transpiler.test_scheduling_padding_pass.TestSchedulingAndPaddingPass.test_constrained_reschedule_accepts_barrier
  • .venv/bin/python -m unittest test/python/transpiler/test_scheduling_padding_pass.py
  • .venv/bin/black --check test/python/transpiler/test_scheduling_padding_pass.py
  • .venv/bin/ruff check test/python/transpiler/test_scheduling_padding_pass.py
  • cargo fmt --check
  • cargo clippy -p qiskit-transpiler --lib --features cache_pygates -- -D warnings
  • .venv/bin/reno -q lint

Notes

Full test suite and full tox -elint were not run.

I reviewed the diff and can explain the changed condition and regression test.

@TSS99 TSS99 requested a review from a team as a code owner May 7, 2026 10:17
@TSS99 TSS99 requested a review from Cryoris May 7, 2026 10:17
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label May 7, 2026
@qiskit-bot
Copy link
Copy Markdown
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@coveralls
Copy link
Copy Markdown

coveralls commented May 7, 2026

Coverage Report for CI Build 25501265948

Coverage increased (+0.05%) to 87.682%

Details

  • Coverage increased (+0.05%) from the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • 36 coverage regressions across 5 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

36 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
crates/qasm2/src/parse.rs 18 96.68%
crates/circuit/src/parameter/symbol_expr.rs 8 73.93%
crates/qasm2/src/lex.rs 8 92.03%
crates/circuit/src/parameter/parameter_expression.rs 1 91.04%
crates/transpiler/src/passes/unitary_synthesis/decomposers.rs 1 94.71%

Coverage Stats

Coverage Status
Relevant Lines: 122062
Covered Lines: 107027
Line Coverage: 87.68%
Coverage Strength: 963038.28 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

ConstrainedReschedule raises an error with barrier

3 participants