Oxidize `synth_cnot_count_full_pmh`
Summary
Closes #12227.
In a benchmark to synthesize 100 qubit linear networks 1000 times, the runtime is ~44 times faster:
(main) Took 172.75505709648132s
(this PR) Took 3.920625925064087s
I would assume the main speedup is due to a more efficient circuit construction.
Details and comments
- Does not address #12106, which is currently tackled in a different PR.
- There certainly is some way to use iterators more by iterating over sections, but I couldn't yet wrap my head around it (and it might not give a significant speedup), suggestions are welcome 🙂
One or more of the following people are relevant to this code:
- @Eric-Arellano
-
@Qiskit/terra-core -
@kevinhartman -
@mtreinish
Pull Request Test Coverage Report for Build 9547358808
Details
- 115 of 115 (100.0%) changed or added relevant lines in 5 files are covered.
- 6 unchanged lines in 1 file lost coverage.
- Overall coverage increased (+0.05%) to 89.764%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/qasm2/src/lex.rs | 6 | 92.11% |
| <!-- | Total: | 6 |
| Totals | |
|---|---|
| Change from base Build 9514566193: | 0.05% |
| Covered Lines: | 63489 |
| Relevant Lines: | 70729 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9548795140
Details
- 115 of 115 (100.0%) changed or added relevant lines in 5 files are covered.
- 2 unchanged lines in 1 file lost coverage.
- Overall coverage increased (+0.06%) to 89.769%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/qasm2/src/lex.rs | 2 | 93.38% |
| <!-- | Total: | 2 |
| Totals | |
|---|---|
| Change from base Build 9514566193: | 0.06% |
| Covered Lines: | 63491 |
| Relevant Lines: | 70727 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9592962940
Details
- 113 of 113 (100.0%) changed or added relevant lines in 5 files are covered.
- 11 unchanged lines in 2 files lost coverage.
- Overall coverage increased (+0.02%) to 89.776%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/qasm2/src/lex.rs | 5 | 92.88% |
| crates/qasm2/src/parse.rs | 6 | 97.61% |
| <!-- | Total: | 11 |
| Totals | |
|---|---|
| Change from base Build 9585515412: | 0.02% |
| Covered Lines: | 63645 |
| Relevant Lines: | 70893 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9600662838
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 116 of 116 (100.0%) changed or added relevant lines in 5 files are covered.
- 45 unchanged lines in 3 files lost coverage.
- Overall coverage decreased (-0.03%) to 89.724%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/qasm2/src/lex.rs | 5 | 92.11% |
| crates/qasm2/src/parse.rs | 12 | 96.23% |
| qiskit/visualization/pulse_v2/device_info.py | 28 | 39.71% |
| <!-- | Total: | 45 |
| Totals | |
|---|---|
| Change from base Build 9585515412: | -0.03% |
| Covered Lines: | 63627 |
| Relevant Lines: | 70914 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9609475087
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 113 of 113 (100.0%) changed or added relevant lines in 5 files are covered.
- 54 unchanged lines in 4 files lost coverage.
- Overall coverage increased (+0.006%) to 89.762%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/qasm2/src/expr.rs | 1 | 94.02% |
| crates/qasm2/src/lex.rs | 2 | 93.13% |
| qiskit/circuit/quantumcircuit.py | 23 | 95.69% |
| qiskit/visualization/pulse_v2/device_info.py | 28 | 39.71% |
| <!-- | Total: | 54 |
| Totals | |
|---|---|
| Change from base Build 9585515412: | 0.006% |
| Covered Lines: | 63652 |
| Relevant Lines: | 70912 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9781347471
Details
- 113 of 113 (100.0%) changed or added relevant lines in 3 files are covered.
- 12 unchanged lines in 3 files lost coverage.
- Overall coverage increased (+0.003%) to 89.843%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/qasm2/src/expr.rs | 1 | 94.02% |
| crates/qasm2/src/lex.rs | 5 | 91.86% |
| crates/qasm2/src/parse.rs | 6 | 97.61% |
| <!-- | Total: | 12 |
| Totals | |
|---|---|
| Change from base Build 9780558630: | 0.003% |
| Covered Lines: | 65198 |
| Relevant Lines: | 72569 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9791122293
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 113 of 113 (100.0%) changed or added relevant lines in 3 files are covered.
- 12 unchanged lines in 2 files lost coverage.
- Overall coverage increased (+0.01%) to 89.85%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/qasm2/src/lex.rs | 3 | 92.11% |
| crates/circuit/src/circuit_data.rs | 9 | 90.73% |
| <!-- | Total: | 12 |
| Totals | |
|---|---|
| Change from base Build 9780558630: | 0.01% |
| Covered Lines: | 65199 |
| Relevant Lines: | 72564 |