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:
- Encodes a symbolic grammar into its logic space
- Evolves via grammar transition rules driven by entropy signals
- Initializes as |LZ⟩ — superposition across all states
- Collapses via PennyLane quantum circuit to |s*⟩
- Activates — emits a structured decision dict
- 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seraphim_logic_core-0.1.0.tar.gz | 15.8 kB | Without provenance | Details for seraphim_logic_core-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seraphim_logic_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for seraphim_logic_core-0.1.0-py3-none-any.whl |
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
|
Security for seraphim-logic-core 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.