Skip to content

Fix QuantumCircuit.compose for front=True and individual qargs (backport #15872)#15885

Merged
jakelishman merged 1 commit intostable/2.4from
mergify/bp/stable/2.4/pr-15872
Mar 26, 2026
Merged

Fix QuantumCircuit.compose for front=True and individual qargs (backport #15872)#15885
jakelishman merged 1 commit intostable/2.4from
mergify/bp/stable/2.4/pr-15872

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Mar 26, 2026

When compose() is called with both front=True and a qubits mapping, the original instructions were incorrectly re-appended with the incoming circuit's qubit remap table, causing the error when the circuits had different widths. The fix removes the spurious qubits/clbits arguments from that append, and adds a regression test.

Fix #15834


This is an automatic backport of pull request #15872 done by Mergify.

(cherry picked from commit 62f74c7)
@mergify mergify bot requested a review from a team as a code owner March 26, 2026 17:51
@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

@github-actions github-actions bot added the Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. label Mar 26, 2026
@github-actions github-actions bot added this to the 2.4.0rc2 milestone Mar 26, 2026
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 23609701615

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 14 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.005%) to 87.263%

Files with Coverage Reduction New Missed Lines %
crates/circuit/src/parameter/parameter_expression.rs 1 86.99%
crates/transpiler/src/passes/unitary_synthesis/decomposers.rs 1 94.71%
crates/circuit/src/parameter/symbol_expr.rs 12 74.02%
Totals Coverage Status
Change from base Build 23604658676: -0.005%
Covered Lines: 103550
Relevant Lines: 118664

💛 - Coveralls

@jakelishman jakelishman added this pull request to the merge queue Mar 26, 2026
Merged via the queue into stable/2.4 with commit d3d05bb Mar 26, 2026
26 checks passed
@jakelishman jakelishman deleted the mergify/bp/stable/2.4/pr-15872 branch March 26, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants