pennylane icon indicating copy to clipboard operation
pennylane copied to clipboard

[Return-types: Fix #1] Update `LieAlgebraOptimizer` for new return types

Open eddddddy opened this issue 2 years ago • 2 comments

Context: Part of the effort to port all PennyLane functionality to the new return type system.

Description of the Change: Not much needs updating. The LieAlgebraOptimizer calls qml.execute on tapes that have only one observable. In addition, the results are already reshaped to squeeze out the extra leading dimension.

Added test file to confirm that everything works with the new return types.

eddddddy avatar Sep 19 '22 18:09 eddddddy

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.

github-actions[bot] avatar Sep 19 '22 18:09 github-actions[bot]

Codecov Report

Merging #3090 (a6d9fed) into master (b025e1d) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3090   +/-   ##
=======================================
  Coverage   99.68%   99.68%           
=======================================
  Files         273      273           
  Lines       23604    23604           
=======================================
  Hits        23530    23530           
  Misses         74       74           
Impacted Files Coverage Δ
pennylane/optimize/lie_algebra.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.

codecov[bot] avatar Sep 19 '22 18:09 codecov[bot]