Quantum Modeler Methodology

The implemented formulations, bounded QAOA search, exact classical checks, and resource projections.

Documentation version: 2.1 · Compatible with: current AutomationGlance simulator · Last reviewed: 2026-10-17

Execution and formulation

All nine Modelers use ideal, noiseless classical statevector simulation with at most 8 total decision and auxiliary qubits. Each executes p=1 QAOA and performs a separate exhaustive classical check. No quantum hardware or quantum advantage is demonstrated. Worked examples make the algebra independently checkable.

Binary variables and Ising convention

xᵢ ∈ {0,1}; Zᵢ has eigenvalue +1 on |0⟩ and −1 on |1⟩. Thus xᵢ = (I−Zᵢ)/2. This maps classical assignments to computational-basis states.

QUBO representation

E(x) = c + Σᵢ aᵢxᵢ + Σᵢ<ⱼ bᵢⱼxᵢxⱼ is minimized. The constant changes reported energies but not minimizing assignments. Since xᵢ²=xᵢ, diagonal matrix coefficients belong in the linear array. Pair coefficients occur once; the input is a sparse coefficient list, not a full matrix.

Custom QUBO accepts one coefficient per variable, up to 28 distinct pairs, and finite coefficients/constant of magnitude at most 1,000,000. A reversed pair is normalized to i<j; supplying both (i,j) and (j,i), or any duplicate, is rejected, not summed. Diagonal pair entries are rejected. To convert a matrix xᵀQx, use aᵢ=Qᵢᵢ and bᵢⱼ=Qᵢⱼ+Qⱼᵢ. A symmetric matrix therefore contributes twice each off-diagonal entry.

AutomationGlance validates the QUBO that you provide. It cannot infer unstated business constraints. Constraints must be encoded in the QUBO, typically using appropriate penalty terms. Custom QUBO is unconstrained binary minimization; it does not attach a separate business-feasibility meaning to an assignment.

Auditable QUBO → Ising mapping

xᵢxⱼ = (I−Zᵢ−Zⱼ+ZᵢZⱼ)/4. Substitution gives H = C·I + Σᵢ hᵢZᵢ + Σᵢ<ⱼ JᵢⱼZᵢZⱼ, with

Each basis eigenvalue of H equals the original E(x). Compilation divides nonconstant coefficients by s=max(1,max|hᵢ|,max|Jᵢⱼ|). This preserves ground states. Reported energies use the original, unscaled QUBO. The constant's global phase is omitted from the circuit.

Max-Cut

The graph is an unweighted simple undirected graph with 2–8 executed vertices. Edges have distinct in-range endpoints; duplicate undirected edges are rejected. Empty graphs are permitted. Bit xᵢ selects the partition of vertex i; an edge is cut if its endpoint bits differ.

Maximize C(x)=Σ₍ᵢⱼ₎∈E (xᵢ+xⱼ−2xᵢxⱼ). The cost Hamiltonian is H꜀=Σ₍ᵢⱼ₎∈E (I−ZᵢZⱼ)/2. The product uses this maximization convention directly, rather than silently minimizing C. One cost interaction exp(−iγ(I−ZᵢZⱼ)/2), ignoring global phase, compiles to CX(i,j), RZ(j,−γ), CX(i,j). Measured bitstrings are candidate graph partitions.

Knapsack

Select items xᵢ to maximize Σvᵢxᵢ with Σwᵢxᵢ≤C. Weights are integers 1–127, values 1–1000, capacity 1–127, with 1–7 items and total encoded width ≤8. Duplicate items are distinct optional selections. Binary slack sₖ has weights 2ᵏ for k=0…floor(log₂C), so q=n+floor(log₂C)+1.

The minimized encoding is E(x,s)=−Σvᵢxᵢ+A(Σwᵢxᵢ+Σ2ᵏsₖ−C)², with fixed A=Σvᵢ+1. This is expanded using x²=x. With combined weights d=(w₀,…,1,2,4,…), the constant is AC², linear coefficients are A(dᵢ²−2Cdᵢ) minus the item value (zero for slack), and pair coefficients are 2Adᵢdⱼ.

For integer inputs, any nonzero equality residual costs at least A, exceeding all possible item rewards. Every feasible item selection can represent its remaining capacity as slack. Thus the exact encoded ground state maximizes feasible value. A feasible selection (weight≤C) can still have the wrong slack and a positive penalty; feasibleProbability and constraintSatisfiedProbability measure different events. The reported conditional expected feasible value averages only over feasible mass.

Penalty formulations depend on suitable coefficients. Here the fixed A has an integer-input guarantee for exact ground states, but a shallow circuit can sample infeasible assignments and large penalties can obscure value differences. No-feasible-sample results keep the measured best and approximation ratio null; the classical answer is never substituted. A zero exact value also has a null ratio.

QAOA: one layer and bounded grid search

Start from |0…0⟩ and apply H to every qubit to prepare |+⟩ⁿ. The ansatz is exp(−iβΣXᵢ) exp(−iγH꜀)|+⟩ⁿ. Apply cost first, then RX(2β) on each qubit, then terminal computational-basis sampling. Parameters are numeric radians; only p=1 (one γ and one β) is supported.

For QUBO/Knapsack, the normalized cost uses RZ(2γhᵢ/s) and CX–RZ(2γJᵢⱼ/s)–CX. Max-Cut uses the sign described above without this QUBO normalization.

Implemented angle search
ModelGridSelection
Max-Cutγ=kπ/8, β=lπ/8; k,l=0…7Maximize exact expected cut; improvements >10⁻¹²
Knapsack / QUBOγ=kπ/4, β=lπ/8; k,l=0…7Minimize original expected energy; improvements >10⁻¹⁰

At most 64 combinations are evaluated, beta varying first; ties retain the first pair. QuantumModel__MaxEvaluations clamps the budget to 1–64 and selects a prefix of that order. Search uses full state probabilities, not noisy shot estimates. This is a fixed grid, not an adaptive variational optimizer. Only the final selected circuit is sampled (1–100,000 shots); modeler seed defaults to 42. An explicit seed and the same backend/runtime reproduce counts; seed does not change the selected angles.

Classical validation

Independent exhaustive enumeration checks at most 256 assignments. Max-Cut enumerates all partitions; Knapsack enumerates item selections with direct capacity checks; Custom QUBO enumerates its supplied energy. These establish the optimum for the supplied bounded model, not an unstated business problem or a projected large instance.

Custom QUBO reports the raw minimum and ground states within tolerance 10⁻⁹+10⁻¹⁴(|c|+Σ|a|+Σ|b|). Its additive optimality gap is best sampled energy minus exact minimum; ratios are inappropriate for arbitrary signed energies. Max-Cut reports best sampled cut/exact cut, with a null ratio when the exact cut is zero. A sampled optimum is not guaranteed.

Executed, projected, logical and physical scale

EXECUTED means an allocated statevector of width ≤8. PROJECTED means symbolic resource arithmetic on requested target sizes; no target graph, solution or statevector was constructed. A projection being small enough to execute does not mean it was executed.

These counts include H preparation and cost/mixer gates, exclude measurement and hardware compilation, and do not establish physical circuit depth. QAOA layer count p is not hardware depth. Target topology, native gates, routing and parallel scheduling would be required for a physical depth estimate. No physical-qubit or error-correction overhead estimate is implemented.

An ideal dense complex-double statevector alone needs 16×2^q bytes: 8 qubits need 4 KiB; 30 need 16 GiB. Simulation also allocates work arrays and results. Symbolic 2^q strings for larger targets describe this exponential growth; they do not claim available memory or executable scale.

Bit ordering and artifacts

Logical assignments display x0…xN−1 left to right; q0 is the most significant bit of statevector indexing. Knapsack puts item bits first, then slack bits of weights 1,2,4,… . For three modeler variables, 100 selects x0 only. Exports measure xi → q[i] → c[i]; Qiskit commonly displays a single classical register as c[N−1]…c[0], yielding 001 for that same assignment. Reverse only after checking the actual register/measurement mapping; arbitrary subsets need explicit conversion. No external hardware or SDK execution is claimed.

All modelers export DSL and OpenQASM 2.0. Custom QUBO additionally exports automationglance.qubo.v1 JSON, with objective/order/provenance metadata; extract coefficient fields when making a strict API request. Edits invalidate old exports until rebuilt. See export compatibility and sources and implementation references.

Validated domain modelers

Portfolio Selection minimizes riskWeight × xᵀΣx − returnsᵀx for exactly K binary assets. The cardinality penalty A(Σx−K)² uses A = 1 + the sum of absolute unpenalized QUBO coefficients, exceeding any possible objective improvement. One qubit per asset, up to eight; no fractional allocations or market feeds.

Covariance must be finite, square, symmetric, and positive semidefinite. Input magnitudes are at most 1,000,000; risk weight is nonnegative. Symmetry tolerance is 1e-10 × max(1,max absolute entry); the eigenvalue tolerance is that value times the asset count. Values are never repaired. Generated coefficients and the constant must also have magnitude at most 1,000,000.

Set Cover minimizes positive integer set costs using AΣ(coverage−1−slack)², with A=1+sum(costs). An element in d sets needs ceil(log2(d)) slack bits for d≥1, and none when d=0. Uncovered elements make the instance infeasible. The total selection and slack budget is eight qubits.

TSP uses (n−1)² fixed-start city/position bits and one-hot constraints. Three cities fit local execution; four require compile-only processing. Symmetric three-city tours have equal distance.

Job Scheduling checks a supplied integer horizon using operation/start-time variables, precedence and machine non-overlap penalties. It does not minimize makespan.

Vehicle Routing selects from every capacity-feasible simple depot-return route, covers each customer exactly once, and uses fleet-count slack. Its complete candidate expansion is checked before allocation. A three-customer, two-vehicle example fits eight bits.

Problem Compiler accepts JSON for these variants and compiles larger explicit models within its resource limits. Compilation does not solve the domain instance.

Each new Modeler also has an optional large-target projection. TSP uses a target city count: exactly (n−1)² qubits and at most (n−1)(n−2)(2n−3) interactions. Scheduling uses a target operation count and horizon; optional duration counts make the start-variable count exact, otherwise operations × horizon is an upper bound. Routing uses target customer and vehicle counts; optional capacity and a minimum demand lower bound tighten the candidate-route upper bound. Fleet slack is counted exactly. Target inputs never change the small instance, its verification, or its circuit.

Projection arithmetic does not construct a target graph, schedule, route list or statevector. Routing projections accept up to 1,000 customers for bounded arithmetic; explicit routing compilation remains limited to 10. Exact counts and upper bounds are labeled separately. An upper bound exceeding eight does not prove that the actual target cannot fit; feasibility and compile eligibility require a complete explicit input.

Fixed-K Graph Coloring uses vertices × colors one-hot variables, with Σv(Σc x[v,c]−1)² plus same-color edge conflicts. Energy zero means a proper coloring. It tests a supplied color count; it does not compute the chromatic number.

Each model has a separate direct classical reference. Domain feasibility is distinct from penalized energy and, for set cover, auxiliary-bit equality. Only positive-count feasible states qualify as sampled solutions. Infeasible instances and runs with no feasible samples are distinguished; the classical solution is never substituted for measurements.

Scaling formulas are symbolic only; no larger target is allocated or solved. QAOA remains depth one with the existing bounded grid and eight-qubit simulator. See API examples and Lucas (2014) for background on Ising formulations.

Read the visual results

Every Modeler visual describes the last successful small-instance build. The Sampled result / Exact reference selector compares a measured assignment with an independent classical solution. The exact reference is not a quantum measurement, and missing feasible samples are never replaced with the classical answer.

The objective gap is exact minus sampled for Max-Cut and Knapsack, and sampled minus exact for minimization models. Zero gap can describe different assignments with equal objectives. Domain feasibility and objective values remain separate from penalty energies. Probabilities describe the ideal statevector; counts describe the finite measurement sample.

Each view initially highlights a relevant item and shows its details. Node, item and connection inspection does not execute another model or change the exported circuit. Input edits mark the previous visual stale and block exports until rebuilding. Mobile cards summarize measured states; expand the complete distribution to inspect every state.

Compiler formulates models, Modeler executes and compares small instances, and Simulator inspects and runs circuits. These tools can be used independently. Compiler discovery links open the corresponding Modeler without transferring input. After a successful Modeler build, Download Compiler input JSON saves the completed small problem for the Compiler’s existing JSON-file intake; review and compilation remain explicit. Target projections and execution settings are excluded. Custom QUBO source exports preserve the expression, without claiming imported domain verification. Modeler-to-Simulator links preserve the completed circuit, shots and seed.