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

CMP #5: Add Sample MP class #3288

Merged
merged 63 commits into from Nov 21, 2022
Merged

CMP #5: Add Sample MP class #3288

merged 63 commits into from Nov 21, 2022

Conversation

AlbertMitjans
Copy link
Collaborator

@AlbertMitjans AlbertMitjans commented Nov 8, 2022

  1. Create _Sample class (name will be changed to Sample after the whole refactor).
  2. Return _Sample instance in qml.sample.
  3. Copy code from QubitDevice.sample into _Sample.process + improve code style.
  4. Add teardown_method to the test_sample.py tests that checks that QubitDevice.sample and _Sample.process return the same values for all tests.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

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.

@AlbertMitjans AlbertMitjans changed the base branch from master to measurement-process November 8, 2022 09:18
@codecov
Copy link

codecov bot commented Nov 9, 2022

Codecov Report

Merging #3288 (1ccfe41) into master (dae6540) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3288   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files         298      298           
  Lines       26163    26188   +25     
=======================================
+ Hits        26085    26110   +25     
  Misses         78       78           
Impacted Files Coverage Δ
pennylane/measurements/measurements.py 100.00% <100.00%> (ø)
pennylane/measurements/mutual_info.py 100.00% <100.00%> (ø)
pennylane/measurements/sample.py 100.00% <100.00%> (ø)
pennylane/measurements/state.py 100.00% <100.00%> (ø)
pennylane/measurements/vn_entropy.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@AlbertMitjans AlbertMitjans marked this pull request as ready for review November 9, 2022 12:00
Base automatically changed from measurement-process to master November 17, 2022 08:45
pennylane/measurements/sample.py Show resolved Hide resolved
pennylane/measurements/sample.py Show resolved Hide resolved
pennylane/measurements/sample.py Show resolved Hide resolved
pennylane/measurements/sample.py Outdated Show resolved Hide resolved
pennylane/measurements/sample.py Show resolved Hide resolved
Copy link
Collaborator

@eddddddy eddddddy 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 @AlbertMitjans 💯

@AlbertMitjans AlbertMitjans enabled auto-merge (squash) November 21, 2022 15:48
@AlbertMitjans AlbertMitjans merged commit ffa6e46 into master Nov 21, 2022
@AlbertMitjans AlbertMitjans deleted the sample branch November 21, 2022 16:06
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.

None yet

2 participants