Skip to content
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

[unitaryHACK] Added SWAP gate decomposition and related tests #1329

Merged

Conversation

charmerDark
Copy link
Contributor

Context:
Added SWAP decomposition and wrote tests to it

Description of the Change:
added the the function

 @staticmethod
   def decomposition(wires): 

to pennylane/ops/qubit.py and tests for it at tests/ops/test_qubit_ops.py

Possible Drawbacks:
similar to #1313
Related GitHub Issues:
resolves #1304

.github/CHANGELOG.md Outdated Show resolved Hide resolved
antalszava and others added 2 commits May 17, 2021 14:04
Co-authored-by: antalszava <antalszava@gmail.com>
@codecov
Copy link

codecov bot commented May 17, 2021

Codecov Report

Merging #1329 (23a3456) into master (2107490) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1329   +/-   ##
=======================================
  Coverage   98.16%   98.16%           
=======================================
  Files         148      148           
  Lines       11446    11450    +4     
=======================================
+ Hits        11236    11240    +4     
  Misses        210      210           
Impacted Files Coverage Δ
pennylane/ops/qubit.py 98.50% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2107490...23a3456. Read the comment docs.

@antalszava antalszava added the unitaryhack Dedicated issue for Unitary Fund open-source hackathon label May 17, 2021
Copy link
Contributor

@antalszava antalszava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @charmerDark, this looks good to me! 🎉 🙂 Extra credit for going through the challenges with git. Thank you for your contribution! :)

@charmerDark
Copy link
Contributor Author

Thank you so much @antalszava Couldn't have made it without all your support. I learnt so much from this. Hope to be able to contribute more to pennylane soon.

@antalszava antalszava merged commit 9777f09 into PennyLaneAI:master May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unitaryhack Dedicated issue for Unitary Fund open-source hackathon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[unitaryhack] Define decomposition for qml.SWAP
2 participants