Skip to main content

Soft Algebra Optimizer for Quantum & Complex Optimization

Project description

Mobiu-Q (v2.4)

Universal Physics-Aware Optimizer for Stochastic Systems

PyPI version Win Rate License

Mobiu-Q is the first optimizer based on Soft Algebra. 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, FinTech, and Complex Engineering.


🚀 What's New in v2.4

  • Reinforcement Learning Support: New method="rl" with +129% improvement on LunarLander
  • Multi-Optimizer: Choose from Adam, NAdam, AMSGrad, SGD, Momentum, LAMB
  • MuJoCo Robotics: +118% improvement on continuous control tasks
  • Crypto Trading: +10.9% profit improvement in high-volatility environments

🏆 Benchmark Results (v2.4)

Reinforcement Learning

Environment Improvement p-value Win Rate
LunarLander-v3 +129.7% 0.000000 96.7%
MuJoCo InvertedPendulum +118.6% 0.001 100%
Crypto Trading +10.9% profit 0.005 90%

Quantum Computing

Problem Improvement p-value Win Rate
VQE H2 (IBM FakeFez) +53.1% 0.001 100%
QAOA MaxCut +21.5% <0.05 85%

Classical Optimization

Problem Improvement
Rosenbrock Valley +75.8%
Credit Risk (VaR) +52.3%
Portfolio Optimization +51.7%

📦 Installation

pip install mobiu-q

⚡ Quick Start

1. VQE (Quantum Chemistry)

from mobiu_q import MobiuQCore, Demeasurement

opt = MobiuQCore(license_key="YOUR-KEY", method="vqe")

for step in range(100):
    grad = Demeasurement.finite_difference(energy_fn, params)
    params = opt.step(params, grad, energy_fn(params))

opt.end()

2. QAOA (Combinatorial Optimization)

opt = MobiuQCore(
    license_key="YOUR-KEY",
    method="qaoa",
    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. Reinforcement Learning (NEW in v2.4)

opt = MobiuQCore(license_key="YOUR-KEY", method="rl")

for episode in range(1000):
    # Run episode, compute policy gradient
    episode_return = run_episode(policy)
    gradient = compute_policy_gradient()
    
    policy_params = opt.step(policy_params, gradient, episode_return)

opt.end()

4. 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 and Modes

Method Mode Use Case Default LR
vqe simulation Chemistry, physics (clean) 0.01
vqe hardware VQE on quantum hardware 0.02
qaoa simulation Combinatorial (simulator) 0.1
qaoa hardware QAOA on quantum hardware 0.1
rl (ignored) Reinforcement learning 0.0003

Optimizers (NEW in v2.4)

Default: Adam (recommended - works best across all methods)

# Use default (Adam)
opt = MobiuQCore(method="vqe")

# Try alternative optimizer
opt = MobiuQCore(method="qaoa", base_optimizer="NAdam")

Available optimizers:

  • Adam (default) - Best overall performance
  • NAdam - Strong on QAOA problems
  • AMSGrad - May outperform on VQE simulation
  • LAMB - High improvement potential, less stable
  • SGD / Momentum - Simple baselines

Disable Soft Algebra

For A/B testing against plain optimizers:

# Plain Adam (no Soft Algebra)
opt = MobiuQCore(method="vqe", use_soft_algebra=False)

🧠 How It Works

The Core Innovation: "Noise Hallucination" Prevention

Standard optimizers (Adam, SGD) assume lower objective values always indicate better solutions. In noisy environments—like NISQ processors or stochastic RL—this fails. Optimizers "tunnel" into noise, creating Noise Hallucinations.

The Solution: Soft Algebra cross-coupled state evolution:

S_{t+1} = (γ · S_t) · Δ_t + Δ_t

Where:

  • a_t (Potential): Curvature signal from energy history
  • b_t (Realized): Actual improvement achieved
  • Δ† (Super-Equation): Emergence detection for QAOA/RL

A parameter update is only committed if the Potential Field is validated by Realized Improvement.

Method-Specific Logic

Method Primary Mechanism Best For
VQE Trust Ratio + Gradient Warping Smooth energy landscapes
QAOA Super-Equation Δ† Rugged, multimodal landscapes
RL Trust + Emergence + Warping High-variance, sparse rewards

📊 When to Use Mobiu-Q

Use Mobiu-Q when:

  • High noise/variance (quantum hardware, RL, stochastic finance)
  • Rugged landscapes with many local minima
  • Expensive function evaluations
  • Standard optimizers diverge or get stuck

Skip Mobiu-Q when:

  • Clean, convex problems (vanilla SGD is fine)
  • Deterministic, low-noise environments
  • Very low variance settings

🔑 Pricing

Tier Runs/Month Features
Free 20 Testing & students
Pro Unlimited Priority processing, all features

Get your License Key


📚 API Reference

MobiuQCore

MobiuQCore(
    license_key: str,           # Your license key
    method: str = "vqe",        # "vqe", "qaoa", or "rl"
    mode: str = "simulation",   # "simulation" or "hardware"
    base_lr: float = None,      # Learning rate (auto if None)
    base_optimizer: str = "Adam",  # Optimizer choice
    use_soft_algebra: bool = True, # Enable/disable SA
    offline_fallback: bool = True  # Fallback to local Adam
)

Methods:

  • step(params, gradient, energy) → Updated params
  • new_run() → Reset for new seed (same session)
  • end() → End session (counts usage)
  • check_usage() → Get remaining runs

Demeasurement

# For VQE (smooth landscapes)
grad = Demeasurement.finite_difference(energy_fn, params)
grad = Demeasurement.parameter_shift(circuit_fn, params)

# For QAOA/hardware (noisy)
grad, energy = Demeasurement.spsa(energy_fn, params)

🔬 Citation

If you use Mobiu-Q in research:

@software{mobiu_q,
  title = {Mobiu-Q: Soft Algebra Optimizer for Stochastic Systems},
  author = {Mobiu Technologies},
  year = {2024},
  url = {https://mobiu.ai}
}

Proprietary technology. All rights reserved by Mobiu Technologies.

Project details


Release history Release notifications | RSS feed

This version

2.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mobiu_q-2.4.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

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

mobiu_q-2.4-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file mobiu_q-2.4.tar.gz.

File metadata

  • Download URL: mobiu_q-2.4.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for mobiu_q-2.4.tar.gz
Algorithm Hash digest
SHA256 3f8a25aefedd8680aaca37b1e002c8538f5f7f600f5938d098db851d704ee7b0
MD5 b638916b8aa7331e5e439d90b8020e56
BLAKE2b-256 099eb83df5f6d1491928beaa5b249976966819ae2927068bd1baac9971554212

See more details on using hashes here.

File details

Details for the file mobiu_q-2.4-py3-none-any.whl.

File metadata

  • Download URL: mobiu_q-2.4-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for mobiu_q-2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d63a50ecbe71bec9d48558043df6665b93c7bac1cd55444919bb8f8c3044f889
MD5 fb4edcd7b11ea7530df246b4bd6cc836
BLAKE2b-256 c71df2f906ec7e23d9d9c14aa849e441672e0cdf2985634df791263e9d6e843a

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