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

Add simulate of analytic case for DefaultMixedNewAPI #6618

Open
wants to merge 47 commits into
base: add-qubit_mixed/measure
Choose a base branch
from

Conversation

JerryChen97
Copy link
Contributor

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 the
    change, 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 then
    run 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:
The implementation of method simulate is the most important one under the architecture of new API standard. The point of simulate, is basically abstract both the analytic version (controlled by shots=None, or infinite shots in a fancier way) and the MC version (finite shots). Meanwhile, the functionality of such method should not truly depend on our details of qml implementationi; they better only rely on either the fundamental computation libs, e.g. math lib and qnp, or the most essential infras, e.g. Tape/Scripts and Operations.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:
[sc-73320]

JerryChen97 and others added 30 commits November 19, 2024 10:00
Mimicing the qutrit mixed one.
@JerryChen97 JerryChen97 self-assigned this Nov 26, 2024
@JerryChen97 JerryChen97 marked this pull request as ready for review November 27, 2024 21:20
@JerryChen97
Copy link
Contributor Author

The three fails up to now are all expected; will fix when the blockers were removed and this branch got updated

pennylane/devices/default_mixed.py Outdated Show resolved Hide resolved
pennylane/devices/default_mixed.py Outdated Show resolved Hide resolved
pennylane/devices/default_mixed.py Outdated Show resolved Hide resolved
pennylane/devices/default_mixed.py Outdated Show resolved Hide resolved
pennylane/devices/default_mixed.py Outdated Show resolved Hide resolved
@JerryChen97 JerryChen97 changed the base branch from master to add-qubit_mixed/measure November 28, 2024 19:53
@JerryChen97 JerryChen97 changed the base branch from add-qubit_mixed/measure to master November 28, 2024 19:54
@JerryChen97 JerryChen97 changed the base branch from master to add-qubit_mixed/measure November 28, 2024 19:55
@JerryChen97
Copy link
Contributor Author

@lillian542 I just rebased to the measure branch. There might be still some confusing out-of-scope changes somehwere e.g. a little fix regarding init_state over the other PR; but this PR's primary purpose is to introduce the added file simulate.py as well as its test suite

JerryChen97 added a commit that referenced this pull request Nov 28, 2024
JerryChen97 added a commit that referenced this pull request Nov 28, 2024
JerryChen97 added a commit that referenced this pull request Nov 28, 2024
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.

Project coverage is 99.64%. Comparing base (ff09567) to head (da9e8af).
Report is 20 commits behind head on add-qubit_mixed/measure.

Files with missing lines Patch % Lines
pennylane/devices/default_mixed.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##           add-qubit_mixed/measure    #6618      +/-   ##
===========================================================
- Coverage                    99.65%   99.64%   -0.01%     
===========================================================
  Files                          456      456              
  Lines                        43019    43084      +65     
===========================================================
+ Hits                         42870    42933      +63     
- Misses                         149      151       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JerryChen97 JerryChen97 added the do not merge ⚠️ Do not merge the pull request until this label is removed label Nov 29, 2024
@JerryChen97
Copy link
Contributor Author

Put DO NOT MERGE since currently we are only comparing it with another in-progress branch instead of requesting to merge.
After the measure branch is merged to master, we remove the DO NOT MERGE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge ⚠️ Do not merge the pull request until this label is removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants