-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[NFM] Integration testing for CF in O2 and O3 #10390
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, we were using original DAG node IDs to look up nodes in the expanded nested DAGs, but these IDs are of course not the same.
In _handle_control_flow_ops, a new PassManager was created for each ControlFlowOp found. This commit moves the creation out of the loop over nodes. This should be a bit more efficient. I also considered mapped_blocks.clear() rather than reallocating. But in some simpler tests of clearing rather than reallocating, this is actually less performant. I think reallocating renders the code slightly more understandable.
These were requested in a review comment. The previous commit was also requested in a review comment.
…locks A new PassManager for CommutativeCancellation is constructed when descending into control flow blocks. This commit explicitly includes a CommutativeAnalysis pass in this construction rather than relying on `requires`. This change, while not necessary, is made for consistency with other explicit constructions of PassManagers containing these passes.
…-terra into integration/cf-opt-2-3
…qiskit-terra into integration/cf-opt-2-3
…nston/qiskit-terra into integration/cf-opt-2-3
…a into integration/cf-opt-2-3
…skit-terra into integration/cf-opt-2-3
aaf26a5
to
9ba85c2
Compare
Pull Request Test Coverage Report for Build 5515007314
💛 - Coveralls |
Before, we used the builder interface for an ifelse op. Some details of the circuit built, in particular the mapping of wires is not deterministic. We could have used canonicalize_control_flow. But instead we construct the IfElseOp manually. This removes the complexity of the builder interface from this test.
…nto integration/cf-opt-2-3
…qiskit-terra into integration/cf-opt-2-3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR is NOT INTENDED FOR MERGE. It is from an integration branch containing:
SabreSwap
andSabreLayout
. #10366UnitarySynthesis
#10405deepcopy
for new-styleBit
#10411Its purpose is for us to collaborate on ironing out any final issues with integration of control flow support for opt levels 2 and 3 ahead of the 0.25 release.