-
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
Explicitly provide data types in default qubit device #2448
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #2448 +/- ##
=======================================
Coverage 99.53% 99.53%
=======================================
Files 243 243
Lines 19414 19436 +22
=======================================
+ Hits 19323 19345 +22
Misses 91 91
Continue to review full report at Codecov.
|
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 @chaeyeunpark, lots of apologies for the delayed review here 😿
The PR is looking great! 🙏
One definite change from my side would be to go from assert
statements to errors. For the rest, I'm curious about your input too.
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.
Thanks for the detailed review @antalszava! I will incorporate the remaining points ASAP.
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.
Looks good 🥇 Awesome changes 🙂
Co-authored-by: antalszava <antalszava@gmail.com>
Thanks @antalszava for approving this. |
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: With ongoing effort to add SIMD/GPU supports in PennyLane-Lightning, we hope to have better support of a single-precision floating-point throughout the codebase. This PR deals with these requirements.
Description of the Change:
QubitDevice
, the parent class of all devices that support qubit operations, now accepts data types as an argument in the initializer. Some implicit type conversions happening in some methods became explicit to preserve data types.Benefits: Offer more flexibility to devices to use their own data type.
Possible Drawbacks:
Related GitHub Issues: