← Back to Work

Quantum QAOA on IBM Hardware

Real quantum hardware

I encoded a constrained selection problem as a QAOA circuit and ran it on a real 156-qubit IBM quantum processor. Most quantum demos quietly drop the part where the classical method wins. This writeup leads with it, because the honest result is the interesting one.

The Experiment

Does quantum help a real selection problem?

I took the planning optimizer from my selection engine, a problem of picking the best k items under constraints, and expressed it as a QUBO/HUBO. A self-check verified the QUBO-to-Ising math matched my classical energy function exactly on 12 qubits.

Then I ran it as a fixed-angle p=1 QAOA on a real IBM Heron r2 processor and compared the sampled solutions against an exact classical solver.

The Honest Result

Classical won. The quantum run still taught me something.

The exact solver found the optimum cleanly. The QPU, noise-dominated at this scale, sampled the true optimum only about 0.34% of the time, roughly 14x better than random but nowhere near useful. The valuable part: the QPU's lowest-energy sample picked the wrong cardinality, which exposed that my soft cardinality penalty was too weak for any unconstrained solver.

The run.

156
Qubit Heron r2 (ibm_fez)
4,096
Shots
~0.34%
Optimum sampled
~14x
Better than uniform

Verifiable run: IBM job d8pegrq01fac73d1khc0 on ibm_fez, 2026-06-17.

The real finding.

Enforcing a constraint in the solver is not the same as enforcing it in the encoding. My classical path applies a hard cardinality constraint, so it never sees the failure. A raw quantum sampler optimizes the unconstrained energy surface directly, so a too-soft penalty let the global minimum drift off the required k.

That is a concrete, reusable lesson for any external or quantum solver: constraints have to be baked into the objective, not assumed by the runtime. The cheap classical tool is the right answer at this scale, and knowing that is the point.

Tech stack.

Quantum

  • Qiskit Runtime
  • IBM Heron r2
  • Fixed-angle p=1 QAOA

Formulation

  • QUBO / HUBO
  • QUBO-to-Ising mapping
  • Exact-k classical solver

Engineering

  • Python
  • Self-check harness
  • Reproducible run JSON