Profiles / Sciences
AQ

Atomic & quantum physicist

Spectral lines, matter waves, blackbody radiation and CODATA constants with their uncertainties.

10 recipes on this page · open in the interactive view

Recipes
  1. Hydrogen: Balmer lines and ionization energy
  2. De Broglie wavelength of electrons
  3. Blackbody spectrum of the Sun
  4. Rydberg constant from alpha and me, with uncertainty
  5. Harmonic oscillator wave function n = 3
  6. Atomic units: the constant family against const list
  7. ESR and NMR frequencies from the magnetons
  8. Electron tunnelling through a rectangular barrier
  9. Conductance quantum, von Klitzing resistance and flux quanta
  10. A qubit state on the Bloch sphere
executed on MentDB

Hydrogen: Balmer lines and ionization energy

Correct the Rydberg constant for the reduced mass of hydrogen, compute the vacuum wavelengths of the Balmer lines (n = 3 to 6 down to n = 2) and the ionization energy in eV.

Pipeline
Script
admin
#1. Rydberg constant of hydrogen, reduced-mass correction;
-> "[RH]" (math calc "_Rinf/(1+_me/_mp)");
#2. Balmer series 1/lambda = RH * 1/4 - 1/n^2, lambda in nm;
-> "[lines]" (num table (concat "1e9/(" [RH] "*(1/4-1/n^2))") "n" 3 6 1);
#3. Ionization energy of hydrogen in eV;
concat "RH = " [RH] " 1/m; ionization energy = " (math round (unit calc (concat "_h*_c*" [RH] "/(1 m)") "eV") 4) " eV; Balmer lines [n, nm]: " [lines]
Result
mentdb
RH = 1.0967758340277294E7 1/m; ionization energy = 13.5983 eV; Balmer lines [n, nm]: [
  [3,656.469606333245],
  [4,486.2737824690704],
  [5,434.17302006167006],
  [6,410.29350395827817]
]
Go further
  • Do the same for He+ (Z = 2, Z^2 factor and the alpha-particle mass)
  • Get the Lyman series with 1 - 1/n^2
executed on MentDB

De Broglie wavelength of electrons

Compute the de Broglie wavelength of an electron accelerated by 100 V, then by 200 kV in an electron microscope where the relativistic correction (1 + eV/2mc^2) matters, and its speed as a fraction of c.

Pipeline
Script
admin
#1. Electron accelerated by 100 V, non-relativistic lambda = h / sqrt 2 m e V;
-> "[l1]" (unit calc "_h/sqrt(2*_me*_e*100 V)" "pm");
#2. Electron microscope at 200 kV: relativistic correction 1 + eV / 2 m c^2;
-> "[l2]" (unit calc "_h/sqrt(2*_me*_e*200000 V*(1+_e*200000 V/(2*_me*_c^2)))" "pm");
-> "[l2nr]" (unit calc "_h/sqrt(2*_me*_e*200000 V)" "pm");
#3. Speed of the 200 keV electron as a fraction of c;
-> "[g]" (math calc "1+_e*200000/(_me*_c^2)");
concat "100 V: lambda = " (math round [l1] 2) " pm; 200 kV: lambda = " (math round [l2] 4) " pm, the classical formula overestimates it by " (math round (math calc "([l2nr]-[l2])/[l2]*100") 1) " %; v/c = " (math round (math calc "sqrt(1-1/[g]^2)") 4)
Result
mentdb
100 V: lambda = 122.64 pm; 200 kV: lambda = 2.5079 pm, the classical formula overestimates it by 9.3 %; v/c = 0.6953
Go further
  • Compare with a thermal neutron at 300 K using _mn and _k
  • Tabulate the wavelength from 10 kV to 300 kV with num table
executed on MentDB

Blackbody spectrum of the Sun

Write Planck's law for T = 5772 K with the radiation constants c1 and c2, find the peak wavelength numerically (compared with Wien's law b/T), and integrate the spectrum to get the radiant exitance (compared with sigma T^4).

Pipeline
Script
admin
#1. Planck law for the Sun, T = 5772 K, spectral exitance c1 / lambda^5 / exp c2/lambda T - 1, lambda in nm;
-> "[B]" (concat (const get "c1") "/(x*1e-9)^5/(exp(" (const get "c2") "/(x*1e-9*5772))-1)");
#2. Peak of the spectrum, compared with Wien b / T;
json load "rx_bb" (num maximize [B] "x" 100 3000);
#3. Total exitance = integral over lambda, compared with sigma T^4;
-> "[M]" (math calc (concat "1e-9*" (num integrate [B] "x" 10 100000)));
concat "peak at " (math round (json select "rx_bb" /x) 1) " nm (Wien: " (math round (math calc "_b/5772*1e9") 1) " nm); M = " (math round (math calc "[M]/1e6") 3) " MW/m2 (sigma T^4 = " (math round (math calc "_sigma*5772^4/1e6") 3) " MW/m2)"
Result
mentdb
peak at 502 nm (Wien: 502 nm); M = 62.939 MW/m2 (sigma T^4 = 62.939 MW/m2)
Go further
  • Integrate from 400 to 700 nm to get the visible fraction
  • Draw the spectrum with plot function
executed on MentDB

Rydberg constant from alpha and me, with uncertainty

Rebuild R_inf = alpha^2 me c / 2h from the CODATA values, propagate the standard uncertainties of alpha and me, and compare with the tabulated R_inf.

Pipeline
Script
admin
#1. Values and standard uncertainties from CODATA;
-> "[a]" (const get "alpha"); -> "[ua]" (json load select "rx_a" (const info "alpha") /uncertainty);
-> "[m]" (const get "me"); -> "[um]" (json load select "rx_m" (const info "me") /uncertainty);
#2. Rydberg constant R = alpha^2 me c / 2h with propagated uncertainty;
json load "rx_r" (num uncertainty "a^2*m*c/(2*h)" (concat "{\"a\": [" [a] ", " [ua] "], \"m\": [" [m] ", " [um] "], \"c\": 299792458, \"h\": 6.62607015E-34}"));
#3. Compare with the tabulated value;
concat "R = " (json select "rx_r" /text) " 1/m, relative uncertainty " (math round_sig (json select "rx_r" /relative) 2) ", share of alpha in the variance: " (math round (json select "rx_r" /variance_share/a) 3) "; CODATA Rinf = " (const get "Rinf")
Result
mentdb
R = 10973731.568 ± 0.005 1/m, relative uncertainty 0.00000000043, share of alpha in the variance: 0.49; CODATA Rinf = 1.0973731568157E7
Go further
  • List all atomic constants with const list "atomic"
  • Rebuild the Bohr radius hbar/(me c alpha) the same way
executed on MentDB

Harmonic oscillator wave function n = 3

The n = 3 state of the quantum harmonic oscillator is built with a Hermite polynomial and gamma(n+1) = n!. The script checks the normalisation, the probability to be found in the classically forbidden region, and recovers E = n + 1/2 from the Schrodinger equation with a second derivative.

Pipeline
Script
admin
#1. Harmonic oscillator, level n = 3, units hbar = m = omega = 1;
-> "[n]" 3;
-> "[N]" (math calc "1/sqrt(2^[n]*gamma([n]+1)*sqrt(pi))");
-> "[psi]" (concat [N] "*hermite(3, x)*exp(-x^2/2)");
#2. Normalisation check over the whole line;
-> "[norm]" (num integrate (concat "(" [psi] ")^2") "x" "-inf" "inf");
#3. Probability to be beyond the classical turning points sqrt of 2n+1;
-> "[xt]" (math calc "sqrt(2*[n]+1)");
-> "[out]" (math calc (concat "2*" (num integrate (concat "(" [psi] ")^2") "x" [xt] "inf")));
#4. Energy from the Schrodinger equation at x = 0.7: E = -psi''/2psi + x^2/2;
-> "[E]" (math calc (concat "-(" (num derivative2 [psi] "x" 0.7) ")/(2*(" (math eval [psi] "{\"x\": 0.7}") "))+0.7^2/2"));
concat "{\"norm\": " (math round [norm] 10) ", \"turning_point\": " (math round [xt] 4) ", \"P_forbidden\": " (math round [out] 4) ", \"E\": " (math round [E] 8) "}"
Result
mentdb
{"norm": 1, "turning_point": 2.6458, "P_forbidden": 0.0855, "E": 3.5}
Go further
  • Draw psi_0 to psi_3 together with plot function and a JSON array.
  • Change n: the forbidden probability decreases slowly with the level.
executed on MentDB

Atomic units: the constant family against const list

Check the Hartree relation Eh = 2 Rinf h c and 1/alpha with the CODATA 2022 values of the 'constant' family, then cross-check the Bohr radius with the value found in the list of atomic constants of 'const list'.

Pipeline
Script
admin
-> "[a0]" (string regexp_extract (constant physics_a0) "[-0-9.]+E?[-0-9]*" 0);
-> "[Eh]" (string regexp_extract (constant physics_eh) "[-0-9.]+E?[-0-9]*" 0);
-> "[R]" (string regexp_extract (constant physics_rinf) "[-0-9.]+E?[-0-9]*" 0);
-> "[al]" (string regexp_extract (constant physics_fine_structure) "[-0-9.]+E?[-0-9]*" 0);
-> "[h]" (string regexp_extract (constant physics_planck) "[-0-9.]+E?[-0-9]*" 0);
#1. Hartree relation and 1/alpha;
-> "[chk]" (math calc "2*[R]*[h]*299792458/[Eh]");
#2. Atomic constants of const list;
-> "[list]" (const list "atomic");
-> "[a0new]" (string regexp_extract [list] "\"a0\".*?\"value\": ([0-9.E-]+)" 1);
concat "2 Rinf h c / Eh = " (math round [chk] 7) ", 1/alpha = " (math round (math calc "1/[al]") 4) ", Eh = " (math round (unit convert [Eh] "J" "eV") 4) " eV; " (string regexp_count [list] "\"name\"") " atomic constants listed, a0 = " [a0] " m in constant vs " [a0new] " m in const list, relative gap " (math round_sig (math calc "[a0]/[a0new]-1") 2)
Result
mentdb
2 Rinf h c / Eh = 1, 1/alpha = 137.036, Eh = 27.2114 eV; 16 atomic constants listed, a0 = 5.29177210544E-11 m in constant vs 5.29177210544E-11 m in const list, relative gap 0
Go further
  • In atomic units hbar = me = e = 4 pi eps0 = 1: lengths in a0, energies in Eh.
  • const info "alpha" gives the current uncertainty of alpha.
executed on MentDB

ESR and NMR frequencies from the magnetons

Resonance frequency h nu = g mu B for a free electron in an X-band ESR magnet (0.35 T, g = 2.0023) and for protons in a 1.5 T MRI (g = 5.5857, nuclear magneton), and the ratio of the magnetons which equals mp/me.

Pipeline
Script
admin
-> "[uB]" (string regexp_extract (constant physics_bohr_magneton) "[-0-9.]+E?[-0-9]*" 0);
-> "[uN]" (string regexp_extract (constant physics_nuclear_magneton) "[-0-9.]+E?[-0-9]*" 0);
-> "[h]" (string regexp_extract (constant physics_planck) "[-0-9.]+E?[-0-9]*" 0);
#1. ESR of a free electron at 0.35 T;
-> "[fe]" (math calc "2.0023*[uB]*0.35/[h]/1E9");
#2. Proton NMR at 1.5 T;
-> "[fp]" (math calc "5.5857*[uN]*1.5/[h]/1E6");
#3. Ratio of the magnetons;
-> "[mr]" (math calc (concat (string regexp_extract (constant physics_m_proton) "[-0-9.]+E?[-0-9]*" 0) "/" (string regexp_extract (constant physics_m_electron) "[-0-9.]+E?[-0-9]*" 0)));
concat "ESR: " (math round [fe] 3) " GHz; proton NMR: " (math round [fp] 2) " MHz, gyromagnetic ratio " (math round (math calc "[fp]/1.5") 3) " MHz/T; muB/muN = " (math round (math calc "[uB]/[uN]") 2) " = mp/me = " (math round [mr] 2)
Result
mentdb
ESR: 9.809 GHz; proton NMR: 63.87 MHz, gyromagnetic ratio 42.578 MHz/T; muB/muN = 1836.15 = mp/me = 1836.15
Go further
  • The Zeeman energy g muB B is much smaller than kT at room temperature: compute the spin polarisation tanh(g muB B / 2kT).
  • Chemical shifts are a few ppm of the NMR frequency.
executed on MentDB

Electron tunnelling through a rectangular barrier

An electron of 1 eV meets a 2 eV barrier 0.5 nm or 1 nm wide. kappa = sqrt(2m(V0 - E))/hbar, the exact transmission T = 1/(1 + V0^2 sinh^2(kappa a)/(4E(V0 - E))), and the thick-barrier approximation 16E(V0 - E)/V0^2 e^(-2 kappa a).

Pipeline
Script
admin
-> "[m]" (string regexp_extract (constant physics_m_electron) "[-0-9.]+E?[-0-9]*" 0);
-> "[hb]" (string regexp_extract (constant physics_planck_over_two_pi) "[-0-9.]+E?[-0-9]*" 0);
-> "[e]" (string regexp_extract (constant physics_e) "[-0-9.]+E?[-0-9]*" 0);
-> "[E]" 1;
-> "[V]" 2;
#1. kappa in 1/nm;
-> "[k]" (math calc (concat (math sqrt (math calc "2*[m]*([V]-[E])*[e]")) "/[hb]/1E9"));
#2. Exact transmission for 0.5 and 1 nm;
-> "[T1]" (math calc (concat "1/(1+[V]^2*" (math sinh (math calc "[k]*0.5")) "^2/(4*[E]*([V]-[E])))"));
-> "[T2]" (math calc (concat "1/(1+[V]^2*" (math sinh (math calc "[k]*1")) "^2/(4*[E]*([V]-[E])))"));
#3. Approximation for 1 nm;
-> "[Ta]" (math calc (concat "16*[E]*([V]-[E])/[V]^2*" (math exp (math calc "-2*[k]*1"))));
concat "kappa = " (math round [k] 4) " 1/nm; T(0.5 nm) = " (math round_sig [T1] 4) ", T(1 nm) = " (math round_sig [T2] 4) ", approximation " (math round_sig [Ta] 4) "; doubling the width divides T by " (math round (math calc "[T1]/[T2]") 1)
Result
mentdb
kappa = 5.1232 1/nm; T(0.5 nm) = 0.02355, T(1 nm) = 0.0001419, approximation 0.0001419; doubling the width divides T by 165.9
Go further
  • This exponential sensitivity is what makes the scanning tunnelling microscope work: about a factor 10 per 0.1 nm.
  • Plot T versus E with plot function, including the resonances above the barrier.
executed on MentDB

Conductance quantum, von Klitzing resistance and flux quanta

From the conductance quantum G0 = 2e^2/h, get the von Klitzing resistance h/e^2 = 2/G0 and check it equals Z0/(2 alpha); then count the flux quanta h/2e threading a 100 um x 100 um SQUID loop in the Earth's field (50 uT) and the Josephson constant 2e/h.

Pipeline
Script
admin
-> "[G0]" (string regexp_extract (constant physics_g0) "[-0-9.]+E?[-0-9]*" 0);
-> "[Z0]" (string regexp_extract (constant physics_z0) "[-0-9.]+E?[-0-9]*" 0);
-> "[al]" (string regexp_extract (constant physics_fine_structure) "[-0-9.]+E?[-0-9]*" 0);
-> "[F0]" (string regexp_extract (constant physics_magn_flux_quantum) "[-0-9.]+E?[-0-9]*" 0);
#1. Von Klitzing resistance two ways;
-> "[RK]" (math calc "2/[G0]");
-> "[RK2]" (math calc "[Z0]/(2*[al])");
#2. Flux quanta in the SQUID loop;
-> "[n]" (math calc "50E-6*(100E-6)^2/[F0]");
concat "G0 = " [G0] " S, 1/G0 = " (math round (math calc "1/[G0]") 1) " ohm; R_K = 2/G0 = " (math round [RK] 1) " ohm, Z0/2alpha = " (math round [RK2] 1) " ohm; Earth field in the loop = " (math round [n] 0) " flux quanta; K_J = " (math round (math calc "1/[F0]/1E9") 2) " GHz/V"
Result
mentdb
G0 = 7.748091729863649E-5 S, 1/G0 = 12906.4 ohm; R_K = 2/G0 = 25812.8 ohm, Z0/2alpha = 25812.8 ohm; Earth field in the loop = 242 flux quanta; K_J = 483597.85 GHz/V
Go further
  • The 2019 SI fixes R_K = 25812.80745... ohm exactly: compare with const get.
  • A SQUID resolves about 1E-6 flux quantum per root hertz.
executed on MentDB

A qubit state on the Bloch sphere

The state 0.6|0> + 0.8 e^(i pi/4)|1>. Build beta in polar form, check the normalisation, get the Bloch angles theta = 2 atan2(|beta|, |alpha|) and phi = arg beta (also the imaginary part of log beta), the Bloch vector and the measurement probabilities.

Pipeline
Script
admin
-> "[a]" 0.6;
#Phase pi/4 from the stored pi/2;
-> "[p4]" (math calc (concat (string regexp_extract (constant math_half_pi) "[-0-9.]+E?[-0-9]*" 0) "/2"));
-> "[b]" (complex from_polar 0.8 [p4]);
#1. Normalisation and Bloch angles;
-> "[nb]" (complex abs [b]);
-> "[th]" (math calc (concat "2*" (math atan2 [nb] [a])));
-> "[ph]" (complex im (complex log [b]));
#2. Bloch vector;
-> "[x]" (math calc "sin([th])*cos([ph])");
-> "[y]" (math calc "sin([th])*sin([ph])");
-> "[z]" (math calc "cos([th])");
concat "beta = " [b] ", norm = " (math calc "[a]^2+[nb]^2") "; theta = " (math round (math rad_to_deg [th]) 3) " deg, phi = " (math round (math rad_to_deg [ph]) 3) " deg; Bloch vector (" (math round [x] 4) ", " (math round [y] 4) ", " (math round [z] 4) "), length " (math round (math hypot (math hypot [x] [y]) [z]) 6) "; P(0) = " (math round (math calc "[a]^2") 2) ", P(1) = " (math round (math calc "[nb]^2") 2)
Result
mentdb
beta = 0.5656854249492381+0.565685424949238i, norm = 1; theta = 106.26 deg, phi = 45 deg; Bloch vector (0.6788, 0.6788, -0.28), length 1; P(0) = 0.36, P(1) = 0.64
Go further
  • A Hadamard gate maps z to x: apply it with matrix functions to the state vector.
  • z = P(0) - P(1): the measurement statistics only see the z component.

Also in Sciences

MA
Mathematician
Calculus, linear algebra, number theory and complex numbers: exact and numerical in the same script.
10 recipes
MT
Math teacher & student
Equations, tables of values, fractions and probabilities: exact answers and their decimal check.
10 recipes
PH
Physicist
Mechanics with units, constants and differential equations: trajectories, pendulums, oscillators.
10 recipes
OP
Optics & photonics
Refraction, lenses, photons and diffraction with SI units and CODATA constants.
10 recipes
TH
Thermodynamics & heat transfer
Conduction, heat pumps, ideal gases and cooling laws with units, integrals and ODEs.
10 recipes
NR
Nuclear & radiation physicist
Decay, half-lives, generators and shielding: dates, fits and solvers for radiation work.
10 recipes
AE
Acoustics engineer
Decibels, Doppler, spectra and reverberation: the daily formulas of noise and room acoustics.
10 recipes
CN
Cryptographer & number theorist
RSA and Diffie-Hellman by hand, primes, modular arithmetic and exact big integers.
10 recipes
OR
Operations researcher
Optimisation with constraints, Markov chains for maintenance, newsvendor inventory: solve and plot.
10 recipes
ME
Metrologist
Uncertainty budgets following the GUM, exact decimals and calibration curves.
10 recipes
MP
Mathematical physicist
Special functions at work: Bessel modes, Hermite and Laguerre states, gamma and zeta, with the CAS.
10 recipes
CM
Crystallographer & materials physicist
Miller indices, metric tensors, elastic tensors and structure factors.
10 recipes