What is it?: Vibrational spectroscopy detects transitions between the quantised vibrational energy levels associated with bond stretching and/or bond angle bending in molecules.
How do we do it?: Transitions are observed by measuring the amount of infrared radiation that is absorbed or emitted by vibrating molecules in solid, liquid, or gas phases.
Why do we do it?: A knowledge of the vibrational level spacings gives us the value of the stretching (or bending) force constants which characterise the stiffness of a bond, allows us to estimate the bond dissociation energy, and gives us a means of identifying characteristic functional groups of atoms within large molecules.
-
scipy.optimize: provides a range of algorithms for minimization of multidimensional functions (with or without constraints). -
scipy.optimize.minimize: minimize routine which implements several different algorithms for minimization. -
scipy.optimize.minimize_scalar: provide a way to minimize a function of a single variable. -
scipy.optimize.special: is the function for the evaluation of different sirts of orthogonal polynomials, including the Legendre, Jacobi, Laguerre, Hermite and different flavors of Chebshev polynomials. -
scipy.optimize.special import hermite: (Physicists') Hermite polynomial,$H_n (x)$ .
- Differential equations, specifically the power series method.
- Orthogonal polynomials
- Gaussian functions
- Time-Independent
$Schr\ddot{o}dinger$ - Normalization of wavefunctions (
$|\psi (x)|^2$ ) - Quantum number (
$n \in {0, \ 1, \ 2, \ldots}$ ) and energy level ($E_n$ ).
In quantum mechanics and in other branches of physics, it is common to approach physical problems algebraics and analytic methods. Examples include the use of differential equations for many interesting models, the use of quantum groups in quantum physics, and of differential geometry in relativity theory. In this work, we discuss the Hermite polynomials, some of their properties and a brief description of their applications to the Quantum Harmonic Oscillator.
The Harmonic Oscillator's Quantum Mechanical solution involves Hermite Polynomials, which are introduced here. The wavefunctions for the quantum harmonic oscillator contain the Gaussian form, which allows them to satisfy the necessary boundary conditions at infinity. In the wavefunction associated with a given value of the quantum number
Hermite polynomials, named after the French mathematician Charles Hermite, are orthogonal polynomials, in a sense to be described below, of the form
for
- for
$n=0$ we have$H_0 (x) = 1$ - for
$n=1$ we have$H_1 (x) = 2x$ - for
$n=2$ we have$H_2 (x) = 4x^2 - 2$ - for
$n=3$ we have$H_3 (x) = 8x^3 - 12x$ - for
$n=4$ we have$H_4 (x) = 16x^4 - 48x^2 + 12$ - for
$n=5$ we have$H_5 (x) = 32x^5 - 160x^3 + 120x$ - for
$n=6$ we have$H_6 (x) = 64x^6 - 480x^4 + 720x^2 -120$ - for
$n=7$ we have$H_7 (x) = 128x^7 - 1344x^5 + 3360x^3 - 1680x$
For
To find
where
In this final part, we will show the connection of Hermite Polynomials with the Quantum Harmonic Oscillator. First of all, the analogue of the classical Harmonic Oscillator in Quantum Mechanics is described by the
There are a bunch of constants sitting in eq.(4) and life is simpler if we can just get rid of them. To this end, define
Then the
The derivatives are
Furthermore, it's simple to see that all normalisable solutions should fall off in the same exponential fashion, with
In general, the functions
The wavefunctions for the quantum harmonic oscillator contain the Gaussian form, which allows them to satisfy the necessary boundary conditions at infinity. In the wavefunction associated with a given value of the quantum number
Because of the association of the wavefunction with a probability density, it is necessary for the wavefunction to include a normalization constant,
The final form of the harmonic oscillator wavefunction is this
where
The general formula for the normalized wavefunctions is
where
All energies are proportional to
When the
| n | ||
|---|---|---|
| 0 | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 |
The wavefunctions for the quantum harmonic oscillator contain the Gaussian form, which allows them to satisfy the necessary boundary conditions at infinity. In the wavefunction associated with a given value of the quantum number
Visualizing the harmonic oscillator wavefunction for any vibrational quantum number scipy.special package with normalized by integrating the corresponding probability distribution:
Solution:
-
Calculate Normalization constant and Hermite polynomial for quantum number,
$n =2$ and variable$x = 3$ . -
Calculate the one-dimensional harmonic oscillator wavefunction and energies is defined by eq.10 using Numpy:
- Plotted using Matplotlib
- Verify that the wavefunctions are normalized using
scipy.integrate.quad.
# 1. Normalization constant Calculate Hermite polynomial
from scipy.special import hermite
import numpy as np
import math
# Normalization constant for n =2
n = 2
N_n = 1 / (np.sqrt(np.pi) * 2**n * math.factorial(n))
print("N_n=", N_n)
# Hermite polynomial
H2 = hermite (2) # H_2(x) = 4x^2 - 2
print(f"H2(3)=", H2(3)) # 4*3**2 -2N_n= 0.07052369794346953
H2(3)= 34.00000000000001
# 2. Calculate the QHO
import numpy as np
import math
from scipy.special import hermite
def psi_n(y, n):
"Return the harmonic oscillator function, psi_n at x"
N_n = 1.0 / np.sqrt((2**n) * math.factorial(n) * np.sqrt(np.pi))
H_n = hermite(n)
return N_n * H_n(y) * np.exp(-y**2 /2)
# Example: print n=2 at y = 3
print("psi_2(3)=", psi_n(3, 2))psi_2(3)= 0.10030470080286634
The Hermite polynomial for n = 2 and y = 3 is 0.1003.
# 3. Plotting use matplot for n = 2 and n=1
import matplotlib.pyplot as plt
def plot_psi(y, n):
psi = psi_n(y, n)
plt.plot(y, psi, label=f'$n={n}$')
plt.xlabel(r'$y$')
plt.ylabel(r'$\psi_n (y)$')
y = np.linspace(-4, 4, 500)
plot_psi(y, 0)
plot_psi(y, 1)
plot_psi(y, 3)
plt.legend()
plt.title("Quantum Harmonic Oscillator Wavefunctions (n= 0, 1, and 3)")
plt.grid(alpha=0.5)
plt.savefig('Quantum Harmonic Oscillator Wavefunctions (n= 0, 1, and 3).svg', bbox_inches='tight')
plt.show()# Verify the wavefucntions are normalized
from scipy.integrate import quad
def P_n(y, n):
"Return the probability distribution function for psi_n"
return psi_n(y, n)**2
n = 3
area, abserr = quad(P_n, -np.inf, np.inf, args=(n,))
print('area=', area)area= 1.0000000000000004
In quantum mechanics, the behaviour of electrons and other small particles is not Newtonian. In fact, the behavior of quantum systems can almost appear random. Instead of having predictable trajectories that we expect of projectiles in Newtonian mechanics, individual quantum events are unpredictable. However, if we consider a large number of quantum events, a pattern emerges. This is known as a statistical distribution. We often use mathematical probabilities to describes the outcomes of quantum events. The probability of a single quantum events. The probability of a single quantum event is exactly proportional to the value of the statistical distribution.
The probability of a classical particle being found between
Now this can be simplified with
So combining this we get
for
where the normalization constant,
The normalized classical probability density function is therefore
Solution:
- Calculate and get the classical oscillator amplitude for
$n$ , y_(+) = A, \ y_(-) = -A. - Calculate normalized classical probability density function.
- Plot the probability density distribution (classical vs quantum) and set the color lines.
# 1. Calculate the classical oscillator amplitude for state n
def get_A(n):
"Return to the Classical oscillator amplitudo for state n"
return np.sqrt(2*n + 1)
A = get_A(n)
# 2. Calculate normalized classical probability density function.
def P_classical(y, A):
return 1 / np.pi / np.sqrt(A**2 - y**2)
# 3. Plot the probability density distribution (classical vs quantum) and set the color lines
def plot_QM_and_Classical_Probabilities(y, n):
P_qm_n = P_n(y, n)
P_classical_n= P_classical(y, A)
plt.plot(y, P_classical_n, label="Classical", c="black")
plt.plot(y, P_qm_n, label="Quantum, $n={3}$", c="red")
ymax = 1
# As an alternative to pyplot.plot, pyplot.nlines([x1, x2, ...], y1, y2,...)
# Plots vertical lines between y-coordinates y1 and y2 at x = x1, x2, ...
plt.vlines([-A, A], ymin = 0, ymax=ymax, ls='--')
plt.ylim(0, ymax=ymax)
plt.xlabel('$y$')
plt.ylabel('$P(y)$')
plt.title(f"Quantum vs Classical Probabilities (n={n})")
plt.legend()
y = np.linspace(-8, 8, 1000)
plot_QM_and_Classical_Probabilities(y, 3)
plt.savefig('Quantum vs Classical Probabilities (n=3).svg', bbox_inches='tight')By taking an average of
Solution:
- Use some preliminary syntax.
- Plotting with its regions (
$n = 20$ ).
import numpy as np
from scipy.special import hermite
from scipy.integrate import quad
import matplotlib.pyplot as plt
def psi_n(y, n):
"Return the harmonic oscillator function, psi_n at x"
N_n = 1.0 / np.sqrt((2**n) * math.factorial(n) * np.sqrt(np.pi))
H_n = hermite(n)
return N_n * H_n(y) * np.exp(-y**2 /2)
def P_n(y, n):
"Return the probability distribution function for psi_n"
return psi_n(y, n)**2
def get_A(n):
"Return to the Classical oscillator amplitudo for state n"
return np.sqrt(2*n + 1)
A = get_A(n)
def P_classical(y, A):
return 1 / np.pi / np.sqrt(A**2 - y**2)
n = 20
nregions = n // 2
A = get_A(n)
Dq = 2 * A /nregions
P_qm = np.zeros(nregions)
y = np.zeros(nregions)
# Looping over regions
for i in range(nregions):
#Integrate the square of the wavefunction over the its region"
# between -A + Dq.i and -A + Dq.(i + 1)
a = -A + i * Dq
# Quantum probability in each region
P_qm[i] = quad(P_n, a, a + Dq, args=(n,))[0] /Dq
y[i] = a + Dq / 2
# Classical probabilities for the regions
P_classical_n = P_classical(y, A)
plt.plot(y, P_qm, c='k', label=f"Quantum Mechanic $n={n}$")
plt.plot(y, P_classical_n, c = 'red', label='Classical')
plt.xlabel(r'$y$')
plt.ylabel(r'$P(y)$')
plt.legend()
plt.title(f"Quantum vs Classical Probabilities (n={n})")
plt.savefig('Quantum vs Classical Probabilities (n=20).svg', bbox_inches='tight')- Vibrational spectroscopy via Hermite Polynomials bridges quantum mechanics and classical physics.
- At low quantum numbers, quantum mechanics predicts probability distributions that differ strongly from classical expectations, respectively for the opposite.
- The quantum harmonic oscillator reproduces classical behaviour in the limit of large vibrational quantum numbers.
- Hermite polynomials structure encodes the oscillations, while the classical distribution emerges as the envelope in the large
$n$ limit.