dropemptysubspaces

◼ dropemptysubspaces[bz] removes subspaces that contain no states from the basis bz.

◼ See also: transformbasis, transformtoLR, transformbasis, applybasis, mergebasis, projector.

Further examples

Load sneg and declare c to be a fermionic operator

<< sneg`sneg`;
snegfermionoperators[c];

Application of projectors on basis states

bz = qszbasis[{c[]}];
MatrixForm[bz]
dropzerostates[bz_List] := 
        Map[{#[[1]], Select[#[[2]], Function[x, x =!= 0]]} &, 
          bz];
projectbasis[p_] := 
        dropemptysubspaces @ dropzerostates @ 
            applybasis[bz, 
              zeroonvac @ 
                  nc[projector[c[], p], #] &];
MatrixForm[projectbasis[PROJ0]]
MatrixForm[projectbasis[PROJ1]]
MatrixForm[projectbasis[PROJ2]]
MatrixForm[projectbasis[PROJUP]]
MatrixForm[projectbasis[PROJDO]]
MatrixForm[projectbasis[PROJ02]]