Created
November 18, 2021 12:23
-
-
Save wipfli/52eda272f613108ec9bd7b6e35c9b7b3 to your computer and use it in GitHub Desktop.
Differential AC-Stark shift calculation on the S to P Transition of Beryllium at 1050 nm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"!pip3 install atomphys\n", | |
"# see https://github.com/mgrau/atomphys" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from atomphys import Atom\n", | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"from math import pi as π\n", | |
"\n", | |
"# This example uses pint, it has to be installed\n", | |
"try:\n", | |
" import pint\n", | |
"except ImportError:\n", | |
" print('This example makes extensive use of the pint module. If it is not installed several code blocks will error')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Magnesium" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# fetch the NIST transition data for Mg+\n", | |
"Mg = Atom('Mg+')\n", | |
"units = Mg.units\n", | |
"c = units.c\n", | |
"ε_0 = units.ε_0" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"State(3S1/2, 2S1/2: 0 Ry)" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Mg('S1/2')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"0.00857300074692271 Hz cm<sup>2</sup> h/V<sup>2</sup>" | |
], | |
"text/latex": [ | |
"$0.00857300074692271\\ \\frac{\\mathrm{Hz} \\cdot \\mathrm{cm}^{2} \\cdot \\mathrm{h}}{\\mathrm{V}^{2}}$" | |
], | |
"text/plain": [ | |
"0.00857300074692271 <Unit('centimeter ** 2 * hertz * planck_constant / volt ** 2')>" | |
] | |
}, | |
"execution_count": 8, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# calculate the static polarizability for the ground state\n", | |
"Mg('S1/2').α().to('h Hz/(V/cm)^2')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"1.73 Hz·cm²·h/W\n" | |
] | |
} | |
], | |
"source": [ | |
"# calculate the dynamic polarizability for the ground state at 1064 nm\n", | |
"α0 = Mg('S1/2').α(λ=1064 * units.nm)\n", | |
"print((α0/(2*c*ε_0)).to('h Hz/(W/cm^2)'))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Beryllium" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# fetch the NIST transition data for Mg+\n", | |
"Be = Atom('Be+')\n", | |
"units = Be.units\n", | |
"c = units.c\n", | |
"ε_0 = units.ε_0" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"State(2S1/2, 2S1/2: 0 Ry)" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Be('S1/2')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"0.006008741924243778 Hz cm<sup>2</sup> h/V<sup>2</sup>" | |
], | |
"text/latex": [ | |
"$0.006008741924243778\\ \\frac{\\mathrm{Hz} \\cdot \\mathrm{cm}^{2} \\cdot \\mathrm{h}}{\\mathrm{V}^{2}}$" | |
], | |
"text/plain": [ | |
"0.006008741924243778 <Unit('centimeter ** 2 * hertz * planck_constant / volt ** 2')>" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# calculate the static polarizability for the ground state\n", | |
"Be('S1/2').α().to('h Hz/(V/cm)^2')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"S1/2 = 1.24 Hz·cm²·h/W\n" | |
] | |
} | |
], | |
"source": [ | |
"# calculate the dynamic polarizability for the ground state at 1050 nm\n", | |
"α0 = Be('S1/2').α(λ=1050 * units.nm)\n", | |
"s = (α0/(2*c*ε_0)).to('h Hz/(W/cm^2)')\n", | |
"print(f\"S1/2 = {s}\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"P1/2 = 0.0401 Hz·cm²·h/W\n" | |
] | |
} | |
], | |
"source": [ | |
"# calculate the dynamic polarizability for the ground state at 1050 nm\n", | |
"α0 = Be('P1/2').α(λ=1050 * units.nm)\n", | |
"p = (α0/(2*c*ε_0)).to('h Hz/(W/cm^2)')\n", | |
"print(f\"P1/2 = {p}\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"differential AC Stark shift = 1.2 Hz·cm²·h/W\n" | |
] | |
} | |
], | |
"source": [ | |
"diff = s - p\n", | |
"print(f'differential AC Stark shift = {diff}')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"w0 = 9 * units.um\n", | |
"power = 1 * units.W\n", | |
"intensity = 2 * power / (np.pi * w0 ** 2)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"0.7859503362562735 MW/cm<sup>2</sup>" | |
], | |
"text/latex": [ | |
"$0.7859503362562735\\ \\frac{\\mathrm{MW}}{\\mathrm{cm}^{2}}$" | |
], | |
"text/plain": [ | |
"0.7859503362562735 <Unit('megawatt / centimeter ** 2')>" | |
] | |
}, | |
"execution_count": 26, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"intensity.to(units.MW / (units.cm) ** 2)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"shift = intensity * diff" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"0.9428513622351195 MHz h" | |
], | |
"text/latex": [ | |
"$0.9428513622351195\\ \\mathrm{MHz} \\cdot \\mathrm{h}$" | |
], | |
"text/plain": [ | |
"0.9428513622351195 <Unit('megahertz * planck_constant')>" | |
] | |
}, | |
"execution_count": 30, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"shift.to(units.MHz * units.h)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.8.10" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment