scalarproductvc

◼ scalarproductvc[a, b] computes the scalar product between two expressions consisting of vectors in the occupation number representation.

◼ The vc vectors are taken to be orthonormal.

◼ By default, literal comparisons are performed to check for equality between the vc vectors.

◼ scalarproduct is an alias for scalarproductvc.

◼ If conj of a vc vector is followed by a vc vector in an nc expression, scalarproductvc is called to compute the scalar product.

◼ See also: vc, ap, scalarproductop, expvvc, braket, matrixrepresentationvc, normvc, decomposevc, orthogvc.

Further examples

Load sneg and let c be a fermionic operator

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

Check normalisation

scalarproductvc[vc[], vc[]] == 1
scalarproductvc[vc[0], vc[0]] == 1
scalarproductvc[vc[1], vc[1]] == 1
scalarproductvc[vc[0, 0], vc[0, 0]] == 
      1
scalarproductvc[vc[0, 1], vc[0, 1]] == 
      1
scalarproductvc[vc[1, 0], vc[1, 0]] == 
      1
scalarproductvc[vc[1, 1], vc[1, 1]] == 1

Check orthogonality

vecs = 
      Table[vc @@ IntegerDigits[i, 2, 4], {i, 0, 
          4^2 - 1}]
Outer[scalarproductvc, vecs, vecs] // MatrixForm

Vectors within nc expressions.

nc[expr1, conj[vc[0, 1]], vc[0, 1], expr2]
nc[expr1, conj[vc[0, 1]], vc[0, 0], expr2]

Redefinition of scalarproductvc to use KroneckerDelta to test for equality of vc vectors.

scalarproductvc[a_vc, b_vc] := 
        Inner[KroneckerDelta, a, b, Times];
scalarproductvc[vc[x], vc[y]]
scalarproductvc[vc[x1, x2], vc[y1, y2]]
scalarproductvc[vc[x1, 1, x2], vc[y1, 1, y2]]