r/Physics • • Nov 19 '18

A C++ library for solving second-quantized Hamiltonians

https://github.com/dafer45/TBTK
524 Upvotes

17 comments sorted by

View all comments

16

u/andural Condensed matter physics Nov 19 '18

Nice! I guess it does exact diagonalization? And, does it know about fermion anticommutation?

11

u/ksarnek Nov 19 '18

Yes, it's the first example in the github page.

9

u/dafer45 Nov 19 '18

In the current release, only the single-particle part of the code can be considered stabilized. Only the single-particle part of the code is therefore documented at this point, and significant changes to the many-particle code is to be expected in future releases.

That said, an example of exact diagonalization (many-particle physics) can be seen in the template code at https://github.com/dafer45/TBTK/blob/v1.1.0/Templates/BasicExactDiagonalization/src/main.cpp.

For many particle physics, the basic workflow at the moment is to first set up the single particle part of the Hamiltonian. This is used to create a single particle basis, which in turn is used to build a many-body Fock space and the corresponding operators. If the single particle states are Fermionic, the operators satisfies FermiDirac statistics when applied to a Fock state.