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

Change default value of from_qasm to keep the measurements #5982

Merged
merged 21 commits into from
Jul 17, 2024

Conversation

EmilianoG-byte
Copy link
Contributor

Context:

The new default should be to return the QASM measurements (i.e. new default is measurements=None). Users can access the old behaviour by explicitly passing measurements=[], as communicated in the deprecation warning added in 0.37.

Description of the Change:

Default value of from_qasm argument measurements is None.

[sc-66686]

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.

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.65%. Comparing base (94b5533) to head (eede54e).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5982      +/-   ##
==========================================
- Coverage   99.66%   99.65%   -0.01%     
==========================================
  Files         427      427              
  Lines       40983    40724     -259     
==========================================
- Hits        40845    40585     -260     
- Misses        138      139       +1     

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

pennylane/io.py Outdated Show resolved Hide resolved
Copy link
Contributor

@isaacdevlugt isaacdevlugt left a comment

Choose a reason for hiding this comment

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

Thanks @EmilianoG-byte! just a couple suggestions and questions. Please tag me again when you're ready 👌

pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @EmilianoG-byte!

pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Show resolved Hide resolved
pennylane/io.py Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
@EmilianoG-byte
Copy link
Contributor Author

@isaacdevlugt @trbromley @lillian542 , done with the changes, lmk what you think!

Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @EmilianoG-byte, this is a great improvement!

pennylane/io.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

Thanks @EmilianoG-byte, this looks much cleaner and clearer! I left a couple of minor comments :)

pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

For some reason when I open the docs build on your last commit, it doesn't reflect your most recent changes. I made one more suggestion, maybe see if updating that and triggering CI updates the build?

pennylane/io.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lillian542 lillian542 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, thanks @EmilianoG-byte! Glad the sphinx issue is resolved 😅

I have one final suggestion (that I think will actually work this time 🙈) for how to make a docstring-compatible version of the qasm_code string that will also work in a notebook. See what you think!

pennylane/io.py Outdated Show resolved Hide resolved
@isaacdevlugt isaacdevlugt self-requested a review July 16, 2024 14:01
Copy link
Contributor

@isaacdevlugt isaacdevlugt left a comment

Choose a reason for hiding this comment

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

Thanks Emiliano! 🚀 This is more clear than before. Thanks for catching this originally!

EmilianoG-byte and others added 2 commits July 16, 2024 10:42
Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com>
@EmilianoG-byte EmilianoG-byte enabled auto-merge (squash) July 16, 2024 18:11
@EmilianoG-byte EmilianoG-byte merged commit c10e423 into master Jul 17, 2024
39 checks passed
@EmilianoG-byte EmilianoG-byte deleted the removals-0.38 branch July 17, 2024 22:36
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.

4 participants