-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Methods to commute terms in Fermi objects (#6196)
This PR introduces the method `shift_operator` to the `FermiWord` 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 a `FermiSentence` object since new terms and coefficients may be introduced by the anti-commutator relations. The following code ``` fw = FermiWord({(0, 0): '+', (1, 1): '-', (2, 2): '+'}) fw.shift_operator(2, 0) ``` produces `FermiSentence({FermiWord({(0, 2): '+', (1, 0): '+', (2, 1): '-'}): 1})` which is the `FermiSentence` obtained by shifting the operator in the 2nd position until it reaches the 0th position. That is `a+(0) a(1) a+(2)` becomes `a+(2) a+(0) a(1)`. --------- Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com> Co-authored-by: Utkarsh <utkarshazad98@gmail.com> Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
- Loading branch information
1 parent
b52af2e
commit 09ae791
Showing
3 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters