πŸŽ‰ 75% of content is free forever β€” Unlock Premium from $10/mo β†’
CW
NEWSLIVESearch All Content
πŸ’Ό Servicesℹ️ Aboutβœ‰οΈ ContactView Pricing Plansfrom $10

Optimization Landscape

Many real-world problems reduce to finding the minimum of a cost function:

Classical solvers work well for moderate sizes, but worst-case instances are NP-hard. Quantum optimization algorithms aim to provide speedups for specific problem classes β€” and "specific" is the operative word: no quantum algorithm is known to solve arbitrary NP-hard problems efficiently, so every credible claim comes with a problem structure attached.

The canonical teaching instance is MaxCut on a triangle. Three vertices, three edges, and eight possible assignments. The best partition puts two vertices on one side and one on the other, cutting 2 of the 3 edges, so the optimal value is 2 and the best any randomized classical algorithm can guarantee in expectation is edges. That ratio of on this tiny graph is already the flavor of the trade-off the whole field works with: quantum methods chase higher approximation ratios and better time-to-solution distributions, not proofs of optimality.

Two encodings appear everywhere in this space. The QUBO (quadratic unconstrained binary optimization) form writes the cost as over bits. The Ising form uses spins with . The two are related by the substitution , and every annealer and QAOA circuit consumes one of these two forms natively. Constraints such as "visit every city exactly once" in the traveling salesman problem are not dropped β€” they are folded into the cost as penalty terms with weights large enough to make infeasible states uncompetitive.

QAOA Deep Dive

The QAOA circuit for depth :

Key properties:

  • At , QAOA is equivalent to a single layer of alternating rotations
  • For MaxCut on 3-regular graphs, gives approximation ratio
  • As , QAOA converges to the exact solution

Parameter optimization is performed classically using gradient-based or gradient-free methods. Each candidate parameter pair requires preparing the state and estimating from many shots, so a modest 5,000-shot budget per objective evaluation times a few hundred optimizer iterations already means millions of circuit executions. On hardware this dominates the wall-clock cost, not the gate time itself.

Mechanically the two unitaries are simple to compile. The cost unitary decomposes into a phase on each computational basis state; for MaxCut each edge contributes a rotation implemented with a CNOT–RZ–CNOT triple. The mixer with is just a layer of single-qubit RY rotations. So a depth- QAOA circuit on qubits and edges has roughly single-qubit gates and two-qubit gates β€” an instance-sized circuit that stays shallow even when reaches the hundreds.

Quantum Annealing

Quantum annealing uses the adiabatic theorem to solve optimization problems:

where is the total annealing time. If the evolution is slow enough, the system remains in the ground state throughout. "Slow enough" is quantitative: the adiabatic condition ties the required time to the inverse square of the minimum spectral gap along the path, . Hard instances are exactly the ones where collapses to a tiny value near a phase transition in the middle of the schedule, which is why the same machine solves easy instances in microseconds and struggles on structurally frustrated ones.

Real annealers add two complications. First, the physical temperature (tens of millikelvin) means thermal excitations across a gap of a few gigahertz are non-negligible, so success probability saturates rather than reaching 1 unless the schedule is tuned with pauses or reverse anneals. Second, analog control errors shift the effective and away from their targets by roughly in normalized units, which biases the energy landscape itself. Practitioners therefore report time-to-solution: the total time including repeated runs needed to find the ground state with 99% probability, not the length of a single sweep.

The D-Wave quantum annealer implements this approach with up to 5000+ qubits, though connectivity limitations and decoherence affect performance.

D-Wave Architecture

The D-Wave quantum annealer uses a Chimera or Pegasus graph topology:

  • Chimera: unit cells of 8 qubits in bipartite structure
  • Pegasus: more connected, enabling denser problem embeddings β€” degree-15 graphs versus degree 6, which shortens the chains described below

Minor embedding maps problem variables to physical qubits, with chains of qubits representing a single logical variable. The energy of a D-Wave system is:

where are biases and are coupling strengths. Embedding a dense problem graph into a sparse hardware graph is the step that quietly eats qubits: a logical variable that must couple to neighbors needs a chain of at least physical qubits, so fully connected problems of size can consume physical qubits even though only logical variables exist. The chain strength multiplier that holds a chain together is a tuning knob β€” too weak and chains break during sampling, too strong and the effective chain energy distorts the original problem. Broken chains are detected after sampling (the two ends disagree) and scored by a chain break fraction; values above a few percent usually mean the embedding or chain strength needs rework.

Combinatorial Problems

MaxCut: Partition vertices into two sets to maximize edges between them.

Traveling Salesman Problem (TSP): Find the shortest tour visiting all cities.

Encoding TSP as a QUBO needs one binary per (city, position) pair β€” variables for cities β€” plus penalties for visiting each city once and occupying each position once. The penalty weights must exceed the largest distance in the instance, which inflates the coefficient range and stresses analog precision. That blow-up is the practical reason small TSP instances (up to roughly 20 cities on current annealers) are the realistic demonstrations.

Portfolio Optimization: Maximize return while minimizing risk.

where is expected returns, is covariance matrix, and is risk aversion. Continuous weights are discretized into a few levels per asset, turning a convex quadratic program into a QUBO with more variables but a much gentler constraint structure than TSP β€” one reason finance demos appear frequently.

Hybrid Quantum-Classical Approaches

The most promising near-term approach combines quantum and classical processing:

  1. Decompose the problem into subproblems
  2. Solve subproblems with quantum annealing or QAOA
  3. Combine solutions classically
  4. Iterate until convergence

D-Wave's Leap hybrid solver uses this approach and has been applied to logistics, scheduling, and financial optimization problems. The classical side of the loop is not a token contribution: tabu search and simulated annealing baselines on the same QUBOs are strong, and any honest evaluation reports the quantum sampler's contribution relative to those baselines under equal wall-clock budgets. Hybrid designs work best when subproblems map to the hardware's native connectivity, so decomposition along cluster boundaries of the problem graph is a standard trick.

Python: QAOA for MaxCut

python
import numpy as np

def maxcut_cost(cut, graph):
    # Compute MaxCut cost for a given partition.
    return sum(1 for i, j in graph if cut[i] != cut[j])

def qaoa_expectation(gamma, beta, graph):
    # Compute QAOA expectation for MaxCut (P=1).
    cost = 0
    for i, j in graph:
        cost += 0.5 * (1 - np.cos(2 * gamma) * np.cos(2 * beta))
    return cost

graph = [(0,1), (1,2), (0,2)]

from scipy.optimize import minimize
def objective(params):
    return -qaoa_expectation(params[0], params[1], graph)

result = minimize(objective, [0.5, 0.5], method='COBYLA')
print(f"Optimal gamma: {result.x[0]:.4f}")
print(f"Optimal beta: {result.x[1]:.4f}")
print(f"QAOA value: {-result.fun:.4f}")

This demonstrates the QAOA optimization loop for a simple MaxCut instance. For the triangle, the exact maximum is 2, so compare the printed QAOA value against 2 (and against the classical randomized baseline of 1.5) to see where depth-1 QAOA lands before you invest in deeper circuits.

The second script turns the same triangle into the QUBO an annealer would actually receive, then checks it against brute force and simulated annealing β€” the comparison every quantum optimization experiment should include:

python
import itertools
import numpy as np

edges = [(0, 1), (1, 2), (0, 2)]

def maxcut_ising_energy(spins, edges, h=None, J=1.0):
    # spins: array of +1/-1; cost is minus the number of cut edges.
    h = h if h is not None else np.zeros(len(spins))
    e = sum(h[i] * spins[i] for i in range(len(spins)))
    e += sum(J * spins[i] * spins[j] * 0.5 for i, j in edges)
    return e

best = None
for bits in itertools.product([1, -1], repeat=3):
    e = maxcut_ising_energy(bits, edges)
    if best is None or e < best[0]:
        best = (e, bits)
