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

[Code Together] Adding SISWAP operation #1563

Merged
merged 41 commits into from Aug 23, 2021

Conversation

charmerDark
Copy link
Contributor

@charmerDark charmerDark commented Aug 19, 2021

Hey @antalszava
I've just added the SISWAP class, but I am having trouble exposing it as qml.SISWAP . I tried following the PR for ISWAP. But I think the code structure has changed a bit since then? Could you please help me out on this end?

Related issues

Closes #1527

@charmerDark charmerDark marked this pull request as draft August 19, 2021 21:25
@antalszava
Copy link
Contributor

Hi @charmerDark, after checking out your branch I could access qml.SISWAP 🤔 Was there a particular place in the codebase where it was not working?

The operations have indeed been split across files. If a new op is added to one of the existing files, it should be imported by in the top level __init__.py file.

@antalszava antalszava changed the title [WIP] Adding SISWAP operation [Code Together] [WIP] Adding SISWAP operation Aug 19, 2021
@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

Merging #1563 (a4120f1) into master (566e104) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1563   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files         189      189           
  Lines       13625    13642   +17     
=======================================
+ Hits        13511    13528   +17     
  Misses        114      114           
Impacted Files Coverage Δ
pennylane/devices/default_qubit.py 100.00% <ø> (ø)
pennylane/ops/qubit/__init__.py 100.00% <ø> (ø)
pennylane/ops/qubit/non_parametric_ops.py 96.82% <100.00%> (+0.13%) ⬆️

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 566e104...a4120f1. Read the comment docs.

@charmerDark charmerDark marked this pull request as ready for review August 20, 2021 16:44
@charmerDark
Copy link
Contributor Author

charmerDark commented Aug 20, 2021

Hey @antalszava !
I hadn't added any tests for SQISW because it redirects to SISWAP class. Also should I mention SQISW in the documentation line for SISWAP? Please let me know any other changes I should make
The earlier issue with the SISWAP class was because of my local python setup I guess . It works well everywhere else.

@antalszava
Copy link
Contributor

Hi @charmerDark, just for extra safety, cases could be added for qml.SQISW too, similar to how it's the case for CPhase:

It's mostly a matter of adding the same test case as for qml.SISWAP, just calling qml.SQISW.

Also should I mention SQISW in the documentation line for SISWAP?

Yep, it could also be added to doc/introduction/operations.rst, just is the case with CPhase.

@charmerDark
Copy link
Contributor Author

Hey @antalszava
Could you see if its all right now? Thanks in advance

@charmerDark charmerDark changed the title [Code Together] [WIP] Adding SISWAP operation [Code Together] Adding SISWAP operation Aug 23, 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 is getting there! 🎉 Left some suggestions, but the main addition is looking nice. 🙂

.github/CHANGELOG.md Outdated Show resolved Hide resolved
tests/ops/test_qubit_ops.py Outdated Show resolved Hide resolved
tests/ops/test_qubit_ops.py Outdated Show resolved Hide resolved
tests/ops/test_qubit_ops.py Outdated Show resolved Hide resolved
tests/ops/test_qubit_ops.py Outdated Show resolved Hide resolved
pennylane/ops/qubit/non_parametric_ops.py Outdated Show resolved Hide resolved
pennylane/ops/qubit/non_parametric_ops.py Outdated Show resolved Hide resolved
tests/devices/test_default_qubit.py Show resolved Hide resolved
tests/devices/test_default_qubit.py Show resolved Hide resolved
pennylane/ops/qubit/non_parametric_ops.py Outdated Show resolved Hide resolved
charmerDark and others added 12 commits August 23, 2021 22:29
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
.github/CHANGELOG.md Outdated Show resolved Hide resolved
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 is looking great! 🎉 Thank you for the addition and for following through the review process. 😊 🥇

@antalszava antalszava merged commit 068439f into PennyLaneAI:master Aug 23, 2021
@charmerDark charmerDark deleted the siswap_branch branch August 24, 2021 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the SISWAP operation
2 participants