QUBO vs Ising Models for Quantum Optimisation: Formulation, Conversion and Validation
QUBOIsing modelquantum optimisationQAOAvariational algorithmsmathematical modelling

QUBO vs Ising Models for Quantum Optimisation: Formulation, Conversion and Validation

SSmart Qubit Labs Editorial Team
2026-11-15
7 min read

A practical checklist for choosing, converting and validating QUBO and Ising models in quantum optimisation workflows.

QUBO and Ising models describe closely related binary optimisation problems, but their variable conventions, coefficient formats and solver interfaces are different. This guide gives you a reusable workflow for choosing a formulation, converting between models, adding constraints safely and validating the result with scheduling, assignment and routing examples.

Overview

A QUBO—quadratic unconstrained binary optimisation—uses binary variables, usually written as xi ∈ {0, 1}. Its objective is commonly written as:

F(x) = xTQx + c

Depending on the software, Q may be stored as a full symmetric matrix, an upper-triangular matrix or a list of linear and quadratic terms. Always check which convention is being used before comparing coefficients.

An Ising model uses spin variables, written as si ∈ {-1, +1}, with an energy function such as:

E(s) = sTJs + hTs + c

Here, J contains pairwise couplings and h contains local fields. The two representations are equivalent under a change of variables:

si = 2xi - 1 and xi = (si + 1) / 2.

The practical choice is usually determined by the solver interface rather than by the underlying business problem. QUBO is often convenient when you are starting with Boolean decisions and penalty constraints. Ising is natural when a tool expects spin variables or when you are reasoning about energy landscapes. Gate-model workflows, including QAOA and other variational algorithms, may accept either form after mapping the variables to qubits, but the SDK’s objective and operator conventions still need to be checked.

QuestionQUBOIsing
Variable domainxi ∈ {0, 1}si ∈ {-1, +1}
Typical meaningFalse/true, excluded/selectedDown/up spin or two-state choice
ObjectivexTQx, plus constantssTJs + hTs, plus constants
ConstraintsUsually converted to penalty termsAlso represented through penalties after conversion
Common implementation riskDouble-counting off-diagonal termsConfusing coupling, field and sign conventions
Best first checkEvaluate every binary assignment directlyConvert spins back to binary values and evaluate the original model

The constant offset does not change which assignment is optimal, but it does matter when you compare reported objective values across formulations. Preserve it when you need matching energies, debugging output or a meaningful comparison with a classical reference implementation.

Checklist by scenario

When formulating a new scheduling problem

  1. Define the decision variables. For example, let xe,t equal 1 when employee e is assigned to time slot t, and 0 otherwise.
  2. Write the business objective separately. A cost for assigning an employee to an undesirable slot might be Σ ce,txe,t. Do not add penalties until the business objective is clear.
  3. Add one-hot constraints. If each employee must receive exactly one slot, use a penalty such as A(Σtxe,t - 1)2. Expanding the square produces linear and quadratic QUBO terms.
  4. Add coverage constraints. If every slot needs a required number of employees, create a similar squared penalty for each slot.
  5. Choose a penalty scale. A should be large enough that violating a hard constraint is worse than the largest useful improvement in the business objective, but not so large that it overwhelms all other coefficients.
  6. Validate feasibility first. Inspect the lowest-energy samples and confirm that every selected assignment satisfies the scheduling rules.

When building an assignment model

Suppose item i must be assigned to exactly one location l. Use xi,l ∈ {0,1} and the constraint penalty:

A(Σlxi,l - 1)2

Pair this with assignment costs, capacity penalties and, where relevant, incompatibility terms such as Bxi,lxj,l. This makes the formulation explicit: the one-location rule is enforced by A, while the preference or cost of a particular location is represented separately.

Before converting to Ising, test the QUBO with a brute-force enumerator if the instance is small enough. Check that an item assigned twice or not assigned at all receives the expected penalty, and that a legal but more expensive assignment is ranked below the preferred legal assignment.

When representing a routing problem

A simple time-indexed routing model can use xv,p = 1 when vehicle or location v appears at route position p. One-hot penalties enforce one location per position and, if required, one position per location. Travel costs can be represented with quadratic terms:

Σ du,vxu,pxv,p+1

where du,v is the cost of moving from u to v. This encoding can grow quickly as the number of locations and positions increases, so record the variable count, non-zero term count and constraint structure before moving to a quantum solver. A valid formulation is not automatically a practical one.

When switching from QUBO to Ising

  1. Confirm the source QUBO convention: does xTQx use a symmetric matrix, or are cross-term coefficients stored once?
  2. Replace every binary variable with xi = (si + 1)/2.
  3. Expand the expression symbolically or with a trusted algebra tool.
  4. Collect quadratic spin terms into J, linear terms into h and constants into c.
  5. Compare energies for every assignment in a small test case.
  6. Check whether the target interface minimises or maximises the returned objective. Reverse the sign when necessary.

For a symmetric matrix Q under the convention F(x) = xTQx, substitution gives J = Q/4, h = Q1/2 and c = 1TQ1/4, where 1 is the all-ones vector. This compact formula is useful only when the matrix convention is genuinely symmetric. If a library stores each interaction once, convert its linear and pairwise terms explicitly instead of applying the formula blindly.

What to double-check

Coefficient and variable conventions

Write down the meaning of each variable in plain language. Then write down the exact mathematical objective used by the SDK or solver. A term listed as Qijxixj may not mean the same thing as an entry in a symmetric matrix where both Qij and Qji contribute.

Penalty terms

For a constraint g(x) = 0, the standard quadratic penalty is A[g(x)]2. For an inequality, a slack variable or another encoding may be needed; simply squaring the original inequality does not always represent the intended feasible region. If a constraint is soft rather than hard, give it a deliberate business weight instead of treating it as an arbitrary large penalty.

Scaling and precision

Conversion divides or redistributes coefficients, so inspect the resulting ranges. Very small coefficients may be difficult to distinguish from numerical noise in some workflows, while very large penalties can make the optimisation landscape poorly balanced. Record the original coefficients, converted coefficients, scaling factor and any rounding applied.

Objective direction

Many formulations are written as minimisation problems, while an algorithm or API may expose a maximisation objective. A sign change affects every term, including penalties. Confirm the direction with a deliberately simple test where the best assignment is obvious.

Solver output

Do not judge a result by energy alone. Decode each sample, calculate the original business objective, count constraint violations and retain the raw solver metadata. For experiments involving QAOA or another variational method, record circuit settings, optimiser settings, shots and backend information. The quantum experiment reproducibility checklist provides a useful companion workflow.

Common mistakes

  • Mixing binary and spin interpretations: treating 0 as -1 without applying the full variable transformation changes the model.
  • Double-counting interactions: entering a pairwise coefficient in both Qij and Qji when the API expects one term can double its effect.
  • Choosing penalties by habit: an arbitrary value such as 10 may be too small or unnecessarily dominant. Estimate the largest objective improvement that a constraint violation could enable.
  • Ignoring constants: dropping the constant is acceptable for finding an optimiser, but not for comparing absolute energies between models.
  • Accepting infeasible samples: the lowest reported energy may still violate a constraint if penalties are insufficient or sampling is imperfect.
  • Changing encodings without retesting: variable ordering, slack-variable conventions and bitstring endianness can alter how solutions are decoded.
  • Comparing solvers without a common baseline: use the same original objective, constraints, stopping budget and feasibility criteria. See the benchmarking guide for a broader comparison workflow.

For implementation work, consult the relevant SDK documentation and compatibility notes before adapting code. The quantum SDK compatibility matrix can help organise differences between Qiskit, Cirq and PennyLane workflows.

When to revisit

Revisit the formulation before each seasonal planning cycle, whenever costs or capacity rules change, and whenever the workflow or solver interface changes. A model that was correctly encoded for one API may need adjustment after a migration to another quantum cloud platform, SDK or backend.

Use this practical review sequence:

  1. Re-read the variable definitions and confirm that the business meaning has not changed.
  2. Regenerate the QUBO or Ising coefficients from the source model rather than editing a matrix manually.
  3. Run exhaustive validation on a small instance and compare QUBO and Ising energies after conversion.
  4. Test constraint satisfaction separately from objective quality.
  5. Compare against a classical baseline using the original business objective.
  6. Record solver, SDK, encoding, scaling and decoding details so the next review is reproducible.

If you are evaluating a larger enterprise problem, connect the mathematical model to a documented business case and feasibility assessment. The guides on building a quantum computing business case and evaluating supply-chain optimisation offer useful structures for that wider review.

The short answer to “QUBO or Ising?” is: formulate in the representation that makes the business constraints clearest, then convert only when the target solver requires it. Correct variable definitions, explicit conventions and small-instance validation matter more than the label attached to the model.

Related Topics

#QUBO#Ising model#quantum optimisation#QAOA#variational algorithms#mathematical modelling
S

Smart Qubit Labs Editorial Team

Quantum Computing Editors

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.