In Crystal-field theory the interactions of a local atom with its environment (covalent bonding) is approximated by an effective potential. These potentials do not really exist in a solid, but should be seen as effective fields describing the (anti-) bonding states of an atom. We assume that the local spin-orbitals are given by a radial equation times a spherical harmonic describing the angular part. \begin{equation} \varphi_{n,l,m}(\vec{r}) = R_{n,l}(r) Y_{l,m}(\theta,\phi), \end{equation} with $r=|\vec{r}|$ and the spherical harmonics having the same phase as used in Mathematica. The Hamiltonian is given by a potential $V(\vec{r})$. In second quantization this yields the operator: \begin{equation} H_{CF} = \sum_{\tau_1,\tau_2} \big\langle \varphi_{\tau_1}(\vec{r}) \big| V(\vec{r}) \big| \varphi_{\tau_2}(\vec{r}) \big\rangle a^{\dagger}_{\tau_1} a^{\phantom{\dagger}}_{\tau_2}, \end{equation} whereby the quantum number $\tau$ stands for the combination of $n$ (principle quantum number) $l$ (angular momentum) $m$ (projection of angular momentum on $z$ axis) $\sigma$ (projection of the spin on the $z$ axis).

In order to evaluate $\big\langle \varphi_{\tau_1}(\vec{r}) \big| V(\vec{r}) \big| \varphi_{\tau_2}(\vec{r}) \big\rangle$ we expand $V(\vec{r})$ on renormalized spherical Harmonics: \begin{equation} C_{k,m}(\theta,\phi) = \sqrt{\frac{4 \pi}{2l+1}} Y_{k,m}(\theta,\phi). \end{equation} Using a tailor series in $r^k$ we find: \begin{align} V(r,\theta,\phi) &= \sum_{k=0}^{\infty}\sum_{m=-k}^{k} \frac{1}{\sqrt{(k-m)!}}\frac{1}{\sqrt{(k+m)!}} \\ \nonumber \times& \partial_z^{k-|m|}(-\rm{Sign}[m]\partial_x+\imath\partial_y)^{|m|}V(r,\theta,\phi)\big|_{r=0}\, \\ \nonumber \times& r^k C_{k,m}(\theta,\phi). \end{align} The integral $\big\langle \varphi_{\tau_1}(\vec{r}) \big| V(\vec{r}) \big| \varphi_{\tau_2}(\vec{r}) \big\rangle$ can now be rewritten into a $r$ dependent part and a $\theta$ and $\phi$ dependent part: \begin{align} \big\langle \varphi_{\tau_1}(\vec{r}) \big| V(\vec{r}) \big| \varphi_{\tau_2}(\vec{r}) \big\rangle =& \\ \nonumber \sum_{k=0}^{\infty}\sum_{m=-k}^{k} & A_{k,m} \big\langle Y_{l_1,m_1} \big| C_{k,m} \big| Y_{l_2,m_2} \big\rangle, \end{align} with: \begin{align} A_{k,m} &= \frac{1}{\sqrt{(l-m)!}}\frac{1}{\sqrt{(l+m)!}} \\ \nonumber &\times \big\langle R_{n_1,l_1}(r) \big| \\ \nonumber &\quad \partial_z^{l-|m|}(-\rm{Sign}[m]\partial_x+\imath\partial_y)^{|m|}V(r,\theta,\phi)\big|_{r=0} \\ \nonumber & \quad\quad\quad \big| R_{n_2,l_2}(r) \big\rangle. \end{align} In crystal-field theory $V(\vec{r})$ is an effective potential which is taken to fit the experiment, in practice one takes the values $A_{k,m}$ as the fitting parameters. The crystal-field Hamiltonian thus becomes: \begin{equation} H_{CF} = \sum_{\tau_1,\tau_2} \sum_{k,m} A_{k,m} \big\langle Y_{l_1,m_1} \big| C_{k,m} \big| Y_{l_2,m_2} \big\rangle a^{\dagger}_{\tau_1} a^{\phantom{\dagger}}_{\tau_2}. \end{equation}

In Quanty one can create crystal-field operators with the function “NewOperator()” and as a first input the string “CF”. The function furthermore needs to know the effective potential expanded on renormalized spherical harmonics. This is given as a list of the form “$\{\{k_1,m_1,A_{k_1,m_1}\},\{k_2,m_2,A_{k_2,m_2}\},\ldots\}$”.

- Example.Quanty
-- crystal field operator in Oh -- symmetry acting on a d shell NF = 10 NB = 0 IndexDn_3d = {0,2,4,6,8} IndexUp_3d = {1,3,5,7,9} tenDq = 1.1 Akm = {{4, 0,(21/10)*tenDq}, {4,-4,(3/2)*math.sqrt(7/10)*tenDq}, {4, 4,(3/2)*math.sqrt(7/10)*tenDq}} OppCF = NewOperator("CF", NF, IndexUp_3d, IndexDn_3d, Akm)

The crystal-field operator is also used to create transition operators in spectroscopy. Also here one needs to create an operator that represents an electrical field (of the photon). In this case however the field has a physical representation and one can calculate the true expansion of the field on renormalized spherical harmonics. The term $r^k$ for large $k$ can lead to divergent or badly converging series and therefor it is often desirable to expand on spherical Bessel functions $j_k(r)$ as will be discussed in more detail below.