# Jsqr

The $J^2$ operator is defined as: \begin{eqnarray} J^2 = \sum_{m=-l}^{m=l}\sum_{\sigma} && \left(\frac{3}{4}+l(l+1)+2m\sigma\right) a^{\dagger}_{m,\sigma}a^{\phantom{\dagger}}_{m,\sigma}\\ \nonumber +\sum_{m=-l}^{m=l}&& \sqrt{l+m+1}\sqrt{l-m} \times \, (a^{\dagger}_{m+1,\downarrow}a^{\phantom{\dagger}}_{m,\uparrow}+a^{\dagger}_{m,\uparrow}a^{\phantom{\dagger}}_{m+1,\downarrow})\\ \nonumber +\sum_{m_1,m_2=-l}^{m_1,m_2=l}\sum_{\sigma_1,\sigma_2} && \bigg( -(m_1m_2+\sigma_1\sigma_2+m_1\sigma_2) \, a^{\dagger}_{m_1,\sigma_1}a^{\dagger}_{m_2,\sigma_2}a^{\phantom{\dagger}}_{m_1,\sigma_1}a^{\phantom{\dagger}}_{m_2,\sigma_2}\\ \nonumber &&\quad -\sqrt{l+m_1+1}\sqrt{l-m_1}\sqrt{l+m_2+1}\sqrt{l-m_2}\\ \nonumber &&\quad \times \, a^{\dagger}_{m_1+1,\sigma_1}a^{\dagger}_{m_2,\sigma_2}a^{\phantom{\dagger}}_{m_1,\sigma_1}a^{\phantom{\dagger}}_{m_2+1,\sigma_2} \bigg). \end{eqnarray} The equivalent operator in Quanty is created by:

Example.Quanty
OppJsqr = NewOperator("Jsqr", NF, IndexUp, IndexDn)