# Spherical Harmonics

Questaal objects with basis sets defined by spherical harmonics, such as LMTOs or smooth Hankel functions, order the harmonics as m=−l, −l+1, … 0, … l.

The Questaal codes use real harmonics $\Upsilon_{lm}(\hat{\mathbf{r}})$, real versions of the usual (complex) spherical harmonics $Y_{lm}(\hat\mathbf{r})$. The $\Upsilon_{lm}$ are functions of solid angle on a unit sphere, while the “solid real harmonics” $\Upsilon_{lm}r^l$ are polynomials in x, y, and z. (1)  There is a corresponding set of “solid spherical harmonics” or spherical harmonic polynomials $\mathcal{Y}_{lm} = r^l Y_{lm}$.

Caution: Questaal source codes typically use the symbol Ylm to refer to either $\Upsilon_{lm}$ or to the $r^l \Upsilon_{lm}$, depending on the context. In places they can be rotated to the true spherical harmonics $Y_{lm}$.

The $\Upsilon_{lm}$, $Y_{lm}$ and $\mathcal{Y}_{lm}$ are shown for l=0…3 in the order used by the Questaal code:

indexlmpolynomial $r^l \Upsilon_{l\,m}$spherical harmonics $Y_{l\,m}(\theta,\phi)$spherical harmonic polynomials $\mathcal{Y}_{l\,m}(\mathbf{r})$
100$\sqrt\frac{1}{4\pi}$$\sqrt\frac{1}{4\pi}$$\sqrt\frac{1}{4\pi}$
21-1$\sqrt\frac{3}{4\pi}\,y = \left[+Y_{1,-1}+Y_{1\,1}\right]\frac{i}{\sqrt{2}}$$+\sqrt\frac{3}{8\pi} \sin\theta e^{-i\phi} = \left[-i \Upsilon_{1,-1}+\Upsilon_{1\,1}\right]/\sqrt{2}$$\sqrt\frac{3}{8\pi}(x-iy)$
310$\sqrt\frac{3}{4\pi}\,z = Y_{1\,0}$$+\sqrt\frac{3}{4\pi} \cos\theta = \Upsilon_{1\,0}$$\sqrt\frac{3}{4\pi}\,z$
411$\sqrt\frac{3}{4\pi}\,x = \left[+Y_{1,-1}-Y_{1\,1}\right]\frac{1}{\sqrt{2}}$$-\sqrt\frac{3}{8\pi} \sin\theta e^{i\phi} = \left[-i \Upsilon_{1,-1}-\Upsilon_{1\,1}\right]/\sqrt{2}$$-\sqrt\frac{3}{8\pi}(x+iy)$
52-2$\frac{1}{2}\sqrt\frac{15}{4\pi}(2xy) = \left[+Y_{2\,-2}-Y_{2\,2}\right]\frac{i}{\sqrt{2}}$$\frac{1}{4}\sqrt\frac{15}{2\pi} \sin^2\theta e^{-2i\phi} = \left[-i \Upsilon_{2,-2}+\Upsilon_{2\,2}\right]/\sqrt{2}$$\frac{1}{4}\sqrt\frac{15}{2\pi} (x-iy)^2$
62-1$\frac{1}{2}\sqrt\frac{15}{4\pi}(2yz)$$\frac{1}{2}\sqrt\frac{15}{2\pi} \cos\theta \sin\theta e^{-i\phi}$$\frac{1}{2}\sqrt\frac{15}{2\pi} z (x - iy)$
720$\frac{1}{2}\sqrt\frac{5}{4\pi}(3z^2-r^2)$ $\frac{1}{2}\sqrt\frac{5}{4\pi}(2z^2-(x+iy)(x-iy))$
821$\frac{1}{2}\sqrt\frac{15}{4\pi}(2xz)$$-\frac{1}{2}\sqrt\frac{15}{2\pi} \cos\theta \sin\theta e^{i\phi}$$-\frac{1}{2}\sqrt\frac{15}{2\pi} z (x + iy)$
922$\frac{1}{2}\sqrt\frac{15}{4\pi}(x^2-y^2) = \left[+Y_{2\,-2}+Y_{2\,2}\right]\frac{1}{\sqrt{2}}$$\frac{1}{4}\sqrt\frac{15}{2\pi} \sin^2\theta e^{2i\phi} = \left[i \Upsilon_{2,-2}+\Upsilon_{2\,2}\right]/\sqrt{2}$$\frac{1}{4}\sqrt\frac{15}{2\pi} (x + iy)^2$
103-3$\sqrt{\frac{1}{4\pi}}\sqrt{35/8}\,y(3x^2-y^2)$$+\frac{1}{4}\sqrt\frac{35}{4\pi} \sin^3\theta e^{-3i\phi} = \left[-i \Upsilon_{3,-3}-\Upsilon_{3\,3}\right]/\sqrt{2}$$+\frac{1}{4}\sqrt\frac{35}{4\pi} (x-iy)^3$
113-2$\sqrt{\frac{1}{4\pi}}\sqrt{105}\,xyz$$\frac{1}{4}\sqrt\frac{105}{2\pi} \cos\theta \sin^2\theta e^{-2i\phi}$$\frac{1}{4}\sqrt\frac{105}{2\pi} z (x - iy)^2$
123-1$\sqrt{\frac{1}{4\pi}}\sqrt{21/8}\,y(5z^2-r^2)$ $\frac{1}{4}\sqrt{\frac{21}{4\pi}}(4z^2-(x+iy)(x-iy))(x-iy)$
1330$\sqrt{\frac{1}{4\pi}}\sqrt{7/4}\,z(5z^2-3r^2)$ $\frac{1}{2}\sqrt{\frac{7}{4\pi}}(2z^2-3x^2-3y^2)z$
1431$\sqrt{\frac{1}{4\pi}}\sqrt{21/8}\,x(5z^2-r^2)$ $-\frac{1}{4}\sqrt{\frac{21}{4\pi}}(4z^2-(x+iy)(x-iy))(x+iy)$
1532$\sqrt{\frac{1}{4\pi}}\sqrt{105/4}\,z(x^2-y^2)$$\frac{1}{4}\sqrt\frac{105}{2\pi} \cos\theta \sin^2\theta e^{2i\phi}$$\frac{1}{4}\sqrt\frac{105}{2\pi} z (x + iy)^2$
1633$\sqrt{\frac{1}{4\pi}}\sqrt{35/8}\,x(x^2-3y^2)$$-\frac{1}{4}\sqrt\frac{35}{4\pi} \sin^3\theta e^{3i\phi} = \left[-i \Upsilon_{3,-3}-\Upsilon_{3\,3}\right]/\sqrt{2}$$-\frac{1}{4}\sqrt\frac{35}{4\pi} (x+iy)^3$

