Quantum Hopfield associative memory methodology — photonic quantum simulation of p-body Hopfield models for associative memory retrieval and spin-glass phase analysis.
Scanned 9/11/2026
Install to Claude Code
npx -y skills add hiyenwong/ai_collection --skill quantum-hopfield-associative-memory --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Quantum Hopfield Associative Memory?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-quantum-hopfield-associative-memory)More formats (shields.io, HTML) on the badges page.
---
name: quantum-hopfield-associative-memory
description: "Quantum Hopfield associative memory methodology — photonic quantum simulation of p-body Hopfield models for associative memory retrieval and spin-glass phase analysis."
tags: ["quantum", "neuroscience", "hopfield", "associative-memory", "photonic"]
---
# Quantum Hopfield Associative Memory
## Description
Quantum Hopfield associative memory methodology — using photonic quantum simulators to implement generalized p-body Hopfield models for associative memory retrieval. This approach leverages multiphoton processes to realize higher-order interactions beyond classical pairwise coupling, enabling experimental observation of memory retrieval, spin-glass, and paramagnetic phases in neural network models. Based on arXiv:2605.22922.
## Activation Keywords
- quantum hopfield
- quantum associative memory
- photonic quantum neural network
- spin-glass phase memory
- p-body hopfield model
- quantum memory retrieval
- 量子霍普菲尔德
- 量子联想记忆
- photonic quantum simulator neural
- multiphoton hopfield
## Tools Used
- exec: Run quantum simulation scripts (Qiskit, Strawberry Fields, or photonic simulators)
- read/write: Load memory patterns, analyze phase diagrams, store results
- search: Find related quantum neuroscience papers in kg.db
## Core Concepts
### p-body Hopfield Model
The classical Hopfield model uses pairwise (2-body) interactions: H = -Σᵢⱼ Jᵢⱼ σᵢ σⱼ. The generalized p-body model extends this to higher-order interactions: H = -Σᵢ₁...ᵢₚ Jᵢ₁...ᵢₚ σᵢ₁...σᵢₚ, enabling richer memory storage capacity and more complex attractor landscapes.
### Three Phase Regimes
1. **Memory Retrieval Phase**: Low storage capacity (α = p/N) and low temperature — system converges to stored patterns with high overlap
2. **Spin-Glass Phase**: Intermediate regime — memory black-out, system trapped in spurious states
3. **Paramagnetic Phase**: High temperature — no order, random fluctuations
### Photonic Quantum Implementation
- Single photons distributed across optical modes represent neurons
- Binary phase shifters act as Ising-like neuron states (σ = ±1)
- Two-photon processes realize 4-body (p=4) interaction terms
- Quantum parallelism enables exponential speedup in exploring energy landscapes
## Instructions for Agents
### Step 1: Identify the Problem Type
Determine if the task involves:
- Associative memory / pattern completion
- Neural network energy landscape analysis
- Phase transition detection in complex systems
- Quantum simulation of classical neural models
### Step 2: Choose the Hopfield Variant
| Requirement | Model |
|------------|-------|
| Standard pattern retrieval | 2-body Hopfield (classical) |
| Higher-order pattern storage | p-body Hopfield (quantum) |
| Large-scale simulation | Photonic quantum simulator |
| Theoretical analysis | Mean-field theory + replica method |
### Step 3: Map Patterns to Hamiltonian
For p-body Hopfield with M stored patterns ξ^μ:
```
Jᵢ₁...ᵢₚ = (1/N^(p-1)) Σ_μ ξ^μᵢ₁...ξ^μᵢₚ
H = -(1/N^(p-1)) Σ_μ (Σᵢ ξ^μᵢ σᵢ)^p
```
### Step 4: Analyze Phase Diagram
Key parameters:
- **Storage capacity** α = M / N^(p-1)
- **Temperature** T (thermal noise or quantum fluctuations)
- **Body order** p (interaction complexity)
Phase boundaries scale as:
- 2-body: α_c ≈ 0.138 (retrieval → spin-glass)
- p-body: α_c increases with p (higher storage capacity)
### Step 5: Design Quantum Circuit
For photonic implementation:
1. Encode N neurons in N optical modes
2. Apply binary phase shifters for σᵢ ∈ {±1}
3. Implement p-body interactions via (p/2)-photon processes
4. Measure memory overlap m^μ = (1/N) Σᵢ ξ^μᵢ ⟨σᵢ⟩
## Mathematical Framework
### Hamiltonian
```
H = -Σ_(μ=1)^M (m^μ)^p
where m^μ = (1/N) Σᵢ ξ^μᵢ σᵢ
```
### Free Energy (Mean-Field)
```
F = -T log Σ_{σ} exp(-H/T)
```
### Order Parameters
- **Memory overlap**: m^μ = ⟨(1/N) Σᵢ ξ^μᵢ σᵢ⟩
- **Edwards-Anderson parameter**: q = (1/N) Σᵢ ⟨σᵢ⟩²
- **Spin-glass order**: q_sg = [(1/N) Σᵢ ⟨σᵢ⟩²]_disorder
## Error Handling
### Quantum Simulation Too Noisy
If hardware noise obscures phase boundaries:
1. Increase shot count for better statistics
2. Apply error mitigation (zero-noise extrapolation)
3. Use classical simulation as baseline comparison
### Classical Simulation Intractable
For large N with p-body interactions:
1. Use quantum simulation for direct sampling
2. Apply mean-field approximation for theoretical bounds
3. Use tensor network methods for 1D/2D cases
## Best Practices
1. **Start with small p**: Begin with p=2 (classical) to validate implementation, then increase to p=4
2. **Verify phase transitions**: Compare experimental results with theoretical mean-field predictions
3. **Measure multiple observables**: Track memory overlap, energy, and spin-glass order simultaneously
4. **Control temperature**: In quantum simulators, effective temperature is set by noise level and annealing schedule
## Limitations
- Photonic implementations limited by photon loss and detector efficiency
- p-body interactions require (p/2)-photon processes, exponentially harder for large p
- Storage capacity gains diminish for very large p (diminishing returns)
- Classical simulation of p-body Hopfield is NP-hard for p ≥ 3
## Examples
### Example 1: Memory Retrieval Analysis
```
Given: N=100 neurons, M=10 patterns, p=4
Task: Determine if system is in retrieval phase
Analysis:
1. Calculate α = M/N^(p-1) = 10/100^3 = 10⁻⁵ (well below capacity)
2. If T < T_c (critical temperature), system should retrieve
3. Measure overlap m^μ for each stored pattern
4. If max(m^μ) > 0.5 → retrieval phase confirmed
```
### Example 2: Quantum Advantage Estimation
```
Classical: Energy landscape has O(N^p) local minima
Quantum: Tunneling between minima enables faster convergence
Speedup: ~exp(ΔE/T) for barriers of height ΔE
```
## Resources
- arXiv:2605.22922 — Experimental observation on photonic quantum simulator
- Amit, Gutfreund, Sompolinsky (1985) — Statistical mechanics of neural networks
- Krotov & Hopfield (2016) — Large associative memory problem in neurobiology and machine learning
## Related Skills
- quantum-neural-architecture: QNN design and optimization
- spiking-neural-network-analysis: SNN analysis patterns
- quantum-reservoir-computing: Quantum RC for temporal processing
- brain-inspired-capture-evidence-driven-neuromimetic-perceptual: BI-Cap methodology
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!