Skip to content

Optimization and QUBO

penaltymodel

Maintained by dwavesystems

For solving problems with constraints, we recommend using the hybrid solvers in the Leap :tm: service.

PythonApache-2.0Archive
penaltymodel illustration

Resource snapshot

Category

Optimization and QUBO

Stars

19

Last pushed

Aug 26, 2025Updated 1y ago

Open issues

6

What it is

penaltymodel is maintained by dwavesystems and sits in the Optimization and QUBO lane of the open-source quantum map.

For solving problems with constraints, we recommend using the hybrid solvers in the Leap :tm: service. It commonly appears alongside dwavesystems-dimod in example workflows.

Last verified by Qtangl generator on May 27, 2026

Who it's for

Teams exploring routing, scheduling, allocation, and other combinatorial problems that can be modeled as optimization workloads.

What you can build or learn

  • Understand how this project models constrained optimization problems.
  • Compare QUBO, QAOA, and hybrid optimization workflows against classical baselines.
  • Identify pieces that could inform a practical planning stack like Qtangl.

Plays well with

License

Apache-2.0

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~203 words · about 1 min readOpen on GitHub

:warning: penaltymodel is deprecated. For solving problems with constraints, we recommend using the hybrid solvers in the Leap :tm: service. You can find documentation for the hybrid solvers at https://docs.dwavequantum.com.

:target: https://pypi.python.org/pypi/penaltymodel

:target: https://pypi.python.org/pypi/penaltymodel

.. image:: https://codecov.io/gh/dwavesystems/penaltymodel/branch/master/graph/badge.svg :target: https://codecov.io/gh/dwavesystems/penaltymodel

.. image:: https://circleci.com/gh/dwavesystems/penaltymodel.svg?style=svg :target: https://circleci.com/gh/dwavesystems/penaltymodel

============ penaltymodel

.. start_penaltymodel_about

One approach to solve a constraint satisfaction problem (CSP <https://en.wikipedia.org/wiki/Constraint_satisfaction_problem>) using an Ising model <https://en.wikipedia.org/wiki/Ising_model> or a QUBO <https://en.wikipedia.org/wiki/Quadratic_unconstrained_binary_optimization>_, is to map each individual constraint in the CSP to a 'small' Ising model or QUBO. This mapping is called a penalty model.

.. end_penaltymodel_about

For more information, see penalty models <https://docs.dwavequantum.com/en/latest/concepts/penalty.html>_.

Installation

To install the core package:

.. code-block:: bash

pip install penaltymodel

License

Released under the Apache License 2.0

Contributing

Ocean's contributing guide <https://docs.dwavequantum.com/en/latest/ocean/contribute.html>_ has guidelines for contributing to Ocean packages.

Release Notes

penaltymodel makes use of reno <https://docs.openstack.org/reno/>_ to manage its release notes.

When making a contribution to penaltymodel that will affect users, create a new release note file by running

.. code-block:: bash

reno new your-short-descriptor-here

You can then edit the file created under releasenotes/notes/. Remove any sections not relevant to your changes. Commit the file along with your changes.

See reno's user guide <https://docs.openstack.org/reno/latest/user/usage.html>_ for details.

Read on GitHub

Activity

Latest release

—

Watchers

7

Python support

—

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

dwavesystems

dwave_sapi_dimod

dimod wrapper for D-Wave's SAPI Client Library

PythonApache-2.0Archive

9 stars · Updated 8y ago

cda-tum

mqt-qmap

MQT QMAP - A tool for Quantum Circuit Mapping written in C++

C++MITFlagshipQtangl relevant

138 stars · Updated 3mo ago

entropicalabs

openqaoa

Multi-backend SDK for quantum optimisation

PythonMITFlagshipQtangl relevant

139 stars · Updated 2y ago

Qiskit

qiskit-optimization

Quantum Optimization

PythonApache-2.0FlagshipQtangl relevant

281 stars · Updated 5mo ago

jtiosue

qubovert

The one-stop package for formulating, simulating, and solving problems in boolean and spin form

PythonApache-2.0FlagshipQtangl relevant

41 stars · Updated 4mo ago

goodchemistryco

Tangelo

A python package for exploring end-to-end chemistry workflows on quantum computers and simulators.

PythonApache-2.0Qtangl relevant

137 stars · Updated 8mo ago