The $\Upsilon_{lm}$ and $Y_{lm}$ are related as follows, using standard conventions(2), as in e.g. Jackson

where $m>0$. The inverse operation is

The mcx calculator can make these rotation matrices for you. For an example, see here.

#### Standard definition of spherical harmonics in terms of Legendre polynomials

The [standard definition](2) of $Y_{l\,m}(\hat\mathbf{r})$ is

The $(-m)$ and $m$ functions are related by [see Jackson (3.51) and (3.53)]

$P_l^{-m}(x) = (-1)^m \frac{(l - m)!}{(l + m)!} P_l^m(x)$   and   $Y_{l,-m}(\hat {\mathbf{r}}) = (-1)^m Y^{*}_{l\,m}(\hat {\mathbf{r}})$

#### Matrix relations between linear combinations of real and spherical harmonics

Real and spherical harmonics combine states of $+m$ and $-m$ differently. For a particular $(+m,-m)$ pair, relations (1-6) for $m>0$ can be expressed as a 2×2 matrix $u$ as

Note that $u$ is unitary.

##### Rotations between linear combinations of spherical harmonics and real harmonics

Rotations mix only $-m$ and $m$, so it is sufficient to consider only a pair of functions at a time, though the rotation $u$ used below does not make use of that fact.

Express a function $f(\mathbf{r})$ in both real spherical harmonics representations and compare:

Then

Eigenfunctions have the form Eq. (10a). Thus Eq. (10) gives the transformation of an eigenvector between real and spherical harmonics.

##### Structure Matrices

For definiteness, consider a matrix $S$ connecting functions at two points, e.g. a structure matrix expanding a function $H$ around another site,

($H$,$J$) are in real harmonics; ($\tilde H$,$\tilde J$) are in spherical harmonics.

Consider the $(-m,+m)$ segment of a vector of coefficients relating linear combinations of $H$ and $J$ in real harmonics:

