PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.29k stars 590 forks source link

include the the num_steps in Exp.simplify #5831

Closed EmilianoG-byte closed 3 months ago

EmilianoG-byte commented 3 months ago

Context:

The simplified operator of an exponential was not returning the correct number of steps.

Description of the Change:

Exp.simplify()now returns an operator with the correct number of Trotter steps, i.e. equal to the one from the pre-simplified operator.

Benefits: Correct number of Trotter steps is now included after simplification

Related GitHub Issues: Fixes #5747 [sc-64181]

github-actions[bot] commented 3 months ago

Hello. You may have forgotten to update the changelog! Please edit doc/releases/changelog-dev.md with:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.66%. Comparing base (d65f671) to head (01e9b3b). Report is 253 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5831 +/- ## ========================================== - Coverage 99.66% 99.66% -0.01% ========================================== Files 415 415 Lines 39824 39528 -296 ========================================== - Hits 39692 39395 -297 - Misses 132 133 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.