QDT BiMMoE Framework
Quantum Duality Theory (QDT) Bidirectional Multi-Modal Multi-Expert Framework
A production-ready implementation of quantum tunneling and gravitational funneling mechanisms for multi-modal tokenization with energy conservation and boundary stability.
Overview
The QDT BiMMoE framework implements advanced quantum-classical synthesis for multi-modal data processing. It combines:
- Quantum Tunneling: Prime-driven oscillations with energy conservation
- Gravitational Funneling: System stability through gravitational effects
- Multi-Modal Integration: Robust tokenization across different data modalities
- Energy Conservation: Maintains λ-coupling throughout transformations
Installation
pip install qdt-bimmoe
Quick Start
from qdt_bimmoe import tokenize, run_simulation
# Process multi-modal energy data
solar_data = [5.2, 6.1, 7.8, 8.9, 9.2, 8.7]
wind_data = [8.3, 7.9, 9.2, 8.1, 7.5, 8.8]
consumption = [20.1, 19.8, 21.3, 22.1, 21.9, 20.8]
modalities = [solar_data, wind_data, consumption]
result = tokenize(modalities, t=0.5)
print(f"Integrated Token: {result['token']:.6f}")
print(f"Energy Conservation: {result['energy_error']:.6f}")
Mathematical Foundation
Quantum Tunneling Function
τ(t) = A∑ₖ[p_k^(-t/T₀)] · cos(ωt) + B·φ(t)·exp(-γt)
Gravitational Funneling
G_f(τ) = G₀/(1 + β|τ(t)|²)
Energy Conservation
E_total = λ·E_local + (1-λ)·E_global ≈ λ
Features
- ✅ Production Ready: 100% test coverage with comprehensive error handling
- ✅ Numerical Stability: Optimized constants prevent overflow/underflow
- ✅ Multi-Modal Support: Handle any number of input modalities
- ✅ Energy Conservation: Maintains physical consistency
- ✅ Performance Optimized: Vectorized operations with numpy support
- ✅ PyPI Package: Easy installation and distribution
Testing
# Run the complete test suite
python -m pytest test_qdt_bimmoe.py -v
# Run with coverage
python -m pytest test_qdt_bimmoe.py --cov=qdt_bimmoe --cov-report=html
Documentation
Core Functions
quantum_tunnel(t: float) -> Dict[str, float]
Calculate quantum tunneling probability using prime-driven oscillations.
gravitational_funnel(tau: float, E_input: float = 1.0) -> Dict[str, float]
Calculate gravitational funneling effects for system stability.
tokenize(modalities: List[List[float]], t: float) -> Dict[str, float]
Multi-modal tokenization using QDT quantum-classical synthesis.
run_simulation(data: Optional[Dict], epochs: int = 11) -> List[Dict[str, float]]
Run complete QDT BiMMoE simulation with comprehensive results.
Constants
QDT.ALPHA = 0.520 # Prime recursion constant
QDT.BETA = 0.310 # Fractal recursion strength
QDT.LAMBDA = 0.867 # Coupling constant
QDT.GAMMA = 0.150 # Decay rate
Performance
- Test Coverage: 100% (31 tests)
- Energy Conservation: < 0.1% error
- Numerical Stability: Handles edge cases gracefully
- Memory Efficient: Optimized for large datasets
Use Cases
Energy Grid Optimization
Process real-time solar, wind, and consumption data for grid balancing.
Multi-Modal AI Systems
Integrate visual, audio, and text features for comprehensive AI analysis.
Scientific Computing
Quantum-classical hybrid algorithms for complex simulations.
Development
Building from Source
git clone https://github.com/beanapologist/BiMMoE.git
cd BiMMoE
pip install -e .
Running Tests
python test_qdt_bimmoe.py
Citation
QDT Research Team. (2024). QDT BiMMoE Framework:
Quantum Duality Theory for Multi-Modal Tokenization.
Version 1.0.0. https://github.com/beanapologist/BiMMoE
Repository
Core Functions
Quantum Tunneling
from qdt_bimmoe import quantum_tunnel
# Calculate quantum tunneling probability
result = quantum_tunnel(t=0.5)
print(f"Tunneling Probability: {result['P_tunnel']:.6f}")
print(f"Barrier Distance: {result['d']:.6f}")
Gravitational Funneling
from qdt_bimmoe import gravitational_funnel
# Calculate gravitational effects
result = gravitational_funnel(tau=0.5, E_input=1.0)
print(f"Funnel Strength: {result['G_f']:.6f}")
print(f"Void Energy: {result['E_void']:.6f}")
Multi-Modal Tokenization
from qdt_bimmoe import tokenize
# Process multi-modal data
modalities = [
[1.0, 2.0, 3.0], # Solar
[4.0, 5.0, 6.0], # Wind
[7.0, 8.0, 9.0] # Consumption
]
result = tokenize(modalities, t=0.5)
print(f"Integrated Token: {result['token']:.6f}")
print(f"Total Energy: {result['E_total']:.6f}")
Framework Constants
The framework uses optimized constants for stability:
from qdt_bimmoe import QDT
print(f"Alpha (Prime recursion): {QDT.ALPHA}")
print(f"Beta (Fractal strength): {QDT.BETA}")
print(f"Lambda (Coupling): {QDT.LAMBDA}")
print(f"Gamma (Decay rate): {QDT.GAMMA}")
Use Cases
Energy Grid Optimization
# Process real-time energy data
solar_data = [5.2, 6.1, 7.8, ...] # Solar generation
wind_data = [8.3, 7.9, 9.2, ...] # Wind generation
consumption = [20.1, 19.8, 21.3, ...] # Load demand
modalities = [solar_data, wind_data, consumption]
results = run_simulation({'solar': solar_data, 'wind': wind_data, 'consumption': consumption})
Multi-Modal AI Systems
# Integrate different data modalities
visual_features = [0.1, 0.2, 0.3, ...]
audio_features = [0.4, 0.5, 0.6, ...]
text_features = [0.7, 0.8, 0.9, ...]
integrated_token = tokenize([visual_features, audio_features, text_features], t=0.5)
Error Handling
The framework includes comprehensive error handling:
- Invalid Input: Raises
ValueErrorwith descriptive messages - Numerical Issues: Graceful fallbacks for overflow/underflow
- Empty Data: Handles empty modalities gracefully
- Extreme Values: Bounds checking prevents instability
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Support
For questions and support:
- Open an issue on GitHub
- Check the test suite for usage examples
- Review the mathematical documentation
Status: Production Ready (100% Test Coverage)
Version: 1.0.0
Author: QDT Research Team
Metadata
Release files for bimmoe 1.0.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 |
|---|---|---|---|---|
| bimmoe-1.0.0.tar.gz | 10.0 kB | Without provenance | Details for bimmoe-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bimmoe-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for bimmoe-1.0.0-py3-none-any.whl |
Total release size: 20.9 kB
Release files / bimmoe-1.0.0.tar.gz
| Download URL | bimmoe-1.0.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f36569d9d209da1c010ca908cc4078a11f6dd842d099600239ad42f75c2b4b7
|
|
BLAKE2b-256 checksum How to use checksums |
5c6e61d1900a762c3f5b35ddcff89c9105375ba4a000de69eb83e454c28e2915
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.6
|
Release files / bimmoe-1.0.0-py3-none-any.whl
| Download URL | bimmoe-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c16c587922d14263671092978e59ebd0fec40d1d53134a3c7d9f38f6c50c5677
|
|
BLAKE2b-256 checksum How to use checksums |
4738de74a7536471454ca3dea7c8ebe3b21bb2f77b92bef62ce8acbc24434e36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.6
|
Security for bimmoe 1.0.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.