Extension to strangeworks sdk to allow user to run qaoa service
Project description
Strangeworks QAOA SDK Extension
The strangeworks-qaoa package allows users to construct and solve problems with the Quantum Approximate Optimization Algorithm (QAOA) on multiple hardware providers through the Strangeworks Platform.
The package implements StrangeworksQAOA, an enhanced version of QAOA that tracks and reports the best individual bitstring solution found throughout the optimization process, rather than only using the average cost over all measurements.
Installation
pip install -U pip strangeworks-qaoa
Requirements
- Python version (see badge above)
- A Strangeworks account and API key (Get started)
- Quantum Resources enabled in your workspace
Quick Start
import strangeworks as sw
from strangeworks_qaoa.sdk import StrangeworksQAOA
import strangeworks_qaoa.utils as utils
sw.authenticate(api_key)
sw_qaoa = StrangeworksQAOA()
# Create problem
problem = utils.get_nReg_MaxCut_QUBO(3, 4, 0)
# Define parameters
problem_params = {
"nqubits": 4,
"maxiter": 50,
"shotsin": 1000,
}
# Run job
sw_job = sw_qaoa.run("SV1", problem, problem_params)
result = sw_qaoa.get_results(sw_job)
Documentation
Comprehensive documentation including problem formats, algorithm variants, parameters, and examples is available at docs.strangeworks.com/algorithms/qaoa.
Support
For support, questions, or feature requests:
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_qaoa-0.1.13.tar.gz.
File metadata
- Download URL: strangeworks_qaoa-0.1.13.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.9.25 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed3ab2d55433b67ea8739cef94f7736ddcb49160bd3b0057d473432dbb33a016
|
|
| MD5 |
cb255415ef4caa3418467c2119707352
|
|
| BLAKE2b-256 |
b0777b3885910ce2d4386cc5bd86db561a45b805f92f1d42385204d6dd0e29af
|
File details
Details for the file strangeworks_qaoa-0.1.13-py3-none-any.whl.
File metadata
- Download URL: strangeworks_qaoa-0.1.13-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.9.25 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e3f6ac9cb2dff57c49d1d615cb50400122283519c73aa107aef1e795bcc7bb2
|
|
| MD5 |
cdbec74aaee238e7841f6eb04a7268c5
|
|
| BLAKE2b-256 |
f6bf35fb79f25e4f70efb17d8faa06b6e78c1c8573a370bd5f848af24735b3ea
|