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

Add cache_pygates feature to accelerate crate. #13183

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

raynelfss
Copy link
Contributor

Summary

The following commits add the cache_pygates feature from the circuit crate into accelerate.

Details and comments

Since we added rust native methods to add operations into the DAGCircuit (thanks in part to #13143), we make use of the cache_pygate feature which is only available in the circuit crate. A couple of transpiler passes which require building instances of DAGCircuit from Rust entirely (mainly #13141, and #13137) are using these functions, they need to respect the bounds this feature specifies or else they would not compile.

A couple of teammates have already implemented this flag as part of their PRs but, to prevent a future merge conflict debacle, I decided to put it in this PR. These commits add the feature to accelerate so that people don't have to worry about that in the future.

Co-authored-by: Elena Peña-Tapia <57907331+ElePT@users.noreply.github.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
@raynelfss raynelfss requested a review from a team as a code owner September 18, 2024 18:16
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@raynelfss raynelfss added the Changelog: None Do not include in changelog label Sep 18, 2024
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM this is a straightforward addition and one I've done in some local code that isn't quite ready for a PR so glad to spin it out here even if nothing is using it yet.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10927852001

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 13 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.008%) to 88.819%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/parse.rs 6 97.61%
crates/qasm2/src/lex.rs 7 92.48%
Totals Coverage Status
Change from base Build 10926067236: -0.008%
Covered Lines: 73475
Relevant Lines: 82724

💛 - Coveralls

@mtreinish mtreinish added this pull request to the merge queue Sep 18, 2024
Merged via the queue into Qiskit:main with commit ee7e0ea Sep 18, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants