Quantum-inspired Echo State Network (QESN) — classical energy-diffusion reservoir with complex amplitudes.
Project description
QESN-MABe V2
Quantum-inspired Echo State Network on a 2D lattice — classical, NOT a quantum computer simulation.
QESN is a classical energy-diffusion reservoir that uses complex-valued amplitudes and a Schrödinger-inspired diffusion update. It runs on ordinary CPUs/GPUs — no quantum hardware is involved.
Earlier versions of this repo described the model as "genuine quantum mechanical evolution" or said it "runs the Schrödinger equation". That framing is retracted. The update rule is a symmetric, complex-valued Laplacian stencil with optional multiplicative decay. It is inspired by the form of the Schrödinger equation, not a rigorous simulation of it.
What this is
- A 2D lattice of complex amplitudes.
- A diffusion update (5-point stencil with periodic boundaries) applied for N steps.
- A small Python reference implementation (
src/qesn/) + a C++20 core (src/,include/). - A CLI (
qesn-mabe) for synthetic simulations. - Pure-Python synthetic unit tests under
tests/.
What this is NOT
- Not a quantum computer simulation.
- Not a variational quantum circuit.
- Not running on quantum hardware.
- Not a physically rigorous Schrödinger solver.
- Not shipping the MABe 2022 dataset, weights, or a benchmark reproduction script.
Install
Python package (recommended)
pip install qesn-mabe
With optional extras:
pip install "qesn-mabe[arrow]" # adds pyarrow for Parquet I/O
pip install "qesn-mabe[dev]" # pytest + build + twine
From source:
git clone https://github.com/Agnuxo1/QESN_MABe_V2_REPO
cd QESN_MABe_V2_REPO
pip install -e ".[dev]"
pytest
C++ core (optional)
The C++ core is optional and only needed if you want to explore the original training binary.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
Options:
| Option | Default | Effect |
|---|---|---|
QESN_WITH_CUDA |
OFF |
Enable CUDA GPU acceleration (requires nvcc). |
QESN_WITH_ARROW |
OFF |
Link Apache Arrow + Parquet. |
QESN_WITH_OPENMP |
ON |
Enable OpenMP parallelism if available. |
If Eigen3 is not found via find_package, CMake falls back to
FetchContent from the upstream Eigen repo — no manual path setup required.
CLI usage
qesn-mabe info
qesn-mabe status
qesn-mabe simulate --lattice-size 64 --steps 100 --output run.json
The simulate subcommand runs a synthetic diffusion simulation (random
energy injections on a fresh lattice) and writes metrics as JSON. It does not
load the MABe dataset and does not produce classification labels.
Library usage
from qesn import Lattice, diffuse
lat = Lattice(width=64, height=64, coupling=0.20, decay=1.0)
lat.inject(32, 32, amount=1.0)
diffuse(lat, steps=100)
print(lat.energy(), lat.energy_map().shape)
Benchmarks
Historical README versions compared QESN against ResNet-50 + LSTM, Transformer,
GCN, SlowFast, etc. with F1 numbers such as QESN F1 ≈ 0.48. Those numbers
are unverified and not reproducible from this repo alone.
Full details: BENCHMARK_DISCLAIMER.md.
No benchmark numbers are claimed by this release.
Tests
Synthetic only — no dataset needed.
pytest
The suite covers the diffusion update (energy conservation, translation symmetry, validation of parameters), config round-trips, and the CLI.
License
Apache-2.0 — see LICENSE.
Author
Francisco Angulo de Lafuente — agnuxo1@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qesn_mabe-1.0.0.tar.gz.
File metadata
- Download URL: qesn_mabe-1.0.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e5db13a618fb712c6dcd419a3bb34e2370520cf62f576d0f0f611b77f73f81a
|
|
| MD5 |
4e85a29e4a1251ac8bf8ab90a34209cd
|
|
| BLAKE2b-256 |
44cd8bd0e9ed419183e5945e2b78d32b5ab7d98e07d89ab90a0467336e2e211c
|
File details
Details for the file qesn_mabe-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qesn_mabe-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a6bf8a6251f64ecc40e5d96543feda9d88fbfad02c168327ba705e11a35b83
|
|
| MD5 |
2855d8be380c866b4de937940f22444e
|
|
| BLAKE2b-256 |
6a2a0e00a6df9b7e91f04f8b6ad5b1f5e44ed5d585694f441fa41704dbe2c5d1
|