Z_Stream

Z_Stream

Z_Stream is our in-house algorithm for computing the exact partition function of a 1-D periodic Ising chain. It,

  • halves the configuration space via global spin-flip symmetry
  • streams the remaining states across all CPU-cores
  • bins identical energy levels on the fly
  • reinserts a symmetry factor to rebuild the full spectrum

Why we care

Accurate values underpin free-energy, entropy and phase-diagram studies. Classical exact summation caps out at ~26 spins; Monte-Carlo loses the absolute normalisation. Z_Stream gives ground-truth results, yet keeps RAM growth polynomial through real-time binning.

Current snapshot (8 cores, Python prototype)

NWall timePeak RAM
100.07s0.07 MB
200.93s0.08 MB
2674.40s0.09 MB
301525.00s0.09 MB
326228.00s0.09 MB

Time still scales ≈ c 2^N ; memory only aN^b.

Where we’re heading – classical × quantum hybrid

  1. Massively-parallel classical front-end – SIMD / GPU kernels (CUDA & ROCm) for energy evaluation. – Dynamic load balancing over heterogeneous clusters.

  2. Quantum co-processor back-end – Map energy-bin counting to a quantum amplitude-estimation task, replacing classical sampling with Grover-style scaling. – Hybrid workflow: CPU/GPU generates candidate bit-strings; a near-term quantum processor verifies and aggregates amplitudes.

  3. Variational rewrite – Treat as a generative overlap between a parameterised quantum state and an energy-diagonal operator; optimise the state on quantum hardware while classically accumulating the bin counts.

  4. Error-mitigated extrapolation – Use classical Z_Stream as a noise-free baseline to calibrate small-N quantum runs, then extrapolate to larger N where classical enumeration fails.

Scientific & industrial implications

  • Statistical-physics benchmarking – Hybrid Z_Stream lets us push exact into regimes previously reserved for Monte-Carlo.

  • Quantum algorithm test-bed – Provides a deterministic ground truth for validating NISQ hardware.

  • Materials discovery & optimisation – Accurate free energies accelerate search in spintronic and magnetocaloric compounds.

  • Education & outreach – A tangible example of how classical/quantum co-design extends computational frontiers.

Z_Stream is under active development. Expect faster kernels, a quantum plug-in, and occasional dragons. Follow the journey or join the effort on GitHub – contributions, benchmarks and bold ideas are always welcome!

Sources

> Classical exhaustive enumeration scales as .> Even a 1-D Ising chain hits the wall around :> configurations. > Storing each spin as one byte already needs > GB, > and the Boltzmann-weight table doubles that. > See e.g. A. D. Sokal, Monte Carlo Methods in Statistical Mechanics (Les Houches, 1998), > Sec. II.3, or the scaling discussion in > T. Neuhaus & K. Heinisch, “Exact enumeration of Ising configurations”, > Comput. Phys. Commun. 184 (2013) 1719–1727.

W. Janke, “Monte Carlo Methods in Statistical Physics”, Les Houches Lecture Notes (1998), Sec. 3.2, esp. p. 97–100. D. P. Landau & K. Binder, A Guide to Monte Carlo Simulations in Statistical Physics, 5 th ed. (Cambridge Univ. Press, 2021), Chap. 9 “Free-Energy Methods”.