For any point r, $a$ and $b$ correspond to a particular term in the first expression, Eq. (10a). Each term can be re-expressed in spherical harmonics through the rotation in the first expression, Eq. (10). The same argument applies to $a^\prime$ and $b^\prime$. Thus the preceding relation expressed as coefficients to functions in spherical harmonics is:

This establishes that

This section addresses the evaluation of the gradient operator acting on a function $\nabla [f(r) Y_L]$.

##### Spherical components of a vector

It is convenient to define the “spherical components” of a vector $\mathbf{r}$ as (See Edmonds Sec 5.1)

The two components $r_\pm$ and ($y,x$) are related by $\bar{u}$, i.e. $u$ for odd $m$:

The spherical components are convenient because the “solid spherical harmonics” $\mathcal{Y}_{lm} \equiv r^l Y_{lm}$ are polynomials in the spherical components of $\mathbf{r}$.
This is shown explicitly in the table above. In particular, $\mathcal{Y}_{1m} = \sqrt{\frac{3}{4\pi}}r_m$.

Products of the $\mathcal{Y}_{lm}$ can be expanded in linear combinations of them, using Clebsch Gordan or Gaunt coefficients or Wigner 3-j symbols, e.g.

##### Spherical components of Gradients of Spherical Harmonics

Since $\mathcal{Y}_{1m} = \sqrt{\frac{3}{4\pi}}r_m$, the gradient can be written as $\sqrt{\frac{4\pi}{3}}\mathcal{Y}_{1m}(\nabla)$ and its action on some $\mathcal{Y}$ can be evaluated as an “operator product” in terms of these expansion coefficients.

The gradient operator expressed in spherical harmonic components is then

$\nabla_{0}$ can be written in spherical coordinates as

Expressing $\nabla_{0}$ in spherical coordinates, and making use of properties of the Legendre polynomials, it is straightforward to show that

which establishes that

so that there are two nonzero matrix elements, $(Y_{l{\pm}1\,0} \vert \nabla_0 \vert f(r) Y_{l\,0})$ of $Y_{l\,0}$.

The general matrix elements are (Edmonds, Section 5.7)

Looking up Wigner 3-j symbols, explicit forms of the matrix elements can be obtained:

and

with

##### Gradients in terms of Vector Spherical Harmonics

Gradients are sometimes expressed as in terms of “vector spherical harmonics” $Y^{l{\pm}1}_{lm}$, a special case of “tensorial spherical harmonics” which refer to products of two spherical harmonics.

As two special cases, $f(r)=r^l$ and $f(r)=r^{-l-1}$, note that the first or second term vanishes and the gradient becomes

Note that the gradient $\nabla Y_L$ can be written

##### Rotations of functions of the gradient operator

We consider a pair linear combinations of spherical harmonics $f_\pm = y_{n\,\pm} Y_n$ derived from the $\nabla_\pm$ operator acting on a single function. For clarity we switch to Greek indices when referring to Cartesian coordinates and Roman indices when referring to spherical harmonics. Using Eqs. (13) and (10)

#### References

See
(1) Jackson, Electrodynamics.
(2) A.R.Edmonds, Angular Momentum in quantum Mechanics, Princeton University Press, 1960.
(3) M.E.Rose, Elementary Theory of angular Momentum, John Wiley & Sons, 1957.

#### Footnotes

(1) For example,

(2) Definitions (7) and (8) of spherical harmonics are the same as in Jackson. Jackson’s definition differs from that of Edmonds and Rose, by a phase factor $(-1)^m$. This phase is sometimes referred to as the “Condon–Shortley phase.” Wikipedia follows Jackson’s convention for $P_l^m$. Some authors, e.g. Abramowitz and Stegun omit the Condon–Shortley phase.

Wikipedia also refers to Jackson’s definition as the “standard definition,” and refers to the definition which omits the Condon–Shortley phase in both the $P_l^{m}$ and the $Y_{l\,m}$ as a “quantum mechanics” defnition of spherical harmonics, since some texts in quantum mechanics (e.g. Messiah) use that convention. Since the phase is omitted in both places, “standard” and “quantum mechanics” definitions are identical for the $Y_{l\,m}$ , but differ by the Condon–Shortley phase for the $P_l^{m}$.

This is apparently also the definition K. Haule uses in his CTQMC code. However, his code may scale some $m$ by $i$.