This release is a pre-release and may not be stable for production use.
ommx-da4-adapter
This package provides an adapter for Fujitsu Digital Annealer(DA4) from OMMX. It allows you to solve optimization problems defined in OMMX format using DA4's powerful solver.
Installation
The ommx-da4-adapter can be installed from PyPI as follows:
pip install ommx-da4-adapter
Usage
Here's a simple example of how to use the adapter directly:
from ommx import Instance
from ommx_da4_adapter import OMMXDA4Adapter
ommx_instance = Instance.minimize()
x_0 = ommx_instance.new_binary("x_0")
x_1 = ommx_instance.new_binary("x_1")
ommx_instance.objective = x_0 * x_1 + x_0 - x_1 + 1
ommx_instance.add_constraint(x_0 + x_1 == 1)
ommx_sampleset = OMMXDA4Adapter.sample(
ommx_instance=ommx_instance,
token="*** your da4 api token ***",
url="*** da4 url ***",
)
You can also use the adapter and client separately:
from ommx_da4_adapter import OMMXDA4Adapter, DA4Client
# Assuming ommx_instance is already defined as above
adapter = OMMXDA4Adapter(ommx_instance)
qubo_request = adapter.sampler_input
client = DA4Client(
token="*** your da4 api token ***",
url="*** da4 url ***",
)
qubo_response = client.sample(qubo_request=qubo_request)
ommx_sampleset = adapter.decode_to_sampleset(qubo_response)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ommx_da4_adapter-0.2.0b1.tar.gz.
File metadata
- Download URL: ommx_da4_adapter-0.2.0b1.tar.gz
- Upload date:
- Size: 102.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
829779380dcd3525f7ab371e468656fbe1f631840e0807db6a7c7e9ce144e493
|
|
| MD5 |
29b9af51b02d92695fb01ffc8fc8cbcc
|
|
| BLAKE2b-256 |
11a65f37b9189f61e85cf97e504c1a601b253621497674a2a67a158b6d4471f4
|
Provenance
The following attestation bundles were made for ommx_da4_adapter-0.2.0b1.tar.gz:
Publisher:
release.yaml on Jij-Inc/ommx-da4-adapter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ommx_da4_adapter-0.2.0b1.tar.gz -
Subject digest:
829779380dcd3525f7ab371e468656fbe1f631840e0807db6a7c7e9ce144e493 - Sigstore transparency entry: 2827060722
- Sigstore integration time:
-
Permalink:
Jij-Inc/ommx-da4-adapter@62ee511c7079fb9babc68a31134462a7b93ed601 -
Branch / Tag:
refs/tags/v0.2.0b1 - Owner: https://github.com/Jij-Inc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@62ee511c7079fb9babc68a31134462a7b93ed601 -
Trigger Event:
push
-
Statement type: