Container

The purpose of the Container class is the enumeration of an individual subsystems of length \(L_P\). It uniquely maps a truncated states, \(\vert\Psi_P\rangle\), with a fixed particle number \(n_P\) between start and end to an index within \(0\) and \(D_Q(L_P,n_p)\). Here, \(D_Q(...)\) refers to the dimensional formula and determines the number of possible states with a local Hilbert space dimension \(Q\), length \(L_P\), and particle number \(n_P\). The particle number \(n_P\) ranges from \(0\) to \(\max \left(L_P\cdot(Q-1),n\right)\) where \(n\) is the total particle number of the entire system.

Let’s illustrate that on an example for \(L_P=3\), \(Q=3\), and \(n_P\in[0,6]\):

  • Mapping for \(n_P=0\) - \(D_3(3,0)=1\):

    \(\vert 0;0;0\rangle \mapsto 0\)

  • Mapping for \(n_P=1\) - \(D_3(3,1)=3\):

    \(\vert 0;0;1\rangle \mapsto 0\)

    \(\vert 0;1;0\rangle \mapsto 1\)

    \(\vert 1;0;0\rangle \mapsto 2\)

  • Mapping for \(n_P=2\) - \(D_3(3,2)=6\):

    \(\vert 0;0;2\rangle \mapsto 0\)

    \(\vert 0;1;1\rangle \mapsto 1\)

    \(\vert 0;2;0\rangle \mapsto 2\)

    \(\vert 1;0;1\rangle \mapsto 3\)

    \(\vert 1;1;0\rangle \mapsto 4\)

    \(\vert 2;0;0\rangle \mapsto 5\)

  • Mapping for \(n_P=3\) - \(D_3(3,4)=7\):

    \(\vert 0;1;2\rangle \mapsto 0\)

    \(\vert 0;2;1\rangle \mapsto 1\)

    \(\vert 1;0;2\rangle \mapsto 2\)

    \(\vert 1;1;1\rangle \mapsto 3\)

    \(\vert 1;2;0\rangle \mapsto 4\)

    \(\vert 2;0;1\rangle \mapsto 5\)

    \(\vert 2;1;1\rangle \mapsto 6\)

  • Mapping for \(n_P=4\) - \(D_3(3,4)=6\):

    \(\vert 0;2;2\rangle \mapsto 0\)

    \(\vert 1;1;2\rangle \mapsto 1\)

    \(\vert 1;2;1\rangle \mapsto 2\)

    \(\vert 2;0;2\rangle \mapsto 3\)

    \(\vert 2;1;1\rangle \mapsto 4\)

    \(\vert 2;2;0\rangle \mapsto 5\)

  • Mapping for \(n_P=5\) - \(D_3(3,5)=3\):

    \(\vert 1;2;2\rangle \mapsto 0\)

    \(\vert 2;1;2\rangle \mapsto 1\)

    \(\vert 2;2;1\rangle \mapsto 2\)

  • Mapping for \(n_P=6\) - \(D_3(3,5)=1\):

    \(\vert 2;2;2\rangle \mapsto 0\)

Note

  • The precise order of states does not matter as long as it is unique within \(0\) and \(D_Q(L_P,n_P)\).

  • Subsystems of the same length use the same Container instance to reduce the memory usage.

There are three different implementations of the Container class that use different approaches to organize the subsystem but provide the same functionality:

Advantages and disadvantages are discussed in detail in the paper. The use of lookup-tables is the original proposal of Lin[1] generalized to arbitrary \(Q\) and an arbitrary number of subsystems. In addition, we provide a dictionary for the lookup which is less memory consuming for a small number of particles. On top of that, we provide an on-the-fly implementation without any notable memory overhead.

All implementations have the same functionality and are exchangeable. The basic ideas and data members are introduced in Container Table, Container Dictionary, and Container on-the-fly. We list more detailed documentation for the Constructors and Functions for the Container Table instance. Other implementations are equivalent.

The full documentations for all options are listed here: Autodocs - Container Table, Autodocs - Container Dictionary, and Autodocs - Container on-the-fly.