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

Fix bug in circuit decompose #8364

Merged
merged 4 commits into from
Jul 19, 2022
Merged

Fix bug in circuit decompose #8364

merged 4 commits into from
Jul 19, 2022

Conversation

kevinsung
Copy link
Contributor

Summary

Fixes #8363 .

Details and comments

@kevinsung kevinsung requested a review from a team as a code owner July 18, 2022 18:20
@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 the following people are requested to review this:

  • @Qiskit/terra-core

@mtreinish mtreinish added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Jul 18, 2022
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 this fix it LGTM. Before we merge this though can you a test that tests the function to show that this fixes the underlying bug (matching gates by type when a label is set), and maybe some related combinations (assuming there isn't sufficient coverage).

@mtreinish mtreinish added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jul 18, 2022
@mtreinish mtreinish added this to the 0.21.1 milestone Jul 18, 2022
@kevinsung
Copy link
Contributor Author

@mtreinish I've added a test.

@coveralls
Copy link

coveralls commented Jul 18, 2022

Pull Request Test Coverage Report for Build 2698978082

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 83.998%

Totals Coverage Status
Change from base Build 2698807388: 0.005%
Covered Lines: 55876
Relevant Lines: 66521

💛 - Coveralls

@kevinsung
Copy link
Contributor Author

CI failure unrelated

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.

LGTM, thanks for the update

@mergify mergify bot merged commit 7753560 into Qiskit:main Jul 19, 2022
mergify bot pushed a commit that referenced this pull request Jul 19, 2022
* fix bug in circuit decompose

* add test

* Update test/python/circuit/test_circuit_operations.py

Co-authored-by: Matthew Treinish <[email protected]>

Co-authored-by: Matthew Treinish <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 7753560)
@kevinsung kevinsung deleted the decompose-fix branch July 19, 2022 18:52
mergify bot added a commit that referenced this pull request Jul 19, 2022
* fix bug in circuit decompose

* add test

* Update test/python/circuit/test_circuit_operations.py

Co-authored-by: Matthew Treinish <[email protected]>

Co-authored-by: Matthew Treinish <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 7753560)

Co-authored-by: Kevin J. Sung <[email protected]>
Co-authored-by: Matthew Treinish <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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 stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specifying gates to decompose fails
4 participants