Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Glossary

Constraint

A constraint is a rule that a candidate solution must satisfy. In optimization, constraints distinguish allowable solutions from choices that may have a good score but cannot be used.

Edition released Entry updated Coverage: Overview
On this page

Plain-language explanation

Constraints can describe budgets, capacities, logical relationships or physical requirements. Some mathematical formulations represent them directly, while others add penalties to discourage violations. The chosen representation affects the difficulty of solving the problem and interpreting the output. A useful result reports both objective quality and whether the relevant constraints were satisfied, including any numerical tolerances.

This prevents a common mistake in optimization headlines: celebrating a low objective value from a solution that fails an essential requirement.

Example

A vehicle-routing candidate might have the shortest total distance while assigning more cargo than a truck can carry. The capacity rule is a constraint. A slightly longer route that respects capacity is useful; the shorter infeasible route is not a valid operational solution.

Scope and limits

Converting a rule into a penalty does not automatically guarantee compliance. A solver may trade a violation for a better objective if the formulation or penalty weight permits it.

Cost function is a related idea. A cost function ranks choices. Constraints determine which choices qualify for consideration. An implementation can combine them, but reporting should still separate quality from feasibility.

Sources

  • D-Wave · Documentation · docs.dwavequantum.com
    Verification scope

    Recorded source check ·

    BQM, QUBO, Ising and constrained models

    Vendor formulation documentation, not evidence of advantage

  • D-Wave · Documentation · docs.dwavequantum.com
    Verification scope

    Recorded source check ·

    Constraints represented by energy penalties

    Penalty selection and numerical precision are problem dependent

  • D-Wave · Documentation · docs.dwavequantum.com
    Verification scope

    Recorded source check ·

    Formulation, solver use and interpreting solutions

    Includes quantum, classical and hybrid routes