Inspiration
QRecall — See How a Memory Finds Its Way Back
Inspiration
How does a neural network remember something it has partially forgotten? And can quantum computing offer a different approach to recovering that memory?
We were inspired by Hopfield Networks and Boltzmann Machines, two foundational energy-based neural network models, and the possibilities of quantum computing.
Although these algorithms are mathematically fascinating, understanding their internal workings is challenging. Most demonstrations show only the final result, leaving the actual energy changes, probability distributions, neural interactions, and quantum operations hidden.
We wanted to change that.
QRecall transforms complex neural and quantum computations into an interactive, visually explorable experience where users can see how a damaged memory is reconstructed, one computational step at a time.
What It Does
QRecall is an interactive learning and experimentation platform that connects classical associative memory, probabilistic neural computation, and quantum optimization through a shared mathematical energy model.
Users can create binary memory patterns, corrupt or erase parts of them, and observe different algorithms attempting to reconstruct the original memory.
Core Features
1. Interactive Hopfield Neural Networks
- Create and store custom binary memory patterns.
- Erase or corrupt pixels to simulate incomplete memories.
- Visualize connections between neurons and their learned weights.
- Watch neurons update asynchronously during memory reconstruction.
- Inspect local fields, energy changes, and convergence.
2. Boltzmann-Inspired Thermal Sampling
- Explore Gibbs sampling as a probabilistic alternative to deterministic recall.
- Adjust temperature and observe changes in sampling behavior.
- Visualize conditional probabilities and stochastic neuron updates.
- Understand why thermal fluctuations can sometimes escape local energy minima.
- Compare sampled behavior against the exact thermal distribution.
3. Quantum Memory Reconstruction with QAOA
- Translate the same memory-recovery problem into an Ising Hamiltonian.
- Build and simulate genuine quantum circuits using Qiskit.
- Explore quantum cost and mixer operations.
- Visualize quantum amplitudes, relative phases, and interference.
- Observe actual simulated quantum measurement shots.
- Experiment with circuit depth, optimization parameters, and noise.
4. Interactive 3D Visualizations
QRecall provides linked 3D representations of neural connections, learned weights, energy landscapes, quantum states, and measurement distributions.
Users can rotate, zoom, pause, replay, and step through the visualizations while inspecting the actual mathematical values behind each animation.
5. Interactive Mathematical Laboratory
The Math Lab connects visual behavior to mathematical explanations, including energy decomposition, state encoding, complex amplitudes, expectation values, variance, and probability distributions.
6. Algorithm Comparison and Benchmarking
Compare Hopfield recall, Gibbs sampling, QAOA, and a nearest-memory baseline using:
- Memory reconstruction accuracy
- Energy and error metrics
- Sampling distributions
- Computational resource usage
- Reproducible experiment configurations
QRecall also includes preset scenarios, JSON/CSV exports, and presentation controls for classroom demonstrations.
How We Built It
We developed QRecall as a full-stack scientific visualization platform with separate computation and presentation layers.
Frontend: React, TypeScript, Vite, Three.js, and React Three Fiber power the interactive interface, animated 3D scenes, and linked visualizations. KaTeX renders mathematical equations.
Backend: Python, FastAPI, NumPy, and SciPy implement the shared energy model, associative-memory algorithms, stochastic sampling, numerical calculations, and optimization.
Quantum Computing: Qiskit and Qiskit Aer execute actual quantum circuit simulations, producing statevector snapshots and finite-shot measurement results instead of relying on predetermined animations.
Deployment: We containerized the application using Docker and deployed it through Microsoft Azure Container Apps.
The Mathematics Behind QRecall
All three computational approaches share the same energy function:
$$ E(s)=-\frac{1}{2}s^TWs-b^Ts $$
where:
- (s) represents the neural spin states.
- (W) represents the learned connection weights.
- (b) represents the external bias or conditioned fields.
The Hopfield network uses deterministic local updates to decrease energy.
Gibbs sampling introduces temperature-dependent stochastic updates:
$$ P(s_i=+1)=\frac{1}{1+e^{-2u_i/T}} $$
The quantum approach maps the same energy model into an Ising cost Hamiltonian and applies the Quantum Approximate Optimization Algorithm (QAOA):
$$ |\psi\rangle=\prod_{k=p}^{1}e^{-i\beta_k H_M}e^{-i\gamma_k H_C}|+\rangle^{\otimes n} $$
This shared formulation allows users to investigate three fundamentally different approaches to the same reconstruction problem.
Challenges We Faced
Connecting classical and quantum mathematics: Ensuring that Hopfield updates, Gibbs sampling, and QAOA all operated on a mathematically consistent energy model required careful handling of spin encodings, constrained variables, and Hamiltonian transformations.
Visualizing quantum behavior: Quantum amplitudes, relative phases, and measurement probabilities are difficult to communicate intuitively. We developed synchronized visual representations that expose these quantities without confusing ideal quantum states with measured outcomes.
Keeping animations scientifically accurate: Instead of creating decorative simulations, we connected playback directly to computed algorithm traces, circuit operations, and simulator measurement results.
Balancing complexity and interactivity: Quantum statevector simulation becomes exponentially expensive as the number of qubits increases. We constrained experiment sizes and computational budgets to keep the platform interactive and reproducible.
Comparing algorithms fairly: Different algorithms use different computational resources. We designed explicit metrics and benchmark configurations rather than assuming that quantum methods would automatically outperform classical approaches.
Accomplishments We're Proud Of
- Built a functional end-to-end neural and quantum memory-reconstruction laboratory.
- Integrated three computational approaches into one shared mathematical framework.
- Implemented actual Qiskit quantum circuit simulation with finite-shot measurements.
- Created linked interactive 3D neural, energy, and quantum visualizations.
- Developed an interactive Math Lab connecting formulas to computed results.
- Added reproducible experiments, benchmarks, and downloadable scientific data.
- Deployed a publicly accessible full-stack application on Microsoft Azure.
- Implemented automated scientific, API, and frontend tests.
One particularly important result was discovering that quantum methods do not automatically outperform classical methods. Our small-scale benchmarks show that classical approaches can outperform the tested QAOA configuration.
Rather than hiding these outcomes, QRecall makes them visible so users can understand the strengths, limitations, and trade-offs of each approach.
What We Learned
Building QRecall deepened our understanding of associative memory, energy-based neural networks, statistical sampling, Ising models, quantum gates, and quantum optimization.
We learned how the same optimization problem can be approached using deterministic neural updates, temperature-driven random sampling, and quantum amplitude evolution.
We also learned that scientific visualization must communicate what the computation actually does, not merely what looks impressive.
Most importantly, we gained a better understanding of how quantum and classical algorithms should be compared through reproducible evidence instead of assumptions about quantum advantage.
What's Next?
We envision expanding QRecall with larger problem instances, additional quantum and classical optimization techniques, richer educational experiments, and optional execution on real quantum hardware.
Future work could also include improved parameter-search methods and expanded benchmark suites to investigate when different computational approaches become useful.
Our long-term goal is to make QRecall a practical educational environment for exploring the intersection of artificial intelligence, statistical physics, and quantum computing.
Try QRecall
Live Application: https://qrecall.graysea-2c087476.eastasia.azurecontainerapps.io/
GitHub Repository: https://github.com/Siddhanthkjain2005/QRecall
QRecall — Don't just see the recovered memory. See how it finds its way back.
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for qrecall
Built With
- azure
- azure-container-apps
- docker
- fastapi
- github-actions
- javascript
- katex
- numpy
- pydantic
- pytest
- python
- qiskit
- qiskit-aer
- react
- react-three-fiber
- scipy
- three.js
- typescript
- vite
- vitest
Log in or sign up for Devpost to join the conversation.