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.
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
base: main
Are you sure you want to change the base?
Port synth_cnot_phase_aam to Rust #12937
Changes from 7 commits
8da594c
193058b
2ae9379
d7f41b7
60379b2
671b634
ae91425
64ce56b
fe01589
1ecab6d
a217522
4a36e1e
0b681f9
d2142f6
8982c2c
032b8c2
583ca17
d1394f4
6956e0f
0091c98
92bf2aa
6b2d31e
156da41
b236d62
d28da2a
4c32291
1c7ad1e
68917a0
5973f85
353e5ff
6262d16
41a8906
0cd01ce
75bc902
62aef8c
477e62e
f5a92c9
93375c5
cb2170c
2bdaaae
843c220
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 function has a small typo, you want
section_size: int = 2
.More importantly, there are still some problems with passing
cnots
andangles
from the Python code to the Rust code. I am also learning Rust/Pyo3 and am not sure if the following is optimal, but one possible way to fix these is to modify the Python function toand the Rust function to:
(you could write the above loop more compactly, but let's not worry about this right now).
Now running the first example in
test_cnot_phase_synthesis.py
makes the Rust code throw a panic exception, so you will need to debug what's going on.One pitfall that I noticed when experimenting with the Python version of
synth_cnot_phase_aam
is that it clears the list ofangles
passed to it as input, so pay attention to this. :)