print(f"Brute-force ground energy: {best[0]} on spins {best[1]}")

rng = np.random.default_rng(0)
spins = rng.choice([1, -1], size=3)
energy = maxcut_ising_energy(spins, edges)
temp = 2.0
for _ in range(2000):
    i = rng.integers(3)
    trial = spins.copy()
    trial[i] *= -1
    dE = maxcut_ising_energy(trial, edges) - energy
    if dE < 0 or rng.random() < np.exp(-dE / temp):
        spins, energy = trial, maxcut_ising_energy(trial, edges)
    temp *= 0.995
print(f"Simulated annealing energy: {energy} on spins {spins}")
print(f"Cut value: {sum(1 for i, j in edges if spins[i] != spins[j])}")

Both searches should find energy , meaning all three edges cut is impossible and two is optimal β€” the same answer QAOA targets, reached classically. The point of running both is calibration: a quantum sampler must beat this baseline's time-to-solution distribution, not merely reproduce its answer.

QAOA Parameter Setting

For MaxCut on 3-regular graphs with :

These analytical results hold for specific graph classes. For general problems, parameter optimization is required.

Parameter concentration: for large graphs, optimal QAOA parameters concentrate around specific values, reducing the optimization landscape complexity. In practice this means you can often warm-start a new instance with parameters transferred from a similar solved instance, cutting the number of objective evaluations by an order of magnitude.

QAOA Performance Analysis

The QAOA approximation ratio depends on:

  1. Graph structure: regular graphs perform better than random graphs
  2. QAOA depth : deeper circuits give better solutions
  3. Parameter optimization: better parameters improve quality
  4. Initial state: is standard, but other initial states may help

For MaxCut on 3-regular graphs the literature gives a clean progression β€” and a sobering comparison:

MethodApproximation ratio
QAOA 0.6924
QAOA 0.7559
QAOA 0.7924
Goemans–Williamson (classical)0.878

Depth buys ratio, but each extra layer adds more gates and another pair of angles to optimize, while hardware error rates erode the signal that the classical loop is maximizing. On devices with two-qubit error rates near , circuits beyond often stop improving measured cut values even though the noiseless algorithm would still be gaining. That crossover point β€” where algorithmic improvement stops outpacing noise accumulation β€” is the single most important number to extract from any QAOA hardware paper.

Common Mistakes

Reading a QAOA or annealing demo's final energy as evidence of quantum speedup.

Fix: Compare against simulated annealing, tabu search, and GPU-accelerated branch-and-bound under equal wall-clock budgets, and report time-to-solution at fixed success probability rather than a single best energy.

Assuming more physical qubits automatically means larger problems can be embedded.

Fix: Minor embedding consumes chains of physical qubits per logical variable, so dense problems of n variables can need O(n^2) physical qubits. Check the chain lengths your embedding actually produced before quoting a maximum problem size.

Increasing QAOA depth P indefinitely to chase the noiseless approximation ratio.

Fix: Two-qubit errors accumulate with every added layer, so measured solution quality peaks at a hardware-specific depth β€” typically P between 4 and 10 on current devices β€” and degrades beyond it. Sweep P and plot quality against it instead of assuming deeper is better.

Key Takeaways

  • Quantum optimization targets approximation ratios and time-to-solution distributions on structured problems; no known quantum method solves arbitrary NP-hard instances efficiently.
  • QAOA alternates cost and mixer unitaries for P layers with 2P classical parameters; on hardware the shot budget for parameter optimization, not gate time, usually dominates runtime.
  • Annealers consume Ising or QUBO energies directly, but sparse hardware connectivity forces minor embeddings whose chains and chain-strength tuning determine whether results are trustworthy.
  • Credible speedup claims require equal-budget classical baselines β€” simulated annealing and tabu search are the minimum bar β€” plus error bars from repeated runs.
CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-16

β€”
β˜†β˜†β˜†β˜†β˜†
0 ratings

Rate & Feedback

Need Expert Quantum Computing Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement