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

Optimized apply_operation_back for DAGDependencyV2 #12194

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

enavarro51
Copy link
Contributor

Summary

Adds an optimized version of apply_operation_back to DAGDependencyV2. Requires rustworkx 0.15.0

Details and comments

This PR updates apply_operation_back in DAGDependencyV2 to use several optimized functions for TopologicalSorter in the 0.15.0 release of rustworkx. These include an initial option to include a list of starting nodes, a check_args option to eliminate some checks in the sorter, and allowing the done function to accept an int as well as a list.

In local tests on a random clifford circuit, this reduced the execution time of converting from a circuit to a DAGDependencyV2 from 35 sec to 1.9 sec.

Requires rustworkx 0.15.0.

@enavarro51 enavarro51 requested a review from a team as a code owner April 16, 2024 21:22
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9705468617

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 89.752%

Files with Coverage Reduction New Missed Lines %
qiskit/circuit/commutation_checker.py 1 95.95%
crates/qasm2/src/lex.rs 3 93.38%
Totals Coverage Status
Change from base Build 9703107599: 0.01%
Covered Lines: 63801
Relevant Lines: 71086

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9714236322

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.

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 89.752%

Files with Coverage Reduction New Missed Lines %
qiskit/circuit/commutation_checker.py 1 95.95%
crates/qasm2/src/lex.rs 4 92.88%
Totals Coverage Status
Change from base Build 9703107599: 0.01%
Covered Lines: 63801
Relevant Lines: 71086

💛 - Coveralls

@enavarro51 enavarro51 changed the title [WIP] Optimized apply_operation_back for DAGDependencyV2 Optimized apply_operation_back for DAGDependencyV2 Jul 2, 2024
@coveralls
Copy link

coveralls commented Jul 2, 2024

Pull Request Test Coverage Report for Build 9754486878

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 1 file are covered.
  • 22 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.01%) to 89.815%

Files with Coverage Reduction New Missed Lines %
qiskit/circuit/commutation_checker.py 1 95.95%
crates/qasm2/src/lex.rs 3 92.11%
crates/qasm2/src/parse.rs 18 96.69%
Totals Coverage Status
Change from base Build 9751520597: -0.01%
Covered Lines: 64394
Relevant Lines: 71696

💛 - Coveralls

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