⚛️ QDB (v1.6.0): Quantum-Inspired Deductive Database & Code Hypergraph Engine
QDB (qdb-ai) is a self-contained, multi-hop combinatorial reasoning database, AST codebase dependency hypergraph engine, embedded SQL/OLAP analytics engine, and in-VRAM thermodynamic logit interceptor.
Unlike standard Vector RAG (which relies on shallow 1-hop similarity) or Graph DBs (which suffer from $O(d^k)$ path explosion), QDB formulates multi-hop relational deduction across knowledge graphs and codebases as a Quadratic Unconstrained Binary Optimization (QUBO) problem solved in $< 50 ext{ms}$ via Hamiltonian ground-state energy minimization.
🚀 What's New in v1.6.0
- 🧠 Adaptive Domain Model Selection: Auto-detects task domain and dynamically loads the optimal HuggingFace model:
- Code:
microsoft/codebert-base - Finance:
ProsusAI/finbert - Science / Research:
allenai/scibert_scivocab_uncased - Medical / Clinical:
dmis-lab/biobert-base-cased-v1.2 - Legal:
nlpaueb/legal-bert-base-uncased - General QA:
bert-base-uncased
- Code:
- ⚡ Automatic Hardware & CUDA Acceleration: Automatically detects NVIDIA GPUs, Apple MPS, or CPU and places model tensors on optimal device.
- 📦 AST-Level Codebase Ingestion (
vault.ingest_codebase): Recursively parses Python AST, JS/TS, package manifests, imports, class inheritance, decorators, and function call chains into k-ary QUBO Hyperedges. - 🕸️ k-ary HyperEdges: Multi-participant relational clusters with direct Hamiltonian matrix couplings.
- 🤫 Clean Output: Suppressed all checkpoint warning clutter.
📦 Installation
pip install --upgrade qdb-ai
⚡ Quickstart
1. Ingest Full Codebase & Query Architecture via QUBO
import qdb
from qdb import Vault
# Initialize Vault
vault = Vault("my_codebase")
# Ingest entire repository (Python AST, JS/TS, requirements.txt, package.json)
report = vault.ingest_codebase("./src/")
print(f"Parsed {report['files_parsed']} files into {report['nodes_created']} AST nodes and {report['edges_created']} hyperedges.")
# Multi-Hop Transitive Dependency Deduction (< 50ms)
res = vault.query("What modules depend on the database layer and what functions are called?")
print(res["answer_narrative"])
2. Multi-Hop Factual Knowledge Deduction
vault.ingest("Alexander Holder received the royal Beryl Coronet as security for a loan of 50000 pounds.", value=50000.0)
vault.ingest("Sir George Burnwell was the secret lover of Mary Holder and masterminded the Beryl Coronet theft.")
result = vault.query("Who masterminded the theft and what was the value of the security?")
print(result["answer_narrative"])
3. In-Memory SQL & OLAP Analytics Over Knowledge/Code
sql_res = vault.query("SELECT id, content FROM states_sql WHERE content LIKE '%FUNCTION%' LIMIT 5")
print(sql_res["sql_results"])
4. In-VRAM Thermodynamic Logit Shield (+50J)
from qdb import Shield
import torch
shield = Shield()
shield.register_ground_truth(
entity_name="JPMorgan",
aliases=["JPMC", "$JPM"],
truth_token_ids=[1042],
statement="JPMorgan Chase acquired First Republic Bank on May 1, 2023."
)
raw_logits = torch.randn(1, 32000)
penalized_logits, intercepted, telemetry = shield.evaluate("Tell me about $JPM", raw_logits)
📄 License
MIT License. Developed by Prannesshkva.
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 qdb_ai-1.7.2.tar.gz.
File metadata
- Download URL: qdb_ai-1.7.2.tar.gz
- Upload date:
- Size: 94.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
809e0bef133e4acfdd225572f26ff190871a35a31a702f34814c801238c8ddac
|
|
| MD5 |
def13f3497e546954110eff018b4f7d6
|
|
| BLAKE2b-256 |
8e38ec1c796dcfd9199bde2c9dfb2ccac4717353cf0e9fc47e5278d366f5918c
|
File details
Details for the file qdb_ai-1.7.2-py3-none-any.whl.
File metadata
- Download URL: qdb_ai-1.7.2-py3-none-any.whl
- Upload date:
- Size: 103.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fc3aa8212d0581a9fcdec8f16167baf542eef5e88c27c170ec08f0141b30579
|
|
| MD5 |
46d17ed16364e5b02d0580efdc274a3d
|
|
| BLAKE2b-256 |
d25265b76288e13768b2440ab7a589e14c06fc2ceab69bb400451979a908056d
|