Soft Algebra Optimizer for Quantum & Complex Optimization
Project description
Mobiu-Q (v2.5.0)
Universal Physics-Aware Optimizer for Stochastic Systems
Mobiu-Q is the first optimizer based on Soft Algebra, developed by Dr. Moshe Klein and Prof. Oded Maimon. By mathematically decomposing gradients into Potential ($a_t$) and Realization ($b_t$), it filters out noise in real-time.
Works across Quantum Computing, Reinforcement Learning, LLM Fine-Tuning, and FinTech.
🚀 What's New in v2.5.0
- New Method Names:
standard,deep,adaptive(legacyvqe/qaoa/rlstill work!) - Noise Robustness: +32.5% more robust to quantum hardware noise
- 80% Win Rate: Outperforms standard optimizers across all noise levels
- LLM Support: +18% improvement on soft prompt tuning
🏆 Benchmark Results
Noise Robustness (IBM FakeBackend)
| Condition | Momentum | Mobiu-Q | Winner |
|---|---|---|---|
| IDEAL | -2.19 | -1.29 | Momentum |
| NOISY | +0.20 | -0.30 | Mobiu-Q ✅ |
Key Finding:
- Momentum degradation under noise: +109% (breaks down)
- Mobiu-Q degradation under noise: +77% (stays stable)
- Mobiu-Q is 32.5% MORE ROBUST to noise!
Comprehensive Noise Test
| Qubits | Noise Level | SA Gain | Win Rate |
|---|---|---|---|
| 2 | all levels | +27-65% | 5/5 ✅ |
| 4 | all levels | +5-19% | 4/5 ✅ |
| 6 | all levels | +2-14% | 3/5 ✅ |
Overall: 80% win rate (12/15 tests) with +5% to +65% improvement
LLM Soft Prompt Tuning
| Config | Improvement | Win Rate |
|---|---|---|
| Momentum+SA | +18.1% | 3/3 ✅ |
Quantum Chemistry (VQE)
| Molecule | Improvement |
|---|---|
| H2 | +46.6% |
| LiH | +41.4% |
| BeH2 | +37.8% |
| He Atom | +51.2% |
Reinforcement Learning
| Environment | Improvement | Win Rate |
|---|---|---|
| LunarLander | +129.7% | 96.7% |
| MuJoCo | +118.6% | 100% |
📦 Installation
pip install mobiu-q
⚡ Quick Start
1. Standard (Quantum VQE, 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()
2. Deep (Complex Circuits, Noisy Hardware)
opt = MobiuQCore(
license_key="YOUR-KEY",
method="deep",
mode="hardware" # For quantum hardware / noisy simulation
)
for step in range(150):
grad, energy = Demeasurement.spsa(energy_fn, params)
params = opt.step(params, grad, energy)
opt.end()
3. Adaptive (RL, LLM Fine-Tuning)
opt = MobiuQCore(license_key="YOUR-KEY", method="adaptive")
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. LLM Soft Prompt Tuning
opt = MobiuQCore(license_key="YOUR-KEY", method="adaptive")
for step in range(50):
loss = compute_loss(soft_tokens, model, batch)
grad = compute_gradient(loss, soft_tokens)
soft_tokens = opt.step(soft_tokens, grad, loss)
opt.end()
5. Multi-Seed Experiments (1 billing session)
opt = MobiuQCore(license_key="YOUR-KEY")
for seed in range(10):
opt.new_run() # Resets state, keeps session open
params = init_params(seed)
# ... optimization loop ...
opt.end() # All 10 seeds count as 1 run
🎛️ Configuration
Methods
| Method | Legacy | Use Case | Default LR |
|---|---|---|---|
| standard | vqe | Smooth landscapes, chemistry, physics | 0.01-0.02 |
| deep | qaoa | Deep circuits, noisy hardware | 0.1 |
| adaptive | rl | RL, LLM fine-tuning, high-variance | 0.0003 |
Modes
| Mode | Use Case |
|---|---|
| simulation | Clean simulations |
| hardware | Quantum hardware, noisy sims |
Optimizers
⚠️ Optimizer names are case-sensitive!
# Use default (Adam)
opt = MobiuQCore(method="standard")
# Alternative optimizer
opt = MobiuQCore(method="deep", base_optimizer="NAdam")
Available optimizers:
Adam(default) - Best overallNAdam- Strong on deep circuitsMomentum- Best for noisy hardware (+18.1% on LLM)AMSGrad- Alternative for standardSGD- Simple baselineLAMB- Large batch training
Disable Soft Algebra
For A/B testing:
opt = MobiuQCore(method="standard", use_soft_algebra=False)
🧠 How It Works
The Core Innovation: "Noise Hallucination" Prevention
Standard optimizers assume lower objective values always indicate better solutions. In noisy environments, this fails. Mobiu-Q uses Soft Algebra to distinguish real progress from noise.
SoftNumber Multiplication (Nilpotent ε²=0)
(a, b) * (c, d) = (ad + bc, bd)
State Evolution
S_{t+1} = (γ · S_t) · Δ_t + Δ_t
Where:
a_t(Potential): Curvature signalb_t(Realized): Actual improvementĆ(Super-Equation): Emergence detection for deep/adaptive
Method-Specific Logic
| Method | Primary Mechanism | Best For |
|---|---|---|
| standard | Trust Ratio + Gradient Warping | Smooth energy landscapes |
| deep | Super-Equation Δ† | Rugged, multimodal, noisy |
| adaptive | Trust + Emergence + Warping | High-variance, sparse reward |
📊 When to Use Mobiu-Q
✅ Use Mobiu-Q when:
- High noise/variance (quantum hardware, RL, stochastic finance)
- Deep circuits with many parameters
- Noisy quantum hardware (IBM, IonQ, etc.)
- LLM fine-tuning with limited data
- Standard optimizers diverge or get stuck
❌ Skip Mobiu-Q when:
- Clean, convex problems
- Deterministic, low-noise environments
🔑 Pricing
| Tier | Runs/Month | Features |
|---|---|---|
| Free | 20 | Testing & students |
| Pro | Unlimited | Priority, all features |
📚 API Reference
MobiuQCore
MobiuQCore(
license_key: str,
method: str = "standard", # "standard", "deep", "adaptive"
mode: str = "simulation", # "simulation" or "hardware"
base_lr: float = None, # Auto if None
base_optimizer: str = "Adam", # Case-sensitive!
use_soft_algebra: bool = True,
offline_fallback: bool = True
)
Methods:
step(params, gradient, energy)→ Updated paramsnew_run()→ Reset for new seed (same session)end()→ End session (counts usage)check_usage()→ Get remaining runs
Demeasurement
# For standard (smooth)
grad = Demeasurement.finite_difference(energy_fn, params)
grad = Demeasurement.parameter_shift(circuit_fn, params)
# For deep/hardware (noisy)
grad, energy = Demeasurement.spsa(energy_fn, params)
🔬 Scientific Foundation
Mobiu-Q is based on Soft Algebra, developed by:
- Dr. Moshe Klein - Mathematician, Soft Logic and Soft Numbers
- Prof. Oded Maimon - Tel Aviv University, Industrial Engineering
📖 Citation
@software{mobiu_q,
title = {Mobiu-Q: Soft Algebra Optimizer for Stochastic Systems},
author = {Angel, Ido and Klein, Moshe and Maimon, Oded},
year = {2024},
url = {https://mobiu.ai}
}
Proprietary technology. All rights reserved by Mobiu Technologies.
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.tar.gz.
File metadata
- Download URL: mobiu_q-2.5.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
908448c742208f8b5650725ab5de975b27a254748654a5f5267c63957a13afd8
|
|
| MD5 |
e6e4454601be7bb20441769a0831aeb2
|
|
| BLAKE2b-256 |
ae60558f3bf83c611ac8dbabb4b58346b40d76460af01842739377c12cf33451
|
File details
Details for the file mobiu_q-2.5-py3-none-any.whl.
File metadata
- Download URL: mobiu_q-2.5-py3-none-any.whl
- Upload date:
- Size: 21.1 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 |
1f835b45a8cbf6a4dd69f8b90b7b1da989fbc3f0f60931d808061570fcee66ee
|
|
| MD5 |
9e1ab90c1cd9dcc2b90dc99bfc04ce11
|
|
| BLAKE2b-256 |
3e325b8674605f93c134a4c1a44d062f6f1628f2db0125d0b3f848d8d28f6f26
|