Skip to content
/ QASWP Public

Quantum-AI Secure Weaving Protocol combining QKD and semantic prediction for the Quantum Internet.

License

Notifications You must be signed in to change notification settings

cputer/QASWP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

67 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐ŸŒŒ QASWP โ€” Quantum-AI Secure Weaving Protocol

Benchmarks Fuzz Tests Qiskit Smoke Python License: CPUTER Proprietary Stars IETF QIRG


Overview

QASWP is a hybrid Quantum Key Distribution (QKD) + Neural Semantic Transport framework for the Quantum Internet, achieving predictive compression, verifiable AI inference, and context synchronization between distributed agents.

It fuses quantum security primitives with neural-semantic prediction to create a verifiable, low-latency Layer 4 protocol connecting quantum computers and AI systems.


Demo Mode

The demo-only path demonstrates โ‰ฅ 99 % semantic compression on repeated templated flows via batched confirmation bits.
It uses a shared-key handshake for testability, a deterministic entanglement sync stub, and a succinct โ€œzk-likeโ€ proof (commitment + verify).
Real deployments will vary and require production-grade crypto/ML systems.


๐Ÿ“ˆ Claims & Validation

CI: The Proofs workflow in /proofs/ runs reproducible validation tests:

  • Compression benchmark: templated flows โ‰ฅ 95 % savings (typically โ‰ฅ 99 %)
  • Shared-session keys: encryption/decryption symmetry confirmed
  • Entanglement stub: identical IDs on both ends (0-byte sync)
  • Succinct verify: 64-byte proof check passes

๐Ÿš€ Quick Demo (30 seconds)

# 1. Install dependencies
pip install -r requirements.txt

# 2. Run the server in one terminal
python examples/server.py

# 3. Run the client in another terminal
python examples/client.py

Expected Output:

[QASWP Server] Listening for quantum-neural connections...
[QASWP Client] Handshake successful! QBER=0.00% | Session Key derived.
[QASWP Client] Alice predicts next message: "GET /api/v1/profile"
[QASWP Server] Bob predicts next message:  "GET /api/v1/profile"
[Result] Neural Prediction MATCH! (0 bytes of payload transmitted)
[Stats] Compression Ratio: 99.8% ๐Ÿš€

Packet Semantics & Flushing

  • Placeholders: non-flushed packets have flushed=False, wire_len=0, and empty nonce/payload; receivers must treat them as no-ops.
  • Stream boundaries: call QASWPSession.flush() before shutdown to emit trailing confirmations.
  • Schema version: first byte of encrypted payload is schema_version=1 for forward compatibility.

๐Ÿ“– Documentation


๐Ÿ›  Core Features

  • โœ… Hybrid Security: combines QKD (BB84) for eavesdrop detection with Kyber + Dilithium for post-quantum safety
  • โœ… Neural Semantic Compression: TinyLLM prediction โ†’ single-bit confirmation
  • โœ… Verifiable AI: zk-proof-like inference verification
  • โœ… Entanglement Simulation: QuTiP-based shared-state model for zero-latency context sync

๐Ÿ”ฎ Future Roadmap

  • Qiskit Integration: transition QKD to real quantum backends (2026)
  • Federated LoRA Sync: live on-device model updates for edge nodes
  • Formal IETF Submission: evolve draft โ†’ RFC proposal for QIRG

๐Ÿ” Licensing & Commercial Use

Public for research and collaboration, but not open-source.

  • Non-commercial research use allowed under the CPUTER Inc. Proprietary License (Royalty-Bearing)
  • Commercial use requires a paid license and royalties
  • Contact info@cputer.com for licensing

See LICENSE and NOTICE.


Qiskit-Backed QKD (v2.2 Scaffold)

Feature-flagged optional handshake using Qiskit (IBM Quantum).

export QASWP_QISKIT=1
pip install qiskit
pytest -q tests/test_qiskit_stub.py
pytest -q tests/test_qiskit_integration_optional.py

In CI, the Qiskit Smoke workflow can be triggered manually; it installs Qiskit best-effort and skips cleanly if unavailable.

Current scaffold returns a deterministic 32-byte demo key. Future revisions will derive real keys from Qiskit circuits (Samplers / Estimators).


โš–๏ธ Theoretical Limits & Semantic Compression

In classical information theory, the Shannon limit defines the lower bound for lossless compression, set by source entropy ( H(X) ). QASWP does not violate that law. Its โ€œ99 % compressionโ€ describes semantic efficiencyโ€”reducing transmitted bits when peers share predictive context.

[ \text{Effective compression} = 1 - \frac{H(ฮ”|ฮจ)}{H(M)} ]

When ( H(ฮ”|ฮจ)\to0 ), apparent compression approaches 100 %, but total entropy remains consistent with Shannonโ€™s theorem.

References

  • Shannon (1948) A Mathematical Theory of Communication
  • Zhang et al. (2023) Semantic Communication Networks
  • Nedovodin (2025) QASWP v2.1 Technical Report

Applicability & Limitations

QASWP excels in structured, context-rich exchanges (telemetry, control-plane, federated updates) where TinyLLM predictions minimize payloads.
Unstructured or high-entropy streams gain little benefit, prompting fallback to classical compression or full-payload transfer.
Hybrid QKD+PQC encryption, authenticated sequencing, and model rotation mitigate replay, leakage, and disclosure risks.


๐Ÿงช Testing Matrix

  • Local: pytest, coverage
  • CI: GitHub Actions (CI, Coverage, Lint, CodeQL)
  • Environments: Python 3.10 โ€“ 3.11 (tox/nox)

๐Ÿณ Docker

docker build -t qaswp .
docker run --rm qaswp

๐Ÿงฐ Dev Container

Open in VS Code โ†’ โ€œDev Containers: Open Folder in Containerโ€ฆโ€


๐Ÿ“ฆ Releasing

  • Release notes via Release Drafter
  • Version bump in CHANGELOG.md โ†’ git tag v2.3 && git push --tags

Join the future of communication ๐ŸŒŒ โ€” Star this repo, open issues, or submit PRs.

About

Quantum-AI Secure Weaving Protocol combining QKD and semantic prediction for the Quantum Internet.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages