HUB
Sign inSign up
quantummaterials-lab logo

credkellar/quantummaterials-lab

By credkellar

•Updated 17 days ago

QuantumMaterials-Lab: tight-binding bands, Dirac cones, SSH edge states, Hubbard dimer. Toy models!!

Image
Machine learning & AI
Developer tools
Data science
1

100

credkellar/quantummaterials-lab repository overview

⁠QuantumMaterials-Lab 🧱⚛️

Quantum Materials Tight-Binding Lab — by Darion Kellar

Educational quantum-materials lab in ONE pure-Python file: tight-binding band structures computed exactly on toy lattices — a 1D chain (bandwidth 4t, DOS van Hove edge bins 1.0222 vs centre 0.1588), a 2D square lattice (bandwidth 8t, DOS saddle peak 0.3118 at E = 0), a graphene-style honeycomb whose structure factor vanishes at K (|f(K)| = 4.44e-16) with a fitted Dirac slope of 1.4814 against the labelled (3/2)ta Fermi velocity, an SSH chain whose winding (0 vs 1, by summed phase increments) decides whether a 40-site open chain hides two zero-energy edge states (4.99e-08) or none, and a Hubbard dimer solved exactly in a 6-determinant basis whose double occupancy drains 0.500000 → 0.052786 as U runs 0 → 8, matching the analytic anchors at every point. A from-scratch Jacobi eigensolver and a from-scratch kNN material-character classifier (metal / insulator / dirac-semimetal / topological) are included; every classifier training row is computed by the lab itself.

Pure Python standard library. Zero dependencies. Zero network. Honest scope: every hopping and lattice constant is a LABELLED toy value — nothing here predicts, fits, or measures any real material, and every real-material / discovery / superconductor / device / synthesis / battery / semiconductor / quantum-hardware claim is a permanent HOLD gate (14 total).

⁠🐳 Quick start

docker pull credkellar/quantummaterials-lab:latest
docker run --rm credkellar/quantummaterials-lab:latest

The default command runs the full demo plus the built-in self-checks (CHECKS 59/59).

Run a specific command instead:

docker run --rm credkellar/quantummaterials-lab:latest python3 main.py checks   # CHECKS 59/59
docker run --rm credkellar/quantummaterials-lab:latest python3 main.py bands    # 1D + 2D bands, DOS, van Hove bins
docker run --rm credkellar/quantummaterials-lab:latest python3 main.py graphene # Dirac points + fitted cone slope
docker run --rm credkellar/quantummaterials-lab:latest python3 main.py ssh      # gap, winding, Zak phase, edge states
docker run --rm credkellar/quantummaterials-lab:latest python3 main.py hubbard  # Hubbard dimer U-curve vs anchors
docker run --rm credkellar/quantummaterials-lab:latest python3 main.py classify # kNN character classifier report
docker run --rm credkellar/quantummaterials-lab:latest python3 main.py holds    # 14 HOLD gates

⁠🔬 What's inside

  • 1D chain + DOS — E(k) = −2t·cos(ka) on 4,001 k-points; the histogram DOS (no smoothing) piles up 6.4× at the flat band edges — the van Hove singularity as counted states.
  • 2D square lattice — bandwidth 8t; the DOS peaks at E = 0 (0.3118 vs 0.0804 at the edges), so half filling sits exactly on the van Hove saddle.
  • Graphene toy — f(k) = Σ exp(i k·δⱼ) vanishes at K and K′ to 4.44e-16; fitted cone slope 1.4814 vs the labelled ℏv_F = (3/2)ta; DOS at E_F ≈ 0.0118 (semimetal) vs 0.2029 at 1.5t.
  • Jacobi eigensolver, from scratch — eigenvalues + eigenvectors for real symmetric matrices; the checks rebuild A = VΛVᵀ to < 1e-9 before any spectrum is trusted.
  • SSH topology, demonstrated — bulk gap exactly 2|t1 − t2| in both phases; winding 0 (trivial) vs 1 (topological); Zak phase 0 vs π; the open chain shows 2 midgap states at 4.99e-08 in the topological phase and none (min |E| = 0.811) in the trivial phase.
  • Hubbard dimer, exact — 6 determinants, fermionic signs, ground energy and double occupancy matching (U − √(U² + 16t²))/2 and (1 − U/√(U² + 16t²))/2 to < 1e-9; the ground state stays a pure singlet.
  • TinyML kNN classifier — metal / insulator / dirac-semimetal / topological from (gap, DOS at E_F, winding); labels from the lab's own policy over rows the lab computed.
  • Advisory seats — Gemini Argon 4 DECIDER (names-only, tighten-only, sha256 trace), Muse advisor (can never override HOLD), Google Flow plan-only (rendered = False, live = 0).

⁠✅ Verified

  • pytest: 31 passed
  • Built-in checks: CHECKS 59/59
  • Deterministic: double-run byte-identical
  • Base image: python:3.12-slim

⁠🏷️ Categories

Science · Developer tools · Machine learning & AI

  • License: MIT © 2026 Darion Kellar
  • Image: credkellar/quantummaterials-lab:latest
Tag summary
Recent tags
Content type
Image
Digest
sha256:bdef9eb19…
Size
41.6 MB
Last updated
17 days ago
docker pull credkellar/quantummaterials-lab:latest