The xx component of $Q$ is defined as: \begin{equation} Q_{xx} = 3x^2/r^2 - 1. \end{equation} The equivalent operator in Quanty is created by:
OppQxx = NewOperator("Qxx", NF, IndexUp, IndexDn)
The operator could also be defined by:
Akm={{2,-2,sqrt(1.5)},{2, 2,sqrt(1.5)},{2,0,-1}} OppQxx=NewOperator("CF",NF,indexup,indexdn,Akm)