Skip to main content

An adapter between OMMX and DWave

Project description

ommx-dwave-adapter

Provides an adapter to translate between OMMX and D-Wave samplers.

Currently only implements an adapter to LeapHybridCQMSampler.

Usage

ommx-dwave-adapter can be installed from PyPI as follows:

pip install ommx-dwave-adapter

An example usage of the LeapHybridCQMSampler through this adapter:

from ommx_dwave_adapter import OMMXLeapHybridCQMAdapter
from ommx.v1 import Instance, DecisionVariable

x1 = DecisionVariable.integer(1, lower=0, upper=5)
ommx_instance = Instance.from_components(
    decision_variables=[x1],
    objective=x1,
    constraints=[],
    sense=Instance.MINIMIZE,
)

# Create `ommx.v1.SampleSet` through `diwave.system.LeapHybridCQMSampler`
# Your Leap token can be set through configuration file, environment variable,
# or passed with a `token` parameter.
ommx_sampleset = OMMLeapHybridCQMAdapter.sample(ommx_instance)

print(ommx_sampleset)

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

ommx_dwave_adapter-0.1.1.tar.gz (109.4 kB view details)

Uploaded Source

File details

Details for the file ommx_dwave_adapter-0.1.1.tar.gz.

File metadata

  • Download URL: ommx_dwave_adapter-0.1.1.tar.gz
  • Upload date:
  • Size: 109.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ommx_dwave_adapter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b8cb5f3a782114cc5d0a3308e430c6088274932c7c75f2099ab6648505f36500
MD5 138f65f597662a77099dd93f5ee81ace
BLAKE2b-256 c7ec4a571fc4570939fd34532b8d511798dbce0d760c90a13caca0ef09183319

See more details on using hashes here.

Provenance

The following attestation bundles were made for ommx_dwave_adapter-0.1.1.tar.gz:

Publisher: release.yml on Jij-Inc/ommx-dwave-adapter

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page