Differences

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

Link to this comparison view

documentation:standard_operators:magnetic_dipole:ty [2016/10/06 08:14] – created Maurits W. Haverkortdocumentation:standard_operators:magnetic_dipole:ty [2016/10/10 09:41] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Ty ======
  
 +###
 +The y component of $\vec{T}$ is defined as:
 +\begin{equation}
 +T_y = S_y - 3 y\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>
 +OppTy = NewOperator("Ty", NF, IndexUp, IndexDn)
 +</code>
 +###
 +
 +###
 +The operator can alternatively be created with the following function:
 +<code Quanty Example.Quanty>
 +function Ty(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 Ty")
 +  end
 +  local l=(#indexup-1)/2
 +  if not IntegerQ(l) then
 +    error("Length of index must be equal to 2l+1 in Ty")
 +  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 * (-sqrt(3/8)*SlaterCoefficientC({l,m1},{2,-2},{l,m2})
 +                      -sqrt(3/8)*SlaterCoefficientC({l,m1},{2, 2},{l,m2})
 +                      -sqrt(2/8)*SlaterCoefficientC({l,m1},{2, 0},{l,m2})
 +                     )*Sy(m1,m2)
 +                -I * ( sqrt(3/2)*SlaterCoefficientC({l,m1},{2,-2},{l,m2})
 +                      -sqrt(3/2)*SlaterCoefficientC({l,m1},{2, 2},{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})
 +                     )*Sz(m1,m2)
 +    end
 +  end
 +  opp.Chop()
 +  opp.Name="Ty"
 +  return opp
 +end
 +</code>
 +###
 +
 +
 +===== Table of contents =====
 +{{indexmenu>.#1}}
Print/export