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

Iterable states #140

Merged
merged 9 commits into from Sep 13, 2022
Merged

Iterable states #140

merged 9 commits into from Sep 13, 2022

Conversation

ziofil
Copy link
Collaborator

@ziofil ziofil commented Jun 4, 2022

Context:
Adding a new feature to iterate over the marginals of a multimode state.

Description of the Change:
With this PR we support the syntax (e.g.)

for mode in state:
    print(mode.purity)

Benefits:
cleaner syntax.

Possible Drawbacks:
maybe one could expect that for xxx in state yields something other than the single-mode marginals.

Related GitHub Issues:
None

@codecov
Copy link

codecov bot commented Jun 4, 2022

Codecov Report

Merging #140 (616cc21) into main (bc4ae38) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   71.22%   71.24%   +0.02%     
==========================================
  Files          29       29              
  Lines        2811     2813       +2     
==========================================
+ Hits         2002     2004       +2     
  Misses        809      809              
Impacted Files Coverage Δ
mrmustard/lab/abstract/state.py 74.52% <100.00%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc4ae38...616cc21. Read the comment docs.

@ziofil ziofil requested a review from sduquemesa June 5, 2022 14:56
@ziofil
Copy link
Collaborator Author

ziofil commented Jun 6, 2022

Oh I still need to update the changelog

@sduquemesa sduquemesa added the enhancement New feature or request label Sep 13, 2022
@sduquemesa sduquemesa merged commit fa9329a into main Sep 13, 2022
@sduquemesa sduquemesa deleted the iterable_states branch September 13, 2022 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants