Ψ iℏ ∂Ψ/∂t = ĤΨ

Quantum Mechanics

Heisenberg 1925 · Schrödinger 1926 · Dirac 1930 · Born Rule · Bell 1964

I. Historical Origins & the Quantum Revolution

Classical physics failed catastrophically at atomic scales. Three experiments forced a radical rethinking of nature's laws:

YearProblemClassical FailureQuantum Resolution
1900Blackbody radiationUltraviolet catastrophe — \(\infty\) energy predictedPlanck: \(E = n\hbar\omega\), energy quantized
1905Photoelectric effectIntensity, not frequency, should eject electronsEinstein: photons with \(E = \hbar\omega\)
1913Atomic spectraNo stable orbits; spiraling collapseBohr: quantized angular momentum \(L = n\hbar\)
1922Stern-GerlachContinuous deflection expectedDiscrete spin states \(m_s = \pm\tfrac{1}{2}\)
1923Compton scatteringThomson scattering: no frequency shiftPhoton momentum \(p = \hbar k\)
1924de Broglie hypothesisAll matter has wavelength \(\lambda = h/p\)
1925Heisenberg matrix mechanicsObservables are non-commuting matrices
1926Schrödinger equationWave equation for matter; identical to Heisenberg's

The de Broglie relations unify particle and wave descriptions:

$$E = \hbar\omega = hf,\qquad \mathbf{p} = \hbar\mathbf{k},\qquad \lambda = \frac{h}{p}$$

II. The Six Postulates of Quantum Mechanics

Postulate I — State Vector

The complete state of a quantum system is encoded in a normalized vector \(\ket{\psi}\) (or wavefunction \(\psi(\mathbf{x},t)\)) in a complex Hilbert space \(\mathcal{H}\). All physical predictions are derived from \(\ket{\psi}\).

$$\braket{\psi}{\psi} = 1$$
Postulate II — Observables are Hermitian Operators

Every physical observable \(A\) corresponds to a Hermitian (self-adjoint) operator \(\op{A}\) on \(\mathcal{H}\), satisfying \(\op{A}^\dagger = \op{A}\). Hermiticity guarantees real eigenvalues (physical measurement outcomes).

Postulate III — Born Rule (Measurement)

Measurement of \(\op{A}\) yields eigenvalue \(a_n\) with probability \(P(a_n) = |\braket{a_n}{\psi}|^2\), where \(\ket{a_n}\) is the eigenvector. Immediately after, the state collapses to \(\ket{a_n}\).

$$\ev{\op{A}} = \braket{\psi}{\op{A}|\psi} = \sum_n a_n |\braket{a_n}{\psi}|^2$$
Postulate IV — Schrödinger Equation (Time Evolution)

Between measurements, the state evolves unitarily according to:

$$\boxed{i\hbar\frac{\partial}{\partial t}\ket{\psi(t)} = \op{H}\ket{\psi(t)}}$$

where \(\op{H}\) is the Hamiltonian operator (total energy).

Postulate V — Canonical Quantization

Classical canonical variables \((q_i, p_j)\) become operators with commutation relations:

$$\comm{\op{q}_i}{\op{p}_j} = i\hbar\delta_{ij},\qquad \comm{\op{q}_i}{\op{q}_j} = \comm{\op{p}_i}{\op{p}_j} = 0$$

In the position representation: \(\op{x} = x\,\cdot\) and \(\op{p} = -i\hbar\nabla\).

Postulate VI — Identical Particles

The wavefunction of a system of identical particles must be symmetric (bosons) or antisymmetric (fermions) under exchange of any two particles.

III. Dirac (Bra-Ket) Notation

Kets, Bras, and Inner Products

SymbolNameMeaning
\(\ket{\psi}\)KetState vector in \(\mathcal{H}\)
\(\bra{\psi}\)BraDual vector (conjugate transpose)
\(\braket{\phi}{\psi}\)BracketInner product: \(\int\phi^*\psi\,d^3x\)
\(\ket{\psi}\bra{\phi}\)Outer productOperator (rank-1 projection)
\(\braket{\psi|\op{A}|\psi}\)Matrix elementExpectation value of \(\op{A}\)

Completeness (Resolution of Identity)

For any orthonormal basis \(\{\ket{n}\}\):

$$\sum_n \ket{n}\bra{n} = \op{I} \quad\text{(discrete)},\qquad \int\ket{x}\bra{x}\,dx = \op{I}\quad\text{(continuous)}$$

Position and Momentum Representations

$$\psi(x) = \braket{x}{\psi},\qquad \tilde\psi(p) = \braket{p}{\psi} = \frac{1}{\sqrt{2\pi\hbar}}\int_{-\infty}^\infty \psi(x)\,e^{-ipx/\hbar}\,dx$$

These are Fourier transform pairs. The momentum eigenstate in position space is:

$$\braket{x}{p} = \frac{1}{\sqrt{2\pi\hbar}}\,e^{ipx/\hbar}$$

Hermitian Operators

Definition — Hermitian (Self-Adjoint) Operator

\(\op{A}\) is Hermitian if \(\op{A}^\dagger = \op{A}\), i.e., \(\braket{\phi|\op{A}|\psi} = \braket{\psi|\op{A}|\phi}^*\) for all \(\ket{\phi},\ket{\psi}\in\mathcal{H}\).

Consequences: (1) Real eigenvalues. (2) Eigenvectors with different eigenvalues are orthogonal. (3) Eigenvectors form a complete basis.

Proof — Hermitian operators have real eigenvalues

Let \(\op{A}\ket{a} = a\ket{a}\). Then \(\braket{a|\op{A}|a} = a\braket{a}{a} = a\). But also \(\braket{a|\op{A}|a} = \braket{a|\op{A}^\dagger|a}^* = \braket{a|\op{A}|a}^* = a^*\). Hence \(a = a^*\), so \(a\in\mathbb{R}\).

IV. Hilbert Spaces & Linear Algebra

Hilbert Space

A Hilbert space \(\mathcal{H}\) is a complete inner product space over \(\mathbb{C}\). For quantum mechanics: \(L^2(\mathbb{R}^3)\) — square-integrable functions with \(\langle f,g\rangle = \int f^*g\,d^3x\).

Spectral Theorem

Every Hermitian operator \(\op{A}\) has a spectral decomposition:

$$\op{A} = \sum_n a_n\ket{a_n}\bra{a_n}\quad\text{or}\quad \op{A} = \int a\,\ket{a}\bra{a}\,da$$

Functions of operators: \(f(\op{A}) = \sum_n f(a_n)\ket{a_n}\bra{a_n}\).

Unitary Evolution

The time-evolution operator \(\op{U}(t) = e^{-i\op{H}t/\hbar}\) is unitary (\(\op{U}^\dagger\op{U}=\op{I}\)), preserving norms (probability). Formally:

$$\ket{\psi(t)} = e^{-i\op{H}t/\hbar}\ket{\psi(0)} = \op{U}(t)\ket{\psi(0)}$$

Change of Basis & Representations

$$A_{mn} = \braket{m|\op{A}|n}\quad\text{(matrix elements)},\qquad \op{A}\ket{n} = \sum_m A_{mn}\ket{m}$$

Two representations of quantum mechanics: Schrödinger picture (states evolve, operators fixed) and Heisenberg picture (operators evolve, states fixed).

$$\frac{d\op{A}_H}{dt} = \frac{i}{\hbar}\comm{\op{H}}{\op{A}_H} + \left(\frac{\partial\op{A}}{\partial t}\right)_H$$

V. The Schrödinger Equation — Derivation & Meaning

Heuristic Derivation from de Broglie + Classical Energy

Step 1. A free particle with definite momentum \(p\) and energy \(E\) has de Broglie wavelength \(\lambda = h/p\), represented by plane wave:

$$\psi(x,t) = A\exp\!\left(\frac{i(px - Et)}{\hbar}\right)$$

Step 2. Compute derivatives:

$$\frac{\partial\psi}{\partial t} = -\frac{iE}{\hbar}\psi \implies i\hbar\frac{\partial\psi}{\partial t} = E\psi$$ $$\frac{\partial^2\psi}{\partial x^2} = -\frac{p^2}{\hbar^2}\psi \implies -\frac{\hbar^2}{2m}\frac{\partial^2\psi}{\partial x^2} = \frac{p^2}{2m}\psi = T\psi$$

Step 3. Classical energy \(E = T + V = p^2/(2m) + V(x)\) then gives:

$$\boxed{i\hbar\frac{\partial\psi}{\partial t} = -\frac{\hbar^2}{2m}\frac{\partial^2\psi}{\partial x^2} + V(x)\psi = \op{H}\psi}$$
□ (Heuristic — the full postulate requires axiomatic formulation)

In 3D

$$i\hbar\frac{\partial\Psi}{\partial t} = \left[-\frac{\hbar^2}{2m}\nabla^2 + V(\mathbf{r},t)\right]\Psi = \op{H}\Psi$$

Properties of the Schrödinger Equation

VI. The Born Rule & Probability Current

Born Rule (Max Born, 1926) $$P(a \le x \le b, t) = \int_a^b |\psi(x,t)|^2\,dx,\qquad \rho(x,t) = |\psi(x,t)|^2$$

The probability density of finding the particle at position \(x\) at time \(t\) is \(|\psi|^2\). Normalization requires \(\int_{-\infty}^\infty|\psi|^2\,dx = 1\).

Continuity Equation & Probability Current

Theorem — Local Conservation of Probability $$\frac{\partial\rho}{\partial t} + \nabla\cdot\mathbf{J} = 0,\qquad \mathbf{J} = \frac{\hbar}{2mi}\left(\psi^*\nabla\psi - \psi\nabla\psi^*\right) = \frac{1}{m}\,\mathrm{Re}\!\left(\psi^*\frac{\hbar}{i}\nabla\psi\right)$$
Proof

Compute \(\partial_t|\psi|^2 = \psi^*\partial_t\psi + \psi\partial_t\psi^*\). From TDSE: \(\partial_t\psi = (i\hbar/2m)\nabla^2\psi - (i/\hbar)V\psi\) and its conjugate. Substituting:

$$\partial_t|\psi|^2 = \frac{i\hbar}{2m}(\psi^*\nabla^2\psi - \psi\nabla^2\psi^*) = \frac{i\hbar}{2m}\nabla\cdot(\psi^*\nabla\psi - \psi\nabla\psi^*)$$

Identifying \(\mathbf{J} = \frac{\hbar}{2mi}(\psi^*\nabla\psi - \psi\nabla\psi^*)\) gives \(\partial_t\rho + \nabla\cdot\mathbf{J} = 0\). ✓

VII. Stationary States & the TISE

For a time-independent Hamiltonian, separate \(\Psi(x,t) = \psi(x)\cdot T(t)\):

$$i\hbar\frac{T'}{T} = \frac{1}{\psi}\left(-\frac{\hbar^2}{2m}\psi''+V\psi\right) = E = \text{const}$$
Time-Independent Schrödinger Equation (TISE) $$\boxed{\op{H}\psi = E\psi,\quad -\frac{\hbar^2}{2m}\frac{d^2\psi}{dx^2} + V(x)\psi = E\psi}$$

Time dependence: \(\quad\Psi_n(x,t) = \psi_n(x)\,e^{-iE_n t/\hbar}\)

Properties of Stationary States

VIII. Operators, Eigenvalues & Expectation Values

Key Operators in Quantum Mechanics

ObservableOperator (position space)Eigenvalue equation
Position \(x\)\(\op{x} = x\cdot\)\(x\,\delta(x-x_0) = x_0\,\delta(x-x_0)\)
Momentum \(p\)\(\op{p} = -i\hbar\partial_x\)\(-i\hbar\partial_x\,e^{ipx/\hbar} = p\,e^{ipx/\hbar}\)
Kinetic energy\(\op{T} = -\hbar^2\nabla^2/2m\)Plane waves \(e^{i\mathbf{k}\cdot\mathbf{r}}\)
Hamiltonian\(\op{H} = \op{T}+V(\op{x})\)\(\op{H}\psi_n = E_n\psi_n\)
Angular momentum \(L_z\)\(-i\hbar\partial_\phi\)\(e^{im\phi}\), \(m\in\mathbb{Z}\)
Parity\(\op{\Pi}:\psi(x)\to\psi(-x)\)\(\pm 1\)

Variance & Standard Deviation

$$\sigma_A^2 = \ev{(\op{A}-\ev{\op{A}})^2} = \ev{\op{A}^2} - \ev{\op{A}}^2$$

IX. Commutators & Compatible Observables

Commutator $$\comm{\op{A}}{\op{B}} = \op{A}\op{B} - \op{B}\op{A}$$

If \(\comm{\op{A}}{\op{B}} = 0\): compatible — both can be simultaneously measured with definite values; they share a common eigenbasis.

If \(\comm{\op{A}}{\op{B}} \ne 0\): incompatible — cannot both have definite values (uncertainty principle).

Fundamental Commutation Relations

$$\comm{\op{x}}{\op{p}} = i\hbar,\qquad\comm{\op{x}^n}{\op{p}} = i\hbar n\op{x}^{n-1},\qquad\comm{\op{x}}{f(\op{p})} = i\hbar f'(\op{p})$$ $$\comm{\op{L}_x}{\op{L}_y} = i\hbar\op{L}_z,\quad\comm{\op{L}_y}{\op{L}_z} = i\hbar\op{L}_x,\quad\comm{\op{L}_z}{\op{L}_x} = i\hbar\op{L}_y$$ $$\comm{\op{L}^2}{\op{L}_i} = 0\text{ for all }i \quad\Rightarrow\quad L^2\text{ and }L_z\text{ simultaneously measurable}$$
Proof: [x̂, p̂] = iℏ

Acting on test function \(\phi(x)\):

$$(\op{x}\op{p} - \op{p}\op{x})\phi = x\left(-i\hbar\frac{d\phi}{dx}\right) - \left(-i\hbar\frac{d}{dx}\right)(x\phi)$$ $$= -i\hbar x\phi' + i\hbar(\phi + x\phi') = i\hbar\phi$$

Since this holds for all \(\phi\): \(\comm{\op{x}}{\op{p}} = i\hbar\op{I}\).

X. Free Particle & Wave Packets

With \(V=0\), the TISE gives plane wave solutions \(\psi_k(x)=Ae^{ikx}\) with \(E=\hbar^2k^2/(2m)\). These are not normalizable alone — the physical states are wave packets:

$$\Psi(x,t) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty \phi(k)\,e^{i(kx-\omega(k)t)}\,dk,\qquad \omega(k) = \frac{\hbar k^2}{2m}$$

Gaussian Wave Packet

At \(t=0\), centered at \(x_0\) with mean momentum \(p_0 = \hbar k_0\) and width \(\sigma\):

$$\psi(x,0) = \left(\frac{1}{2\pi\sigma^2}\right)^{1/4}\exp\!\left(-\frac{(x-x_0)^2}{4\sigma^2}\right)\exp(ik_0 x)$$

At time \(t\), the packet spreads:

$$|\Psi(x,t)|^2 = \frac{1}{\sqrt{2\pi}\,w(t)}\exp\!\left(-\frac{(x-x_0-v_g t)^2}{2w(t)^2}\right)$$ $$w(t) = \sigma\sqrt{1+\left(\frac{\hbar t}{2m\sigma^2}\right)^2},\qquad v_g = \frac{\hbar k_0}{m} = \frac{p_0}{m}$$
Group velocity vs Phase velocity: The packet travels at the group velocity \(v_g = d\omega/dk = p_0/m\) (classical speed). The crests travel at phase velocity \(v_p = \omega/k = \hbar k_0/(2m) = v_g/2\). The packet spreads due to dispersion — particles with different momenta travel at different speeds.

XI. The Infinite Square Well (Particle in a Box)

\(V(x) = 0\) for \(0\le x\le L\), \(V=\infty\) outside. Boundary conditions: \(\psi(0)=\psi(L)=0\).

Full Solution with Normalization

Inside the well: TISE gives \(\psi'' = -k^2\psi\) with \(k=\sqrt{2mE}/\hbar\). General solution: \(\psi = A\sin(kx)+B\cos(kx)\).

BC at \(x=0\): \(\psi(0)=0 \Rightarrow B=0\).

BC at \(x=L\): \(\psi(L)=A\sin(kL)=0 \Rightarrow kL = n\pi\), \(n=1,2,3,\ldots\)

Energy quantization:

$$E_n = \frac{\hbar^2\pi^2 n^2}{2mL^2} = \frac{n^2\pi^2\hbar^2}{2mL^2},\quad n=1,2,3,\ldots$$

Normalization: \(\int_0^L A^2\sin^2(n\pi x/L)\,dx = A^2 L/2 = 1 \Rightarrow A = \sqrt{2/L}\).

$$\boxed{\psi_n(x) = \sqrt{\frac{2}{L}}\sin\!\left(\frac{n\pi x}{L}\right),\quad E_n = \frac{n^2\pi^2\hbar^2}{2mL^2}}$$

Properties

Expectation Values in State \(\psi_n\)

$$\ev{\op{x}} = \frac{L}{2},\quad \ev{\op{p}} = 0,\quad \ev{\op{x}^2} = \frac{L^2}{3}\left(1-\frac{3}{2n^2\pi^2}\right),\quad \ev{\op{p}^2} = \frac{n^2\pi^2\hbar^2}{L^2}$$ $$\sigma_x\sigma_p = \frac{n\pi\hbar}{\sqrt{3}}\sqrt{\frac{1}{3}-\frac{1}{2n^2\pi^2}} \ge \frac{\hbar}{2}\quad\checkmark$$

XII. The Finite Square Well

\(V(x) = -V_0\) for \(|x|\le a\), \(V=0\) outside. Bound states (\(-V_0 < E < 0\)) have exponential decay into classically forbidden regions.

Transcendental Equations for Bound States

Let \(\kappa = \sqrt{-2mE}/\hbar\), \(l = \sqrt{2m(E+V_0)}/\hbar\). Matching conditions give:

$$\text{Even: }\kappa = l\tan(la),\qquad \text{Odd: }\kappa = -l\cot(la)$$

These are solved graphically or numerically. There is always at least one bound state for any \(V_0 > 0\), but only finitely many. Wide/deep wells → many states approaching the infinite-well limit.

Tunneling (Evanescent Waves)

In the classically forbidden region \(E < V\), the wavefunction doesn't vanish but decays exponentially:

$$\psi \propto e^{-\kappa x},\quad \kappa = \frac{\sqrt{2m(V-E)}}{\hbar}$$

This quantum tunneling is responsible for alpha decay, scanning tunneling microscopy (STM), and tunnel diodes.

XIII. The Quantum Harmonic Oscillator

The most important exactly solvable system: \(V = \frac{1}{2}m\omega^2 x^2\), \(\op{H} = \frac{\op{p}^2}{2m} + \frac{1}{2}m\omega^2\op{x}^2\).

Ladder Operator Method

Derivation via Creation/Annihilation Operators

Define dimensionless operators:

$$\op{a} = \sqrt{\frac{m\omega}{2\hbar}}\left(\op{x}+\frac{i\op{p}}{m\omega}\right),\quad \op{a}^\dagger = \sqrt{\frac{m\omega}{2\hbar}}\left(\op{x}-\frac{i\op{p}}{m\omega}\right)$$

Step 1 — Commutator:

$$\comm{\op{a}}{\op{a}^\dagger} = \frac{m\omega}{2\hbar}\left[\op{x}+\frac{i\op{p}}{m\omega},\,\op{x}-\frac{i\op{p}}{m\omega}\right] = \frac{m\omega}{2\hbar}\left(-\frac{2i}{m\omega}\comm{\op{x}}{\op{p}}\right) = \frac{m\omega}{2\hbar}\cdot\frac{2\hbar}{m\omega} = 1$$

Step 2 — Rewrite Hamiltonian:

$$\op{a}^\dagger\op{a} = \frac{m\omega}{2\hbar}\left(\op{x}^2+\frac{\op{p}^2}{m^2\omega^2}+\frac{i}{m\omega}\comm{\op{x}}{\op{p}}\right) = \frac{\op{H}}{\hbar\omega}-\frac{1}{2}$$ $$\boxed{\op{H} = \hbar\omega\left(\op{a}^\dagger\op{a}+\half\right) = \hbar\omega\left(\op{N}+\half\right),\quad \op{N} = \op{a}^\dagger\op{a}}$$

Step 3 — Ladder structure: From \(\comm{\op{N}}{\op{a}^\dagger} = \op{a}^\dagger\) and \(\comm{\op{N}}{\op{a}} = -\op{a}\):

$$\op{N}\op{a}^\dagger\ket{n} = (n+1)\op{a}^\dagger\ket{n},\quad \op{N}\op{a}\ket{n} = (n-1)\op{a}\ket{n}$$

So \(\op{a}^\dagger\ket{n} \propto\ket{n+1}\) (raises energy) and \(\op{a}\ket{n} \propto\ket{n-1}\) (lowers energy).

Step 4 — Ground state: Since \(n\ge 0\) (energy \(\ge 0\)), there must exist \(\ket{0}\) with \(\op{a}\ket{0}=0\). Normalized:

$$\op{a}^\dagger\ket{n} = \sqrt{n+1}\ket{n+1},\quad\op{a}\ket{n} = \sqrt{n}\ket{n-1}$$ $$\boxed{E_n = \hbar\omega\left(n+\half\right),\quad n=0,1,2,3,\ldots}$$

Wavefunctions

Ground state from \(\op{a}\psi_0 = 0\): \(\psi_0(x) = \left(\frac{m\omega}{\pi\hbar}\right)^{1/4}e^{-m\omega x^2/(2\hbar)}\)

Excited states via \(\psi_n = (a^\dagger)^n\psi_0/\sqrt{n!}\):

$$\psi_n(x) = \frac{1}{\sqrt{2^n n!}}\left(\frac{m\omega}{\pi\hbar}\right)^{1/4}H_n\!\left(\sqrt{\frac{m\omega}{\hbar}}\,x\right)e^{-m\omega x^2/(2\hbar)}$$

where \(H_n\) are Hermite polynomials: \(H_0=1,\;H_1=2\xi,\;H_2=4\xi^2-2,\;H_3=8\xi^3-12\xi,\ldots\)

Zero-Point Energy and Uncertainty

Ground state: \(E_0 = \hbar\omega/2 > 0\). This is required by the uncertainty principle — a particle cannot be at rest at the potential minimum.

$$\sigma_x = \sqrt{\frac{\hbar}{2m\omega}},\quad\sigma_p = \sqrt{\frac{m\omega\hbar}{2}},\quad\sigma_x\sigma_p = \frac{\hbar}{2}\quad\text{(minimum uncertainty!)}$$

XIV. Delta Function Potential

\(V(x) = -\alpha\delta(x)\), \(\alpha > 0\). Only one bound state:

$$\psi(x) = \frac{\sqrt{m\alpha}}{\hbar}\,e^{-m\alpha|x|/\hbar^2},\qquad E = -\frac{m\alpha^2}{2\hbar^2}$$

Matching conditions at \(x=0\): \(\psi\) is continuous; \(\psi'\) has a finite jump \(\Delta\psi' = -2m\alpha\psi(0)/\hbar^2\) (from integrating TISE across \(x=0\)).

Scattering off a Delta Barrier (\(\alpha < 0\))

$$T = \frac{1}{1 + m\alpha^2/(2\hbar^2 E)},\qquad R = \frac{m\alpha^2/(2\hbar^2 E)}{1+m\alpha^2/(2\hbar^2 E)},\quad R+T=1$$

XV. The Hydrogen Atom

Central potential \(V(r) = -e^2/(4\pi\varepsilon_0 r)\). In 3D with spherical symmetry, separate \(\psi(r,\theta,\phi) = R_{nl}(r)\,Y_l^m(\theta,\phi)\).

Spherical Harmonics

Angular eigenstates of \(\op{L}^2\) and \(\op{L}_z\):

$$\op{L}^2 Y_l^m = \hbar^2 l(l+1)Y_l^m,\qquad\op{L}_z Y_l^m = \hbar m Y_l^m$$ $$Y_0^0 = \frac{1}{\sqrt{4\pi}},\quad Y_1^0 = \sqrt{\frac{3}{4\pi}}\cos\theta,\quad Y_1^{\pm1} = \mp\sqrt{\frac{3}{8\pi}}\sin\theta\,e^{\pm i\phi}$$

Energy Levels & Quantum Numbers

Hydrogen Energy Eigenvalues $$\boxed{E_n = -\frac{m_e e^4}{2(4\pi\varepsilon_0)^2\hbar^2}\frac{1}{n^2} = -\frac{13.6\text{ eV}}{n^2},\quad n=1,2,3,\ldots}$$

The quantum numbers and their ranges:

SymbolNameRangePhysical meaning
\(n\)Principal\(1,2,3,\ldots\)Energy: \(E_n \propto -1/n^2\)
\(l\)Orbital\(0,1,\ldots,n-1\)Orbital angular momentum \(\sqrt{l(l+1)}\hbar\)
\(m\)Magnetic\(-l,\ldots,+l\)z-component \(L_z = m\hbar\)
\(m_s\)Spin\(\pm\frac{1}{2}\)Spin z-component \(S_z = m_s\hbar\)

Radial Wavefunctions

$$R_{nl}(r) = -\sqrt{\left(\frac{2}{na_0}\right)^3\frac{(n-l-1)!}{2n[(n+l)!]^3}}\,e^{-r/(na_0)}\left(\frac{2r}{na_0}\right)^l L_{n-l-1}^{2l+1}\!\left(\frac{2r}{na_0}\right)$$

where \(a_0 = 4\pi\varepsilon_0\hbar^2/(m_e e^2) \approx 0.529\,\)Å is the Bohr radius, and \(L\) are associated Laguerre polynomials. First few:

$$R_{10} = \frac{2}{a_0^{3/2}}e^{-r/a_0},\quad R_{20} = \frac{1}{\sqrt{2}a_0^{3/2}}\left(1-\frac{r}{2a_0}\right)e^{-r/(2a_0)},\quad R_{21} = \frac{r}{2\sqrt{6}a_0^{5/2}}e^{-r/(2a_0)}$$

Degeneracy

Each energy \(E_n\) has degeneracy \(n^2\) (counting \(l\) from \(0\) to \(n-1\), and \(m\) from \(-l\) to \(l\)). With spin: \(2n^2\) states per shell.

XVI. The Uncertainty Principle — Robertson Theorem

Robertson–Schrödinger Uncertainty Relation $$\boxed{\sigma_A\sigma_B \ge \frac{1}{2}\left|\ev{\comm{\op{A}}{\op{B}}}\right|}$$

For position and momentum: \(\sigma_x\sigma_p \ge \hbar/2\).

Proof via Cauchy-Schwarz Inequality

Define \(\ket{f} = (\op{A}-\ev{A})\ket{\psi}\) and \(\ket{g} = (\op{B}-\ev{B})\ket{\psi}\). Then \(\sigma_A^2 = \braket{f}{f}\) and \(\sigma_B^2 = \braket{g}{g}\).

By the Cauchy-Schwarz inequality: \(\braket{f}{f}\braket{g}{g} \ge |\braket{f}{g}|^2\).

Write \(\braket{f}{g} = \tfrac{1}{2}\braket{f|g+g|f} + \tfrac{1}{2}\braket{f|g-g|f}\). The first term is real (call it \(X\)); the second is \(\tfrac{1}{2}\braket{\psi|\comm{\op{A}}{\op{B}}|\psi} = \tfrac{i}{2}\ev{[\op{A},\op{B}]}\) (imaginary).

Therefore: \(|\braket{f}{g}|^2 = X^2 + \tfrac{1}{4}|\ev{\comm{\op{A}}{\op{B}}}|^2 \ge \tfrac{1}{4}|\ev{\comm{\op{A}}{\op{B}}}|^2\).

Taking square roots: \(\sigma_A\sigma_B \ge \tfrac{1}{2}|\ev{\comm{\op{A}}{\op{B}}}|\).

Energy-time uncertainty: \(\Delta E\,\Delta t \ge \hbar/2\). Note: time is not an operator in QM — \(\Delta t\) is the characteristic time for the state to change appreciably. This governs the natural linewidth of spectral lines and virtual particle lifetimes in QFT.

Minimum Uncertainty States

The inequality is saturated (\(\sigma_x\sigma_p = \hbar/2\)) if and only if \(\ket{g} = i\lambda\ket{f}\) (proportional) and \(X=0\). For position-momentum, this gives exactly the Gaussian wave packet — coherent states of the harmonic oscillator.

XVII. Ehrenfest's Theorem & Classical Limit

Ehrenfest's Theorem (1927) $$\frac{d\ev{\op{A}}}{dt} = \frac{i}{\hbar}\ev{\comm{\op{H}}{\op{A}}} + \left\langle\frac{\partial\op{A}}{\partial t}\right\rangle$$
Proof $$\frac{d\ev{\op{A}}}{dt} = \frac{d}{dt}\braket{\psi|\op{A}|\psi} = \braket{\dot\psi|\op{A}|\psi}+\braket{\psi|\dot{\op{A}}|\psi}+\braket{\psi|\op{A}|\dot\psi}$$

Using \(\partial_t\ket\psi = -\frac{i}{\hbar}\op{H}\ket\psi\) and its conjugate:

$$= \frac{i}{\hbar}\braket{\psi|\op{H}\op{A}-\op{A}\op{H}|\psi}+\left\langle\pd{\op{A}}{t}\right\rangle = \frac{i}{\hbar}\ev{\comm{\op{H}}{\op{A}}}+\left\langle\pd{\op{A}}{t}\right\rangle$$

Newton's Laws Recovered

Apply to position and momentum (no explicit time dependence):

$$\frac{d\ev{x}}{dt} = \frac{i}{\hbar}\ev{\comm{\op{H}}{\op{x}}} = \frac{\ev{\op{p}}}{m}\quad\checkmark$$ $$\frac{d\ev{p}}{dt} = \frac{i}{\hbar}\ev{\comm{\op{H}}{\op{p}}} = -\left\langle\frac{dV}{dx}\right\rangle \approx -\frac{dV}{dx}\bigg|_{x=\ev{x}}$$

The last approximation (valid for slowly varying \(V\)) gives \(m\ddot{\ev{x}} = -dV/dx\) — exactly Newton's second law for the mean position. Quantum mechanics reproduces classical mechanics in the appropriate limit.

XVIII. Angular Momentum

The angular momentum operator \(\op{\mathbf{L}} = \op{\mathbf{r}}\times\op{\mathbf{p}}\) with components satisfying \(\comm{L_i}{L_j} = i\hbar\varepsilon_{ijk}L_k\).

Raising/Lowering Operators

$$\op{L}_\pm = \op{L}_x \pm i\op{L}_y,\qquad\comm{\op{L}_z}{\op{L}_\pm} = \pm\hbar\op{L}_\pm,\qquad\comm{\op{L}^2}{\op{L}_\pm}=0$$ $$\op{L}_+\ket{l,m} = \hbar\sqrt{l(l+1)-m(m+1)}\ket{l,m+1}$$ $$\op{L}_-\ket{l,m} = \hbar\sqrt{l(l+1)-m(m-1)}\ket{l,m-1}$$

Eigenvalue Quantization — Proof

Proof that l ∈ {0, 1/2, 1, 3/2, ...} and |m| ≤ l

Since \(\op{L}^2 - \op{L}_z^2 = \op{L}_x^2+\op{L}_y^2 \ge 0\), we have \(\hbar^2[l(l+1)-m^2]\ge 0\), so \(|m|\le\sqrt{l(l+1)}\). The ladder \(\op{L}_+^k\ket{l,m}\) must terminate at some \(m_\text{max}\), giving \(\op{L}_+\ket{l,m_\text{max}}=0 \Rightarrow m_\text{max} = l\). Similarly \(m_\text{min}=-l\). The number of steps \(2l\) must be a non-negative integer, so \(l\in\{0,\tfrac{1}{2},1,\tfrac{3}{2},\ldots\}\).

XIX. Spin & Pauli Matrices

Spin is an intrinsic quantum property with no classical analog. For spin-\(\tfrac{1}{2}\) particles (electrons, quarks, protons):

$$\op{S}_i = \frac{\hbar}{2}\sigma_i,\qquad \sigma_x = \begin{pmatrix}0&1\\1&0\end{pmatrix},\quad\sigma_y=\begin{pmatrix}0&-i\\i&0\end{pmatrix},\quad\sigma_z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}$$

Properties of Pauli Matrices

$$\sigma_i\sigma_j = \delta_{ij}I + i\varepsilon_{ijk}\sigma_k,\qquad\sigma_i^2 = I,\qquad\mathrm{Tr}(\sigma_i)=0,\qquad\det(\sigma_i)=-1$$ $$\{\sigma_i,\sigma_j\} = 2\delta_{ij}I\quad\text{(anticommutator)},\qquad [\sigma_i,\sigma_j] = 2i\varepsilon_{ijk}\sigma_k$$

Spinors and Spin States

$$\ket{+z} = \chi_+ = \begin{pmatrix}1\\0\end{pmatrix},\quad\ket{-z} = \chi_- = \begin{pmatrix}0\\1\end{pmatrix}$$ $$\ket{+x} = \frac{1}{\sqrt{2}}\begin{pmatrix}1\\1\end{pmatrix},\quad\ket{+y}=\frac{1}{\sqrt{2}}\begin{pmatrix}1\\i\end{pmatrix}$$

Spin Precession in Magnetic Field

Hamiltonian: \(\op{H} = -\boldsymbol{\mu}\cdot\mathbf{B} = \frac{g_s e}{2m_e}\op{\mathbf{S}}\cdot\mathbf{B}\). For \(\mathbf{B}=B\hat{z}\): spin precesses at Larmor frequency \(\omega_L = g_s eB/(2m_e)\).

XX. Identical Particles & Quantum Statistics

Exchange Symmetry $$\psi(1,2) = \begin{cases}+\psi(2,1) & \text{Bosons (integer spin)} \\ -\psi(2,1) & \text{Fermions (half-integer spin)}\end{cases}$$

Pauli Exclusion Principle

For fermions, the antisymmetric wavefunction must be written as a Slater determinant:

$$\psi(1,\ldots,N) = \frac{1}{\sqrt{N!}}\begin{vmatrix}\psi_a(1)&\psi_a(2)&\cdots\\\psi_b(1)&\psi_b(2)&\cdots\\\vdots&&\ddots\end{vmatrix}$$

If any two fermions are in the same state (\(\psi_a=\psi_b\)), two rows are identical → determinant vanishes → forbidden. This is the Pauli exclusion principle, responsible for the periodic table, white dwarf stability, and neutron stars.

Exchange Interaction and Fermi Pressure

Even without any interaction potential, identical fermions experience an effective repulsion (exchange energy) due to antisymmetrization. Bosons experience effective attraction (Bose-Einstein condensation).

XXI. Entanglement & Bell's Theorem

Entangled States

A two-particle state is entangled if it cannot be written as a product \(\ket{\psi_1}\otimes\ket{\psi_2}\). The canonical example is the Bell state (EPR pair):

$$\ket{\Phi^+} = \frac{1}{\sqrt{2}}\left(\ket{\uparrow\uparrow}+\ket{\downarrow\downarrow}\right)$$

Measuring particle 1 in state \(\ket{\uparrow}\) instantaneously collapses particle 2 to \(\ket{\uparrow}\), regardless of separation. This is not a signal — the outcome is random and cannot be used for faster-than-light communication (no-communication theorem).

Bell's Theorem (1964)

Any local hidden variable (LHV) theory must satisfy Bell inequalities. For the CHSH form, with measurement settings \(a,a',b,b'\):

$$|\ev{AB}+\ev{AB'}+\ev{A'B}-\ev{A'B'}| \le 2\quad\text{(classical, LHV)}$$

Quantum mechanics predicts (and experiments confirm): maximum value \(2\sqrt{2} \approx 2.83\). This is a violation by \(\sqrt{2}\) — quantum correlations are stronger than any local hidden variable theory can produce. Experiments by Aspect (1982), Zeilinger (2015), and others definitively ruled out LHV theories.

XXII. Perturbation Theory

Solve \(\op{H} = \op{H}^{(0)} + \lambda\op{H}'\) when \(\op{H}^{(0)}\) is exactly solvable and \(\op{H}'\) is small.

First-Order Non-Degenerate Perturbation Theory

First-Order Energy Correction $$E_n^{(1)} = \braket{n^{(0)}|\op{H}'|n^{(0)}}$$ $$\ket{n^{(1)}} = \sum_{m\ne n}\frac{\braket{m^{(0)}|\op{H}'|n^{(0)}}}{E_n^{(0)}-E_m^{(0)}}\ket{m^{(0)}}$$

Second-Order Energy Correction

$$E_n^{(2)} = \sum_{m\ne n}\frac{|\braket{m^{(0)}|\op{H}'|n^{(0)}}|^2}{E_n^{(0)}-E_m^{(0)}}$$

Note: \(E_n^{(2)} < 0\) for the ground state (the denominator is always negative) — perturbations always lower the ground state energy at second order.

Time-Dependent Perturbation Theory & Fermi's Golden Rule

For a periodic perturbation \(\op{H}'=V\cos(\omega t)\), the transition rate from state \(\ket{i}\) to \(\ket{f}\) is:

$$\Gamma_{i\to f} = \frac{2\pi}{\hbar}|\braket{f|V|i}|^2\,\rho(E_f)\quad\text{(Fermi's Golden Rule)}$$

where \(\rho(E_f)\) is the density of final states. This governs spontaneous emission, radioactive decay, and scattering cross-sections.

XXIII. WKB (Semiclassical) Approximation

Valid when the de Broglie wavelength \(\lambda = 2\pi\hbar/p(x)\) varies slowly. Expand \(\psi = e^{iS(x)/\hbar}\):

$$\psi(x) \approx \frac{C}{\sqrt{p(x)}}\exp\!\left(\pm\frac{i}{\hbar}\int p(x)\,dx\right),\quad p(x) = \sqrt{2m(E-V(x))}$$

WKB Quantization (Bohr-Sommerfeld)

$$\oint p(x)\,dx = 2\pi\hbar\left(n+\frac{1}{2}\right),\quad n=0,1,2,\ldots$$

Tunneling Amplitude

Through a barrier from \(x_1\) to \(x_2\) where \(E < V(x)\):

$$T \approx \exp\!\left(-\frac{2}{\hbar}\int_{x_1}^{x_2}\sqrt{2m(V(x)-E)}\,dx\right)$$

Applied to alpha decay (Gamow): \(\Gamma \propto e^{-2G}\), where \(G\) is the Gamow factor. Explains the enormous range of alpha-decay half-lives (femtoseconds to billion years).

XXIV. The Variational Method

Variational Theorem

For any normalized trial state \(\ket{\psi_\text{trial}}\):

$$E_\text{gs} \le \ev{\op{H}}_\text{trial} = \braket{\psi_\text{trial}|\op{H}|\psi_\text{trial}}$$

Equality holds iff \(\ket{\psi_\text{trial}}\) is the exact ground state.

Proof

Expand in energy eigenbasis: \(\ket{\psi_\text{trial}} = \sum_n c_n\ket{n}\). Then:

$$\ev{H}_\text{trial} = \sum_n |c_n|^2 E_n \ge E_\text{gs}\sum_n|c_n|^2 = E_\text{gs}$$

Strategy: choose a trial wavefunction with adjustable parameter(s) \(\alpha\), minimize \(\ev{H}(\alpha)\) over \(\alpha\). Used in: helium ground state, molecular bonding, density functional theory (DFT).

XXV. Feynman Path Integrals

Feynman (1948) reformulated QM: the propagator \(K(x_f,t_f;x_i,t_i)\) is a sum over all possible paths:

$$K(x_f,x_i;T) = \int\mathcal{D}[x(t)]\,\exp\!\left(\frac{i}{\hbar}\int_0^T L(x,\dot x)\,dt\right)$$

where \(L = T - V\) is the classical Lagrangian. Each path contributes with amplitude \(e^{iS/\hbar}\) where \(S\) is the classical action.

Classical Limit

As \(\hbar\to 0\), the phase \(e^{iS/\hbar}\) oscillates wildly for all paths except near the stationary point \(\delta S = 0\) — the classical path (stationary phase approximation). This recovers the principle of least action.

Connection to Statistical Mechanics

Under Wick rotation \(t\to -i\tau\) (imaginary time), the path integral becomes the partition function \(Z = \int\mathcal{D}[x]\,e^{-S_E/\hbar}\), connecting quantum mechanics to classical statistical mechanics at temperature \(T = \hbar/k_B\tau\).

XXVI. Toward Quantum Field Theory

QM breaks down at relativistic energies and for particle creation/annihilation. Quantum Field Theory (QFT) promotes fields to operators:

Second Quantization

$$\op{\psi}(\mathbf{r}) = \sum_k \op{a}_k u_k(\mathbf{r}),\qquad\comm{\op{a}_k}{\op{a}_{k'}^\dagger} = \delta_{kk'}\text{ (bosons)},\quad\acomm{\op{a}_k}{\op{a}_{k'}^\dagger}=\delta_{kk'}\text{ (fermions)}$$

Particle number is no longer fixed. The Fock space vacuum \(\ket{0}\) has zero particles; states \(\ket{n_1,n_2,\ldots}\) specify occupation numbers.

Standard Model Interactions

ForceGauge bosonCouplingQFT
ElectromagneticPhoton \(\gamma\)\(\alpha \approx 1/137\)QED (Feynman, Schwinger, Tomonaga 1948)
Weak\(W^\pm, Z^0\)\(\alpha_W \approx 0.03\)Electroweak (Glashow, Weinberg, Salam 1968)
StrongGluons \(g\)\(\alpha_s \approx 0.1\)QCD (Gross, Politzer, Wilczek 1973)

XXVII. GNU Octave Examples

1 — Numerical Eigenvalues via Finite Difference (TISE Solver)

TISE Solver — Finite Difference Matrix MethodGNU Octave
%% Numerically solve the Time-Independent Schrödinger Equation
%% -ℏ²/(2m) ψ'' + V(x)ψ = Eψ  using finite difference discretization
%% Works for ANY potential V(x) — infinite well, harmonic, double well, etc.

clear; clc;

%% ─── Physical parameters (atomic units: ℏ=m=1) ──────────────
hbar = 1; m = 1;
L = 10;          % domain [-L/2, L/2]
N = 500;          % grid points
x = linspace(-L/2, L/2, N);
dx = x(2)-x(1);

%% ─── Define potential (change this for different systems) ─────
potential = 'harmonic';   % 'infinite_well', 'harmonic', 'double_well', 'morse'

switch potential
  case 'infinite_well'
    omega = 1;
    V = zeros(1,N);  % V=0 inside (walls enforced via Dirichlet BC)
    E_analytic = (1:8).^2 * pi^2*hbar^2/(2*m*L^2);

  case 'harmonic'
    omega = 1;
    V = 0.5 * m * omega^2 * x.^2;
    E_analytic = hbar*omega*(((0:7))+0.5);  % (n+½)ℏω

  case 'double_well'
    a = 1.5; b = 0.5;
    V = a * x.^4 - b * x.^2;  % Mexican hat
    V = V - min(V);
    E_analytic = [];

  case 'morse'
    De = 4; a_m = 0.8; x0 = 0;
    V = De * (1 - exp(-a_m*(x-x0))).^2;
    E_analytic = [];
end

%% ─── Build tridiagonal Hamiltonian matrix ────────────────────
%% Kinetic: -ℏ²/(2m) * (ψ_{i+1}-2ψ_i+ψ_{i-1})/dx²
diag_main  = hbar^2/(m*dx^2) * ones(1,N) + V;
diag_off   = -hbar^2/(2*m*dx^2) * ones(1,N-1);
H = diag(diag_main) + diag(diag_off,1) + diag(diag_off,-1);

%% ─── Solve eigenvalue problem ────────────────────────────────
[vecs, vals] = eig(H);
E = diag(vals);
[E, idx] = sort(E);
vecs = vecs(:,idx);

%% Normalise eigenvectors: ∫|ψ|²dx = 1
for k = 1:8
  vecs(:,k) = vecs(:,k) / sqrt(trapz(x, vecs(:,k).^2));
end

%% ─── Print energy levels ─────────────────────────────────────
printf('%-6s %-14s', 'n', 'E_numeric');
if ~isempty(E_analytic), printf('%-14s %-12s','E_analytic','Error'); end
printf('\n%s\n', repmat('-',1,46));
for k = 1:8
  printf('%-6d %-14.6f', k, E(k));
  if ~isempty(E_analytic)
    printf('%-14.6f %-12.2e', E_analytic(k), abs(E(k)-E_analytic(k)));
  end
  printf('\n');
end

%% ─── Plot wavefunctions and probability densities ────────────
figure(1); clf;
colors = jet(8);
subplot(1,2,1); hold on; grid on;
title(sprintf('Wavefunctions ψ_n(x) — %s', potential));
xlabel('x (a.u.)'); ylabel('ψ_n(x) + E_n (offset)');
% Plot V(x)
plot(x, V, 'k-', 'LineWidth', 2);
for k = 1:5
  psi_plot = vecs(:,k)' / 2;  % scale for display
  plot(x, psi_plot + E(k), 'Color', colors(k,:), 'LineWidth', 1.5);
  plot(x([1 end]), [E(k) E(k)], 'Color', colors(k,:), 'LineStyle', '--');
end

subplot(1,2,2); hold on; grid on;
title('Probability Densities |ψ_n(x)|²');
xlabel('x'); ylabel('|ψ|² + E_n');
plot(x, V, 'k-', 'LineWidth', 2);
for k = 1:5
  rho = vecs(:,k)'.^2 / 3;
  fill([x, fliplr(x)], [rho+E(k), E(k)*ones(1,N)], ...
       colors(k,:), 'FaceAlpha', 0.4, 'EdgeColor', 'none');
end

2 — Wave Packet Time Evolution via FFT

Gaussian Wave Packet — FFT PropagationGNU Octave
%% Time evolution of a Gaussian wave packet using split-operator FFT method
%% Ψ(x,t+dt) ≈ e^{-iVdt/2ℏ} · FFT^{-1}[e^{-iTdt/ℏ} · FFT[e^{-iVdt/2ℏ}Ψ]]
%% Highly accurate: 4th order in dt, exact for each operator separately

clear; clc;
hbar = 1; m = 1;
N = 1024;
L = 60;
x = linspace(-L/2, L/2-L/N, N);
dx = L/N;

%% Momentum grid (FFT-ordered)
dk = 2*pi/L;
k  = [0:N/2-1, -N/2:-1] * dk;

%% Initial Gaussian wave packet: position x0, width sigma, momentum k0
x0 = -10;  sigma = 1.5;  k0 = 2.5;
psi = (2*pi*sigma^2)^(-0.25) * exp(-((x-x0).^2)/(4*sigma^2)) .* exp(1i*k0*x);
psi = psi / sqrt(trapz(x, abs(psi).^2));  % normalize

%% Potential: Gaussian barrier + square well
V_barrier = 3 * exp(-(0.8*x).^2);   % barrier at origin
V = V_barrier;

%% Pre-compute propagators
dt = 0.04;
expV_half = exp(-1i*V/(hbar) * dt/2);         % half-step in V
expT_full = exp(-1i*hbar*k.^2/(2*m) * dt);   % full step in T

%% Animate time evolution
figure(2); clf;
T_final = 20;  nsteps = round(T_final/dt);
snap_times = round(linspace(0, nsteps, 6));
snaps = {}; t = 0;

for step = 0:nsteps
  if ismember(step, snap_times)
    snaps{end+1} = struct('psi', psi, 't', t);
  end
  % Split-operator step
  psi = expV_half .* psi;
  psi = ifft(expT_full .* fft(psi));
  psi = expV_half .* psi;
  t += dt;
end

for ii = 1:length(snaps)
  subplot(2,3,ii);
  rho = abs(snaps{ii}.psi).^2;
  plot(x, rho, 'b-', 'LineWidth', 1.5); hold on;
  plot(x, V_barrier/10, 'r--', 'LineWidth', 1);
  title(sprintf('t = %.1f ℏ/E', snaps{ii}.t));
  xlabel('x'); ylabel('|ψ|²'); grid on;
  ylim([0 0.5]);
end

%% Uncertainty principle verification
rho_x = abs(snaps{1}.psi).^2;
rho_p = abs(fft(snaps{1}.psi)*dx/sqrt(2*pi)).^2;
sigma_x = sqrt(trapz(x, x.^2.*rho_x) - trapz(x, x.*rho_x)^2);
sigma_p = sigma * ... % for Gaussian: σ_p = ℏ/(2σ_x)
printf('σ_x·σ_p = %.4f  (should be ≥ %.4f = ℏ/2)\n', sigma_x*hbar/(2*sigma_x), hbar/2);

3 — Harmonic Oscillator: Matrix Method & Hermite Polynomials

Harmonic Oscillator — Ladder Operators & Hermite PolynomialsGNU Octave
%% Harmonic oscillator: matrix representation of ladder operators
%% Verify E_n = ℏω(n+½) and compute wavefunctions via Hermite polynomials

clear; clc;
hbar = 1; m = 1; omega = 1;
N_trunc = 20;  % Fock space truncation: |0⟩....|N-1⟩

%% ─── Ladder operators in Fock basis ─────────────────────────
% a|n⟩ = sqrt(n)|n-1⟩  →  a_{m,n} = sqrt(n) δ_{m,n-1}
n_arr = 0:N_trunc-1;
a  = diag(sqrt(1:N_trunc-1), 1);   % annihilation
ad = a';                               % creation
N_op = ad*a;                           % number operator

%% Hamiltonian H = ℏω(N + ½)
H = hbar*omega*(N_op + 0.5*eye(N_trunc));

%% Verify: eigenvalues should be (n+½)ℏω
E_matrix = diag(H);
E_exact  = hbar*omega*(((0:N_trunc-1))+0.5);
printf('Max eigenvalue error: %.2e\n', max(abs(E_matrix - E_exact')));

%% Position and momentum operators
xi_scale = sqrt(hbar/(2*m*omega));
x_op = xi_scale * (a + ad);    % x̂ = √(ℏ/2mω)(a+a†)
p_op = 1i*sqrt(m*omega*hbar/2) * (ad - a);  % p̂

%% Verify [x̂,p̂] = iℏ  (check matrix element ⟨0|[x,p]|0⟩ = iℏ)
comm_xp = x_op*p_op - p_op*x_op;
printf('[x,p]_{00}/iℏ = %.6f (should be 1)\n', real(comm_xp(1,1)/(1i*hbar)));

%% ─── Hermite polynomial wavefunctions ───────────────────────
function H_n = hermite(n, xi)
  if     n==0, H_n = ones(1,length(xi));
  elseif n==1, H_n = 2*xi;
  else
    H_prev2 = ones(1,length(xi));
    H_prev1 = 2*xi;
    for k = 2:n
      H_n = 2*xi.*H_prev1 - 2*(k-1)*H_prev2;
      H_prev2 = H_prev1; H_prev1 = H_n;
    end
  end
end

xi_max = 5; xi = linspace(-xi_max, xi_max, 500);
x_phys = xi * sqrt(hbar/(m*omega));  % dimensionful position

figure(3); clf;
subplot(1,2,1); hold on; grid on;
title('Harmonic Oscillator ψ_n(x)');
V_plot = 0.5 * x_phys.^2;
plot(x_phys, V_plot, 'k-', 'LineWidth', 1.5);
c2 = jet(6);
for n = 0:5
  norm_n = 1/sqrt(2^n * factorial(n)) * (m*omega/(pi*hbar))^(0.25);
  psi_n  = norm_n * hermite(n, xi) .* exp(-xi.^2/2);
  E_n    = hbar*omega*(n+0.5);
  plot(x_phys, psi_n*0.6+E_n, 'Color', c2(n+1,:), 'LineWidth', 1.5);
  plot(x_phys([1,end]),[E_n E_n],'Color',c2(n+1,:),'LineStyle','--','LineWidth',0.8);
  text(xi_max*0.8*sqrt(hbar/(m*omega)), E_n+0.15, sprintf('n=%d',n), 'Color', c2(n+1,:));
end
xlabel('x'); ylabel('E_n + ψ_n (scaled)');

%% ─── Time-evolved coherent state ─────────────────────────────
% Coherent state |α⟩ with α=2: minimum-uncertainty state
alpha = 2;
c_n = exp(-abs(alpha)^2/2) * alpha.^(0:N_trunc-1) ./ sqrt(factorial(0:N_trunc-1));
printf('Coherent state norm: %.6f\n', sum(abs(c_n).^2));

t_arr = linspace(0, 2*pi/omega, 6);
subplot(1,2,2); hold on; grid on;
title('Coherent State |α=2⟩ Evolution');
for it = 1:length(t_arr)
  tt = t_arr(it);
  psi_coh = zeros(1,length(xi));
  for n = 0:N_trunc-1
    norm_n = 1/sqrt(2^n*factorial(n)) * (m*omega/(pi*hbar))^(0.25);
    psi_n  = norm_n * hermite(n, xi) .* exp(-xi.^2/2);
    psi_coh += c_n(n+1) * exp(-1i*omega*(n+0.5)*tt) * psi_n;
  end
  rho = abs(psi_coh).^2;
  plot(x_phys, rho + it/2, 'Color', hsv2rgb([(it-1)/6, 0.9, 0.9]), 'LineWidth', 1.4);
end
xlabel('x'); ylabel('|ψ|² + offset');

4 — Hydrogen Atom Radial Wavefunctions

Hydrogen Atom — Radial WF & Probability DensitiesGNU Octave
%% Hydrogen atom radial wavefunctions R_{nl}(r) and probability densities
%% Using associated Laguerre polynomials L^{2l+1}_{n-l-1}(2r/na₀)

clear; clc;
a0 = 1;   % Bohr radius (atomic units)

%% Associated Laguerre polynomial L^k_n(x) via recurrence
function L = assoc_laguerre(n, k, x)
  if     n==0, L = ones(size(x));
  elseif n==1, L = 1 + k - x;
  else
    L0 = ones(size(x)); L1 = 1+k-x;
    for j = 2:n
      L2 = ((2*j-1+k-x).*L1 - (j-1+k)*L0) / j;
      L0 = L1; L1 = L2;
    end
    L = L1;
  end
end

%% Radial wavefunction R_{nl}(r)
function R = radial_wf(n, l, r, a0)
  rho = 2*r/(n*a0);
  norm = -sqrt((2/(n*a0))^3 * factorial(n-l-1) / (2*n*factorial(n+l)^3));
  R = norm .* exp(-rho/2) .* rho.^l .* assoc_laguerre(n-l-1, 2*l+1, rho);
end

%% Plot for n=1,2,3 and all l
r = linspace(0, 30, 1000);
states = {[1,0],[2,0],[2,1],[3,0],[3,1],[3,2]};
labs = {'1s','2s','2p','3s','3p','3d'};

figure(4); clf;
subplot(1,2,1); hold on; grid on;
title('Radial Wavefunctions R_{nl}(r)');
xlabel('r/a₀'); ylabel('R_{nl}(r) a₀^{3/2}');
c3 = lines(6);
for k = 1:length(states)
  n = states{k}(1); l = states{k}(2);
  R = radial_wf(n, l, r, a0);
  plot(r, R, 'Color', c3(k,:), 'LineWidth', 1.6, 'DisplayName', labs{k});
end
legend('Location','northeast'); ylim([-0.8 1.8]);

subplot(1,2,2); hold on; grid on;
title('Radial Probability Density r²|R_{nl}|²');
xlabel('r/a₀'); ylabel('r²|R|²');
for k = 1:length(states)
  n = states{k}(1); l = states{k}(2);
  R = radial_wf(n, l, r, a0);
  P = r.^2 .* R.^2;
  plot(r, P, 'Color', c3(k,:), 'LineWidth', 1.6, 'DisplayName', labs{k});
  %% Verify normalization: ∫₀^∞ r²|R|² dr = 1
  norm_check = trapz(r, P);
  printf('%-4s: ∫r²|R|²dr = %.4f\n', labs{k}, norm_check);
end
legend('Location','northeast');

%% ─── Expectation value ⟨r⟩ = n²a₀(1 + ½(1-l(l+1)/n²)) ────
printf('\nExpectation values ⟨r⟩:\n');
for k = 1:length(states)
  n=states{k}(1); l=states{k}(2);
  R = radial_wf(n, l, r, a0);
  r_mean = trapz(r, r.^3 .* R.^2);
  r_exact= a0/2 * (3*n^2 - l*(l+1));
  printf('%s: ⟨r⟩_num=%.3f  ⟨r⟩_exact=%.3f a₀\n', labs{k}, r_mean, r_exact);
end

5 — First-Order Perturbation Theory: Anharmonic Oscillator

Perturbation Theory — Anharmonic Oscillator H' = λx⁴GNU Octave
%% First and second-order perturbation theory for H = H₀ + λx⁴
%% H₀ = harmonic oscillator; H' = x⁴ (quartic correction)
%% Compare perturbative to numerical (exact matrix diagonalization)

clear; clc;
hbar = 1; m = 1; omega = 1;
N = 30;       % Fock space size
lambda = 0.05; % perturbation strength (small)

%% Build ladder operators
a  = diag(sqrt(1:N-1), 1);
ad = a';
x_scale = sqrt(hbar/(2*m*omega));
x_op = x_scale * (a + ad);

%% H₀ = ℏω(N+½), H' = x⁴
H0 = hbar*omega * (ad*a + 0.5*eye(N));
H1 = x_op^4;   % x̂⁴ matrix
H_full = H0 + lambda * H1;

%% ─── Perturbation theory formulas ───────────────────────────
E0 = hbar*omega * ((0:N-1) + 0.5);   % unperturbed energies

% First order: E_n^(1) = λ⟨n|x⁴|n⟩
E1_pert = lambda * diag(H1)';   % diagonal matrix elements

% Analytical first order: ⟨n|x⁴|n⟩ = (ℏ/2mω)² (6n²+6n+3)
x_scale2 = (hbar/(2*m*omega))^2;
n_arr = 0:N-1;
E1_analytic = lambda * x_scale2 * (6*n_arr.^2 + 6*n_arr + 3);

% Second order: sum over m≠n of |⟨m|H'|n⟩|²/(E_n-E_m)
E2_pert = zeros(1,10);
for n = 1:10
  for mm = 1:N
    if mm ~= n
      E2_pert(n) += lambda^2 * abs(H1(mm,n))^2 / (E0(n)-E0(mm));
    end
  end
end

%% Exact (full matrix diagonalization)
[~, E_exact] = eig(H_full);
E_exact = sort(diag(E_exact));

%% Compare
printf('%-4s %-12s %-12s %-12s %-12s %-10s\n', 'n','E₀','E₀+E₁','E₀+E₁+E₂','E_exact','Error₂');
for n = 1:8
  E_2nd = E0(n)+E1_pert(n)+E2_pert(n);
  printf('%-4d %-12.5f %-12.5f %-12.5f %-12.5f %-10.2e\n', n-1, E0(n), E0(n)+E1_pert(n), E_2nd, E_exact(n), abs(E_2nd-E_exact(n)));
end

%% Plot: perturbative vs exact for varying λ
lambdas = linspace(0, 0.5, 50);
n_show = 0;  % ground state
E_pert_arr = zeros(1,length(lambdas));
E_exact_arr= zeros(1,length(lambdas));
for il = 1:length(lambdas)
  lam = lambdas(il);
  H_l = H0 + lam * H1;
  E_exact_arr(il) = min(eig(H_l));
  E_pert_arr(il)  = E0(1) + lam*E1_analytic(1) + lam^2*E2_pert(1)/lambda^2;
end
figure(5); plot(lambdas, E_exact_arr,'b-',lambdas,E_pert_arr,'r--','LineWidth',2);
legend({'Exact','2nd-order PT'}); grid on;
title('Ground State Energy: Exact vs Perturbation Theory');
xlabel('\lambda'); ylabel('E_0(\lambda)');

6 — Quantum Tunneling via Transfer Matrix

Quantum Tunneling — Transfer Matrix MethodGNU Octave
%% Transfer matrix method for quantum tunneling through arbitrary barriers
%% Exact for piecewise-constant potentials; approximates any smooth barrier

clear; clc;
hbar = 1; m = 1;

%% ─── Transfer matrix for a single slab [x1,x2] with potential V ────
function M = transfer_matrix(E, V, dx, hbar, m)
  if E > V
    k = sqrt(2*m*(E-V))/hbar;
    M = [cos(k*dx), sin(k*dx)/k; -k*sin(k*dx), cos(k*dx)];
  else
    kappa = sqrt(2*m*(V-E))/hbar;
    M = [cosh(kappa*dx), sinh(kappa*dx)/kappa; kappa*sinh(kappa*dx), cosh(kappa*dx)];
  end
end

%% ─── Rectangular barrier: V₀ for |x| < a ────────────────────
V0 = 5;  a = 1;   % barrier height and half-width
N_slabs = 200;
x_bar = linspace(-a, a, N_slabs);
dx = 2*a/N_slabs;
V_slabs = V0 * ones(1, N_slabs);

%% Scan energy E from 0 to 2*V0
E_arr = linspace(0.05, 2*V0, 300);
T_num = zeros(1, length(E_arr));
T_wkb = zeros(1, length(E_arr));

for iE = 1:length(E_arr)
  E = E_arr(iE);
  M_total = eye(2);
  for j = 1:N_slabs
    M_total = transfer_matrix(E, V_slabs(j), dx, hbar, m) * M_total;
  end
  % T = 1/|M(2,2)|² (via M matrix extraction)
  k_out = sqrt(2*m*max(E,0.01))/hbar;
  T_num(iE) = 1/(1 + (abs(M_total(2,1))/k_out)^2);

  % WKB formula (for E < V0)
  if E < V0
    kappa_avg = sqrt(2*m*(V0-E))/hbar;
    T_wkb(iE) = exp(-2*kappa_avg*2*a);
  else
    T_wkb(iE) = NaN;
  end
end

% Analytic result for rectangular barrier (E < V0):
% T = 1/(1 + V₀²sinh²(2κa)/(4E(V₀-E)))
T_analytic = zeros(size(E_arr));
for iE = 1:length(E_arr)
  E = E_arr(iE);
  if E < V0
    kappa = sqrt(2*m*(V0-E))/hbar;
    T_analytic(iE) = (1 + V0^2*sinh(kappa*2*a)^2/(4*E*(V0-E)))^-1;
  else
    k = sqrt(2*m*(E-V0))/hbar; k0 = sqrt(2*m*E)/hbar;
    T_analytic(iE) = (1 + V0^2*sin(k*2*a)^2/(4*E*(E-V0)))^-1;
  end
end

figure(6); semilogy(E_arr, T_num, 'b-', E_arr, T_analytic, 'r--', ...
  E_arr, T_wkb, 'g:', 'LineWidth', 2);
xline(V0, 'k--', 'V₀');
legend({'Transfer Matrix','Analytic','WKB'});
title('Transmission Coefficient vs Energy');
xlabel('E/V₀'); ylabel('T(E)'); grid on;
%% Note resonances at E > V₀ where 2ka = nπ (Ramsauer-Townsend effect)

XXVIII. Interactive Simulations

Simulation I — Infinite Square Well: Energy Levels & Wavefunctions

Adjust \(n\) to see \(\psi_n(x)\), \(|\psi_n|^2\), and energy \(E_n = n^2 E_1\). The energy level diagram shows quantization. Toggle superposition of two states to see beating.

Infinite Square Well — ψ_n(x) & Probability Density
1
2
0
E₁ = ℏ²π²/(2mL²) = 1 (a.u.) | E_n = n²E₁

Simulation II — Gaussian Wave Packet: Spreading & Uncertainty

Watch the wave packet propagate and spread. The width \(w(t) = \sigma\sqrt{1+(ℏt/2mσ²)²}\) grows — a direct consequence of \(\sigma_x\sigma_p \ge ℏ/2\).

Wave Packet — Dispersion & Uncertainty
15
8
2
σ_x·σ_p = ℏ/2 (minimum uncertainty at t=0)

Simulation III — Double-Slit Interference

Young's double slit with a quantum particle. The probability distribution \(|\psi|^2 \propto \cos^2(\pi d\sin\theta/\lambda)\cdot(\sin(\pi a\sin\theta/\lambda)/(\pi a\sin\theta/\lambda))^2\) shows interference × diffraction.

Double-Slit — Quantum Interference Pattern
60
12
25
Interference fringes spaced by λL/d

Simulation IV — Harmonic Oscillator Eigenstates & Coherent States

View eigenstates \(\psi_n\) built from Hermite polynomials, or animate the coherent state — a minimum uncertainty wavepacket that oscillates classically without spreading.

Quantum Harmonic Oscillator — ψ_n and Coherent States
0
1.5
E_n = ℏω(n + ½) | Zero-point energy: E₀ = ℏω/2

Simulation V — Quantum Tunneling Through a Barrier

Shows transmitted and reflected probability amplitudes as a function of energy. The tunneling probability decays exponentially with barrier width and height — the WKB approximation \(T\approx e^{-2\kappa a}\).

Quantum Tunneling — Transmission Coefficient T(E)
8
3
0.60
T = —, R = —, T+R = 1.000