Skip to main content

quantum-corpus

Version 0.3.4 — RAG pipeline and corpus tools for quantum research copilot.

A local-only corpus pipeline that ingests quantum research material from multiple sources, applies PII redaction, splits records into train/val/test sets, builds a versioned SQLite corpus, and constructs a BM25 + optional semantic hybrid RAG index.

Installation

pip install quantum-corpus          # core only (BM25 RAG, no ML deps)
pip install "quantum-corpus[advanced]"  # + sentence-transformers + PyMuPDF
pip install "quantum-corpus[dev]"   # + pytest

Core Modules

Module Description Dependencies
quantum_corpus.schema SQLite schema + source_identity sqlite3 (stdlib)
quantum_corpus.redact PII redaction (IBMid, keys, emails) re (stdlib)
quantum_corpus.split Train/val/test split by project hashlib (stdlib)
quantum_corpus.tokenize_count Token counting with HuggingFace tokenizers tokenizers
quantum_corpus.rag BM25 RAG index + schema-aware query expansion —
quantum_corpus.fusion BM25 + semantic hybrid fusion quantum_corpus.rag, quantum_corpus.semantic
quantum_corpus.structured Structured SQL query layer sqlite3 (stdlib)
quantum_corpus.answer Evidence-gated answer synthesis quantum_corpus.rag, quantum_corpus.structured
quantum_corpus.extract Ingest from repo dirs, IBM job zips, PDFs fitz (optional)
quantum_corpus.build End-to-end build orchestrator all above

Quick Start

from quantum_corpus import schema, rag

# Use existing corpus
db_path = schema.default_db_path()  # or set TMT_QUANTUM_CORPUS_DB
idx = rag.RAGIndex.load(db_path)

# Query
hits = idx.query("ibm_fez backend job OTOC", k=5)
for hit in hits:
    print(hit["snippet"][:120])

Environment Variables

Variable Default Description
TMT_QUANTUM_CORPUS_DB quantum_corpus.db Path to corpus SQLite DB
TMT_QUANTUM_JOBS_DB — Path to IBM job structured DB
TMT_DEPLOY_MODE private-training private-training or public-demo

Corpus Schema

Each record has:

  • id, source_type, project, subdomain, doc_id, text
  • split (train/val/test), token_count
  • sensitivity (public/internal/restricted/sensitive)
  • risk_tier (public/standard/elevated/critical)
  • source_identity (stable SHA-256 content hash)
  • provenance_url, source_license

License

MIT. See LICENSE file.

Metadata

Release files for quantum-corpus 0.3.4

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

Built distribution (wheel)

Table of built distributions (wheels) for quantum-corpus 0.3.4
File Interpreter ABI Platform Actions
quantum_corpus-0.3.4-py3-none-any.whl Python 3 none any Details for quantum_corpus-0.3.4-py3-none-any.whl

Release files / quantum_corpus-0.3.4-py3-none-any.whl

Download URL quantum_corpus-0.3.4-py3-none-any.whl
Size 89.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5119e270263cae9931ff16f6da6c14acbeeb701ae4b0d27bbc2cbb6a733ecb89
BLAKE2b-256 checksum
How to use checksums
a782e2a6d34530d21572d8bf1ee278f6b6db5a816e686dfdf89046dc89c621bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

Security for quantum-corpus 0.3.4

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for quantum_corpus-0.3.4-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.3.4 This release

1 release file Full provenance

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