Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OMMX adapter for OpenJij

Sample candidate assignments with OpenJij and evaluate them against the OMMX problem. You choose the penalty weights when constraints are converted to penalties.

Installation from a prerelease or main · 日本語の導入手順

In v3, SampleSet.objectives reports the original objective. Penalties affect the sampling energy, so code that used the v2 objective values as penalized energies must account for that change.

Sample a constrained problem

from ommx import DecisionVariable, FixedPenaltyPreparation, Instance, Sense
from ommx_openjij_adapter import OMMXOpenJijSAAdapter

x = DecisionVariable.binary(0, name="x")
instance = Instance.from_components(
    decision_variables=[x],
    objective=x,
    active_constraints={0: x == 1},
    sense=Sense.Minimize,
)

policy = OMMXOpenJijSAAdapter.recommended_preparation_policy()
policy.fixed_penalty = FixedPenaltyPreparation.uniform_penalty_method_with_fixed_weight(
    weight=2.0
)
instance.prepare(OMMXOpenJijSAAdapter.INPUT_CLASS, policy)

sample_set = OMMXOpenJijSAAdapter.sample_without_preparation(
    instance,
    num_reads=16,
)
print(sample_set.summary)

Reference

OpenJij adapter API · 日本語サイトのAPI Reference

The adapter reference above describes supported inputs and explicit preparation, including which variable IDs to supply when passing an initial state. The Book chapter on choosing a formulation explains when to keep or convert a constraint.

Metadata

Release files for ommx-openjij-adapter 3.0.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ommx-openjij-adapter 3.0.0rc1
File Size Uploaded Provenance Actions
ommx_openjij_adapter-3.0.0rc1.tar.gz 14.5 kB With provenance Details for ommx_openjij_adapter-3.0.0rc1.tar.gz

Release files / ommx_openjij_adapter-3.0.0rc1.tar.gz

Download URL ommx_openjij_adapter-3.0.0rc1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
443162b93d2f97205cd9735fc2ebdb711071e9ddbdb56c9ec25be51622e27139
BLAKE2b-256 checksum
How to use checksums
a11d718680b20326360fd7765bd06daa7c3578e01b36c975eabd2aa849c51804
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for ommx-openjij-adapter 3.0.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for ommx_openjij_adapter-3.0.0rc1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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