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 error in Target non-global operation method with ideal gates (backport #7554) #7561

Merged
merged 2 commits into from
Jan 24, 2022

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 24, 2022

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


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* Fix error in Target non-global operation method with ideal gates

This commit fixes an issue in the Target
get_non_global_operation_names() method. Previously this method would
crash when you had a target with it's instruction properties set to
None (which is typically used for an ideal simulator).

* Fix issue with transpile() on BackendV2 with ideal operation

This commit fixes an issue when running transpile() with a BackendV2
based backend that has ideal operation defined in it's target. A Target
that has an operation with its qargs set as None means it's ideally
defined on all qubits (or all combinations of qubits for >1 qubit
operations). However, the pre-processing of the target in the
transpile() method was not taking this into account and would fail if
a backend with this set was used.

* Tweak timing constraints parsing in transpile()

In the previous commit there were some issues in the tweaks made to the
transpile() function to parse the timing_constraints argument. The basic
flow we wanted for the standalone target case is to create a
TimingConstraints object directly from that Target. However, the
internal function was expect only a dict was passed in and tried to
create a TimingConstraints object from it. The previous commit tried to
address this but neglected the standard use with a dict. This commit
corrects this oversight and tweaks the logic to handle a predefined
TimingConstraint object first and then fallsback to the other behavior.

(cherry picked from commit fe5acd4)
@mergify mergify bot requested a review from a team as a code owner January 24, 2022 14:26
@jakelishman jakelishman added automerge Changelog: Bugfix Include in the "Fixed" section of the changelog labels Jan 24, 2022
@jakelishman jakelishman added this to the 0.19.2 milestone Jan 24, 2022
@mergify mergify bot merged commit 4b544a4 into stable/0.19 Jan 24, 2022
@mergify mergify bot deleted the mergify/bp/stable/0.19/pr-7554 branch January 24, 2022 21:02
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants