Observer-relative knowledge graph using wave function compression
Project description
Quantum Context
Observer-relative knowledge graph using wave function compression for AI instance continuity.
What This Solves
Problem: Claude instances don't share context across sessions. Each new conversation starts from scratch.
Solution: Store measurements (subject, predicate, object, confidence) from different observers in a shared graph. Wave function compression preserves causal relationships while allowing multiple perspectives.
Install
Easy way:
git clone https://github.com/Unity-Environmental-University/quantum-context.git
cd quantum-context
./install.sh
Manual way:
git clone https://github.com/Unity-Environmental-University/quantum-context.git
cd quantum-context
pip install -e ".[mcp]" # Includes MCP server support
For Claude Desktop: After install, add MCP server (see MCP_SETUP.md)
Quick Start
from quantum_context import observe_context, analyze_dependencies, act_record
# Record what you built this session (requires confirmation)
act_record(
"skill-starter-template",
"status",
"complete",
confidence=0.7,
observer="claude-session-2026-02-05",
confirm=True
)
# Next session: observe what was built
amplitude = observe_context("skill-starter-template")
# → magnitude: 0.7 (reasonably confident it's done)
deps = analyze_dependencies("skill-starter-template")
# → depends_on: ["complete", "friction-gradient-philosophy"]
Key Features
Epistemic Humility
- Confidence ceiling: 0.7 without evidence (can't claim >70% certainty from single observation)
- Evidence required to exceed 0.7 (provide URLs/citations)
- Default: 0.5 (moderate uncertainty)
# Capped at 0.7
act_record("concept", "is", "true", confidence=0.95, confirm=True)
# → Actually stored as 0.7
# Evidence allows exceeding ceiling
act_record("concept", "is", "proven", confidence=0.95,
evidence=["https://paper.pdf"], confirm=True)
# → Stored as 0.95
Friction Gradient
- observe: No friction (read-only, always safe)
- analyze: Medium friction (computation cost)
- act: High friction (requires
confirm=True)
Observer Attribution
Every measurement has an observer. Different observers can see the same concept differently (like your dialectical_mcp bias detection, but with wave functions).
Philosophy
The universe is a holographic projection from ℤ where any integer can be the origin.
Practical implications:
- Measurements = observations with confidence from an observer frame
- Wave functions = compressed representation (Shor-equivalent)
- Interference = relationships via quantum amplitude |ψ(A)·ψ(B)|²
- Divisibility = causality (if A divides B, A "causes" B)
This connects to:
- Shor's algorithm - prime factorization via wave interference
- Wolfram's Ruliad - space of all possible computations
- Causal set theory - time's arrow from observer entanglement
Storage
~/.quantum-context/graph.ndjson
Each line is a JSON measurement:
{"subject": "auth", "predicate": "requires", "object": "identity",
"confidence": 0.7, "observer": "claude", "timestamp": "2026-02-05T12:00:00",
"evidence": []}
Portable:
- Plain text (NDJSON)
- Git-friendly (line-based diffs)
- No database required
- Works anywhere Python 3.9+ runs
Use Cases
✅ AI continuity - Claude instances share context across sessions ✅ Multi-agent coordination - Different agents record different observations ✅ Learning analytics - Track how understanding evolves with confidence ✅ Bias detection - Compare observer frames (like dialectical_mcp) ✅ Research - Test if wave interference preserves causal structure
❌ NOT for legal evidence - No chain of custody ❌ NOT for medical/financial - Confidence levels too low ❌ NOT real-time - Wave fitting takes time
What's Implemented vs Stubbed
Working now:
- ✅ NDJSON storage
- ✅ Record measurements with confirmation
- ✅ Observe context (read measurements)
- ✅ Analyze dependencies (find related concepts)
- ✅ Confidence ceiling enforcement
- ✅ Evidence-based confidence boost
- ✅ Observer attribution
Stubbed (future):
- ⏳ Wave function fitting (currently just averages confidence)
- ⏳ Interference calculations (|ψ(A)·ψ(B)|²)
- ⏳ Frame transformations (different observer perspectives)
- ⏳ Confidence decay over time
- ⏳ Orthogonality detection (independent concepts)
Files
quantum_context/core.py- Implementation (~200 lines)quantum_context/models.py- Pydantic types withextra="allow"skill.md- How Claude uses this skillRESPONSIBLE_USE.md- Ethics and safety guidelinesREADME.md- This file
Example: Self-Modeling
A Claude instance can model itself:
act_record("claude-instance-2026-02-05", "can", "write-code",
confidence=0.7, confirm=True)
act_record("claude-instance-2026-02-05", "uncertain-about",
"shor-equivalence", confidence=0.7, confirm=True)
act_record("claude-instance-2026-02-05", "tends-to",
"over-engineer", confidence=0.6, confirm=True)
Future instances can read this and know the previous instance's capabilities, uncertainties, and biases.
Status
Alpha (0.1.0) - Minimal working implementation. Wave function math is stubbed. Use for experimentation only.
License
MIT - See LICENSE file
Authors
Hallie Larsson, Unity Environmental University With Claude Sonnet 4.5
Measure. Compress. Interfere. Understand.
The structure teaches. The friction creates meaning. The waves preserve truth.
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 quantum_context-0.2.0.tar.gz.
File metadata
- Download URL: quantum_context-0.2.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9dd387a4ec512d725a3f46c1401a3c3cfbfea2e7b1f36e2671507248d2c0ca3
|
|
| MD5 |
92163788e6ee2740ad94bb5667fafe96
|
|
| BLAKE2b-256 |
1c099d47de5464be06f07eae3430bcb5231ce548035e1508a8a9e2fc359e9395
|
File details
Details for the file quantum_context-0.2.0-py3-none-any.whl.
File metadata
- Download URL: quantum_context-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8223ae7fde2fb31e3ae3d9887356ed65051cf1c287b321b99e00d6213c49bb
|
|
| MD5 |
6bd5d3a523457d75532541c51e22c2de
|
|
| BLAKE2b-256 |
c126d17d251aef036120d2ee2f12ee0daaddef4cb62853cdac7524eb92542ffc
|