number

◼ number[c[i]] returns the number operator corresponding to the operator c[i].
◼ number[c[i],σ] returns the number  operator for a given spin projection σ only (for example, σ=UP | DO).

◼ Operator c must be expressed in the stripped form, i.e. a form which excludes the first index (creation/annihilation) and the last index (spin).

◼ See also: hubbard.

Further examples

Load sneg and declare c to be a fermionic operator

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

Verify the definition

number[c[]]
number[c[], UP]
number[c[], DO]
number[c[], σ]

The number operator can also be obtained using snegSpinThread.

snegSpinThread[nc[c[CR], c[AN]], {UP, DO}]

Writing the Hubbard interaction term in terms of a square of an operator as required for performing the Hubbard-Stratonovich transformation.

H = hubbard[c[]]

      
-1/2  pow[number[c[], UP] - number[c[], DO], 2] + 
        1/2  number[c[]] // Expand

      
+1/2 pow[number[c[], UP] + number[c[], DO], 2] - 
        1/2 number[c[]] // Expand

      
1/4  pow[number[c[], UP] + number[c[], DO], 2] - 
        1/4 pow[number[c[], UP] - number[c[], DO], 2] // 
      Expand

Proof of an identity used in the discrete Hubbard-Stratonovich transformation. See J. E. Hirsch, Phys. Rev. B, 28, 4059 (1983).

snegrealconstants[a, 
      U, Δ]


      
op1 = 
      Exp[-Δ U hubbard[c[]]]
op2 = 
      1/2 Sum[Exp[
            2 a If[σ == UP, 
                  1, -1] (number[c[], UP] - number[c[], DO]) - 
              1/2 U Δ number[c[]]], {σ, 0, 
            1}]


      
ψ0 = VACUUM
ψUP = nc[c[CR, UP], VACUUM]
ψDO = nc[c[CR, DO], VACUUM]
ψ2 = nc[c[CR, DO], c[CR, UP], VACUUM]

We define a rule for calculating exponential functions with operator arguments applied on states that are eigenvectors of the argument of the exponential function.

rule = 
        nc[Exp[expr_], ops___, VACUUM] :> 
          Module[{state, factor}, 
state = 
              nc[ops, VACUUM]; 
factor = 
              Collect[nc[expr, state], state]/state; 
nc[
                Exp[factor], ops, VACUUM] /; 
              isnumericQ[factor]];

Test the equality of operators. Here we use Tanh[a]^2 == Tanh[Δ U/
                4].

Off[General::spell1];
arule = 
        a -> 
          ArcTanh[Sqrt[Tanh[Δ U/4]]];

    
nc[op1, ψ0] == nc[op2, ψ0] //. 
      rule
FullSimplify[
(nc[op1, ψUP] == 
              nc[op2, ψUP] //. rule) /. 
        arule]
FullSimplify[
(nc[op1, ψDO] == 
              nc[op2, ψDO] //. rule) /. 
        arule]
nc[op1, ψ2] == nc[op2, ψ2] //. rule

Another transformation is more convenient for negative Hubbard U. Note that there is a "-1" term missing in Eq. (10b) of the original paper.

snegrealconstants[b];
op2 = 
      1/2 Sum[Exp[
            2 b If[σ == UP, 
                  1, -1] (number[c[]] - 1) - 
              1/2 U Δ (number[c[]] - 1)], {σ, 0, 
            1}]

Test the equality of operators. Here we use Tanh[b]^2 == -Tanh[Δ U/
                  4].

brule = 
        b -> 
          ArcTanh[Sqrt[-Tanh[Δ U/
                      4]]];

    
FullSimplify[
(nc[op1, ψ0] == 
              nc[op2, ψ0] //. rule) /. 
        brule]
FullSimplify[(nc[op1, ψUP] == nc[op2, ψUP] //. rule) /. 
        brule]
FullSimplify[
(nc[op1, ψDO] == 
              nc[op2, ψDO] //. rule) /. 
        brule]
FullSimplify[
(nc[op1, ψ2] == 
              nc[op2, ψ2] //. rule) /. brule]

On[General::spell1];