-
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 TwoQubitControlledUDecomposer to rust #13139
Merged
+547
−150
Merged
Changes from 19 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
2e3a383
replace calls to TwoQubitWeylDecomposition by calling rust functions
ShellyGarion 7ab59b4
fix failing test
ShellyGarion cbc9b9d
Merge branch 'main' into two_qubit_decomp
ShellyGarion 285a91d
add code for TwoQubitControlledUDecomposer in rust
ShellyGarion 18000fe
Merge branch 'main' into two_qubit_decomp
ShellyGarion 14c4a56
update try_inverse to inverse
ShellyGarion eb1b928
fix rust code. add rust docstrings
ShellyGarion c9b7553
remove python code
ShellyGarion 71caa9e
update unitary in call
ShellyGarion eb4968b
handle global_phase
ShellyGarion a2943c9
minor fix
ShellyGarion 7acb09a
fix lint
ShellyGarion e532c8a
set self.rxx_equivalent_gate
ShellyGarion 3182838
check that rxx_equivalent_gate is a standard gate
ShellyGarion 59ef018
iterating over test_angles and scales
ShellyGarion 1ceb94e
add Vec capacity
ShellyGarion 9ac68b1
remove invert variable
ShellyGarion 6ad3869
move comments from Python to Rust code
ShellyGarion ebc0e73
remove new_inner function, move code into new
ShellyGarion 02cd73e
call returns a CircuitData
ShellyGarion 71d4b60
Merge remote-tracking branch 'origin/main' into two_qubit_decomp
mtreinish f46edbe
Support custom gates for decomposition too
mtreinish 2e57608
Remove bare panics
mtreinish 319c6e1
Merge branch 'main' into two_qubit_decomp
mtreinish 7e0c2a2
Undo debug testing for invalid custom gate check
mtreinish 7769833
Fix lint
mtreinish af17ab8
Fix python lint
mtreinish 06c3da4
add default fidelity value
ShellyGarion ee3e88e
add more gates for the tests
ShellyGarion 1bb0616
assert that CustomXYGate raises an error
ShellyGarion 8949f7f
update assertion in test
ShellyGarion 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
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.
Do you think we should treat this class as public at all? The python space definition wasn't limited to standard gates, it would support any python space
Gate
object including a custom defined gate. This will error in the case of a customPyGate
though.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.
Currently,
rxx_equivalent_gate
could be only aStandardGate
since in the code we need to invert it, and there is currently no inverse function for other types, see these lines: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.
As for making this class public, I think that it may be useful. Should we do it now or only after it's added to the
UnitarySynthesis
transpiler pass #13320?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'd say lets do it later as the PR is large and intricate enough that we should review the change making it public on its own.