| Recommend this page to a friend! |
| Packages of madi kais | PHP KAI Harness | doc/quantum/quantum_ontological_memory.md | Download |
|
|
||||||||||||||||||||
Quantum-Inspired Ontological Memory Specification1. Concept & RationaleTraditional vector databases retrieve context using a flat cosine similarity search. This ignores the temporal context, the cognitive domain, or relation strengths between concepts. The Quantum Memory Harness models episodic memories as quantum states with phase angles ($\theta \in [0, 2\pi]$) representing operational contexts. When memories are queried, the harness simulates wave interference to constructively amplify or destructively suppress retrieval candidates. 2. Cosine + Phase Interference ScoringStandard vector retrieval calculates flat cosine similarity $S_{cos}$ between a query vector $\vec{q}$ and memory vector $\vec{m}$: $$S_{cos} = \frac{\vec{q} \cdot \vec{m}}{\|\vec{q}\| \|\vec{m}\|}$$ In The Wave Interference Score ($S_{interfere}$) is calculated as: $$S_{interfere} = \cos(\theta_q - \theta_m)$$ The final Fused Ontological Score ($S_{fused}$) combines both vectors: $$S_{fused} = \alpha \cdot S_{cos} + \beta \cdot S_{interfere}$$ where:
* $\alpha$: Semantic weight (Default: Constructive interference occurs when the query and memory phase angles are closely aligned ($\theta_q \approx \theta_m$), raising $S_{fused}$. Destructive interference suppresses nodes from unrelated domains even if they share similar words. 3. Semantic Entanglement PropagationWhen two memories $A$ and $B$ are strongly associated, they are linked in the If Node $A$ is retrieved with a high score (exceeding similarity threshold), the entanglement operator propagates state collapse to Node $B$: $$S_{fused}'(B) = \max(S_{fused}(B), S_{fused}(A) \cdot F_{ent})$$ This pulls Node $B$ into the active context window instantly, ensuring highly coupled dependencies are not lost during retrieval. |