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.36k stars 604 forks source link

FermiWord and FermiSentence __repr__ now return a unique representation #6167

Closed willjmax closed 2 months ago

willjmax commented 2 months ago

This PR updates the __repr__ method for FermiWord and FermiSentence to return str(dict(self)). This representation uniquely defines the instance, and addresses [sc-72054].

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 99.65%. Comparing base (36dc2d0) to head (60e6f27). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6167 +/- ## ========================================== - Coverage 99.65% 99.65% -0.01% ========================================== Files 447 447 Lines 42713 42418 -295 ========================================== - Hits 42567 42271 -296 - Misses 146 147 +1 ```

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