Cost function
A cost function assigns a numerical score to a candidate solution so an optimization method can compare choices. The function must reflect what the user actually wants to minimize or maximize.
Also called Objective function
On this page
Plain-language explanation
The name is general: the score could represent distance, energy, delay or a weighted combination of goals. A quantum algorithm optimizes the mathematical score it is given, not an unstated business objective. Choosing weights and units matters, and constraints may be represented separately or through penalties. A lower computed score is useful only if the model faithfully captures the real decision.
Understanding the cost function is often more important than knowing the algorithm’s name. It reveals what an impressive numerical improvement actually means.
Example
A scheduling objective could reward short completion times but ignore overtime. The solver might produce a low score by assigning unrealistic working hours. Changing the objective or adding constraints can make the schedule usable, while also changing which solutions are considered good.
Scope and limits
An objective value cannot be compared across studies without checking definitions, units and normalization. A reported percentage improvement may describe a mathematical score rather than a comparable operational benefit.
Constraint is a related idea. The objective expresses what is preferred. A constraint expresses what is allowed. Encoding both into one formula is possible, but their roles remain conceptually different.
Sources
Verification scope
Recorded source check ·
BQM, QUBO, Ising and constrained models
Vendor formulation documentation, not evidence of advantage
Verification scope
Recorded source check ·
Constraints represented by energy penalties
Penalty selection and numerical precision are problem dependent
Verification scope
Recorded source check ·
Formulation, solver use and interpreting solutions
Includes quantum, classical and hybrid routes