In order to do calculations Quanty needs to know the basis set used. Although Quanty is a many body code, the basis set is defined by one particle modes. These are the boxes (basis states) one can place a particle in. The minimal information Quanty needs to define a basis is the number of Ferminonic modes and Bosonic modes. Fermionic modes can be different orbitals with different spins (spin-orbitals) or different lattice sites. We will refer to these as spin- orbitals and when possible index these by $\tau$. For the Hydrogen atom $\tau$ labels the quantum numbers $n$, $l$, $m$ and $\sigma$. For calculations in solid state physics or chemistry these could refer to the Wannier orbitals in a solid or the molecular orbitals for a molecule. We generally would obtain those with the use of either DFT or Hartree Fock calculations. The spin-orbitals are labeled from 0 to NF. NF not included. The Bosonic-modes can be phonon modes for example and are labeled from NF to NF + NB. NF + NB not included.

-- Number of spin-orbitals
NF = 6
-- Number of phonon-modes
NB = 0

In order to simplify the creation of operators and in order to give these one particle states a meaning one can group several spin-oribtals into shells. This is done by creating lists. For a p-shell we could for example define:

-- a p-shell can be defined by grouping
-- 3 spin-orbitals into a list for spin up
-- and 3 spin-oribtals into a list for spin down
IndexDn = {0,2,4}
IndexUp = {1,3,5}

The spin-orbitals with spin-up should related to the one-particle wave-functions with $m_l=-1$, $m_l=0$ or $m_l=1$. The code has several pre-defined operators that can use atomic shells. These operators are defined such that they know the degeneracy of the $s$ (1), $p$ (3), $d$ (5), etc. atomic shells and they will assign the quantum numbers $m_l$ from $-l$ to $l$ automatically to the different basis spin-orbitals in the list.

This is all that can be defined for the basis sets. We do not define the number of electrons at this point, nor create explicit Hilbert spaces. The code is written to deal with systems where one has of the order of $10^{100}$ possible many particle states (determinants). The only reason one can do this is by never writing down those determinants.

It is useful to define some language here that we will stick to within this documentation when possible. The one particle Fermionic (spin, orbital, site) and Bosonic (phonon-mode) states will be indexed by $\tau$. For Fermions the corresponding one-particle wave-function will be written as: $$ \begin{equation} \varphi_{\tau}(\vec{r}). \end{equation} $$ Single Slater determinant basis states with more than one electron will be given by the antisymmetric product of the one particle spin-oribtals: $$ \begin{eqnarray} \nonumber \phi(\vec{r}_1,\vec{r}_2,\ldots,\vec{r}_n) = \sqrt{\frac{1}{n!}}&\bigg(&\varphi_{\tau_1}(\vec{r}_1)\varphi_{\tau_2}(\vec{r}_2)\ldots\varphi_{\tau_n}(\vec{r}_n) \\ \nonumber &-&\varphi_{\tau_2}(\vec{r}_1)\varphi_{\tau_1}(\vec{r}_2)\ldots\varphi_{\tau_n}(\vec{r}_n) \\ &+& \ldots \bigg). \end{eqnarray} $$ For a basis of $N$ spin-orbitals and $n$ electrons there are $\binom{N}{n}$ different Slater determinants possible. Many particle states are generally given as a linear combination of Slater determinants: $$ \begin{equation} \psi(\vec{r}_1,\vec{r}_2,\ldots,\vec{r}_n)=\sum_i \alpha_i \phi_i(\vec{r}_1,\vec{r}_2,\ldots,\vec{r}_n). \end{equation} $$ Quanty uses second quantization whereby: $$ \begin{equation} a^{\dagger}_{\tau}, \end{equation} $$ creates an electron in spin-orbital $\varphi_{\tau}(\vec{r})$ and: $$ \begin{equation} a_{\tau}, \end{equation} $$ annihilates an electron in spin-orbital $\varphi_{\tau}(\vec{r})$. For two electrons we have: $$ \begin{equation} a^{\dagger}_1a^{\dagger}_2 |0\rangle = \sqrt{\frac{1}{2}}\bigg|\varphi_{1}(\vec{r}_1)\varphi_{2}(\vec{r}_2)-\varphi_{2}(\vec{r}_1)\varphi_{1}(\vec{r}_2)\bigg\rangle. \end{equation} $$ From which the commutation relations between Fermions follow as: $$ \begin{eqnarray} [a^{\dagger}_i,a_j]_+=&a^{\dagger}_ia_j+a_ja^{\dagger}_i &= \delta_{i,j},\\ \nonumber [a^{\dagger}_i,a^{\dagger}_j]_+=&a^{\dagger}_ia^{\dagger}_j+a^{\dagger}_ja^{\dagger}_i &= 0,\\ \nonumber [a_i,a_j]_+=&a_ia_j+a_ja_i &= 0. \end{eqnarray} $$ The commutation relations for Bosons are: $$ \begin{eqnarray} [a^{\dagger}_i,a_j]_-=&a^{\dagger}_ia_j-a_ja^{\dagger}_i &= \delta_{i,j},\\ \nonumber [a^{\dagger}_i,a^{\dagger}_j]_-=&a^{\dagger}_ia^{\dagger}_j-a^{\dagger}_ja^{\dagger}_i &= 0,\\ \nonumber [a_i,a_j]_-=&a_ia_j-a_ja_i &= 0. \end{eqnarray} $$

Note that internally inside the code many optimizations are made on the basis states, as well as on the many particle wavefunction level. This can lead to a situation where printing a wavefunction is the most computationally involved step of a calculation. In general one does not look at wavefunctions, but focusses on expectation values.