VMV

◼ VMV[v1, m, v2] computes the vector-matrix-vector product using inner to perform multiplications.

◼ In common applications, v1 and v2 are 1D-arrays and m is a 2D-matrix.

◼ More generally, VMV contracts the last index of v1 with the first index of m, and the last index of m with the first index of v2. See also Inner.

◼ See also: inner, outer

Further examples

Load sneg and declare some quantities.

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

Spin operators

v1 = {c[CR, UP], c[CR, DO]}
v2 = {c[AN, UP], c[AN, DO]}
sx = VMV[v1, 1/2  PauliX, v2]
sy = VMV[v1, 1/2  PauliY, v2]
sz = VMV[v1, 1/2  PauliZ, v2]

Majorana Fermion example: (Subscript[c, ↑]) and (Subscript[c, ↓]) expressed with four real (Majorana) fermions (Subscript[ψ, i]).

{cU, 
          cD} = (1/(Sqrt[2])) ψ[0] {0, -I} + (I/(Sqrt[2])) 
            VMV[{ψ[1], ψ[2], ψ[3]}, {PauliX, PauliY, 
                PauliZ}, {0, -I}];
cU
conj[cU]
cD
conj[cD]

Check canonical anti-commutation relations

antikomutator[cU, cU] // Expand
antikomutator[cD, cD] // Expand
antikomutator[conj[cU], cU] // Expand
antikomutator[conj[cD], cD] // Expand
antikomutator[cU, cD] // Expand
antikomutator[conj[cU], conj[cD]] // Expand

Some matrix definitions used in later examples

<< LinearAlgebra`MatrixManipulation`
nul = ZeroMatrix[2];
one = IdentityMatrix[2];
Z = {0, -I, I, 0};

    
Off[General::spell];
sigmaX = 
        BlockMatrix[{{PauliX, nul}, {nul, 
              PauliX}}];
sigmaY = 
        BlockMatrix[{{PauliY, nul}, {nul, 
              PauliY}}];
sigmaZ = 
        BlockMatrix[{{PauliZ, nul}, {nul, 
              PauliZ}}];
MatrixForm /@ {sigmaX, sigmaY, sigmaZ}

    
tauX = 
        BlockMatrix[{{nul, one}, {one, nul}}];
tauY = 
        BlockMatrix[{{nul, -I one}, {I one,  
              nul}}];
tauZ = 
        BlockMatrix[{{one, 
              nul}, {nul, -one}}];
MatrixForm /@ {tauX, tauY, tauZ}

Balian-Werthamer four spinor

bw = (1/(Sqrt[2])) ψ[0] Z + (I/(Sqrt[2])) 
            VMV[{ψ[1], ψ[2], ψ[3]}, {sigmaX, sigmaY, sigmaZ}, 
              Z];
MatrixForm[bw]
bw[[1]] == cU
bw[[2]] == cD
bw[[3]] == conj[cD]
bw[[4]] == -conj[cU]

Spin  operators in terms of the Balian-Werthamer spinor

{sx, sy, 
          sz} = 1/2 VMV[conj[bw], #, bw] &  /@ {sigmaX, sigmaY, 
              sigmaZ} // Simplify;
MatrixForm[{sx, sy, sz}]
sz2 = 
        nc[conj[cU], cU] - nc[conj[cD], cD] // 
          Simplify;
sz == sz2

Isospin operators in terms of the Balian-Werthamer spinor

{ix, iy, 
          iz} = 1/2 VMV[conj[bw], #, bw] &  /@ {tauX, tauY, tauZ} // 
          Simplify;
MatrixForm[{ix, iy, iz}]
iz2 = 
        nc[conj[cU], cU] + nc[conj[cD], cD] - 1 // Simplify;
iz == iz2

Proof of an identity. See P. Coleman, L. B. Ioffe, A. M. Tsvelik, Phys. Rev. B, 52, 6611 (1995).

Simplify[{sx, sy, sz} + {ix, iy, 
            iz} == -I mcross[{ψ[1], ψ[2], ψ[3]}, {ψ[
                1], ψ[2], ψ[3]}]]