direct

◼ direct[b1, b2] returns the vacuum expectation value (vev) of an operator expression.

◼ direct can be used to construct the basis for the full system from the bases for the subsystems.

◼ See also: basis, makebasis, qszbasis, qsbasis.

Further examples

Load sneg and declare some quantities.

<< sneg`sneg`;
snegfermionoperators[c, d];
snegrealconstants[J, U];

Create the full basis for two lattice sites described by the operators c and d.

b1 = basis[c[]]
b2 = basis[d[]]
b = direct[b1, b2]

High temperature expansion of the partition function of the system of two Anderson impurities coupled by exchange interaction.

H = 
      U/2 pow[number[c[]] - 1, 2] + U/2 pow[number[d[]] - 1, 2] + 
        J spinspin[c[], d[]]


      
br = nc[conj[VACUUM], conj[#]] & /@ b;

      
s1 = nc[#, VACUUM] & /@ 
          b;

  
Z = 0;
For[i = 0, 
        i ≤ 40, i++, 
Zi = 
          inner[br, s1]; 
Print["Z", i, "=", 
          Zi]; 
Z = 
          Z + (-β)^
                i Zi/i!; 
s1 = (nc[H, #] & /@ 
                s1) // 
            Expand;
];

      
Take[Z, 10]
Z = Z/Exp[-β (-3 J/4)];

Exact calculation of the partition function

ham = matrixrepresentationop[H, b];
MatrixForm[ham]
maskOp[Eigenvalues, ham]
Zexact = Plus @@ Exp[-β %]
Zexact = 
      Zexact/Exp[-β (-3 J/4)]
Zexact = FullSimplify[Zexact]

The exact partition function exhibits a plateau at 16 for T>U (all levels equiprobable), a plateau at 4 between U and J(charge modes are frozen out), and reaches 1 for T<J (spin modes are frozen out, the system is locked out in a singlet ground state). The high temperature expansion can reproduce the freezing out of the charge degrees of freedom, but even at order 40 it cannot reproduce the magnetic transition.

Needs["Graphics`Graphics`"];
Plot[
      Evaluate[{Zexact, Z} /. {U -> 1, 
              J -> 0.01} /. β -> 1/10^logT], {logT, -3, 
        2}, PlotRange -> {All, {0, 16}}, PlotPoints -> 200, 
      PlotStyle -> {Black, Red}]