Skip to content

Fix ConsolidateBlocks to merge Unitary gates unconditionally#15644

Open
arnavk23 wants to merge 1 commit intoQiskit:mainfrom
arnavk23:issue-15631-consolidate-blocks
Open

Fix ConsolidateBlocks to merge Unitary gates unconditionally#15644
arnavk23 wants to merge 1 commit intoQiskit:mainfrom
arnavk23:issue-15631-consolidate-blocks

Conversation

@arnavk23
Copy link
Contributor

@arnavk23 arnavk23 commented Feb 3, 2026

Summary

Fix ConsolidateBlocks to consolidate blocks of Unitary gates unconditionally, enabling better merging before routing/layout.

Details and comments

@arnavk23 arnavk23 requested a review from a team as a code owner February 3, 2026 20:21
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Feb 3, 2026
@qiskit-bot
Copy link
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

@arnavk23 arnavk23 changed the title Fix init ConsolidateBlocks for unitaries Fix init ConsolidateBlocks for unitaries Feb 3, 2026
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this but the proposed change here is not correct and is not a change that should be made. In the underlying issue if the pass is not consolidating blocks which should be then there is likely a bug in the pass code around the conditions on whether an identified block should be consolidated or not.

@arnavk23 arnavk23 force-pushed the issue-15631-consolidate-blocks branch from 6477685 to 429f773 Compare February 3, 2026 20:49
@arnavk23 arnavk23 force-pushed the issue-15631-consolidate-blocks branch from 429f773 to e885f95 Compare February 3, 2026 20:56
@arnavk23 arnavk23 changed the title Fix init ConsolidateBlocks for unitaries Fix ConsolidateBlocks to merge Unitary gates unconditionally Feb 3, 2026
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21647534016

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • 18 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 87.955%

Files with Coverage Reduction New Missed Lines %
crates/circuit/src/parameter/symbol_expr.rs 1 72.91%
crates/qasm2/src/lex.rs 5 91.52%
crates/qasm2/src/parse.rs 12 97.15%
Totals Coverage Status
Change from base Build 21615363168: -0.02%
Covered Lines: 100008
Relevant Lines: 113703

💛 - Coveralls

@arnavk23 arnavk23 requested a review from mtreinish February 3, 2026 22:11
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.

Improve merging in Consolidate Blocks

4 participants