Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add macro to define a group of mutually anticommuting fermionic operators #11

Merged
merged 3 commits into from
Aug 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,17 @@ The basic functions to create QuantumAlgebra expressions (which are of type
b†(k) b(i)
```
Operators with different names are assumed to belong to different "species"
and always commute.
and always commute. For fermions, this is not always desired, since you might
want to use different named operators to refer to different kinds of states
for the same species (e.g., localized and itinerant electrons). This can be
achieved with the macro `@anticommuting_fermion_group`, which creates several
fermionic operators that mutually anticommute:
```julia
julia> @anticommuting_fermion_group c d

julia> normal_form(c()*d() + d()*c())
0
```

- `param(name::Symbol,state='n',inds...)` to create a named parameter. `state` must be
one of `'r'`, `'n'`, or `'c'` for purely real, non-conjugated complex, and
Expand Down
12 changes: 11 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,17 @@ The basic functions to create QuantumAlgebra expressions (which are of type
b†(k) b(i)
```
Operators with different names are assumed to belong to different "species"
and always commute.
and always commute. For fermions, this is not always desired, since you might
want to use different named operators to refer to different kinds of states
for the same species (e.g., localized and itinerant electrons). This can be
achieved with the macro `@anticommuting_fermion_group`, which creates several
fermionic operators that mutually anticommute:
```julia
julia> @anticommuting_fermion_group c d

julia> normal_form(c()*d() + d()*c())
0
```

- `param(name::Symbol,state='n',inds...)` to create a named parameter. `state` must be
one of `'r'`, `'n'`, or `'c'` for purely real, non-conjugated complex, and
Expand Down
Loading