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

Remove more analytic occurrences #1261

Merged
merged 5 commits into from
Apr 30, 2021
Merged

Remove more analytic occurrences #1261

merged 5 commits into from
Apr 30, 2021

Conversation

antalszava
Copy link
Contributor

Some more places where analytic appeared:

  1. In the building a plugin guide: DeviceError: The analytic argument has been replaced by shots=None. Please use shots=None instead of analytic=True.
  2. One test file

There was another which made me wonder: ./pennylane/optimize/shot_adaptive.py: if dev.analytic: (check_device method). @josh146 would this be intended because Device.analytic is still valid?

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.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.

@antalszava antalszava changed the title Remove more analytic occurences Remove more analytic occurrences Apr 29, 2021
@antalszava antalszava requested a review from josh146 April 29, 2021 19:48
Comment on lines -43 to -44
shots = 1000
analytic = true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TOML doesn't seem to have the concept of None (see here), so just leaving shots out instead of shots=None.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@codecov
Copy link

codecov bot commented Apr 30, 2021

Codecov Report

Merging #1261 (0ff21d5) into master (ef87a8c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1261   +/-   ##
=======================================
  Coverage   98.11%   98.11%           
=======================================
  Files         146      146           
  Lines       11050    11050           
=======================================
  Hits        10842    10842           
  Misses        208      208           

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 ef87a8c...0ff21d5. Read the comment docs.

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

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

would this be intended because Device.analytic is still valid?

Yep, exactly! While the analytic argument was deprecated, the attribute, as far as I know, was not.

.github/CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines -43 to -44
shots = 1000
analytic = true
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@antalszava antalszava merged commit a436199 into master Apr 30, 2021
@antalszava antalszava deleted the remove_more_analytic branch April 30, 2021 13:46
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.

2 participants