HUB
Sign inSign up
quantumwalk-lab logo

credkellar/quantumwalk-lab

By credkellar

β€’Updated 17 days ago

QuantumWalk-Lab: quantum walks lab - Hadamard + continuous walks, ballistic vs diffusive. Sim only!!

Image
Machine learning & AI
Developer tools
Data science
1

148

credkellar/quantumwalk-lab repository overview

⁠QuantumWalk-Lab πŸšΆβ€β™‚οΈβš›οΈ

Quantum Walk Lab (discrete + continuous) β€” by Darion Kellar

Educational quantum-walk lab in ONE pure-Python file: the classical random walk computed exactly (binomial probabilities, variance exactly t, fitted width exponent 0.5000), a discrete-time Hadamard walk evolved as an exact statevector over position Γ— coin (sigma 54.1241 at 100 steps, 5.41x the classical width, fitted exponent 0.9989, rate matching sqrt(1 - 1/sqrt(2))), a biased-coin run that steers 74.68% of the mass left, continuous-time walks on a cycle (DFT spectrum; perfect transfer on C4 at pi/2, revivals at pi and 2pi) and on a line (from-scratch Jacobi eigensolver; sigma = sqrt(2) t), a complete-graph quantum-walk search whose peak time is fitted to grow like sqrt(n) (exponent 0.5000, cross-checked against the full Hamiltonian), and a from-scratch kNN regime classifier whose labels come from the lab's own measured exponents.

Pure Python standard library. Zero dependencies. Zero network. Honest scope: every probability is exact amplitude arithmetic on a laptop - nothing is sampled and no quantum hardware is touched. The search comparison uses labelled toy units (1 unit of walk time = 1 oracle query) printed on the table itself; the fitted exponent is the lesson, not an advantage claim. Every advantage / hardware / supremacy / crypto / production / benchmark use is a permanent HOLD gate (14 total).

⁠🐳 Quick start

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

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

Run a specific command instead:

docker run --rm credkellar/quantumwalk-lab:latest python3 main.py checks    # CHECKS 50/50
docker run --rm credkellar/quantumwalk-lab:latest python3 main.py classical # exact binomial walk + exponent
docker run --rm credkellar/quantumwalk-lab:latest python3 main.py discrete  # Hadamard walk, symmetric + biased
docker run --rm credkellar/quantumwalk-lab:latest python3 main.py continuous # CTQW cycle + line reports
docker run --rm credkellar/quantumwalk-lab:latest python3 main.py search    # search peaks + sqrt(n) fit
docker run --rm credkellar/quantumwalk-lab:latest python3 main.py classify  # kNN regime classifier report
docker run --rm credkellar/quantumwalk-lab:latest python3 main.py holds     # 14 HOLD gates

β πŸ”¬ What's inside

  • Classical walk, exact β€” C(t, k)/2^t via math.comb, never sampled: sigma = 10.0000 at 100 steps, fitted exponent 0.5000. Diffusion pinned to its analytic value.
  • Hadamard walk, ballistic β€” coin + shift statevector: sigma 54.1241 at 100 steps (5.41x classical), fitted exponent 0.9989, sigma/t = 0.5412 matching the theoretical sqrt(1 - 1/sqrt(2)).
  • Biased coin steering β€” start in the left-moving coin state: mean -28.98, left mass 0.7468, peak at x = -68, width still ballistic. The initial coin is a steering wheel with a receipt.
  • CTQW on a cycle β€” DFT eigenvalues 2cos(2 pi k / n): C4 perfect transfer to the opposite site at t = pi/2 (P = 1.000000), full revival at pi, C6 revival at 2pi, return probability matched to its closed form.
  • CTQW on a line β€” Jacobi eigensolver from scratch (reconstruction asserted < 1e-9, spectrum cross-checked against the DFT): sigma = sqrt(2) t exactly, faster than the discrete walk.
  • Complete-graph search β€” Childs-Goldstone with gamma = 1/n, reduced by symmetry to an exact 2D oscillation and cross-checked against the full n x n Hamiltonian at n = 8: at n = 1024 the marked vertex peaks at P ~ 1.0000 at t* = 50.272 vs 512.5 expected classical draws; fitted time exponent 0.5000, toy units labelled.
  • TinyML kNN classifier β€” diffusive / ballistic / localized from (measured exponent, peak ratio, length); labels generated by the lab's own regime model, and the shift-disabled trapped walk proves "localized" is measured, not asserted.
  • 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: 42 passed
  • Built-in checks: CHECKS 50/50
  • 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/quantumwalk-lab:latest
Tag summary
Recent tags
Content type
Image
Digest
sha256:c3c9ed9e4…
Size
41.5 MB
Last updated
17 days ago
docker pull credkellar/quantumwalk-lab:latest