-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add Rust representation of EquivalenceLibrary
#12585
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
Merged
Merged
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
a8cddcd
Initial: Add equivalence to `qiskit._accelerate.circuit`
raynelfss f53b89c
Add: `build_basis_graph` method
raynelfss a215694
Add: `EquivalencyLibrary` to `qiskit._accelerate.circuit`
raynelfss 7d0f4de
Add: PyDiGraph converter for `equivalence.rs`
raynelfss 0f85dc0
Merge branch 'main' into move-equivalence
raynelfss f73581e
Add: Extend original equivalence with rust representation
raynelfss 57e0ef8
Fix: Correct circuit parameter extraction
raynelfss 9eddbbf
Merge branch 'Qiskit:main' into move-equivalence
raynelfss 11611e2
Add: Stable infrastructure for EquivalenceLibrary
raynelfss a013d5b
Merge branch 'main' into move-equivalence
raynelfss 1bf0316
Add: Default methods to equivalence data structures.
raynelfss ab57e3e
Fix: Adapt to new Gate Structure
raynelfss 0e822b5
Fix: Erroneous display of `Parameters`
raynelfss 6a033c9
Format: Fix lint test
raynelfss b04cae2
Fix: Use EdgeReferences instead of edge_indices.
raynelfss 5a3bf2b
Merge branch 'main' into move-equivalence
raynelfss 38436cd
Fix: Use StableDiGraph for more stable indexing.
raynelfss db6acb4
Merge branch 'main' into move-equivalence
raynelfss e16e57b
Fix: Use `clone` instead of `to_owned`
raynelfss b8bd422
Merge branch 'Qiskit:main' into move-equivalence
raynelfss fb1652c
Fix: Use `OperationTypeConstruct` instead of `CircuitInstruction`
raynelfss 139af74
Merge branch 'main' into move-equivalence
raynelfss 27b25e3
Merge branch 'main' into move-equivalence
raynelfss ab84d04
Merge branch 'Qiskit:main' into move-equivalence
raynelfss 6dec921
Fix: Elide implicit lifetime of PyRef
raynelfss 785564f
Merge branch 'main' into move-equivalence
raynelfss 3b954e4
Fix: Make `CircuitRep` attributes OneCell-like.
raynelfss 48bb8eb
Merge branch 'main' into move-equivalence
raynelfss ffa0a81
Merge branch 'main' into move-equivalence
raynelfss 9a7d9a0
Fix: Incorrect pickle attribute extraction
raynelfss e2c8dcb
Merge branch 'main' into move-equivalence
raynelfss dc3041e
Remove: Default initialization methods from custom datatypes.
raynelfss a072635
Remove: `__getstate__`, `__setstate__`, use `__getnewargs__` instead.
raynelfss 77dbec8
Fix: Further improvements to pickling
raynelfss cd0b36e
Merge branch 'main' into move-equivalence
raynelfss 73e5b5b
Merge branch 'main' into move-equivalence
raynelfss 72e1c33
Fix: Use `PyList` and iterators when possible to skip extra conversion.
raynelfss 17eb9d2
Fix: incorrect list operation in `__getstate__`
raynelfss 9d39cf6
Fix: improvements on rust native methods
raynelfss e9e3921
Remove: `add_equiv`, `set_entry` from rust-native methods.
raynelfss 5519659
Merge branch 'main' into move-equivalence
raynelfss bf9aedd
Remove: Undo changes to Param
raynelfss 82a456e
Merge branch 'main' into move-equivalence
raynelfss 41764f2
Merge branch 'main' into move-equivalence
raynelfss 08915c0
Fix: Leverage usage of `CircuitData` for accessing the `QuantumCircui…
raynelfss d24c134
Add: `data()` method to avoid extracting `CircuitData`
raynelfss bd582f0
Merge branch 'main' into move-equivalence
raynelfss f61288f
Merge branch 'main' into move-equivalence
raynelfss 5a2c57b
Merge branch 'main' into move-equivalence
raynelfss 6772305
Fix: Make `graph` attribute public.
raynelfss 1e44817
Fix: Make `NoteData` attributes public.
raynelfss 22210e3
Fix: Revert reference to `CircuitData`, extract instead.
raynelfss c99ca3f
Add: Make `EquivalenceLibrary` graph weights optional.
raynelfss 561553a
Merge branch 'Qiskit:main' into move-equivalence
raynelfss d257db1
Merge branch 'main' into move-equivalence
raynelfss dd2773a
Fix: Adapt to #12730
raynelfss e7b3cb0
Fix: Use `IndexSet` and `IndexMap`
raynelfss aa626b9
Fix: Revert changes from previously failing test
raynelfss 1aaf17a
Merge branch 'main' into move-equivalence
raynelfss ba90411
Merge branch 'main' into move-equivalence
raynelfss 9f4bfb7
Merge branch 'main' into move-equivalence
raynelfss d59f0db
Merge branch 'main' into move-equivalence
raynelfss 0d3a164
Fix: Adapt to #12974
raynelfss feff6eb
Fix: Use `EquivalenceLibrary.keys()` instead of `._key_to_node_index`
raynelfss 6554b38
Merge branch 'main' into move-equivalence
raynelfss 132b6be
Chore: update dependencies
raynelfss 3dbcc41
Refactor: Move `EquivalenceLibrary` to `_accelerate`.
raynelfss c48f0da
Merge branch 'main' into move-equivalence
raynelfss d12dee6
Fix: Erroneous `pymodule` function for `equivalence`.
raynelfss bc9c83f
Merge branch 'main' into move-equivalence
raynelfss fda119d
Merge branch 'main' into move-equivalence
raynelfss f44eaba
Merge branch 'main' into move-equivalence
raynelfss 3479254
Fix: Update `EquivalenceLibrary` to store `CircuitData`.
raynelfss c433c87
Fix: Make inner `CircuitData` instance public.
raynelfss c77af69
Merge branch 'main' into move-equivalence
raynelfss 82a6dcf
Merge branch 'main' into move-equivalence
raynelfss 1a21204
Merge branch 'main' into move-equivalence-gjl
jlapeyre b7c6316
Fix: Review comments and ownership issues.
raynelfss b8e7cff
Merge branch 'main' into move-equivalence
raynelfss e7d99bc
Fix: Use maximum possible integer value for Key in basis_translator.
raynelfss bf7486c
Fix: Use generated string, instead of large int
raynelfss 56278bc
Merge branch 'main' into move-equivalence
raynelfss 11f0470
Merge branch 'main' into move-equivalence
raynelfss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,4 +38,4 @@ workspace = true | |
| features = ["union"] | ||
|
|
||
| [features] | ||
| cache_pygates = [] | ||
| cache_pygates = [] | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some things, eg.
KeyandNodeData, are not used apparently, and the lint for this is suppressed. Why is this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to allow the user to still be able to import these things directly from
qiskit.circuit.equivalenceas they were able to before. If this is not needed anymore I can easily remove.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I did not check who calls these.
KeyandNodeDataare called from Python inclass BasisTranslator. Looks like they cannot be made private after all.