pennylane
pennylane copied to clipboard
`generator` methods of operators should return new opmath instances
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.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.63%. Comparing base (
f9bdb32) to head (0625c82). Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #5253 +/- ##
==========================================
- Coverage 99.65% 99.63% -0.02%
==========================================
Files 399 400 +1
Lines 36901 36746 -155
==========================================
- Hits 36774 36613 -161
- Misses 127 133 +6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
When tests all pass happy to approve :)
All tests were totally fine. Now there's an error associated with an external library that has most probably nothing to with the PR since, from what I can see, it is present in other PRs as well (I'll figure out what's going on)
Can you make sure to follow up on updating also the qchem generators?
@Qottmann Sure, I'll replace the generators in qchem after solving the two related issues in tapering. I'll create a story for that to make sure we do not forget.
Will the return type of generator depend on whether new opmath is enabled? Or are we always returning the new type?
Will the return type of
generatordepend on whether new opmath is enabled? Or are we always returning the new type?
Since qml.s_prod always returns a SProd instance (regardless of whether new opmath is enabled), the generators should always be returned as a new opmath instance.