Skip to main content

quoptuna is a proposed open-source project that combines quantum computing with Optuna's hyperparameter optimization framework.

Project description

QuOptuna

QuOptuna Logo

QuOptuna

Bridging quantum computing and hyperparameter optimization for next-generation machine learning

CodeRabbit Pull Request Reviews License Python 3.11+

DeepWiki


📚 Table of Contents


🌟 About

QuOptuna seamlessly integrates quantum computing capabilities with the powerful Optuna hyperparameter optimization framework. By leveraging quantum algorithms, QuOptuna enables researchers and practitioners to explore optimization landscapes more efficiently, pushing the boundaries of what's possible in machine learning and computational research.

Whether you're working with quantum machine learning models or classical algorithms, QuOptuna provides the tools you need to find optimal hyperparameters faster and more effectively.

✨ Key Features

  • 🔬 Quantum-Enhanced Optimization: Specialized hyperparameter tuning algorithms designed specifically for quantum machine learning workflows
  • 🎯 Hybrid Model Support: Seamlessly optimize both quantum and classical models
    • Quantum Models: Circuit-Centric Classifier, Data Reuploading Classifier, Quantum Kitchen Sinks, and more
    • Classical Models: SVC, MLP Classifier, Perceptron, and other scikit-learn compatible models
  • 📊 Interactive Dashboard: Real-time visualization of optimization progress through an intuitive Streamlit interface
  • 🔍 Explainable AI: Built-in interpretability tools to understand model decisions and optimization trajectories
  • 🔌 Extensible Architecture: Plugin-friendly design for easy integration with custom models and optimization strategies

📦 Installation

QuOptuna requires Python 3.11 or 3.12. Install using your preferred package manager:

Using UV (Recommended)

uv pip install quoptuna

Using pip

pip install quoptuna

Development Installation

For contributors and developers:

git clone https://github.com/Qentora/quoptuna.git
cd quoptuna
uv pip install -e ".[dev]"

🚀 Quick Start

Get up and running in minutes with this simple example:

import quoptuna as qo

# Define your objective function
def objective(trial):
    """
    Example: Minimize a simple quadratic function
    """
    x = trial.suggest_float('x', -10, 10)
    return x ** 2

# Create and run optimization study
study = qo.create_study(direction='minimize')
study.optimize(objective, n_trials=100)

# Display results
print(f"Best value: {study.best_value}")
print(f"Best parameters: {study.best_params}")

🖥️ Launch the Application

QuOptuna ships a single command that boots the full stack (FastAPI backend + Next.js frontend) in production mode, greeting you with a gradient ASCII banner:

uv run quoptuna run

This builds the frontend, starts both services on the first free ports (defaulting to :8000 for the API and :3000 for the UI), waits until the UI is ready, prints the access links, and opens your browser automatically.

Common options:

# Pick explicit ports and skip auto-opening the browser
uv run quoptuna run --backend-port 8001 --frontend-port 3001 --no-browser

# Launch the legacy Streamlit dashboard instead of the full stack
uv run quoptuna run --streamlit

Running uv run quoptuna with no subcommand is equivalent to uv run quoptuna run. Build and server logs are streamed to files under ${TMPDIR}/quoptuna/, whose paths are printed beneath the banner.

📖 Documentation

Comprehensive documentation, tutorials, and API references are available at:

https://Qentora.github.io/quoptuna

Topics covered include:

  • Detailed installation guides
  • Quantum algorithm integration
  • Advanced optimization techniques
  • Custom sampler implementation
  • API reference

🛠️ Development

We welcome contributions from the community! Here's how to set up your development environment:

Prerequisites

  • Python 3.11 or 3.12
  • UV package manager (recommended) or pip
  • Node.js 18+ (for the Next.js frontend)
  • Git

Setup Development Environment

# Clone the repository
git clone https://github.com/Qentora/quoptuna.git
cd quoptuna

# Install development dependencies
uv pip install -e ".[dev]"

Running Tests

# Run all tests
uv run pytest

# Run with coverage report
uv run pytest --cov=quoptuna

# Generate HTML coverage report
uv run pytest --cov=quoptuna --cov-report=html

Code Quality

Maintain code quality with our linting and type-checking tools:

# Run linter
uv run ruff check .

# Auto-fix linting issues
uv run ruff check . --fix

# Type checking
uv run mypy .

🤝 Contributing

We're excited to have you contribute to QuOptuna! Here's how you can help:

  1. Fork the repository on GitHub
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and write tests
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to the branch: git push origin feature/amazing-feature
  6. Open a Pull Request

Please ensure your code:

  • Passes all tests (pytest)
  • Follows our style guide (ruff check)
  • Includes appropriate documentation
  • Has type hints where applicable

For detailed guidelines, see our Contributing Guidelines.

📄 License

This project is licensed under the Apache 2.0 License. See the LICENSE file for full details.

🙏 Acknowledgments

This project builds on the excellent work of:

Special thanks to all our contributors who help make QuOptuna better!


📊 Project Activity

Repography logo / Recent activity

Timeline graph Issue status graph Pull request status graph Top contributors


DocumentationReport BugRequest Feature

Made with ❤️ by the Qentora team

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

quoptuna-0.0.5.tar.gz (88.5 kB view details)

Uploaded Source

Built Distribution

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

quoptuna-0.0.5-py3-none-any.whl (124.3 kB view details)

Uploaded Python 3

File details

Details for the file quoptuna-0.0.5.tar.gz.

File metadata

  • Download URL: quoptuna-0.0.5.tar.gz
  • Upload date:
  • Size: 88.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for quoptuna-0.0.5.tar.gz
Algorithm Hash digest
SHA256 169d819c815480279abfe58736f877fdd448a23f75a9286805cf41e8b46d1a3b
MD5 5c00d81d0e1a57e8141b262a88dd4014
BLAKE2b-256 bcbc38bc20ef0b60c187b1d9670cab06d6027e9463a8acda135b8608ed54427d

See more details on using hashes here.

File details

Details for the file quoptuna-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: quoptuna-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 124.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for quoptuna-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2e81e12d38b2d14b2cb9f1f6dc64bfa2c925daf46de20bb0868eff92bf135f64
MD5 9c4629e56d2a5359b73791c6278b8864
BLAKE2b-256 f1bc263fb3b7bbf23609ad93c7ad03edf78bb9b1e71d439bc8e2f0e964b59d03

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