: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 <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.
Raw data
{
"_id": null,
"home_page": "https://github.com/dwavesystems/penaltymodel",
"name": "penaltymodel",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "D-Wave Systems Inc.",
"author_email": "tools@dwavesys.com",
"download_url": "https://files.pythonhosted.org/packages/02/f6/3af591b63fca93de731711f8c985e5b7f5ef97de28e334ffeec413c31c82/penaltymodel-1.3.0.tar.gz",
"platform": null,
"description": ":warning: *penaltymodel* is deprecated. For solving problems with constraints,\n we recommend using the hybrid solvers in the Leap :tm: service. You can find\n documentation for the hybrid solvers at https://docs.dwavequantum.com.\n\n.. image:: https://img.shields.io/pypi/v/penaltymodel.svg\n :target: https://pypi.python.org/pypi/penaltymodel\n\n.. image:: https://img.shields.io/pypi/pyversions/penaltymodel.svg\n :target: https://pypi.python.org/pypi/penaltymodel\n\n.. image:: https://codecov.io/gh/dwavesystems/penaltymodel/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/dwavesystems/penaltymodel\n\n.. image:: https://circleci.com/gh/dwavesystems/penaltymodel.svg?style=svg\n :target: https://circleci.com/gh/dwavesystems/penaltymodel\n\n============\npenaltymodel\n============\n\n.. start_penaltymodel_about\n\nOne approach to solve a constraint satisfaction problem\n(`CSP <https://en.wikipedia.org/wiki/Constraint_satisfaction_problem>`_) using\nan `Ising model <https://en.wikipedia.org/wiki/Ising_model>`_ or a\n`QUBO <https://en.wikipedia.org/wiki/Quadratic_unconstrained_binary_optimization>`_,\nis to map each individual constraint in the CSP to a 'small' Ising model or\nQUBO. This mapping is called a *penalty model*.\n\n.. end_penaltymodel_about\n\nFor more information, see\n`penalty models <https://docs.dwavequantum.com/en/latest/concepts/penalty.html>`_.\n\nInstallation\n============\n\nTo install the core package:\n\n.. code-block:: bash\n\n pip install penaltymodel\n\nLicense\n=======\n\nReleased under the Apache License 2.0\n\nContributing\n============\n\nOcean's\n`contributing guide <https://docs.dwavequantum.com/en/latest/ocean/contribute.html>`_\nhas guidelines for contributing to Ocean packages.\n\nRelease Notes\n-------------\n\npenaltymodel makes use of `reno <https://docs.openstack.org/reno/>`_ to manage\nits release notes.\n\nWhen making a contribution to penaltymodel that will affect users, create a new\nrelease note file by running\n\n.. code-block:: bash\n\n reno new your-short-descriptor-here\n\nYou can then edit the file created under ``releasenotes/notes/``.\nRemove any sections not relevant to your changes.\nCommit the file along with your changes.\n\nSee reno's `user guide <https://docs.openstack.org/reno/latest/user/usage.html>`_\nfor details.\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Package for creating penalty models.",
"version": "1.3.0",
"project_urls": {
"Changes": "https://github.com/dwavesystems/penaltymodel/releases",
"Documentation": "https://docs.dwavequantum.com",
"Homepage": "https://github.com/dwavesystems/penaltymodel",
"Souce Code": "https://github.com/dwavesystems/penaltymodel"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2a16501a538776abb83ef02243e937fb7b196a7377e49bb474798ca8bc5a58a6",
"md5": "7216f70c4ac9ded53030fc3b4f918e01",
"sha256": "543f596a5c1fb602d18355c46349e8ccb2842b335de86958d7525de0d993eda9"
},
"downloads": -1,
"filename": "penaltymodel-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7216f70c4ac9ded53030fc3b4f918e01",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 36133,
"upload_time": "2025-08-26T16:27:25",
"upload_time_iso_8601": "2025-08-26T16:27:25.868995Z",
"url": "https://files.pythonhosted.org/packages/2a/16/501a538776abb83ef02243e937fb7b196a7377e49bb474798ca8bc5a58a6/penaltymodel-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "02f63af591b63fca93de731711f8c985e5b7f5ef97de28e334ffeec413c31c82",
"md5": "5ae366c094344a85d1a809cac946d0fa",
"sha256": "34af628916420218b16a8ceca608abbf8530b731fe05902392a3a3bceee395d0"
},
"downloads": -1,
"filename": "penaltymodel-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "5ae366c094344a85d1a809cac946d0fa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 32231,
"upload_time": "2025-08-26T16:27:26",
"upload_time_iso_8601": "2025-08-26T16:27:26.769163Z",
"url": "https://files.pythonhosted.org/packages/02/f6/3af591b63fca93de731711f8c985e5b7f5ef97de28e334ffeec413c31c82/penaltymodel-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-26 16:27:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dwavesystems",
"github_project": "penaltymodel",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"circle": true,
"requirements": [
{
"name": "dimod",
"specs": [
[
"==",
"0.12.17"
]
]
},
{
"name": "homebase",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "networkx",
"specs": [
[
"==",
"3.0"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"1.21.0"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"2.1.0"
]
]
},
{
"name": "scipy",
"specs": [
[
"==",
"1.7.3"
]
]
},
{
"name": "scipy",
"specs": [
[
"==",
"1.14.1"
]
]
},
{
"name": "reno",
"specs": [
[
"==",
"3.3.0"
]
]
}
],
"lcname": "penaltymodel"
}