Skip to main contentIBM Quantum Documentation Preview
This is a preview build of IBM Quantum® documentation. Refer to quantum.cloud.ibm.com/docs for the official documentation.

Constrained Quantum Optimizer - A Qiskit Function by Aqarios

See the API reference

Note

Qiskit Functions are an experimental feature available only to IBM Quantum® Premium Plan, Flex Plan, and On-Prem (via IBM Quantum Platform API) Plan users. They are in preview release status and subject to change.


Overview

With the Constrained Quantum Optimizer by Aqarios, you can solve constrained binary optimization problems on IBM® quantum hardware without manual reformulation and circuit mapping. Simply supply a problem as an LP file, an MPS file, or a Luna Model. The function handles reformulation, circuit synthesis, transpilation, and hardware execution automatically. The solver utilizes iterative warm-starting [1] of the FlexQAOA algorithm, a constraint-native extension of the Quantum Approximate Optimization Algorithm (QAOA).

The optimizer targets binary problems with constraints. In particular, one-hot constraints and set-packing constraints can be natively enforced by using XY-mixers. Other constraint types are automatically reformulated as penalty terms.

Supported variable types

The function solves discrete problems only. Every decision variable must be binary, or integer with an explicit lower and upper bound, so that it can be encoded into qubits. Continuous (real-valued) variables are not supported: a model that contains them is rejected with error code 4710.


Description

Disclaimer

Performance can depend on both the problem instance and subsequent processing steps. In some cases, classical samples and quantum-generated samples might achieve similar final solution quality after equivalent post-processing. Evaluation should therefore consider the complete optimization workflow.

The Constrained Quantum Optimizer implements the Iterative warm-start XY-mixer QAOA(IWS-QAOA) [1]. The algorithm runs fixed-angle QAOA circuits on quantum hardware and updates the initial warm-start probabilities of each circuit using measurement outcomes from the previous iteration. No variational parameter training is required; instead, a fixed linear ramp parametrization is chosen.

By using XY-mixers to enforce one-hot constraints, you can drastically improve solution quality for constrained problems, because the search space is practically reduced to a smaller feasible subspace — and no additional complexity, due to penalty terms, is introduced in the optimization landscape.

Workflow

The workflow of the function is described below:

  1. Preprocessing: Before circuit synthesis, the optimizer analyzes the constraint structure of the input problem:
    • Graph preprocessing: When applicable to the problem, it is analyzed as a graph, where edges determine the relationship between variables. This graph analysis enables two preprocessing problem enhancements. First, single constraints can be aggregated to one large constraint by using clique merging, so that they are represented by a single XY-mixer. Second, variables with only a single neighbor can be fixed deterministically, reducing the problem size and complexity.
    • Constraint resolution: The preprocessor handles each constraint separately: If the constraint is a one-hot constraint, it can be enforced through XY-mixers. If it is a set-packing constraint, it will first be transformed to a one-hot constraint. Equality constraints are handled through quadratic penalties, and inequality constraints through unbalanced penalization.
    • Penalty derivation: Constraints that cannot be expressed as one-hot equality constraints are converted to penalty terms. The optimizer derives the penalty strength automatically from the problem structure.
  2. Iterative warm-starting: The optimizer runs multiple parallel warm-start chains. Each chain holds a probability distribution over variable assignments, which is used as the starting probability of the QAOA circuit (warm-start state). At each iteration, a chain samples from the quantum circuit, applies classical postprocessing, and updates its distribution based on the occurrence of samples. Across iterations, this focuses the search on high-quality solutions without a variational optimization loop.

The number of chains (num_parallel), the total shot budget per chain (total_shots), and the number of QAOA repetitions (reps) are the primary controls for trading solution quality against runtime.

Workflow diagram of the Constrained Quantum Optimizer

Benchmarks

The benchmarks below show that the Constrained Quantum Optimizer Qiskit Function is capable of finding high quality, feasible solutions to constrained optimization problems with well above 100 binary variables. Accuracy is the ratio of the found objective value to the known optimum. Runtime is wall-clock time from function invocation to result delivery. QPU usage is the billable Quantum Compute time.

Two problems were examined: The Maximum Independent Set (MIS) problem and the Max-kk-Cut, which is an extension of the well-known MaxCut problem to more than two categories. Max-kk-Cut is also the optimization problem equivalent of the graph coloring decision problem (when all edges are cut, the graph is kk-colorable).

Problem
Variables
Constraints
Qubits
Accuracy
Feasibility
Total runtime (s)
QPU usage (s)
Total shots
MIS es60fst02186280124100.0%True940.2147.025.0k
MIS sloane_2dc_128128517374100.0%True347.6106.012.5k
Max-3-Cut Karate Club99339998.7%True279.5166.025.0k
Max-4-Cut Karate Club13233132100.0%True258.3200.025.0k

Benchmark Notes

  • The above results were obtained on the ibm_marrakesh Heron r2 processor with default options and use_session enabled. For the sloane_2dc_128 instance, total_shots=12500 was used.
  • The reduced qubit count for MIS instances (74 and 124 versus 128 and 186 variables) reflects variable fixing in preprocessing.
  • The problem instances for MIS are taken from the Quantum Optimization Benchmarking Library. - The instance for the Max-kk-Cut problem is the Zachary Karate Club graph, which has a chromatic number of 5.

Get started

To learn how to load the function and run it, see Get started with Constrained Quantum Optimizer.


Get support

For questions or issues, contact support@aqarios.com with your job ID.


Next steps

Recommendations

References

  1. Bucher et al. (2026), Constrained Quantum Optimization via Iterative Warm-Start XY-Mixers 10.1088/1367-2630/ae8ea2