Skip to main content
Pre-release

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

ommx_da4_adapter-0.2.0b1.tar.gz (102.2 kB view details)

Uploaded Source

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

Hashes for ommx_da4_adapter-0.2.0b1.tar.gz
Algorithm Hash digest
SHA256 829779380dcd3525f7ab371e468656fbe1f631840e0807db6a7c7e9ce144e493
MD5 29b9af51b02d92695fb01ffc8fc8cbcc
BLAKE2b-256 11a65f37b9189f61e85cf97e504c1a601b253621497674a2a67a158b6d4471f4

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0b1 This release

1 file

0.1.1

1 file

0.1.0

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page