Soft Algebra Optimizer for Quantum & Complex Optimization
Project description
Mobiu-Q
Mobiu-Q wraps your existing optimizer with Soft Algebra to filter noise and improve convergence. Same API, better results.
Works across Quantum Computing, Reinforcement Learning, LLM Fine-tuning, Materials Science, and FinTech.
🚀 What's New in v2.5.3
- LLM Fine-tuning Support: +23.3% improvement on full fine-tuning, +97% on LoRA
- Materials Science: +98% on Bulk Modulus, +67% on Band Gap prediction
- Noise Robustness: +32.5% more robust to quantum hardware noise
- Multi-Optimizer: Choose from Adam, NAdam, AMSGrad, SGD, Momentum, LAMB
🏆 Benchmark Results (v2.5)
All benchmarks compare Optimizer + Soft Algebra vs Optimizer alone. Same learning rate, same seeds, fair A/B test.
🔬 Materials Science (NEW)
| Task | Improvement | p-value | Win Rate |
|---|---|---|---|
| Bulk Modulus (GPa) | +98.3% | <0.001 | 100% |
| Band Gap (eV) | +66.8% | <0.001 | 100% |
| Formation Energy | +26.9% | <0.001 | 100% |
🤖 LLM Fine-tuning
| Task | Improvement | p-value | Win Rate |
|---|---|---|---|
| LoRA r16 + Momentum | +97.6% | <0.001 | 100% |
| LoRA r32 + SGD | +90.2% | <0.001 | 100% |
| Full Fine-tuning | +23.3% | 0.002 | 100% |
| GPT-2 Medium (PPL) | +21.2% | <0.001 | 100% |
| Soft Prompt Tuning | +18.1% | <0.05 | 100% |
🎮 Reinforcement Learning
| Environment | Improvement | p-value | Win Rate |
|---|---|---|---|
| LunarLander-v3 | +129.7% | <0.001 | 96.7% |
| MuJoCo InvertedPendulum | +118.6% | 0.001 | 100% |
| Crypto Trading | +10.9% profit | 0.005 | 90% |
🧪 Quantum Chemistry (VQE)
| Problem | Improvement |
|---|---|
| XY Model | +60.8% |
| He Atom | +51.2% |
| H2 Molecule | +46.6% |
| H3+ Chain | +42.0% |
| LiH Molecule | +41.4% |
| BeH2 Molecule | +37.8% |
🎯 QAOA (Combinatorial Optimization)
| Problem | Improvement | p-value |
|---|---|---|
| MaxCut 4-qubit | +27.2% | 0.04 |
| MaxCut 5-qubit | +23.7% | 0.004 |
| MaxCut p=3 | +15.6% | 0.008 |
🛡️ Noise Robustness (IBM FakeBackend)
| Metric | Result |
|---|---|
| Robustness Advantage | +32.5% |
| Win Rate (all noise levels) | 80% (12/15) |
| IBM FakeFez VQE | +50.9% (p=0.03) |
📦 Installation
pip install mobiu-q
⚡ Quick Start
1. Materials Science (NEW)
from mobiu_q import MobiuQCore
opt = MobiuQCore(
license_key="YOUR-KEY",
method="standard",
base_optimizer="adam"
)
for epoch in range(100):
loss = compute_property_loss(model, batch)
gradient = compute_gradients()
params = opt.step(params, gradient, loss)
opt.end()
2. LoRA Fine-tuning
opt = MobiuQCore(
license_key="YOUR-KEY",
method="adaptive",
base_optimizer="momentum" # Recommended for LoRA
)
for step in range(1000):
loss = lora_forward(model, batch)
gradient = compute_lora_gradients()
params = opt.step(params, gradient, loss)
opt.end()
3. Reinforcement Learning
opt = MobiuQCore(
license_key="YOUR-KEY",
method="adaptive",
base_optimizer="momentum"
)
for episode in range(1000):
episode_return = run_episode(policy)
gradient = compute_policy_gradient()
policy_params = opt.step(policy_params, gradient, episode_return)
opt.end()
4. VQE (Quantum Chemistry)
from mobiu_q import MobiuQCore, Demeasurement
opt = MobiuQCore(
license_key="YOUR-KEY",
method="standard"
)
for step in range(100):
grad = Demeasurement.finite_difference(energy_fn, params)
params = opt.step(params, grad, energy_fn(params))
opt.end()
5. QAOA (Noisy Hardware)
opt = MobiuQCore(
license_key="YOUR-KEY",
method="deep",
mode="hardware"
)
for step in range(150):
grad, energy = Demeasurement.spsa(energy_fn, params)
params = opt.step(params, grad, energy)
opt.end()
🔧 Configuration
Methods
| Method | Best For | Description |
|---|---|---|
standard |
VQE, Chemistry, Materials | Trust Ratio + Gradient Warping |
deep |
QAOA, Noisy Hardware | Super-Equation Δ† for emergence detection |
adaptive |
RL, LLM, LoRA, Trading | Trust + Emergence + Warping combined |
Base Optimizers
Choose from: adam, momentum, sgd, nadam, amsgrad, lamb
opt = MobiuQCore(
license_key="YOUR-KEY",
method="adaptive",
base_optimizer="momentum" # Best for RL/LLM
)
Modes
| Mode | Description |
|---|---|
simulation |
Clean quantum simulation (default) |
hardware |
Noisy quantum hardware |
🛠️ Troubleshooting
If optimization is not improving or diverging, try these adjustments:
1. Switch Base Optimizer
Different optimizers work better for different problems:
| Problem Type | Recommended Optimizer |
|---|---|
| LoRA / LLM | momentum (not SGD) |
| VQE / Chemistry | adam |
| QAOA | nadam |
| RL | momentum |
| Materials Science | adam |
# If Adam isn't working, try Momentum:
opt = MobiuQCore(license_key="KEY", base_optimizer="momentum")
# If Momentum isn't working, try NAdam:
opt = MobiuQCore(license_key="KEY", base_optimizer="nadam")
2. Switch Method
| If This Fails | Try This |
|---|---|
standard |
adaptive |
adaptive |
deep |
deep |
standard |
# If standard isn't working for your problem:
opt = MobiuQCore(license_key="KEY", method="adaptive")
3. Switch Mode
For quantum problems, if simulation mode isn't working:
# Try hardware mode (more aggressive noise filtering):
opt = MobiuQCore(license_key="KEY", mode="hardware")
4. Adjust Learning Rate
Soft Algebra works best with moderate learning rates:
| Scenario | Recommendation |
|---|---|
| Diverging | Lower LR by 2-5x |
| No improvement | Increase LR by 2x |
| LoRA specifically | Use LR=0.01-0.03 |
5. Common Fixes by Domain
| Domain | Common Issue | Fix |
|---|---|---|
| LoRA | SGD + high LR diverges | Use momentum + LR=0.02 |
| Drug Discovery | BCE loss unstable | Use adam + standard method |
| Small Batch LLM | High variance | Increase batch size or use deep method |
| Classification | Cross-entropy issues | Use adam + lower LR |
🔬 How It Works
Mobiu-Q is based on Soft Algebra, a mathematical framework that extends real numbers with infinitesimal components using nilpotent arithmetic (ε²=0).
Core SoftNumber Multiplication
(a, b) × (c, d) = (ad + bc, bd)
Where:
a= potential (infinitesimal component)b= realization (real component)
Evolution Law
S_{t+1} = (γ · S_t) · Δ_t + Δ_t
This allows gradients to carry both magnitude AND uncertainty information, enabling the optimizer to distinguish real improvement from noise artifacts.
Key Formulas
- Trust Ratio:
trust = |real| / (|real| + |soft| + ε) - Gradient Warping:
g_eff = gradient × soft_factor - Super-Equation Δ†: For emergence detection in rugged landscapes
💰 Pricing
| Tier | Price | Runs |
|---|---|---|
| Free | $0 | 20 runs/month |
| Pro | $19/month | Unlimited |
Get your license key at app.mobiu.ai
📊 Full Benchmark Summary
| Domain | Best Result | vs Optimizer |
|---|---|---|
| RL (LunarLander) | +129.7% | vs Momentum |
| RL (MuJoCo) | +118.6% | vs Momentum |
| Materials (Bulk Modulus) | +98.3% | vs Adam |
| LoRA (r16 Momentum) | +97.6% | vs Momentum |
| Materials (Band Gap) | +66.8% | vs Adam |
| Quantum (XY Model) | +60.8% | vs Adam |
| Noise Robustness | +32.5% | vs Momentum |
| QAOA MaxCut | +27.2% | vs NAdam |
| LLM Full Fine-tune | +23.3% | vs Momentum |
| Crypto Trading | +10.9% | vs Momentum |
Overall Win Rate: 80% across all benchmarks.
🧑🔬 Scientific Foundation
Developed by Mobiu Technologies, based on Soft Algebra theory by:
- Dr. Moshe Klein – Developer of Soft Logic and Soft Numbers
- Prof. Oded Maimon – Tel Aviv University, Industrial Engineering
📚 Links
- Website: mobiu.ai
- App: app.mobiu.ai
- PyPI: pypi.org/project/mobiu-q
📄 License
Proprietary. See LICENSE for details.
© 2025 Mobiu Technologies. All rights reserved.
Project details
Release history Release notifications | RSS feed
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 mobiu_q-2.5.3.tar.gz.
File metadata
- Download URL: mobiu_q-2.5.3.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52e4f9a97e0809be5eecd5708e6c7355a014814f5afcee275cf1d5414361c8c0
|
|
| MD5 |
4b354c10ab5ca393fa428101b255b470
|
|
| BLAKE2b-256 |
013d30bf28f2b7bb0b28ff3c0716af347a6adc33d696c0563412298dd6b2342d
|
File details
Details for the file mobiu_q-2.5.3-py3-none-any.whl.
File metadata
- Download URL: mobiu_q-2.5.3-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
082fb95632edffb45d1648b614b44bdf9ee6370f2fb1d5080803fac6186940b2
|
|
| MD5 |
ce42d14481032ec026d91f24708d281b
|
|
| BLAKE2b-256 |
b3f760f03988db5c25a67a424a62d9e67d1f6c16df980492f171b85e692764c3
|