Skip to main content

seraphim-logic-core

Quantum-Classical Hybrid Symbolic Agent Framework
Perfect Squared Inc. | P2 Labs | Seraphim |LZ⟩

Agents of the Highest Order


Overview

seraphim-logic-core is the symbolic intelligence engine behind the Seraphim |LZ⟩ research initiative. It implements a quantum-native agent framework where agents exist in superposition across all symbolic states and collapse to a single truth via a PennyLane quantum circuit.

|S⟩ = Σ αᵢ |sᵢ⟩  →  |s*⟩

P(kᵢ) ∝ exp(-Entropy(kᵢ))
D = argmax_i(I(sᵢ) - β·E(sᵢ))

Architecture

seraphim_logic_core/
├── constants.py     — System constants (entropy thresholds, lifecycle states)
├── entropy.py       — XOR-Lattice Entropy Engine (Shannon entropy, XOR diff, anomaly detection)
├── grammar.py       — Symbolic Grammar Engine (symbols, rules, pre-built grammars)
├── collapse.py      — Quantum Collapse Engine (PennyLane StatePrep + probs)
├── agent.py         — SymbolicAgent (full ENCODED→DELIVERED lifecycle)
└── swarm.py         — AgentSwarm (parallel agent coordination + entropy-aware voting)

Agent Lifecycle

ENCODED → EVOLVED → INITIALIZED → COLLAPSED → ACTIVATED → DELIVERED

Each agent:

  1. Encodes a symbolic grammar into its logic space
  2. Evolves via grammar transition rules driven by entropy signals
  3. Initializes as |LZ⟩ — superposition across all states
  4. Collapses via PennyLane quantum circuit to |s*⟩
  5. Activates — emits a structured decision dict
  6. Delivers to the target system (QUANTA handler)

Quick Start

from seraphim_logic_core import SymbolicAgent, AgentSwarm
from seraphim_logic_core import threat_detection_grammar, integrity_grammar

# Single agent — threat detection
agent = SymbolicAgent(grammar=threat_detection_grammar())
result = agent.run(entropy_signal=0.85)
print(result["symbol"])  # e.g. "ANOMALOUS"

# Swarm — integrity monitoring
swarm = AgentSwarm(grammar=integrity_grammar())
verdict = swarm.respond_to_xor_event(window_1, window_2)
print(verdict["symbol"])  # e.g. "DEGRADED"

Pre-Built Grammars

Grammar Product States
threat_detection_grammar() QUANTA-PULSE / QUANTA-RAD NOMINAL → ANOMALOUS → SPOOFED → CONFIRMED → RESOLVED
integrity_grammar() QUANTA-VIGIL SECURE → DEGRADED → BREACHED → RESTORING

Installation

pip install seraphim-logic-core

Development:

git clone https://github.com/10XAnalytics/seraphim-logic-core
cd seraphim-logic-core
pip install -e ".[dev]"
pytest

Quantum Backend

Uses PennyLane default.qubit simulator (1024 shots).
Production deployments can target real quantum hardware via PennyLane device plugins.

Classical fallback available for testing:

agent = SymbolicAgent(grammar=threat_detection_grammar(), use_quantum=False)

License

Apache 2.0 — See LICENSE


Perfect Squared Inc. | P2 Labs — "Simulate the Future. Secure the Present."

Metadata

Release files for seraphim-logic-core 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seraphim-logic-core 0.1.0
File Size Uploaded
seraphim_logic_core-0.1.0.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for seraphim-logic-core 0.1.0
File Interpreter ABI Platform
seraphim_logic_core-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.0 kB

Release files / seraphim_logic_core-0.1.0.tar.gz

Download URL seraphim_logic_core-0.1.0.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d0d95da63c6a1ac550a5d909986806a3bab402e547f443f82b87769f75ea5b1
BLAKE2b-256 checksum
How to use checksums
5ca42caaefae50fd0f304a1734e4a16ca2d590e47475ab7d77616b72c9838008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / seraphim_logic_core-0.1.0-py3-none-any.whl

Download URL seraphim_logic_core-0.1.0-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6aa2d9e799a0f83537e67d48149d87b08c4f7d2d06dee0a89f48be6b2f1b5d50
BLAKE2b-256 checksum
How to use checksums
e1ff7d77e19e5a7de195e81ea9945f0878dc567e8ad0b7eba8a817a582e15dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page