Reusable QUBO core library for API and HPC execution
Project description
qubo-core
Reusable QUBO core library for solving Quadratic Unconstrained Binary Optimization problems, designed for API and HPC execution.
Installation
pip install stt-qubo-core
Usage
from stt_qubo_core import (
QuboProblem, QuboDict,
QuboService, DimodSimulatedAnnealingSolver
)
qubo = QuboDict(data={
(0, 0): -1.0,
(1, 1): -1.0,
(0, 1): 2.0,
})
problem = QuboProblem(qubo=qubo, num_reads=100)
service = QuboService(solver=DimodSimulatedAnnealingSolver())
result = service.solve(problem)
for sol in result.solutions:
print(sol.energy, sol.sample)
Custom solver
Implement the QuboSolverPort protocol and inject it into QuboService:
from stt_qubo_core import QuboProblem, QuboSolverPort, QuboSolveResult, QuboService
class MyRemoteSolver:
def solve(self, problem: QuboProblem) -> QuboSolveResult:
...
service = QuboService(solver=MyRemoteSolver())
Development
pip install -e ".[dev]"
pytest tests/
License
MIT
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
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 stt_qubo_core-0.1.7.tar.gz.
File metadata
- Download URL: stt_qubo_core-0.1.7.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46d2ac1a10ceca9a735bdeaabbc1af4d0a4965325f0ddfc891430148669dab87
|
|
| MD5 |
d38c20feca0027a394e6c02dd86f8b77
|
|
| BLAKE2b-256 |
aa4f4f46a2f498fcaea210d39c8b592a96c2df0e9e0a487ca1f2541937669d1d
|
Provenance
The following attestation bundles were made for stt_qubo_core-0.1.7.tar.gz:
Publisher:
publish.yml on pasqualcastellon/qubo-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stt_qubo_core-0.1.7.tar.gz -
Subject digest:
46d2ac1a10ceca9a735bdeaabbc1af4d0a4965325f0ddfc891430148669dab87 - Sigstore transparency entry: 1391594631
- Sigstore integration time:
-
Permalink:
pasqualcastellon/qubo-core@312eb227c1fe83ea72cd7fdcc841f1c3a8509d27 -
Branch / Tag:
refs/tags/0.1.7 - Owner: https://github.com/pasqualcastellon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@312eb227c1fe83ea72cd7fdcc841f1c3a8509d27 -
Trigger Event:
release
-
Statement type:
File details
Details for the file stt_qubo_core-0.1.7-py3-none-any.whl.
File metadata
- Download URL: stt_qubo_core-0.1.7-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f26369b6cdfc6ff47607f3356268f8406e7d64cb3faff1dbc7db2b25d21e3197
|
|
| MD5 |
49710085f7de891699ca734931f884ec
|
|
| BLAKE2b-256 |
7c142f040dbe2b13a5684f8b097f76e279a494379a0df3cd7c57ae78a5d45fb4
|
Provenance
The following attestation bundles were made for stt_qubo_core-0.1.7-py3-none-any.whl:
Publisher:
publish.yml on pasqualcastellon/qubo-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stt_qubo_core-0.1.7-py3-none-any.whl -
Subject digest:
f26369b6cdfc6ff47607f3356268f8406e7d64cb3faff1dbc7db2b25d21e3197 - Sigstore transparency entry: 1391594651
- Sigstore integration time:
-
Permalink:
pasqualcastellon/qubo-core@312eb227c1fe83ea72cd7fdcc841f1c3a8509d27 -
Branch / Tag:
refs/tags/0.1.7 - Owner: https://github.com/pasqualcastellon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@312eb227c1fe83ea72cd7fdcc841f1c3a8509d27 -
Trigger Event:
release
-
Statement type: