Examples#
Runnable scripts demonstrating the conceptual breakthroughs behind tbkit, from Bloch’s band theory through the Thouless quantum pump – see History for the full chronology each script illustrates.
See also the narrative walkthrough: Tutorial.
Each script in this gallery is self-contained and can be run directly with
python examples/<section>/<script>.py. Every script also carries an
RST module docstring as its title/description and uses # %% markers
to split narrative text from code, which is exactly what Sphinx-Gallery
renders into the pages below – the script is the source of truth for
what you see, not a copy of it. Every numeric claim a script’s narrative
makes is checked with an assert right there in the code – nothing is
asserted in the docs that isn’t also verified in code.
Sections#
tight_binding – the generic real-space/reciprocal-space machinery: a graphene flake and its Bloch band structure, including Wallace’s 1947 linear (Dirac) dispersion near the K point.
magnetic_field – the Peierls substitution: an Aharonov-Bohm ring’s flux-periodic spectrum, and the fractal Hofstadter butterfly swept continuously in flux.
disorder – Anderson localization: the Inverse Participation Ratio vs. disorder strength, and an extended state next to a localized one.
topology – topological band theory: the SSH model’s bulk-boundary correspondence, the Haldane model’s Chern-number phase transition and Berry curvature, zigzag graphene and Kane-Mele helical edge states on ribbons, and the Thouless quantum pump’s quantized charge transport.
flat_bands – the kagome and Lieb lattices’ exactly flat bands, the natural home for strong-correlation physics via Lieb’s theorem.
dynamics – real-time wavepacket propagation: Bloch oscillations and the Wannier-Stark ladder under a uniform tilt.
Disorder#
Anderson localization: the Inverse Participation Ratio vs. disorder strength, and an extended state shown side by side with a localized one.
Dynamics#
Real-time wavepacket propagation: Bloch oscillations and the Wannier-Stark ladder under a uniform lattice tilt.
Flat Bands#
The kagome and Lieb lattices’ exactly flat bands, the natural home for strong-correlation physics via Lieb’s theorem.
Magnetic Field#
The Peierls substitution on a lattice: an Aharonov-Bohm ring’s flux-periodic spectrum, and the self-similar, fractal Hofstadter butterfly swept continuously in flux.
Non-Hermitian lattices#
Lattices with balanced gain and loss: PT-symmetric spectra that stay real up to a threshold, the exceptional points at which eigenvalues and eigenvectors coalesce, the Petermann factor that measures how far the eigenbasis has been skewed, and the selective amplification of a topological edge mode.
PT Symmetry, Exceptional Points, and a Selectively Amplified Edge Mode
Strain#
Mechanical strain as a gauge field: triaxial strain bends graphene’s bonds into a pseudo-magnetic field that quantizes the Dirac spectrum into Landau levels while leaving the Hamiltonian real, and therefore time-reversal symmetry intact.
Strain as a Gauge Field: Pseudo-Landau Levels in Graphene
Tight-Binding#
The generic real-space and reciprocal-space machinery: the square
lattice, whose single band is simple enough to check by hand, as the
smallest complete illustration of Bloch’s theorem; a graphene flake
diagonalized directly and its Bloch band structure along a k-path,
including Wallace’s 1947 linear (Dirac) dispersion near the K point;
and tbkit.plot.Plot’s lattice, spectrum, density-of-states, and
eigenstate-intensity plots.
Graphene: Real-Space Flake and Reciprocal-Space Bands
The Square Lattice: Bloch’s Theorem in its Simplest Form
Topology#
Topological band theory: the SSH model’s bulk-boundary correspondence, the Haldane model’s Chern-number phase transition and Berry curvature, zigzag graphene and Kane-Mele helical edge states cut from ribbons, the Thouless quantum pump’s exactly quantized charge transport, and a topological (Chern) flat band on the kagome lattice.
The Haldane Model: Berry Curvature and a Topological Phase Transition