Skip to main content

Quantum-optimized AI agent workflow platform with 53% token compression

Project description

QuantumFlow SDK

Quantum-optimized AI agent workflow platform with 53% token compression, quantum teleportation, and BB84 QKD.

Installation

pip install quantumflow-sdk

With IBM Quantum support:

pip install quantumflow-sdk[ibm]

With all integrations:

pip install quantumflow-sdk[all]

Quick Start

Token Compression

from quantumflow import QuantumCompressor

compressor = QuantumCompressor(backend="simulator")
result = compressor.compress([100, 200, 150, 175, 225, 180, 160, 190])

print(f"Input tokens: {result.input_token_count}")
print(f"Output qubits: {result.n_qubits}")
print(f"Compression: {result.compression_percentage:.1f}%")

Quantum Backpropagation

from quantumflow import QuantumBackprop

backprop = QuantumBackprop(backend="simulator")
result = backprop.compute_gradient(
    input_state=[0.5, 0.5],
    target_state=[0.8, 0.2],
    weights=[0.3, 0.7],
)

print(f"Gradients: {result.gradients}")
print(f"Similarity: {result.similarity:.2%}")

Quantum Key Distribution (QKD)

from quantumflow import QKDExchange

qkd = QKDExchange(backend="simulator")
result = qkd.exchange(key_length=256)

print(f"Shared key: {result['key'][:32]}...")
print(f"Error rate: {result['error_rate']:.2%}")
print(f"Secure: {result['secure']}")

Quantum Teleportation

from quantumflow import QuantumTeleporter

teleporter = QuantumTeleporter(backend="simulator")

# Create Bell pairs
pairs = teleporter.create_bell_pairs(10)

# Teleport a quantum state
state = [0.707 + 0j, 0.707 + 0j]  # |+> state
result = teleporter.teleport_state(state)

print(f"Fidelity: {result.fidelity:.4f}")
print(f"Corrections: {result.corrections_applied}")

Secure Messaging

from quantumflow import SecureMessenger

messenger = SecureMessenger(backend="simulator")

# Establish secure channel
channel = messenger.establish_channel("bob@example.com")

# Send message via compressed teleportation + QKD
result = messenger.send_message("Hello, quantum world!")

print(f"Compression ratio: {result['compression_ratio']:.1f}x")
print(f"QKD secured: {result['qkd_secured']}")

REST API

You can also use the hosted API at https://api.qflowai.dev:

# Token compression
curl -X POST https://api.qflowai.dev/v1/compress \
  -H "Content-Type: application/json" \
  -d '{"tokens": [100, 200, 150, 175]}'

# QKD exchange
curl -X POST https://api.qflowai.dev/v1/quantum/qkd/exchange \
  -H "Content-Type: application/json" \
  -d '{"key_length": 256}'

# Secure message
curl -X POST https://api.qflowai.dev/v1/quantum/message \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello quantum world!"}'

Features

  • 53% Token Compression: Quantum amplitude encoding for exponential compression
  • Quantum Backpropagation: 97.78% gradient similarity via teleportation protocol
  • BB84 QKD: Unconditionally secure key exchange
  • Quantum Teleportation: State transfer without physical qubit transmission
  • Secure Messaging: Compressed teleportation + QKD encryption
  • Multi-Backend: Simulator, IBM Quantum, AWS Braket

Framework Integrations

  • LangChain
  • CrewAI
  • AutoGen
  • Claude MCP

Documentation

Full documentation at https://qflowai.dev/docs

License

MIT License - see LICENSE file for details.

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

quantumflow_sdk-0.2.1.tar.gz (91.4 kB view details)

Uploaded Source

Built Distribution

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

quantumflow_sdk-0.2.1-py3-none-any.whl (117.2 kB view details)

Uploaded Python 3

File details

Details for the file quantumflow_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: quantumflow_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 91.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for quantumflow_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 648ab0974ddd4b2f9c1a70e9e0b6b01af4155338c37949f422d14f1c0f72122e
MD5 0764852f00b2be670a90c32052be9e6c
BLAKE2b-256 5aff9848bca863b96ba586f47ad3cc1c7283a7dac81269f0b325e1f104a79bff

See more details on using hashes here.

File details

Details for the file quantumflow_sdk-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for quantumflow_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50916799491acdda14c401d4d603bee50254e3e6c18bd76f5ec54b184aef64ed
MD5 73ada88966527039ae7d8034552a4319
BLAKE2b-256 53af5d92ec2cfdb59f506b6917ea60f734f18a3ca465160156bf8561945f54ef

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