Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
documentation:standard_operators:magnetic_dipole:tz [2016/10/06 08:13] – created Maurits W. Haverkortdocumentation:standard_operators:magnetic_dipole:tz [2016/10/10 09:41] – external edit 127.0.0.1
Line 1: Line 1:
 +====== Tz ======
  
 +###
 +\subsection{$T_z$}
 +The z component of $\vec{T}$ is defined as:
 +\begin{equation}
 +T_z = S_z - 3 z\left(x S_x + y S_y + z S_z\right)/r^2.
 +\end{equation}
 +The equivalent operator in Quanty is created by:
 +<code Quanty Example.Quanty>
 +OppTz = NewOperator("Tz", NF, IndexUp, IndexDn)
 +</code>
 +###
 +
 +###
 +The operator can alternatively be created with the following function:
 +<code Quanty Example.Quanty>
 +function Tz(indexup, indexdn, NF)
 +  if #indexup ~= #indexdn then
 +    error("Length of index up must be equal to length of index dn and equal to 2l+1 in Tz")
 +  end
 +  local l=(#indexup-1)/2
 +  if not IntegerQ(l) then
 +    error("Length of index must be equal to 2l+1 in Tz")
 +  end
 +  local function Sx(m1,m2) 
 +    return NewOperator("Number",NF,{indexup[m1+l+1],indexdn[m1+l+1]},
 +                       {indexdn[m2+l+1],indexup[m2+l+1]},{1/2,1/2})
 +  end
 +  local function Sy(m1,m2) 
 +    return NewOperator("Number",NF,{indexup[m1+l+1],indexdn[m1+l+1]},
 +                       {indexdn[m2+l+1],indexup[m2+l+1]},{-I/2,I/2})
 +  end
 +  local function Sz(m1,m2) 
 +    return NewOperator("Number",NF,{indexup[m1+l+1],indexdn[m1+l+1]},
 +                       {indexup[m2+l+1],indexdn[m2+l+1]},{1/2,-1/2})
 +  end
 +  local opp = 0 * NewOperator("Number",NF,0,0)
 +  for m1 = -l,l do
 +    for m2 = -l,l do
 +      opp = opp -2 * (           SlaterCoefficientC({l,m1},{2, 0},{l,m2})
 +                     )*Sz(m1,m2)
 +                -    ( sqrt(3/2)*SlaterCoefficientC({l,m1},{2,-1},{l,m2})
 +                      -sqrt(3/2)*SlaterCoefficientC({l,m1},{2, 1},{l,m2})
 +                     )*Sx(m1,m2)
 +                -I * ( sqrt(3/2)*SlaterCoefficientC({l,m1},{2,-1},{l,m2})
 +                      +sqrt(3/2)*SlaterCoefficientC({l,m1},{2, 1},{l,m2})
 +                     )*Sy(m1,m2)
 +    end
 +  end
 +  opp.Chop()
 +  opp.Name="Tz"
 +  return opp
 +end
 +</code>
 +###
 +
 +
 +===== Table of contents =====
 +{{indexmenu>.#1}}
Print/export