-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Port synth_cnot_phase_aam to Rust #12937
Draft
MozammilQ
wants to merge
33
commits into
Qiskit:main
Choose a base branch
from
MozammilQ:port-synth_cnot_phase_aam-to-rust
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
8da594c
initial commit
MozammilQ 193058b
added some code
MozammilQ 2ae9379
refactor code
MozammilQ d7f41b7
Merge branch 'main' into port-synth_cnot_phase_aam-to-rust
MozammilQ 60379b2
done some cargo-clippy linting
MozammilQ 671b634
added code
MozammilQ ae91425
added some more code
MozammilQ 64ce56b
refactor code
MozammilQ fe01589
refactor code
MozammilQ 1ecab6d
refactor code
MozammilQ a217522
refactor code
MozammilQ 4a36e1e
refactor code
MozammilQ 0b681f9
refactor code
MozammilQ d2142f6
refactor code
MozammilQ 8982c2c
refactor code
MozammilQ 032b8c2
removed associated python code
MozammilQ 583ca17
rust lint
MozammilQ d1394f4
added release note; added docstring to rust algo
MozammilQ 6956e0f
rust lint
MozammilQ 0091c98
refactor code
MozammilQ 92bf2aa
Merge branch 'main' into port-synth_cnot_phase_aam-to-rust
MozammilQ 6b2d31e
Merge branch 'main' into port-synth_cnot_phase_aam-to-rust
MozammilQ 156da41
applied suggestion partially
MozammilQ b236d62
reverting suggestions
MozammilQ d28da2a
added a test
MozammilQ 4c32291
Merge branch 'Qiskit:main' into port-synth_cnot_phase_aam-to-rust
MozammilQ 1c7ad1e
Merge branch 'main' into port-synth_cnot_phase_aam-to-rust
MozammilQ 68917a0
Merge branch 'Qiskit:main' into port-synth_cnot_phase_aam-to-rust
MozammilQ 5973f85
replace vector with iterator
MozammilQ 353e5ff
refactor code; lint
MozammilQ 6262d16
refactor code
MozammilQ 41a8906
refactor code
MozammilQ 0cd01ce
refactor code
MozammilQ 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
This file contains 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 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.
Is it possible to write the
instructions
as iterator, instead of creating it as vector and pushing each element? That would allow us to avoid the collections and haveCircuitData
directly consume the iterator (and likely be a bit faster 🙂)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.
I have implemented
Iterator
for all the loops in the logic, the performance seems to be same, but the code has become very complex. and, the program crashes for inputs when num_qubits * depth > 14900. (This is stack-overflow, it worked when I increased the stack to 40MB by doingulimit -s 40960
)at the end I have no option other than to collect these iterator into a vector, because I have to get the residual state out of the iterator to feed into synth_pmh which has to be chained into final instructor iterator.
Still, using vec.push(...) doesn't seem bad, please have a look at it and guide me what to change next :)