vc2ops

◼ vc2ops[expr] transforms vectors in the occupation-number representation in expr to the corresponding operator strings.

◼ The result of vc2ops applied to the appropriate vacuum vector, gives back expr. Mathematicallys, ap[vc2ops[expr],vacuum[]]=expr.

◼ See also: basis, makebasis, op2ndx, ndx2op, goodopQ, vacuum, ap, vc.

Further examples

Load sneg and declare some quantities

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

Construct a basis for two lattice sites c and d, and obtain the vacuum state

makebasis[{c[], d[]}]
vac = vacuum[]

The vacuum corresponds to the identity operator

vc2ops[vac] == 1

Vaccum state internal representation

FullForm[vac]

Simple applications of vc2ops

ap[c[CR, UP], vac]
vc2ops[%]
ap[nc[c[CR, UP], c[CR, DO]], vac]
vc2ops[%]
ap[nc[c[CR, UP], d[CR, DO]], vac]
vc2ops[%]

vc2ops handles correctly kets in the vc vector

ap[ket[a], 
      ap[nc[c[CR, UP], d[CR, DO]], vac]]
vc2ops[%]

vc2ops is a linear operator

ap[nc[(1/(Sqrt[2])) (c[CR, UP] + d[CR, UP])], 
      vac]
vc2ops[%]

vc2ops is Listable. In this example we transform all possible vc vectors to the corresponding creation operator strings.

l = 
      Table[vc  @@  IntegerDigits[i, 2, 4], {i, 0, 
          4^2 - 1}]
vc2ops[l]
ap[%, vac] == l