The J2 operator is defined as: J2=m=l∑m=−l∑σ(34+l(l+1)+2mσ)a†m,σa†m,σ+m=l∑m=−l√l+m+1√l−m×(a†m+1,↓a†m,↑+a†m,↑a†m+1,↓)+m1,m2=l∑m1,m2=−l∑σ1,σ2(−(m1m2+σ1σ2+m1σ2)a†m1,σ1a†m2,σ2a†m1,σ1a†m2,σ2−√l+m1+1√l−m1√l+m2+1√l−m2×a†m1+1,σ1a†m2,σ2a†m1,σ1a†m2+1,σ2). The equivalent operator in Quanty is created by:
OppJsqr = NewOperator("Jsqr", NF, IndexUp, IndexDn)