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

Support snapshots in DefaultQubit2 #4193

Merged
merged 12 commits into from
Jun 2, 2023
Merged

Support snapshots in DefaultQubit2 #4193

merged 12 commits into from
Jun 2, 2023

Conversation

eddddddy
Copy link
Contributor

Basically port over the implementation from DefaultQubit and add a couple of tests.

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #4193 (2ec0a87) into master (a7ae25b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4193   +/-   ##
=======================================
  Coverage   99.77%   99.77%           
=======================================
  Files         342      342           
  Lines       30709    30737   +28     
=======================================
+ Hits        30639    30667   +28     
  Misses         70       70           
Impacted Files Coverage Δ
pennylane/ops/functions/dot.py 100.00% <ø> (ø)
pennylane/pulse/__init__.py 100.00% <ø> (ø)
pennylane/pulse/rydberg.py 100.00% <ø> (ø)
pennylane/pulse/transmon.py 100.00% <ø> (ø)
pennylane/_qubit_device.py 99.29% <100.00%> (+<0.01%) ⬆️
pennylane/debugging.py 100.00% <100.00%> (ø)
pennylane/devices/experimental/default_qubit_2.py 100.00% <100.00%> (ø)
pennylane/devices/qubit/apply_operation.py 100.00% <100.00%> (ø)
pennylane/devices/qubit/preprocess.py 100.00% <100.00%> (ø)
pennylane/devices/qubit/simulate.py 100.00% <100.00%> (ø)
... and 2 more

@eddddddy eddddddy requested a review from a team May 31, 2023 02:00
tests/test_debugging.py Outdated Show resolved Hide resolved
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was testing it out with code from #4196 , and the preprocessing was decomposing the snapshots away. We need to edit preprocess.py line 56 to manually specify that the new device support snapshots.

@eddddddy
Copy link
Contributor Author

@albi3ro Can you check if the last change was what you meant?

Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 I'm happy with this :)

@albi3ro albi3ro requested a review from a team June 1, 2023 17:57
Co-authored-by: Christina Lee <christina@xanadu.ai>
@eddddddy eddddddy enabled auto-merge (squash) June 2, 2023 14:34
@eddddddy eddddddy merged commit f376092 into master Jun 2, 2023
@eddddddy eddddddy deleted the snapshot_new branch June 2, 2023 15:10
@eddddddy
Copy link
Contributor Author

eddddddy commented Jun 2, 2023

[sc-33774]

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.

3 participants