+ "<form action=\"javascript:code_toggle()\"><input type=\"submit\" value=\"Click here to toggle on/off the raw code.\"></form>"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "HTML('''<script>\n",
+ "code_show=true; \n",
+ "function code_toggle() {\n",
+ " if (code_show){\n",
+ " $('div.input').hide();\n",
+ " } else {\n",
+ " $('div.input').show();\n",
+ " }\n",
+ " code_show = !code_show\n",
+ "} \n",
+ "$( document ).ready(code_toggle);\n",
+ "</script>\n",
+ "<form action=\"javascript:code_toggle()\"><input type=\"submit\" value=\"Click here to toggle on/off the raw code.\"></form>''')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ed974a8e",
+ "metadata": {},
+ "source": [
+ "## Spherical harmonics and angular part\n",
+ "\n",
+ "### Complex representations\n",
+ "\n",
+ "We start with the simultaneous eigenstates of both $\\hat{L}^2$ and $\\hat{L}_z$, the spherical harmonics $Y_l^m(\\theta,\\phi)$. These are the solution of the angular part of the central-field Schrödinger equation. Note that the central field is rotationally invariant w.r. to rotations about any axis, such that all the $m$ states are degenerate. "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "94151c37",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\tbuehler\\AppData\\Local\\Temp\\ipykernel_39564\\3158692838.py:16: RuntimeWarning: invalid value encountered in divide\n",
+ "Now we look at the 'real' orbitals in which we sacrifce the m quantum number in favor of a purely real representation of the eigenstates. Because all the $m$ are degenerate, this is still a nice complete basis for the degenerate eigenstates of with a given $l$. Those orbitals are no longer eigenstates of $\\hat{L}_z$."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "id": "59d93472",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\tbuehler\\AppData\\Local\\Temp\\ipykernel_39564\\2972091797.py:21: RuntimeWarning: invalid value encountered in divide\n",
+ "<form action=\"javascript:code_toggle()\"><input type=\"submit\" value=\"Click here to toggle on/off the raw code.\"></form>"
+ ],
+ "text/plain": [
+ "<IPython.core.display.HTML object>"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "HTML('''<script>\n",
+ "code_show=true; \n",
+ "function code_toggle() {\n",
+ " if (code_show){\n",
+ " $('div.input').hide();\n",
+ " } else {\n",
+ " $('div.input').show();\n",
+ " }\n",
+ " code_show = !code_show\n",
+ "} \n",
+ "$( document ).ready(code_toggle);\n",
+ "</script>\n",
+ "<form action=\"javascript:code_toggle()\"><input type=\"submit\" value=\"Click here to toggle on/off the raw code.\"></form>''')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ed974a8e",
+ "metadata": {},
+ "source": [
+ "## Spherical harmonics and angular part\n",
+ "\n",
+ "### Complex representations\n",
+ "\n",
+ "We start with the simultaneous eigenstates of both $\\hat{L}^2$ and $\\hat{L}_z$, the spherical harmonics $Y_l^m(\\theta,\\phi)$. These are the solution of the angular part of the central-field Schrödinger equation. Note that the central field is rotationally invariant w.r. to rotations about any axis, such that all the $m$ states are degenerate. "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "94151c37",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\tbuehler\\AppData\\Local\\Temp\\ipykernel_39564\\3158692838.py:16: RuntimeWarning: invalid value encountered in divide\n",
+ "Now we look at the 'real' orbitals in which we sacrifce the m quantum number in favor of a purely real representation of the eigenstates. Because all the $m$ are degenerate, this is still a nice complete basis for the degenerate eigenstates of with a given $l$. Those orbitals are no longer eigenstates of $\\hat{L}_z$."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "id": "59d93472",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\tbuehler\\AppData\\Local\\Temp\\ipykernel_39564\\2972091797.py:21: RuntimeWarning: invalid value encountered in divide\n",