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 code due to be removed in v0.28 #3281

Merged
merged 9 commits into from Nov 17, 2022
Merged

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Nov 7, 2022

A variety of code is due to be removed for the v0.28 release. See the deprecations page for the full list.

The list is:

  • qml.tape.get_active_tape: Use qml.QueuingManager.active_context()
  • qml.transforms.qcut.remap_tape_wires: Use qml.map_wires
  • qml.tape.QuantumTape.inv(): Use qml.tape.QuantumTape.adjoint()
  • qml.tape.stop_recording(): Use qml.QueuingManager.stop_recording()
  • qml.tape.QuantumTape.stop_recording(): Use qml.QueuingManager.stop_recording()
  • qml.QueuingContext is now qml.QueuingManager
  • QueuingManager.safe_update_info and AnnotatedQueue.safe_update_info: Use plain update_info

@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Merging #3281 (315cf08) into master (883dad0) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3281      +/-   ##
==========================================
- Coverage   99.70%   99.70%   -0.01%     
==========================================
  Files         299      298       -1     
  Lines       26214    26142      -72     
==========================================
- Hits        26136    26064      -72     
  Misses         78       78              
Impacted Files Coverage Δ
pennylane/queuing.py 100.00% <ø> (ø)
pennylane/tape/tape.py 97.50% <ø> (-0.54%) ⬇️
pennylane/transforms/__init__.py 100.00% <ø> (ø)
pennylane/transforms/qcut.py 100.00% <ø> (ø)
pennylane/tape/__init__.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.

@albi3ro albi3ro added the review-ready 👌 PRs which are ready for review by someone from the core team. label Nov 8, 2022
Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

image
😍

doc/development/deprecations.rst Show resolved Hide resolved
doc/development/deprecations.rst Outdated Show resolved Hide resolved
doc/releases/changelog-dev.md Show resolved Hide resolved
Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

Two notes for consistency but otherwise lgtm!

  1. Two of the pending deprecations say "Will be removed in v0.28" - are we sure we'll get to them? Otherwise it will clash with the completed deprecations that say "Removed in v0.28". Not sure what I'm asking for here. Stories to track them? Optimistically change the language now? A calendar reminder to ensure it's updated pre-release? Nothing is also acceptable, just making sure it's pointed out.
  2. The newly completed deprecations have the first line saying "Still accessible in vX.Y", while the previously existing ones say "Deprecated in vX.Y". Can we make them the same? I'd prefer "Deprecated in".

@albi3ro
Copy link
Contributor Author

albi3ro commented Nov 17, 2022

For the grouping deprecation, let's make a separate PR for that @Jaybsoni . Since that will be a lot of deletions and clean up.

I'm unsure whether we should actually remove qml.ExpvalCost in this release, because of the ShotAdaptiveOptimizer. I think we should wait to actually remove it when we are capable of distributing shots over a script batch.

Updated the language for "Completed deprecation cycles".

@albi3ro albi3ro merged commit 87dfbad into master Nov 17, 2022
@albi3ro albi3ro deleted the remove-deprecated-code branch November 17, 2022 20:39
timmysilv added a commit that referenced this pull request Jan 23, 2024
This was originally added in #3182, but I only put the test in
`test_tape.py`, so it was accidentally pruned in #3281 (anagram PR!)
which isn't ideal. I'm putting it back in `test_queuing.py` where it
truly belongs.

I know this PR seems a bit insignificant, but I remember this bug coming
up and I don't want it to resurface because of a lack of testing. Plus,
the `finally` is much prettier than writing the cleanup code twice 😄

Not bothering with a changelog entry, but can add if we feel strongly
about it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-ready 👌 PRs which are ready for review by someone from the core team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants