This morning at work I wanted to listen to an audiobook, so I searched online and found this 【“Madness and Civilization” Michel Foucault【Audiobook | Synchronized Text】】 I think what he’s done is very appropriate. For sociology- and philosophy-related books, just reading often feels dull and leads to giving up; just listening often means forgetting the context, zoning out, and not knowing what’s being said. These kinds of books are best suited for audiobooks with synchronized text. So I started thinking: how did he make an audiobook like this? What AI tools did he use? How did he align the text and audio precisely? I dug through r/localllama for quite a while. Open-source solutions are usually very complicated: first convert the ebook into audio and timestamped subtitles, then synchronize the subtitles with the audio to produce a video. ...
Spin
TODO
Atomic Orbits And Harmonic Ocillators
To solve for the state of a particle in a system with a central potential, such as an electron in an atom, we describe its state using a wavefunction \( \psi(r, \theta, \phi) \) in spherical coordinates. A key mathematical technique here is the separation of variables. This method is applicable because the system’s potential energy is spherically symmetric, meaning it only depends on the distance \(r\) from the center, not on the angles \( \theta \) or \( \phi \). This symmetry allows us to decompose the wavefunction into a product of a radial part \( R(r) \) and an angular part \( Y(\theta, \phi) \). By expressing \( \psi(r, \theta, \phi) = R(r)Y(\theta, \phi) \), we can transform the single complex Schrödinger equation into a set of simpler, one-dimensional ordinary differential equations, which can be solved separately. ...
Symmetry Groups and Degeneracy
A symmetry can be understood as an operator that, when applied to a system, leaves its fundamental characteristics unchanged. For instance, a crystal lattice exhibits translational symmetry; shifting its position by a lattice vector does not alter its structure. In quantum mechanics, this concept is deeply tied to the degeneracy of energy levels. Degeneracy means that different quantum states can share the same energy. While symmetry sometimes implies degeneracy, but degeneracy in energy levels is always a sign of an underlying symmetry in the system. ...
Review of quantum mechanics
In quantum mechanics, the state of a physical system is described by a state vector, denoted using Dirac’s bra-ket notation as \(|\psi\rangle\). These state vectors are elements of a complex vector space called a Hilbert space. Given two state vectors \(|\psi\rangle\) and \(|\phi\rangle\), their inner product is a complex number denoted by \(\langle\phi|\psi\rangle\). If the inner product of two different states is zero, i.e., \(\langle\phi|\psi\rangle = 0\), the states are said to be orthogonal, representing completely independent physical situations. ...
Ising Model
Following Susskind’s Statistical Mechanics course, lecture 9. The energy of a single spin in the Ising model is given by: \[E = -J\sigma\]where: \(E\) is the energy of the spin \(J\) is the coupling constant (strength of interaction) \(\sigma\) is the spin value, which can be either +1 (spin up) or -1 (spin down) Focus on a single spin. Its partition function \(Z\), summing over the two configurations (\(\sigma = +1, \sigma = -1\)), is: ...
FLRW Cosmology Model
In this post, I would like to introduce the basic assumption of modern cosmology, i.e. the FLRW model, also as an application of Einstein field equation. The idea is simple, given a FLRW metric, plug into the field equation, then we deduce how the space scale \(a\) (which is a parameter of the metric) changes along with the \(t\) coordinates. Here I express the computation in a Python program. import sympy as sp from sympy.diffgeom import Manifold, Patch, CoordSystem, TensorProduct from sympy.diffgeom.diffgeom import metric_to_Ricci_components, metric_to_Christoffel_2nd from sympy import Symbol, Function, sin, simplify, Matrix # Define spacetime dimensions dim = 4 # Define manifold and coordinate system (using spherical coordinates) M = Manifold('M', dim) patch = Patch('P', M) coords = CoordSystem('coords', patch, [ Symbol('t', real=True), Symbol('r', real=True, positive=True), Symbol('theta', real=True, positive=True), Symbol('phi', real=True) ]) # Get coordinate functions and basic one-forms t, r, theta, phi = coords.coord_functions() dt, dr, dtheta, dphi = coords.base_oneforms() # Define scale factor and curvature parameter (using natural units c=1) a = Function('a')(t) # Scale factor as a function of time k = Symbol('k') # Spatial curvature parameter # Construct FLRW metric # ds² = -dt² + a(t)²[dr²/(1-kr²) + r²(dθ² + sin²θ dφ²)] g = -TensorProduct(dt, dt) + \ a**2 * (TensorProduct(dr, dr)/(1-k*r**2) + \ r**2 * TensorProduct(dtheta, dtheta) + \ r**2 * sin(theta)**2 * TensorProduct(dphi, dphi)) # Matrix form of the metric (for Einstein tensor calculation) g_matrix = Matrix([ [-1, 0, 0, 0], [0, a**2/(1-k*r**2), 0, 0], [0, 0, a**2*r**2, 0], [0, 0, 0, a**2*r**2*sin(theta)**2] ]) # Calculate Christoffel symbols Christoffel = metric_to_Christoffel_2nd(g) # Calculate Ricci tensor Ricci_tensor = metric_to_Ricci_components(g) # Define coordinate index names coord_names = ['t', 'r', 'θ', 'φ'] # Calculate inverse metric tensor g_inverse = Matrix([ [-1, 0, 0, 0], [0, (1-k*r**2)/a**2, 0, 0], [0, 0, 1/(a**2*r**2), 0], [0, 0, 0, 1/(a**2*r**2*sin(theta)**2)] ]) # Calculate Ricci scalar R = g^{μν} * R_{μν} Ricci_scalar = 0 for i in range(dim): for j in range(dim): Ricci_scalar += g_inverse[i, j] * Ricci_tensor[i, j] Ricci_scalar = simplify(Ricci_scalar) # Calculate Einstein tensor G_μν = R_μν - (1/2) * g_μν * R Einstein_tensor = Matrix([[0 for _ in range(dim)] for _ in range(dim)]) for i in range(dim): for j in range(dim): Einstein_tensor[i, j] = Ricci_tensor[i, j] - (1/2) * g_matrix[i, j] * Ricci_scalar Einstein_tensor[i, j] = simplify(Einstein_tensor[i, j]) # Print Christoffel symbols print("Christoffel symbols of FLRW metric (Γ^μ_νρ):") for i in range(dim): for j in range(dim): for k in range(dim): if Christoffel[i, j, k] != 0: print(f"Γ^{coord_names[i]}_{coord_names[j]}{coord_names[k]} = {simplify(Christoffel[i, j, k])}") # Print Ricci tensor print("\nRicci tensor of FLRW metric (R_μν):") for i in range(dim): for j in range(dim): if Ricci_tensor[i, j] != 0: print(f"R_{coord_names[i]}{coord_names[j]} = {simplify(Ricci_tensor[i, j])}") # Print Ricci scalar print("\nRicci scalar of FLRW metric (R):") print(f"R = {Ricci_scalar}") # Print Einstein tensor print("\nEinstein tensor of FLRW metric (G_μν):") for i in range(dim): for j in range(dim): if Einstein_tensor[i, j] != 0: print(f"G_{coord_names[i]}{coord_names[j]} = {Einstein_tensor[i, j]}") Christoffel symbols of FLRW metric (Γ^μ_νρ): Γ^t_rr = -a(t)*Subs(Derivative(a(_xi), _xi), _xi, t)/(k*r**2 - 1) Γ^t_θθ = a(t)*r**2*Subs(Derivative(a(_xi), _xi), _xi, t) Γ^t_φφ = a(t)*sin(theta)**2*r**2*Subs(Derivative(a(_xi), _xi), _xi, t) Γ^r_tr = Subs(Derivative(a(_xi), _xi), _xi, t)/a(t) Γ^r_rt = Subs(Derivative(a(_xi), _xi), _xi, t)/a(t) Γ^r_rr = -k*r/(k*r**2 - 1) Γ^r_θθ = k*r**3 - r Γ^r_φφ = (k*r**2 - 1)*sin(theta)**2*r Γ^θ_tθ = Subs(Derivative(a(_xi), _xi), _xi, t)/a(t) Γ^θ_rθ = 1/r Γ^θ_θt = Subs(Derivative(a(_xi), _xi), _xi, t)/a(t) Γ^θ_θr = 1/r Γ^θ_φφ = -sin(2*theta)/2 Γ^φ_tφ = Subs(Derivative(a(_xi), _xi), _xi, t)/a(t) Γ^φ_rφ = 1/r Γ^φ_θφ = 1/tan(theta) Γ^φ_φt = Subs(Derivative(a(_xi), _xi), _xi, t)/a(t) Γ^φ_φr = 1/r Γ^φ_φθ = 1/tan(theta) Ricci tensor of FLRW metric (R_μν): R_tt = -3*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t)/a(t) R_rr = (-2*k - a(t)*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t) - 2*Subs(Derivative(a(_xi), _xi), _xi, t)**2)/(k*r**2 - 1) R_θθ = (2*k + a(t)*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t) + 2*Subs(Derivative(a(_xi), _xi), _xi, t)**2)*r**2 R_φφ = (2*k + a(t)*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t) + 2*Subs(Derivative(a(_xi), _xi), _xi, t)**2)*sin(theta)**2*r**2 Ricci scalar of FLRW metric (R): R = 6*(k + a(t)*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t) + Subs(Derivative(a(_xi), _xi), _xi, t)**2)/a(t)**2 Einstein tensor of FLRW metric (G_μν): G_tt = 3.0*(k + Subs(Derivative(a(_xi), _xi), _xi, t)**2)/a(t)**2 G_rr = (1.0*k + 2.0*a(t)*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t) + 1.0*Subs(Derivative(a(_xi), _xi), _xi, t)**2)/(k*r**2 - 1) G_θθ = (-1.0*k - 2.0*a(t)*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t) - 1.0*Subs(Derivative(a(_xi), _xi), _xi, t)**2)*r**2 G_φφ = (-1.0*k - 2.0*a(t)*Subs(Derivative(a(_xi), (_xi, 2)), _xi, t) - 1.0*Subs(Derivative(a(_xi), _xi), _xi, t)**2)*sin(theta)**2*r**2 Plug in the final Einstein tensor into the Einstein equation. Let’s take \( G_{tt} \) as an example: ...
Einstein Field Equation
To derive the Einstein field equation, we start from physical considerations involving energy and momentum, and geometry considerations from the curvature of spacetime. The Einstein field equation relies on three fundamental assumptions: Energy conservation Momentum conservation Newtonian gravity equation For assumptions 1 and 2, the conservation law for the stress-energy tensor holds: \[ \nabla_\mu T^{\mu \nu} = 0 \]The stress-energy tensor \(T^{\mu \nu}\) encapsulates crucial physical quantities and is expressed as: ...
Some Basics of Differential Geometry 3
In this post, I would like to study some basic knowledge of the \( \nabla \) symbol, as well as an important formula related with riemann tensor. I. Connection Definition: A connection \( \nabla \) on a smooth manifold \( (M, \mathcal{O}) \) is a map that takes a pair consisting of a vector field \( X \) and a \( (p, q) \)-tensor field \( T \) and sends them to a \( (p, q) \)-tensor field \( \nabla_X T \), satisfying: ...
Some Basics of Differential Geometry 2
In this post, we will delve deeper into the concepts of differential geometry, mainly focusing on the notion of riemann tensor, ricci tensor, and ricci scalar. I. The Riemann Tensor A. Definition We start with a \(d\)-dimensional manifold \(M\) endowed with a (pseudo-)Riemannian metric \(g_{\mu\nu}\). The connection compatible with the metric is the Levi-Civita connection \(\nabla\). The Riemann curvature tensor (often called simply the Riemann tensor) \(R^\rho_{\ \sigma\mu\nu}\) is defined by the commutator of covariant derivatives acting on a vector field \(V^\rho\): ...