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
Add 2q fractional gates to the
UnitarySynthesis
tranpiler pass #13568base: main
Are you sure you want to change the base?
Add 2q fractional gates to the
UnitarySynthesis
tranpiler pass #13568Changes from 16 commits
89ca81e
077ecb9
18b20f6
967da13
3bb10fd
14c7aac
eeff4cd
043a795
b94070a
0a1644b
48fec9b
009d87e
85e2962
c5d0c97
d7b84e9
ea9a2d0
132a44f
b1cb5a0
9cdf2da
1be749d
1495781
231af7f
bb874c1
c2a9ad4
d39c005
106ae4a
9131e3d
6a82649
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.
should we replace the default value here to "ZXZ"? If so, we should better do this in other places of this file.
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 replaced the default to "ZXZ". Should we do it in other classes as well?
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 think we might be missing out a group of gates here. As far as I understand it, the
TwoQubitControlledUDecomposer
works not only for standard gates (the ones defined inPARAM_SET
), but should also be at least a candidate for user-defined parametrized unitary gates that match the input conditions. In that case, we should probably not checkPARAM_SET.contains(&std_gate.name())
, and instead consider any 2q unitary parametrized gate for the "available_2q_param_basis
".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.
Note that not any parametrized gate can fit here, only certain parametrized gates which are equivalent (up to single qubit gates) to an
RXXGate
. TheTwoQubitControlledUDecomposer
works for such gates if the user was able to calibrate them somehow. Should theUnitarySynthesis
transpiler pass fit any calibrated gates?So I'm not sure what exactly should be checked here. See the function
TwoQubitControlledUDecomposer.to_rxx_gate
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.
We currently support non-standard gates too, so the pass should work if there is a non-standard gate that meets the condition of rxx equivalence.
TwoQubitControlledUDecomposer::new
already checks if the gate is rxx equivalent:qiskit/crates/accelerate/src/two_qubit_decompose.rs
Lines 2777 to 2822 in e9ccd3f
So I was thinking that we could abstract that logic and add a check to
UnitarySynthesis
similar tois_controlled
oris_supercontrolled
, but in this case it could be calledis_rxx_equivalent
(for example). The idea for the check is to filter out the non-rxx-equivalent gates.