Skip to content

Conversation

jakelishman
Copy link
Member

Summary

The previous form of the code assumed that the data of the definition of a custom instruction contained the complete information. This is not the case; a definition might also have a global phase. If the definition of a custom instruction was empty but had a global phase set, this pass would silently throw it away.

Details and comments

Fixes an issue found in #9251 (comment).

The previous form of the code assumed that the `data` of the definition
of a custom instruction contained the complete information.  This is not
the case; a definition might also have a global phase.  If the
definition of a custom instruction was empty but had a global phase set,
this pass would silently throw it away.
@jakelishman jakelishman added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels Apr 3, 2023
@jakelishman jakelishman added this to the 0.24.0 milestone Apr 3, 2023
@jakelishman jakelishman requested a review from a team as a code owner April 3, 2023 17:54
@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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4599782933

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.0009%) to 85.411%

Totals Coverage Status
Change from base Build 4599001631: -0.0009%
Covered Lines: 67468
Relevant Lines: 78992

💛 - Coveralls

@jakelishman jakelishman enabled auto-merge April 3, 2023 18:24
@jakelishman jakelishman added this pull request to the merge queue Apr 3, 2023
Merged via the queue into Qiskit:main with commit 0507907 Apr 3, 2023
@jakelishman jakelishman deleted the fix-unroll-custom-definitions-empty-definition branch April 3, 2023 19:45
giacomoRanieri pushed a commit to giacomoRanieri/qiskit-terra that referenced this pull request Apr 16, 2023
)

The previous form of the code assumed that the `data` of the definition
of a custom instruction contained the complete information.  This is not
the case; a definition might also have a global phase.  If the
definition of a custom instruction was empty but had a global phase set,
this pass would silently throw it away.
king-p3nguin pushed a commit to king-p3nguin/qiskit-terra that referenced this pull request May 22, 2023
)

The previous form of the code assumed that the `data` of the definition
of a custom instruction contained the complete information.  This is not
the case; a definition might also have a global phase.  If the
definition of a custom instruction was empty but had a global phase set,
this pass would silently throw it away.
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.

4 participants