Closed dariavh closed 1 year ago
Hi Daria, Thanks for contributing. We’re definitely interested in contributions like this. I’m currently on vacation with marginal internet access and won’t be able to go over the code before September. It does however look good on first glance.
One thing I spotted:
I think the Givens gate is the same as “QubitExcitation” with target=[first,second]. Makes still sense to have it as an alias though. You can however then replace the GeneralizedRotation
with the corresponding call to QubitExcitation(….).
A convenient iSWAP is however not there yet (know that, because people asked about it in the past :-) ). Need to check one or two things with the GeneralizedRotation definitions in order to make sure that gradient building will work as expected. I’ll provide more details in ~1.5 weeks when I’m back.
Have a nice weekend.
@kottmanj Thank you for your extensive review. I have incorporated your comments into the last commit, let me know if you agree with those changes.
To the best of my knowledge, the current code has no direct implementation for the
iSWAP
gate $\exp(i\frac{\pi}{4}(X \otimes X + Y \otimes Y))$Givens
gate $\exp(-i \frac{\theta}{2} (Y \otimes X - X \otimes Y))$I have implemented them using
GeneralizedRotation
gates. I have written some test cases for both gates as well. Please let me know if these gates are of any interest to you and if you have further remarks/requests.