Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate DAGCircuit.name in ApplyLayout (backport #13910) #13920

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 24, 2025

This has always been absent, but transpile masked the problem by assigning the output circuit names by overwriting the output_names input kwarg if it wasn't set. generate_preset_pass_manager didn't have the same logic, so it was observable that ApplyLayout didn't propagate the name.

We could have added similar name-propagation logic to generate_preset_pass_manager, but really the bug is in ApplyLayout; passes should propagate the metadata.

Summary

Details and comments


This is an automatic backport of pull request #13910 done by [Mergify](https://mergify.com).

Copy link
Contributor Author

mergify bot commented Feb 24, 2025

Cherry-pick of 29aa2bd has failed:

On branch mergify/bp/stable/1.4/pr-13910
Your branch is up to date with 'origin/stable/1.4'.

You are currently cherry-picking commit 29aa2bd7b.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   qiskit/transpiler/passes/layout/apply_layout.py
	new file:   releasenotes/notes/fix-pm-name-36baa550ce5d9c2c.yaml
	modified:   test/python/compiler/test_transpiler.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   test/python/transpiler/test_preset_passmanagers.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts used by mergify when there are conflicts in a port label Feb 24, 2025
@mergify mergify bot requested a review from a team as a code owner February 24, 2025 22:15
@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

@github-actions github-actions bot added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels Feb 24, 2025
@github-actions github-actions bot added this to the 1.4.1 milestone Feb 24, 2025
@jakelishman jakelishman force-pushed the mergify/bp/stable/1.4/pr-13910 branch from d11512f to a87fa39 Compare February 25, 2025 14:15
@jakelishman jakelishman removed the conflicts used by mergify when there are conflicts in a port label Feb 25, 2025
jakelishman
jakelishman previously approved these changes Feb 25, 2025
@coveralls
Copy link

coveralls commented Feb 25, 2025

Pull Request Test Coverage Report for Build 13525152901

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 88.856%

Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/unitary_synthesis.rs 1 93.21%
crates/qasm2/src/expr.rs 1 94.02%
crates/qasm2/src/lex.rs 3 92.48%
Totals Coverage Status
Change from base Build 13512573070: 0.02%
Covered Lines: 79391
Relevant Lines: 89348

💛 - Coveralls

* Propagate `DAGCircuit.name` in `ApplyLayout`

This has always been absent, but `transpile` masked the problem by
assigning the output circuit names by overwriting the `output_names`
input kwarg if it wasn't set.  `generate_preset_pass_manager` didn't
have the same logic, so it was observable that `ApplyLayout` didn't
propagate the name.

We could have added similar name-propagation logic to
`generate_preset_pass_manager`, but really the bug is in `ApplyLayout`;
passes _should_ propagate the metadata.

* Fix typo

Co-authored-by: John Lapeyre <[email protected]>

* Remove redunant set

---------

Co-authored-by: John Lapeyre <[email protected]>
(cherry picked from commit 29aa2bd)
@jakelishman jakelishman added this pull request to the merge queue Feb 25, 2025
@jakelishman jakelishman removed this pull request from the merge queue due to the queue being cleared Feb 25, 2025
@jakelishman jakelishman added this pull request to the merge queue Feb 25, 2025
Merged via the queue into stable/1.4 with commit 1b3e8b6 Feb 25, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants