"From Blackboards to Observables." This repository translates the abstract position-basis identities from Leonard Susskind’s Advanced Quantum Mechanics (Lecture 7) into concrete, runnable Python code. It bridges the gap between the Dirac Delta notation and discrete grid-based computation.
In the "Position Basis," we treat space as a continuous set of labels. This lab explores three foundational "Essences" from the lecture:
-
The Sifting Property: Proving that
$\int \delta(x-y)\psi(x)dx = \psi(y)$ using Gaussian approximations of the Dirac Delta. -
State Normalization: Ensuring that our physical states
$| \psi \rangle$ represent exactly one particle:$\langle \psi | \psi \rangle = 1$ . -
Observables as Densities: Visualizing the Field Operator expectation value
$\langle \Psi^\dagger(x)\Psi(x) \rangle$ , which reveals where the particle "actually is."
Ensure you have a clean Python environment, then install the package in editable mode:
# 1. Clone the repo (or enter your folder)
cd qft-position-lab
# 2. Install dependencies and the local 'qpl' package
pip install -e .The demos are designed to be run sequentially to build intuition.
Tests the "sampling" nature of the position basis.
python demos/01_identities.pyObservation: You will see a high-frequency wavepacket "sifted" by a narrow spike. The terminal will output the numerical error between the blackboard equation and the grid calculation.
Visualizes the particle number density.
python demos/02_observables.pyObservation: This plot shows the localized density of the field. Even as the phase (real/imaginary parts) oscillates, the Observable (density) remains a stable, measurable "bump."
qft-position-lab/
├── src/qpl/ # Core Logic
│ ├── grid.py # Spatial domain management (dx, x)
│ ├── calculus.py # Inner products & Integrals
│ ├── states.py # Wavefunctions & Delta approximations
│ └── fields.py # Operator-to-Observable mapping
├── demos/ # Lab Experiments
│ ├── 01_identities.py # Dirac Delta verification
│ └── 02_observables.py # Density plotting
└── assets/ # Visual Documentation (README Images)
| Identity Verification (Demo 01) | Field Density Observable (Demo 02) |
|---|---|
![]() |
![]() |
| The Delta function "picking" a value. | The measurable distribution of the field. |
Inspiration: Leonard Susskind's Theoretical Minimum
Lecture Source: Advanced QM: Lecture 7 - Position Basis (YouTube playlist)
"The goal is to make the invisible, visible." — Leonard Susskind
Disclaimer: This is a learning tool for foundational exploration. Numerical errors are expected due to grid discretization (dx) and are part of the learning process.

