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

[NFM] Integration testing for CF in O2 and O3 #10390

Closed
wants to merge 69 commits into from

Conversation

kevinhartman
Copy link
Contributor

@kevinhartman kevinhartman commented Jul 5, 2023

Summary

This PR is NOT INTENDED FOR MERGE. It is from an integration branch containing:

Its 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.

ewinston and others added 30 commits November 16, 2022 09:17
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.
@coveralls
Copy link

coveralls commented Jul 10, 2023

Pull Request Test Coverage Report for Build 5515007314

  • 191 of 192 (99.48%) changed or added relevant lines in 11 files are covered.
  • 182 unchanged lines in 10 files lost coverage.
  • Overall coverage decreased (-0.07%) to 85.918%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/transpiler/passes/routing/sabre_swap.py 65 66 98.48%
Files with Coverage Reduction New Missed Lines %
qiskit/qasm/init.py 1 80.0%
qiskit/extensions/quantum_initializer/squ.py 2 80.0%
crates/qasm2/src/lex.rs 3 91.39%
qiskit/qasm/pygments/init.py 3 0%
qiskit/transpiler/preset_passmanagers/common.py 4 94.74%
qiskit/qpy/binary_io/circuits.py 11 92.95%
qiskit/qasm/pygments/lexer.py 14 0%
crates/qasm2/src/parse.rs 18 96.65%
qiskit/tools/jupyter/library.py 43 0%
qiskit/circuit/quantumcircuit.py 83 94.05%
Totals Coverage Status
Change from base Build 5490783039: -0.07%
Covered Lines: 71274
Relevant Lines: 82956

💛 - Coveralls

jlapeyre and others added 8 commits July 10, 2023 15:39
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants