-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add pass to filter ops and label inserted barriers #10323
Merged
Merged
Commits on Jun 22, 2023
-
Add pass to remove labeled ops and label inserted barriers
This commit adds a new transpiler pass RemoveLabeledOps which is used to remove any op nodes that match a given label. This is paired with a new label option for BarrierBeforeFinalMeasurements. These are combined in the preset pass managers to ensure we're not always adding a barrier before output measurements in the output of the transpiler. Fixes Qiskit#10321
Configuration menu - View commit details
-
Copy full SHA for caae56f - Browse repository at this point
Copy the full SHA caae56fView commit details
Commits on Nov 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b8cea23 - Browse repository at this point
Copy the full SHA b8cea23View commit details -
Configuration menu - View commit details
-
Copy full SHA for b12cc3b - Browse repository at this point
Copy the full SHA b12cc3bView commit details -
Handle pre-existing adjacent barriers
In the case when a label is set to trigger the removal of the labelled barrier the merge step would lose the context around which barrier instruction was transpiler inserted and which was user provided. To address this issue this commit skips the MergeAdjacentBarrier step so that the transpiler barrier is kept separate from any user inserted barriers which need to be preserved.
Configuration menu - View commit details
-
Copy full SHA for 29c1217 - Browse repository at this point
Copy the full SHA 29c1217View commit details -
Generalize RemoveLabeledOps to FilterOpNodes
This commit generalizes the new RemoveLabeledOps pass to be a generic node filtering pass that given a filter function it will remove any matching op nodes in the circuit.
Configuration menu - View commit details
-
Copy full SHA for 691d7d5 - Browse repository at this point
Copy the full SHA 691d7d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a2a4eaf - Browse repository at this point
Copy the full SHA a2a4eafView commit details -
Configuration menu - View commit details
-
Copy full SHA for bc3b5d5 - Browse repository at this point
Copy the full SHA bc3b5d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f855a8e - Browse repository at this point
Copy the full SHA f855a8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1be3517 - Browse repository at this point
Copy the full SHA 1be3517View commit details
Commits on Nov 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0c7cdc5 - Browse repository at this point
Copy the full SHA 0c7cdc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1236ad - Browse repository at this point
Copy the full SHA d1236adView commit details -
This commit inverts the predicate usage to be consistent with Python's built in filter() function. Now if the predicate returns True the dag node is retained and if it returns false it is removed. This is also explicitly documented to make it clear how the pass is to be used.
Configuration menu - View commit details
-
Copy full SHA for f6df5be - Browse repository at this point
Copy the full SHA f6df5beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 638b9d8 - Browse repository at this point
Copy the full SHA 638b9d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 77d54f8 - Browse repository at this point
Copy the full SHA 77d54f8View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.