# Quantum operator algebra of creation and annhilation operators of fermions

**URL:** <https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017>\
**Category:** Quantum\
**Tags:** question\
**Created:** [July 24, 2023, 1:33pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017 "2023-07-24T13:33:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![That\_ind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/that_ind/32/51372_2.png) [@That\_ind](https://discourse.julialang.org/u/That_ind)\
**Post date:** [July 24, 2023, 1:33pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017/1 "2023-07-24T13:33:57Z")

</div>

Is there any package that does quantum operator algebra (i.e., algebra with non-commuting operators) in Julia? I need to calculate numerous commutators of fermions, so I hope the package can do the job with small time and memory costs.

---

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [July 24, 2023, 1:44pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017/2 "2023-07-24T13:44:58Z")

</div>

Do you have a more specific problem to calculate? There are some that do simple symbolic calculations, most are numerical packages AFAIK

---

<div class="post-metadata">

**Author:** ![That\_ind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/that_ind/32/51372_2.png) [@That\_ind](https://discourse.julialang.org/u/That_ind)\
**Post date:** [July 24, 2023, 1:55pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017/3 "2023-07-24T13:55:34Z")

</div>

I need to calculate numerous commutators of fermions, so I hope the package can do the job with small time and memory costs. Both numerical and symbolic packages are okay with me. Could you share a little bit more details?

---

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [July 24, 2023, 2:06pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017/4 "2023-07-24T14:06:11Z")

</div>

I don’t know if there is many packages do fermions, but there is [GitHub - QuantumBFS/FLOYao.jl: A fermionic linear optics simulator backend for Yao.jl](https://github.com/QuantumBFS/FLOYao.jl) does the fermionic linear optics (FLO) circuits

---

<div class="post-metadata">

**Author:** ![Krastanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krastanov/32/6817_2.png) [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Post date:** [July 24, 2023, 2:41pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017/5 "2023-07-24T14:41:52Z")

</div>

I do not know of anything that exactly fits your needs, but QuantumCumulants does do some commutation algebra for simplifying expectation values: [Theoretical background · QuantumCumulants.jl](https://qojulia.github.io/QuantumCumulants.jl/dev/theory/)

Excising their internal methods that do the simplification might be a good starting point. They would also welcome contributions and feature requests.

---

<div class="post-metadata">

**Author:** ![fnin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fnin/32/23300_2.png) [@fnin](https://discourse.julialang.org/u/fnin)\
**Post date:** [July 24, 2023, 3:06pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017/6 "2023-07-24T15:06:45Z")

</div>

Have you looked at [GitHub - qojulia/QuantumOptics.jl: Library for the numerical simulation of closed as well as open quantum systems.](https://github.com/qojulia/QuantumOptics.jl)?  
It might be able to do that. I think I used it for something similar some time ago.

---

<div class="post-metadata">

**Author:** ![jlbosse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlbosse/32/11274_2.png) [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Post date:** [July 24, 2023, 3:17pm UTC](https://discourse.julialang.org/t/quantum-operator-algebra-of-creation-and-annhilation-operators-of-fermions/102017/7 "2023-07-24T15:17:04Z")

</div>

I haven’t used this before, but by name this seems to be what you are looking for?

[https://jfeist.github.io/QuantumAlgebra.jl/stable/](https://jfeist.github.io/QuantumAlgebra.jl/stable/)
