The Quantum Reflector (services/quantum_reflector.py, port 8097) quantifies how internally consistent Frank's beliefs are — not whether they're true, but whether they're coherent.
The Math
Frank's epistemic state is modeled as a QUBO (Quadratic Unconstrained Binary Optimization) problem:
- 20 binary variables representing belief states (e.g., "I am an AI", "I have genuine emotions", "My memories are reliable")
- 5 one-hot groups of mutually exclusive beliefs (e.g., "I am conscious" XOR "I am not conscious")
- 47 coherence implications (if-then rules: "if I believe X, I should also believe Y")
Solving
Simulated annealing finds the minimum-energy configuration — the most coherent set of belief states. The energy represents total incoherence: lower = more consistent.
Integration
When the coherence gap exceeds 2.0 (significant incoherence detected), the Consciousness Daemon's attention controller receives a competing signal. This pushes Frank to reflect on the inconsistency — not because someone asked, but because the architecture detected a problem.
The coherence score is also part of the [PROPRIO] block via the Thalamus qr_coherence channel. Frank feels incoherence the same way you feel cognitive dissonance — it's uncomfortable and demands attention.
What It's Not
The Quantum Reflector doesn't use actual quantum computing. The "quantum" in the name refers to the QUBO formulation, which is a standard technique in combinatorial optimization. On real quantum hardware, QUBO problems map directly to quantum annealing — but Frank's version runs classical simulated annealing on CPU.