https://github.com/qojulia/secondquantizedalgebra.jl
Symbolic computations with second quantized operators
https://github.com/qojulia/secondquantizedalgebra.jl
computer-algebra-system hamiltonian quantum quantum-mechanics symbolics
Last synced: 3 months ago
JSON representation
Symbolic computations with second quantized operators
- Host: GitHub
- URL: https://github.com/qojulia/secondquantizedalgebra.jl
- Owner: qojulia
- License: mit
- Created: 2025-06-03T08:40:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-07-19T20:24:53.000Z (3 months ago)
- Last Synced: 2025-07-19T22:59:11.226Z (3 months ago)
- Topics: computer-algebra-system, hamiltonian, quantum, quantum-mechanics, symbolics
- Language: Julia
- Homepage: https://qojulia.github.io/SecondQuantizedAlgebra.jl/
- Size: 419 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SecondQuantizedAlgebra
[](https://qojulia.github.io/SecondQuantizedAlgebra.jl/)
[](https://app.codecov.io/gh/qojulia/SecondQuantizedAlgebra.jl)
[](https://qojulia.github.io/SecondQuantizedAlgebra.jl/benchmarks/)[](https://github.com/JuliaDiff/BlueStyle)
[](https://github.com/JuliaTesting/Aqua.jl)
[](https://github.com/aviatesk/JET.jl)A Julia package for symbolic manipulation and algebraic computation with second quantized operators. SecondQuantizedAlgebra.jl provides a flexible framework for working with creation and annihilation operators, commutation relations, and algebraic expressions common in quantum many-body theory and quantum optics.
The package provides:
- Symbolic representation of bosonic fock creation and annihilation operators
- Automatic (anti-)commutation relation handling
- Algebraic simplification and normal ordering
- Support for atom and spin operators
- Extensible for custom operator typesThe code was refactored out of [QuantumCumulants.jl](https://github.com/qojulia/QuantumCumulants.jl).
### Installation
Install with Julia's package manager:
```julia
pkg> add SecondQuantizedAlgebra
```### Usage
```julia
using SecondQuantizedAlgebra
using SymbolicUtilsha = NLevelSpace(:atoms,2)
hc = FockSpace(:cavity)
h = hc ⊗ ha@qnumbers b::Destroy(h)
σ(i,j) = Transition(h,:σ,i,j)@cnumbers g Δ
H = Δ*b'*b + g*(b*σ(2,1) + b'*σ(1,2))
@show b*b'
@show σ(2,1)*σ(1,1)simplify(commutator(H, b))
```See the [documentation](https://qojulia.github.io/SecondQuantizedAlgebra.jl/) for more details and advanced usage.
## Contributing
Contributions and suggestions are welcome! Please open issues or pull requests on [GitHub](https://github.com/qojulia/SecondQuantizedAlgebra.jl).
## License
This project is licensed under the MIT License.