normvc

◼ normvc[v] returns the norm of the state v in the occupation number representation.
◼ normop[v] returns the norm of the state v in the creation operator representation.

◼ See also: vev, scalarproductop, scalarproductvc.

Further examples

Load sneg and declare c to be a fermionic operator

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

v = c[CR, 1, UP] + c[CR, 2, UP]
normop[v]

makebasis[{c[1], c[2]}]
ap[v, VACUUM]
normvc[%]