Skip to main content

Quantum-classical hybrid symbolic agent framework — Seraphim |LZ⟩

Project description

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."

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seraphim_logic_core-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seraphim_logic_core-0.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file seraphim_logic_core-0.1.0.tar.gz.

File metadata

  • Download URL: seraphim_logic_core-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for seraphim_logic_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d0d95da63c6a1ac550a5d909986806a3bab402e547f443f82b87769f75ea5b1
MD5 1af43706e44b71503521cb4ac609435e
BLAKE2b-256 5ca42caaefae50fd0f304a1734e4a16ca2d590e47475ab7d77616b72c9838008

See more details on using hashes here.

File details

Details for the file seraphim_logic_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for seraphim_logic_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6aa2d9e799a0f83537e67d48149d87b08c4f7d2d06dee0a89f48be6b2f1b5d50
MD5 bfe71a78342abed0878a4c0e65a2e91e
BLAKE2b-256 e1ff7d77e19e5a7de195e81ea9945f0878dc567e8ad0b7eba8a817a582e15dae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page