mergebasis

◼ mergebasis[basis] merges several sets of basis states.

◼ mergebasis collects the states with the same quantum numbers in the same invariant subspace. This is useful in the construction of basis sets.

◼ See also: qszbasisvc, transformQStoPH.

Further examples

Load sneg and declare c to be a Fermionic operator.

<< sneg`sneg`;
snegfermionoperators[c]

Test basic functionality

bz1 = {{{a}, {a1, a2, a3}}, {{b}, {b1, b2, 
              b3}}};
bz2 = {{{a}, {a4, a5}}, {{b}, {b4}}, {{c}, {c1, 
              c2}}};
mergebasis[Join[bz1, bz2]] // MatrixForm

Form a basis for 4-site system given the basis for two 2-site systems. Note that Q and (Subscript[S, z])quantum numbers are both simply additive.

Off[General::spell, General::spell1];
bz2a = qszbasis[{c[1], c[2]}];
bz2b = qszbasis[{c[3], c[4]}];
f[{{q1_, sz1_}, states1_List}, 
{{q2_, sz2_}, 
            states2_List}] := {{q1 + q2, sz1 + sz2}, 
Outer[
            nc, states1, states2]};
bz4 = 
        Flatten[Outer[f, bz2a, bz2b, 1], 1];
bz4 = mergebasis[bz4];

    
MatrixForm[bz2a]
MatrixForm[bz2b]

  
Map[{First[#], Sort @ Last[#]} &, 
        qszbasis[{c[1], c[2], c[3], 
            c[4]}]] == 
Map[{First[#], 
            Sort @ Last[#]} &, bz4]