-
Notifications
You must be signed in to change notification settings - Fork 575
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
ECR implementation #2613
ECR implementation #2613
Conversation
Hi @avbhadw, thank you for the PR! 🙂 Let us know if this would be ready for review. |
Codecov Report
@@ Coverage Diff @@
## master #2613 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 249 249
Lines 20202 20220 +18
=======================================
+ Hits 20119 20137 +18
Misses 83 83
Continue to review full report at Codecov.
|
Hey @antalszava I think this is ready for review. I did implement a function to calculate the power of the matrix but I am not sure how to test it, so I removed it. In my new commit there is no power function but when I run Another issue I have is running make docs. I get the error below: Is there a bibtex file I need to add? Thanks! |
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.
Hi @avbhadw, apologies for the delayed response here! I've been a bit unwell for the past couple of days.
The solution is looking great overall! 🎉 🙂 I've left a couple of minor comments.
For your questions:
- The power method should be tested already based on your addition (see the related comment in the test file);
- What if the
sphinxcontrib-bibtex
package is installed viapip install sphinxcontrib-bibtex
.
Also, there seem to be some CI checks failing (apart form the test runners). Let me know and I could help with these if need be.
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>
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>
Hey @antalszava I think I have resolved almost all of the reviews you have suggested(one unresolved, see above). I was having some trouble running make coverage (my computer does not have enough RAM for this to work), but I borrowed someone else's laptop (OS: Linux) and it worked. I believe I am no longer failing CI checks at least locally. After trying your suggestion, I still have the same error with From what I understand there isn't a torch package 1.9.0+cpu for macOS, I did remove the +cpu and install torch but I had an error when running make tests (short summary):
I think once I am able to successfully run I am thinking of trying to use docker but I am not sure if it would solve the problem. |
Co-authored-by: Christina Lee <chrissie.c.l@gmail.com>
Added ECR to involution_ops
Removed def for label
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.
Hi @avbhadw, this looks good! 🎉
1-2 minor suggestions and it seems that the formatting is off (running black
should help), afterwards, we'd merge this one.
As for the configuration issues, I'm not sure unfortunately. 🤔 Perhaps Docker would work, we do get some issues with Docker at times. For this PR, building the docs should be fine for now, the CI check seems good. 🙂
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Hey @antalszava I have implemented your suggestions and ran black (sorry I forgot). Thanks for being patient with me! |
Hey @antalszava I noticed black failing. I fixed it and pushed back up. |
Hi @avbhadw, no worries! 🙂 Thank you. I'll be merging this PR soon. Thank you for your contribution! 👏 |
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
test directory!
All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
doc/releases/changelog-dev.md
file, summarizing thechange, and including a link back to the PR.
The PennyLane source code conforms to
PEP8 standards.
We check all of our code against Pylint.
To lint modified files, simply
pip install pylint
, and thenrun
pylint pennylane/path/to/file.py
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context: Implementing ECR function as described here
Description of the Change: adding the operation (adjoint, eigenvalues, decomposition), adding support for qubit devices
Benefits:
Possible Drawbacks:
Related GitHub Issues:
Closes #2581