-
Notifications
You must be signed in to change notification settings - Fork 3
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
Missing gates in native gate set for Rigetti backend #5
Comments
Thank you for this request. We will add this to our list and we will try to do improvements on this in the next weeks. |
@cqc-melf, thanks! I was wondering if there's a quick fix for the time being. For example, is it possible that I can define a custom rebase pass by including the |
I am not 100% sure what the |
You can use self defined passes for the rebase and run a self selected set of passes which is not changing the gate set for during the optimisation after that. If you want to submit this circuit to the device you can still use the backend of this extension, but you should disable the check of the requirements, because that would change the gate set again. (Set the |
Just wanted to check: did you mean the ISWAP gate or something else? I have not found a gate called |
@cqc-melf, thanks for the ideas. I will try to implement your suggestions and play around a bit to see if this works for what I want. |
Thank you, that is what I wanted to know. I have tried to find a list with all the supported native gates for the rigetti devices, but I have not found that. Can you point me to where you have found that? I wanted to make sure that I not only add the gates you have listed but all that are currently available. |
The way we generate the list of natively supported gates, is by accessing the device and extracting the connectivity map of the QPU with the following lines of code. You could give this a try and let me know!
Thanks |
From my understanding the CPhase gate is equivalent to the CU1 gate in pytket. CU1 is equivalent to a CRz up to a global phase. As pointed out by @vishal-ph the XY gate can be implemented ad a PhasedISwap operation. I think it should be reasonably easy to handle these gates. @cqc-melf anything I've missed here? |
I think this could be resolved by appropriate changes to the If I understand the above the backend now supports (CPhase aka CU1) and (RiSWAP aka PhasedISwap). Given that these are parametrised gates I think the solution is to come up with a way to implement TKET's internal TK2 gate in terms of {Rx, Rz, CU1, PhasedISwap, CZ}. Once we have such a replacement in hand we either create a RebaseCustom or add it to TKET's library of known decompositions so that it can be accessed via auto_rebase_pass Not that once we incorporate such a rebase into the We may also need to remove the post-routing Is there anything we should be aware of regarding the cost of the new parameterised gates in terms of fidelity? |
I have set up a PR for adding the gate to the target gate set, but I gave not updated the default compilation, because it is not required in there. So if you want to, you can add the gate to your circuit and apply passes on the circuit that are not changing the gateset. If there is a good reason to always compile to the XY gateset, we could add a new rebase pass as CalMacCQ suggested. |
The following method of class
ForestBackend
rebases the quantum circuits for Rigetti devices. However, the supported native gate set does not include the parameterizedCPHASE
andRiSWAP
(a.k.a XY-interaction) gates that are native to Rigetti devices, resulting in sub-optimal gate decompositions.Is there a plan to include these gates in the future?
Thanks
The text was updated successfully, but these errors were encountered: