This SDK extends the Strangeworks SDK to provide access to the Strangeworks Optimization API.
Project description
Strangeworks Optimization
The Strangeworks Optimization SDK provides an abstraction layer for solving optimization problems using classical, quantum-inspired, and quantum solvers. It enables you to seamlessly switch between different optimization backends while maintaining a consistent interface.
Features
- Unified API for multiple optimization solvers (quantum, quantum-inspired, and classical)
- Support for multiple problem formats including QUBO, MPS, LP, and more
- Solver-agnostic interface that allows easy switching between providers
- Job management with status tracking and result retrieval
Installation
pip install strangeworks-optimization
Quick Start
import strangeworks as sw
from dimod import BinaryQuadraticModel
from strangeworks_optimization import StrangeworksOptimizer
# Authenticate with your API key
sw.authenticate("your-api-key")
# Create a QUBO model
linear = {1: -2, 2: -2, 3: -3, 4: -3, 5: -2}
quadratic = {(1, 2): 2, (1, 3): 2, (2, 4): 2, (3, 4): 2, (3, 5): 2, (4, 5): 2}
model = BinaryQuadraticModel(linear, quadratic, "BINARY")
# Create and run the optimizer with Quantagonia
optimizer = StrangeworksOptimizer(model=model, solver="quantagonia.qubo")
job = optimizer.run()
# Get results
results = optimizer.results(job.slug)
print(results.solution)
Documentation
Comprehensive documentation is available at docs.strangeworks.com/optimization.
The documentation includes:
- Getting started guides
- API reference
- Supported solvers and providers
- Problem format specifications
- Examples and tutorials
Supported Solvers
The SDK supports a wide range of optimization solvers including:
- Classical solvers: Gurobi, Quantagonia
- Quantum annealers: D-Wave Leap, D-Wave Sampler
- Quantum-inspired: Hitachi, NEC, Toshiba
- Hybrid solvers: D-Wave Hybrid, Strangeworks Hybrid
For a complete list and solver-specific configuration options, see the documentation.
Requirements
- Python 3.11 or higher
- A Strangeworks account and API key (Get started)
License
This project is licensed under the Apache License 2.0.
Support
For support, questions, or feature requests, please visit:
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 strangeworks_optimization-0.2.44.tar.gz.
File metadata
- Download URL: strangeworks_optimization-0.2.44.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
297950af22692ab86a8173bddea37a8d92cf4cab35f9f082571db1e61ecb6852
|
|
| MD5 |
363b09f43c6f1dcc8a3fb67692c42e86
|
|
| BLAKE2b-256 |
53f2656c1109ca88adb983dcacd98fcd3a7aba1a105d746f2346a7b696f17c32
|
File details
Details for the file strangeworks_optimization-0.2.44-py3-none-any.whl.
File metadata
- Download URL: strangeworks_optimization-0.2.44-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84683ac053f615cd3f680fa1a3820dded55a798e96e8606ab9358be596875b7f
|
|
| MD5 |
f0ea1d09cb108491c54639e669d3e29e
|
|
| BLAKE2b-256 |
b6e89ec13c7e4ca415801582faa885635794ea0c7e6b6ce355fb43f4ebdcbe3a
|