decomposevc

◼ decomposevc[v, basis] decomposes vector v into its components with respect to the basis basis  in the occupation number representation.
◼ decomposeop[v, basis] decomposes vector v into its components with respect to the basis basis  in the creation operator representation.

◼ See also: scalarproductop, scalarproductvc, orthogvc, orthogop.

Further examples

Load sneg and declare c to be a fermionic operator

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

Test creation operator representation

bzop = makebasis[{c[1], c[2]}]
v = Total @ Map[Random[] # &, bzop]
decomposeop[v, bzop]

Test occupation number representation

bvc = ap[bzop, VACUUM]
v = Total @ Map[Random[] # &, bvc]
decomposevc[v, bvc]