Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
Linux/Mac/Windows build status Code coverage Last version on PyPI PyPI - Python Version


dwave-preprocessing provides preprocessing tools for binary quadratic models (BQM) and presolve algorithms for constrained quadratic models (CQM).

import dwave.preprocessing

This package contains several preprocessing composites that can aid in solving BQMs and a presolver that can reduce a problem's redundant variables and constraints to improve the accuracy of CQMs. For details on underlying algorithms and usage, see the package's Reference Documentation.


Install from a package on PyPI:

pip install dwave-preprocessing

or install from source:

pip install -r requirements.txt
python build_ext --inplace
python install


Released under the Apache License 2.0. See LICENSE file.


Ocean's contributing guide has guidelines for contributing to Ocean packages.

Release Notes

dwave-preprocessing makes use of reno to manage its release notes.

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

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.