Closed willjmax closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.58%. Comparing base (
d7db6b4
) to head (5f83275
). Report is 2 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
[sc-72571]
Last set of comments, will be happy to approve after these.
Thanks. I committed your changes.
This PR introduces the method
shift_operator
to theFermiWord
class. Given an initial position and a final position, the method will shift the operator in the initial position to the final position, and apply the fermion anti-commutator relations.shift_operator
returns aFermiSentence
object since new terms and coefficients may be introduced by the anti-commutator relations.The following code
produces
FermiSentence({FermiWord({(0, 2): '+', (1, 0): '+', (2, 1): '-'}): 1})
which is theFermiSentence
obtained by shifting the operator in the 2nd position until it reaches the 0th position. That isa+(0) a(1) a+(2)
becomesa+(2) a+(0) a(1)
.