https://github.com/dwavesystems/penaltymodel
Utilities and interfaces for using penalty models.
https://github.com/dwavesystems/penaltymodel
Last synced: 3 months ago
JSON representation
Utilities and interfaces for using penalty models.
- Host: GitHub
- URL: https://github.com/dwavesystems/penaltymodel
- Owner: dwavesystems
- License: apache-2.0
- Created: 2017-11-03T22:50:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-08-26T16:26:42.000Z (9 months ago)
- Last Synced: 2026-02-19T07:12:33.548Z (3 months ago)
- Language: Python
- Homepage: https://docs.ocean.dwavesys.com/projects/penaltymodel/en/latest
- Size: 714 KB
- Stars: 19
- Watchers: 7
- Forks: 21
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-quantum-software - penaltymodel - Utilities and interfaces for using penalty models. (Quantum annealing)
README
: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.
.. image:: https://img.shields.io/pypi/v/penaltymodel.svg
:target: https://pypi.python.org/pypi/penaltymodel
.. image:: https://img.shields.io/pypi/pyversions/penaltymodel.svg
: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 `_) using
an `Ising model `_ or a
`QUBO `_,
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 `_.
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 `_
has guidelines for contributing to Ocean packages.
Release Notes
-------------
penaltymodel makes use of `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 `_
for details.