Skip to main content
Pre-release

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

OMMX adapter for Fixstars Amplify

PyPI - Version main

This package provides an adapter for the Fixstars Amplify SDK from/to OMMX.

How to install

The ommx-fixstars-amplify-adapter can be installed from PyPI as follows:

pip install ommx-fixstars-amplify-adapter

Solve problems formulated in OMMX with Fixstars Amplify

The ommx-fixstars-amplify-adapter allows problems formulated in OMMX to be solved in Fixstars Amplify.

sequenceDiagram
    participant U as User
    participant A as Adapter
    participant P as Fixstars Amplify
    U->>A: ommx.Instance
    A->>U: amplify.Model
    U->>P: amplify.Model and parameters for solvers;
    P->>P: Solve with Fixstars Amplify
    P->>U: amplify.Result
    U->>A: amplify.Result and variable_map
    A->>U: ommx:State

For example, the following problem formulated in OMMX can be solved using Fixstars Amplify.

from ommx import Instance
from ommx_fixstars_amplify_adapter import OMMXFixstarsAmplifyAdapter

ommx_instance = Instance.maximize()
q_0 = ommx_instance.new_binary("q_0")
q_1 = ommx_instance.new_binary("q_1")
ommx_instance.objective = q_0 * q_1 + q_0 - q_1 + 1
ommx_instance.add_constraint(q_0 + q_1 == 1)

token = "***FIXSTARS AMPLIFY TOKEN***"
solution = OMMXFixstarsAmplifyAdapter.solve(ommx_instance, amplify_token=token)
print(solution.decision_variables_df())

Solve problems formulated in Fixstars Amplify SDK with other solvers

The ommx-fixstars-amplify-adapter allows problems formulated in Fixstars Amplify SDK to be solved in other solvers.

sequenceDiagram
    participant U as User
    participant A as Adapter
    participant O as Other OMMX toolchain
    U->>A: amplify.Model
    A->>U: ommx.Instance
    U->>O: ommx.Instance and parameters for other solver
    O->>O: Solve the instance with other solver using other adapter
    O->>U: ommx.State

For example, the following mixed integer programming problem formulated in Fixstars Amplify SDK can be solved using PythonMIP.

import amplify
from ommx_fixstars_amplify_adapter import model_to_instance
from ommx_python_mip_adapter import OMMXPythonMIPAdapter

UPPER = float("inf")
LOWER = 0.0

gen = amplify.VariableGenerator()
x = gen.scalar("Integer", bounds=(LOWER, UPPER), name="x")
y = gen.scalar("Real", bounds=(LOWER, UPPER), name="y")

model = amplify.Model()
model += -10 * x - y
model += amplify.less_equal(x, 1)
model += amplify.less_equal(20 * x + y, 100)

ommx_instance = model_to_instance(model)
solution = OMMXPythonMIPAdapter.solve(ommx_instance)
print(solution.decision_variables_df())

[!NOTE] Currently, the model_to_instance function does not support Ising variables. Therefore, if your model contains Ising variables, you must convert them to binary variables. The following function can be used for this conversion.

import typing
import amplify

def ising_to_binary(
    model: amplify.Model
) -> typing.Tuple[amplify.Model, amplify.Result.ModelConversion.IntermediateMapping]:
    ising_to_binary_settings = {
        amplify.VariableType.Binary: amplify.Degree.HighOrder,
        amplify.VariableType.Ising: amplify.Degree.Zero,
        amplify.VariableType.Integer: amplify.Degree.HighOrder,
        amplify.VariableType.Real: amplify.Degree.HighOrder,
    }
    return model.to_intermediate_model(
        amplify.AcceptableDegrees(
            objective=ising_to_binary_settings,  # type: ignore
            equality_constraints=ising_to_binary_settings,  # type: ignore
            inequality_constraints=ising_to_binary_settings,  # type: ignore
        )
    )

For Developer

The packages required for development can be installed as follows:

uv sync --all-extras

Use the following commands to test, lint and format.

uv run pytest
uv run ruff check
uv run ruff format

Release files for ommx-fixstars-amplify-adapter 0.5.0b1

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-fixstars-amplify-adapter 0.5.0b1
File Size Uploaded
ommx_fixstars_amplify_adapter-0.5.0b1.tar.gz 96.7 kB Details

Release files / ommx_fixstars_amplify_adapter-0.5.0b1.tar.gz

Download URL ommx_fixstars_amplify_adapter-0.5.0b1.tar.gz
Size 96.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7d99a5d9e8ed28bf33c35759c5be28848bc88ee5f781633b1a01ce269877b32f
BLAKE2b-256 checksum
How to use checksums
e1ae293942310ab4b9ba2fee5b6c9eb238126c5f9a8b5a79378076111e06d584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0b1 This release

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.1

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