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

Stop using QNodeCollection in ExpvalCost #3687

Merged
merged 16 commits into from Jan 30, 2023

Conversation

AlbertMitjans
Copy link
Collaborator

@AlbertMitjans AlbertMitjans commented Jan 26, 2023

Stop using deprecated qml.map.

@github-actions
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.

@AlbertMitjans
Copy link
Collaborator Author

[sc-32650]

tests/test_vqe.py Outdated Show resolved Hide resolved
tests/test_vqe.py Outdated Show resolved Hide resolved
tests/test_vqe.py Outdated Show resolved Hide resolved
tests/test_vqe.py Outdated Show resolved Hide resolved
tests/test_vqe.py Outdated Show resolved Hide resolved
tests/test_vqe.py Outdated Show resolved Hide resolved
tests/test_vqe.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Merging #3687 (d1e7e79) into master (cde04ba) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3687      +/-   ##
==========================================
- Coverage   99.74%   99.73%   -0.01%     
==========================================
  Files         324      324              
  Lines       28396    28399       +3     
==========================================
+ Hits        28324    28325       +1     
- Misses         72       74       +2     
Impacted Files Coverage Δ
pennylane/optimize/shot_adaptive.py 100.00% <ø> (ø)
pennylane/qnn/cost.py 100.00% <100.00%> (ø)
pennylane/transforms/adjoint_metric_tensor.py 100.00% <100.00%> (ø)
pennylane/transforms/hamiltonian_expand.py 100.00% <100.00%> (ø)
pennylane/transforms/metric_tensor.py 100.00% <100.00%> (ø)
pennylane/vqe/vqe.py 100.00% <100.00%> (ø)
pennylane/collections/dot.py 95.65% <0.00%> (-4.35%) ⬇️

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

Copy link
Contributor

@mudit2812 mudit2812 left a comment

Choose a reason for hiding this comment

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

This looks good to me! Please update changelog-dev.md as well. Assuming all the tests pass, I think it's ready for approval.

pennylane/vqe/vqe.py 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 🎉

@AlbertMitjans AlbertMitjans merged commit a5eaac1 into master Jan 30, 2023
@AlbertMitjans AlbertMitjans deleted the stop-using-qnode-collection branch January 30, 2023 16:12
mudit2812 pushed a commit that referenced this pull request Apr 13, 2023
* 🔧 refactor (ExpvalCost): Stop using QNodeCollection.

* ⏪ revert (ExpvalCost): Change back to qnodes.

* 🐛 fix (hamiltonian_expand): Small fix.

* 🧪 tests (ExpvalCost): Fix test.

* Update tests/optimize/test_qng.py

* Update tests/optimize/test_optimize_shot_adaptive.py

* Update tests/test_vqe.py

* Apply suggestions from code review

* 🧪 tests (ExpvalCost): Fix test.

* 🔧 refactor (SquaredErrorLoss): Stop using qml.map.

* ⏪ revert (ExpvalCost): Revert.

* 🐛 fix (ExpvalCost): Small fix.

* 🔧 refactor (ExpvalCost): Refactor.
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

3 participants