Basis
Given a total particle number, say \(n\), all states with this particle number or magnetization are enumerated with the Basis:
Let’s have a look at a small example for \(N=4\) local sites with \(Q=3\) and \(n=3\):
\(\vert\Psi_0 \rangle = \vert 0;0;1;2\rangle\) |
\(\vert\Psi_1 \rangle = \vert 0;0;2;1\rangle\) |
\(\vert\Psi_2 \rangle = \vert 0;1;0;2\rangle\) |
\(\vert\Psi_3 \rangle = \vert 0;1;1;1\rangle\) |
\(\vert\Psi_4 \rangle = \vert 0;1;2;0\rangle\) |
\(\vert\Psi_5 \rangle = \vert 0;2;0;1\rangle\) |
\(\vert\Psi_6 \rangle = \vert 0;2;1;0\rangle\) |
\(\vert\Psi_7 \rangle = \vert 1;0;0;2\rangle\) |
\(\vert\Psi_8 \rangle = \vert 1;0;1;1\rangle\) |
\(\vert\Psi_9 \rangle = \vert 1;0;2;0\rangle\) |
\(\vert\Psi_{10}\rangle = \vert 1;1;0;1\rangle\) |
\(\vert\Psi_{11}\rangle = \vert 1;1;1;0\rangle\) |
\(\vert\Psi_{12}\rangle = \vert 1;2;0;0\rangle\) |
\(\vert\Psi_{13}\rangle = \vert 2;0;0;1\rangle\) |
\(\vert\Psi_{14}\rangle = \vert 2;0;1;0\rangle\) |
\(\vert\Psi_{15}\rangle = \vert 2;1;0;0\rangle\) |
Enumerating all basis states quickly becomes tricky for larger systems as the complexity scales exponentially. This is efficiently solved by splitting the large system of size L in Npart subsystems. A detailed explanations and analysis can be found in the paper.
Basic setup
There are multiple classes that are built on top of the State class:
Hierarchy of classes
\(\qquad\) State \(\quad\stackrel{\mathrm{defines}}{\Longrightarrow}\quad\) Container \(\quad\stackrel{\mathrm{defines}}{\Longrightarrow}\quad\) BasisU1 class \(\quad\stackrel{\mathrm{defines}}{\Longrightarrow}\quad\) Basis Iterator
The main functionality to merge the individual systems is contained in the BasisU1 class that includes all tools to enumerate and generate the basis states. The individual subsystems are organized in a Container class. Note that we provide three different implementations of the Container, which are discussed in detail in the paper and here. The BasisU1 class is generated from the State class and the Container class. On top of BasisU1 class, an iterator class – built from the BasisU1 class – allows an easy handling in C++ style.
All classes are built on top of each other with the underlying the State class. They can be defined in the following way:
#include "Basis.h"
/* Defining the state class with a maximal length of 256 sites and a local dimension of 4 */
using State = danceq::internal::State<256,4>;
/* Defining a Container class from the State class */
using Container = danceq::internal::ContainerTable<State>;
/* Instead of the ContainerTable<State> you can call:
* using Container = danceq::internal::ContainerDict<State>;
* using Container = danceq::internal::ContainerFly<State>;
*/
/* Defining the Basis class from the Container class */
using Basis = danceq::internal::BasisU1<Container>;
/* Defining the Basis class from the State Class with ContainerTable<State> */
using Basis_from_State = danceq::internal::BasisU1<State>;
/* Defining the Iterator from the Basis class */
using BasisIterator = danceq::internal::BasisIterator<Basis>;
/* It is possible to retrieve the underlying State class */
Basis::state_class state;
Additionally, we have you defined the type danceq::internal::Basis<T>
that can be built from a Container class and the State class.
In the case of the State class, ContainerTable<State> is used.
Code examples are given here.