-
Notifications
You must be signed in to change notification settings - Fork 595
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
Add helper func apply_operation
for default mixed
#6379
base: master
Are you sure you want to change the base?
Conversation
Hello. You may have forgotten to update the changelog!
|
apply_operation
for default mixedapply_operation
for default mixed
RN I've done the implementation of both einsum and tensordot.
Due to the fact that there are quite some other shortcuting regeisters for many special cases to implement, currently I would like to put this as draft without the full CI. After all the other registers complete I will load the CI along with more tests. |
In previous |
The following methods involve additional stories and will be neglected for now:
|
I noticed that seemingly we can directly use those from pure states given the fact that the conjugated operator's wire numbers are simply all |
More tests to add:
|
apply_operation
for default mixedapply_operation
for default mixed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6379 +/- ##
==========================================
- Coverage 99.38% 99.35% -0.04%
==========================================
Files 447 451 +4
Lines 42418 42648 +230
==========================================
+ Hits 42158 42373 +215
- Misses 260 275 +15 ☔ View full report in Codecov by Sentry. |
…aneAI/pennylane into add-apply-operation-mixed
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:
Before getting into the implementation of new
default_mixed
we need to separate most of the useful logics from the older version one. One of the most important things is theapply_operation
. Basically, what we want to do is to condensate everything into a new sub-module underqml/devices/qubit_mixed
such that previous empirical heuristics regarding how to select betweeneinsum
andtensordot
can be carried over and wrapped independently.Description of the Change:
New script containing the helper funcs as described above.
Benefits:
Better modularization. Getting ready for the implementaion of a new
default_mixed
in the future.Possible Drawbacks:
Related GitHub Issues:
Related Shortcut Stories
[sc-73319]