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