Compiler Settings
ToQUBO.Attributes.StableCompilation — Type
StableCompilation()When set, this boolean flag enables stable reformulation methods, thus yielding predictable results.
Compiler Messages
ToQUBO.Attributes.Warnings — Type
Warnings()Constraint Feasibility Actions
ToQUBO.Attributes.IgnoreFeasibleConstraints — Type
IgnoreFeasibleConstraints()When set, constraints whose encoded residual is provably always feasible are ignored instead of being added as penalty terms.
ToQUBO.Attributes.ErrorInfeasibleConstraints — Type
ErrorInfeasibleConstraints()When set, direct scalar constraints whose encoded residual is provably infeasible stop compilation with MOI.INFEASIBLE.
This does not make infeasible inner constraints of indicator constraints fail the whole model, because those constraints are conditional on the indicator activation.
Solve-Result Feasibility
These attributes control how sampled results surface source-model feasibility and objective values; usage examples live in the results manual.
Marking a source constraint with ToQUBO.Attributes.SoftConstraint excludes its violations from hard-feasibility checks (is_feasible, FeasibilityResult.feasible, primal_status, AutoFeasibilityReport()) and from iterative penalty escalation under ToQUBO.Attributes.MaxPenaltyUpdates, while still recording its residual and violation metrics in ToQUBO.violations and ToQUBO.feasibility_report. It does not remove the constraint's compiled penalty term or reduce its initial automatically inferred penalty coefficient; use ToQUBO.Attributes.ConstraintPenaltyScale, ToQUBO.Attributes.ConstraintPenaltyOffset, or ToQUBO.Attributes.ConstraintEncodingPenaltyHint to control the compiled preference weight.
ToQUBO.Attributes.PrimalFeasibilityCheck — Type
PrimalFeasibilityCheck()When enabled, MOI.PrimalStatus reports MOI.INFEASIBLE_POINT for sampled results whose projected source-variable values violate any source constraint, using the same measurement as ToQUBO.violations. Results that satisfy every source constraint keep the underlying sampler's status.
Enabled by default. Disable to restore the sampler's raw status:
MOI.set(model, Attributes.PrimalFeasibilityCheck(), false)ToQUBO.Attributes.AutoFeasibilityReport — Type
AutoFeasibilityReport()When enabled, MOI.optimize! computes a ToQUBO.FeasibilityReport over every sampled result right after the solver returns, caches it for later ToQUBO.feasibility_report calls, and emits a warning (subject to Warnings) when any sampled result violates a source constraint.
Disabled by default.
ToQUBO.Attributes.SourceObjectiveValue — Type
SourceObjectiveValue(result_index::Integer = 1)Value of the source-model objective function evaluated at the projected source-variable values of sampled result result_index.
For vector objectives (or when ObjectiveWeights / ObjectiveSenses are configured), this returns the scalarized penalty-free source objective using the configured per-objective weights and relative sense signs. Use ObjectiveFunctionValues, SourceObjectiveValues, or ToQUBO.source_objective_values to retrieve the vector of unweighted component objective values.
Unlike MOI.ObjectiveValue, which reports the target QUBO energy including penalty terms introduced by the reformulation, this attribute is penalty-free: it evaluates the original objective on the decoded solution.
ToQUBO.Attributes.SourceObjectiveValues — Type
SourceObjectiveValues(result_index::Integer = 1)Vector of unweighted component source-objective values on sampled result result_index. Equivalent to ObjectiveFunctionValues.
ToQUBO.Attributes.ObjectiveFunctionValues — Type
ObjectiveFunctionValues(result_index::Integer = 1)Vector of component source-objective values on sampled result result_index, evaluated by applying each compiled component pseudo-boolean function in CompiledObjectiveFunctions to the sampled target state (without penalty terms, per-objective weights, or sense sign flips).
ToQUBO.Attributes.ObjectiveFunctionValue — Type
ObjectiveFunctionValue(objective_index::Integer, result_index::Integer = 1)Value of the objective_index-th component source objective on sampled result result_index, evaluated by applying that component's compiled pseudo-boolean function to the sampled target state (without penalty terms, per-objective weights, or sense sign flips).
ToQUBO.Attributes.ObjectiveWeights — Type
ObjectiveWeights()Set or retrieve per-objective scalarization weights for vector (or scalar) objectives.
Pass a vector or tuple of finite real numbers matching the number of objective components, or nothing to reset to unit weights (1). Individual component weights can also be set or overridden with ObjectiveWeight. Setting ObjectiveWeights() clears any previous per-index ObjectiveWeight overrides.
ToQUBO.Attributes.ObjectiveWeight — Type
ObjectiveWeight(index::Integer)Set or retrieve the scalarization weight for the index-th objective component (1-based). Pass nothing to clear the override for index.
ToQUBO.Attributes.ObjectiveSenses — Type
ObjectiveSenses()Set or retrieve per-objective optimization senses (MOI.MIN_SENSE / :min or MOI.MAX_SENSE / :max) for vector (or scalar) objectives.
When unset (nothing), each objective component uses the model's optimization sense (MOI.MAX_SENSE when MOI.ObjectiveSense() is MOI.MAX_SENSE, and MOI.MIN_SENSE otherwise). A component whose sense differs from the target model's optimization sense has its sign flipped during scalarization. Setting ObjectiveSenses() clears any previous per-index ObjectiveSense overrides.
ToQUBO.Attributes.ObjectiveSense — Type
ObjectiveSense(index::Integer)Set or retrieve the optimization sense (MOI.MIN_SENSE / :min or MOI.MAX_SENSE / :max) for the index-th objective component (1-based). Pass nothing to clear the override for index.
ToQUBO.Attributes.SoftConstraint — Type
SoftConstraint()Boolean constraint attribute marking a source constraint as soft for feasibility analysis and iterative penalty refinement.
Soft constraints still have their residuals and violation magnitudes measured and reported by ToQUBO.violations and ToQUBO.feasibility_report, but violating a soft constraint does not make a sampled result hard-infeasible in ToQUBO.is_feasible, FeasibilityResult.feasible, MOI.PrimalStatus, or AutoFeasibilityReport, and does not trigger iterative penalty escalation under MaxPenaltyUpdates.
Marking a constraint with SoftConstraint() does not remove its compiled penalty term from the target QUBO or reduce its initial automatically inferred penalty coefficient. Pair SoftConstraint() with ConstraintPenaltyScale, ConstraintPenaltyOffset, or an explicit ConstraintEncodingPenaltyHint to set a bounded preference weight.
Defaults to false (hard constraint). Pass nothing to reset to the default.
Compiler Optimization
ToQUBO.Attributes.Optimization — Type
Optimization()Working with target architectures
ToQUBO.Attributes.Architecture — Type
Architecture()Selects which solver architecture to use. Defaults to QUBOTools.GenericArchitecture.
Quadratization
ToQUBO.Attributes.Quadratize — Type
Quadratize()Boolean flag to conditionally perform the quadratization step. Is automatically set by the compiler when high-order functions are generated.
ToQUBO.Attributes.QuadratizationMethod — Type
QuadratizationMethod()Defines which quadratization method to use. Available options are defined in the PBO submodule.
ToQUBO.Attributes.StableQuadratization — Type
StableQuadratization()When set, this boolean flag enables stable quadratization methods, thus yielding predictable results. This is intended to be used during tests or other situations where deterministic output is desired. On the other hand, usage in production is not recommended since it requires increased memory and processing resources.
Variable & Constraint Encoding
Automatic Penalty Inference
When a constraint, variable encoding, or slack-variable encoding needs a penalty coefficient and no explicit hint is set, ToQUBO infers one automatically. The default ToQUBO.Attributes.ObjectiveRangePenalty policy uses an objective-range exact-penalty bound:
\[\rho = s \cdot \sigma \cdot \left(\frac{U - L + \beta}{\epsilon}\right)\]
where s is ToQUBO.Attributes.PenaltyScale, β is ToQUBO.Attributes.PenaltyOffset, σ is 1 for minimization models and -1 for maximization models, U - L is the compiled pseudo-boolean objective range, and ϵ is the smallest positive value of the generated nonnegative penalty function. When every feasible source assignment has a target representation with zero generated constraint penalty, the default scale s = 1 and β > 0 penalize any infeasible assignment by more than the largest possible objective improvement available within the compiled objective range. With custom scales, the same sufficient exactness condition is s * (U - L + β) > U - L; smaller scales can make the penalty a tuning heuristic rather than a certified exact penalty. A finite continuous-slack encoding can violate the zero-penalty premise; see Slack Resolution and Penalty Contrast.
The objective range is computed from interval bounds on the compiled PBF over encoded target binary variables. For normal finite JuMP/MOI models this bound is finite after encoding, but it may overestimate the exact source-objective span when an encoding has redundant target states or feasibility relations such as one-hot sums. That overestimate keeps the penalty sufficient, but it is not always the tightest possible objective range.
When the objective range or positive penalty gap cannot be certified, ToQUBO falls back for that coefficient to ToQUBO.Attributes.LegacyPenalty:
\[\rho = s \cdot \sigma \cdot \left(\frac{\delta}{\epsilon} + \beta\right)\]
where δ is the historical objective gap estimate from PBO.maxgap. The selected policy, objective bounds, inferred penalties with their ϵ sources, and any fallback reasons are exposed through ToQUBO.Attributes.PenaltyPolicyMetadata and the "penalty_policy" field in reformulation metadata.
The precedence is:
- Explicit hints such as
ToQUBO.Attributes.ConstraintEncodingPenaltyHintare used as-is. - Constraint overrides
ToQUBO.Attributes.ConstraintPenaltyScaleandToQUBO.Attributes.ConstraintPenaltyOffsetapply to the source constraint and to the slack-variable encoding penalty generated for that constraint. - Global
ToQUBO.Attributes.PenaltyPolicy,ToQUBO.Attributes.PenaltyScale, andToQUBO.Attributes.PenaltyOffsetapply everywhere else.
The defaults are PenaltyPolicy() == ObjectiveRangePenalty(), PenaltyScale() == 1.0, and PenaltyOffset() == 1.0. The coefficient is positive for minimization models and negative for maximization models, so explicit hints should use the same sign as the coefficient you want the compiler to apply.
Verified Feasible Incumbent Penalty Tightening
When a feasible source assignment is known in advance (for example, from a domain heuristic or warm start), ToQUBO.Attributes.ObjectiveRangePenalty can tighten its sufficient penalty bound by replacing the worst-case bound over the entire encoded domain with the independently evaluated objective of the verified incumbent. Supply the candidate assignment via ObjectiveRangePenalty(incumbent), ToQUBO.Attributes.PenaltyIncumbent, or ToQUBO.Attributes.VariablePenaltyIncumbent.
Finite-Domain Sufficient Condition and Limits
For minimization over a finite encoded binary domain $y \in \{0, 1\}^m$, let $L \le f(y)$ hold for every encoded state and let $U_{\text{inc}} = f(y_{\text{inc}})$ be the compiled objective evaluated at a lifted target state $y_{\text{inc}}$ representing a source-feasible incumbent $x_{\text{inc}}$. Suppose every generated constraint, variable-encoding, and slack-encoding penalty $p_i(y)$ is nonnegative over $\{0, 1\}^m$, vanishes at $y_{\text{inc}}$ (and on the represented feasible set), and has a certified positive violation gap $\epsilon_i = \min \{ p_i(y) : p_i(y) > 0 \}$. If the applied penalty coefficients $\rho_i > 0$ satisfy the strict inequality
\[\rho_i \epsilon_i > U_{\text{inc}} - L\]
for every generated penalty $i$, then any assignment $y$ that violates at least one penalty $p_k(y) \ge \epsilon_k$ has penalized objective
\[f(y) + \sum_i \rho_i p_i(y) \ge L + \rho_k \epsilon_k > U_{\text{inc}} = f(y_{\text{inc}}) + \sum_i \rho_i p_i(y_{\text{inc}}).\]
Every infeasible encoded assignment therefore has penalized energy strictly above $U_{\text{inc}}$, while every represented feasible assignment with zero generated penalties retains its original objective $f(y)$. Consequently, every global minimizer of the penalized objective is feasible and achieves the minimum objective among represented feasible assignments. For maximization, the same argument on the sign-adjusted objective gives $|\rho_i| \epsilon_i > U - L_{\text{inc}}$, where $U \ge f(y)$ over the encoded domain and $L_{\text{inc}} = f(y_{\text{inc}})$.
Important limits of this guarantee:
- Sufficient condition, not minimal penalty: $\rho_i \epsilon_i > U_{\text{inc}} - L$ is a sufficient finite-domain bound (Quintero, Vera, and Zuluaga, arXiv:2410.24111v2, Section 3), not the smallest coefficient that separates feasible and infeasible states. At the tied threshold $\rho_i \epsilon_i = U_{\text{inc}} - L$, an infeasible state can tie with $y_{\text{inc}}$.
- Source feasibility and zero-penalty representability: A continuous source point may be feasible in the original model yet lie off the chosen binary discretization grid, or an inequality residual may require a slack value that is not representable with zero penalty. ToQUBO validates both exact original-domain feasibility and zero-penalty target representability in exact rational arithmetic before accepting an incumbent.
- Evaluated objective, not user scalar: ToQUBO never accepts a user-supplied objective scalar as a certificate; it evaluates the actual source and compiled objectives (including objective constants and sense) at the validated assignment and revalidates on every compilation after model edits.
- Applied coefficients and exact penalty forms: The sufficient-bound certificate holds only when every source constraint and variable domain in the source model is enforced across all zero-penalty encoded states (so jointly zero generated penalties imply source feasibility), all applied coefficients (after scales, offsets, and explicit hints) satisfy the strict inequality in exact arithmetic, and no non-exact penalty methods (
LinearPenalty,UnbalancedPenalty,AugmentedLagrangianPenalty), heuristic policies, or higher-order quadratization auxiliaries are active. When any check fails, ToQUBO records the rejection or non-certification reason inToQUBO.Attributes.PenaltyPolicyMetadata("incumbent","objective_bounds","applied_penalties", and"sufficient_bound").
Literature Penalty Heuristics
Besides the exactness-oriented default, ToQUBO offers the static penalty-weight heuristics evaluated by Ayodele (arXiv:2206.11040), selectable through ToQUBO.Attributes.PenaltyPolicy. They typically produce smaller, sampler-friendlier coefficients than the certified bound, at the price of not guaranteeing exactness. Each computes a bound λ on the compiled pseudo-Boolean objective and applies it with the same composition as the default policy, $\rho = s \sigma (\lambda + \beta) / \epsilon$:
| Policy | λ | Scope |
|---|---|---|
ToQUBO.Attributes.UBPositivePenalty | Sum of all non-constant objective coefficients (requires them nonnegative) | global |
ToQUBO.Attributes.MaxCoefficientPenalty | Largest non-constant objective coefficient | global |
ToQUBO.Attributes.VLMPenalty | Largest one-flip objective change (Verma–Lewis) | global |
ToQUBO.Attributes.MOMCPenalty | max(1, VLM / γ), γ the smallest positive one-flip change of the penalty function | per penalty function |
ToQUBO.Attributes.MOCPenalty | max(1, max abs one-flip objective/penalty ratio) | per penalty function |
The per-penalty-function policies (MOMC, MOC) infer one coefficient per constraint, variable-encoding, and slack-encoding penalty, so different constraints receive different weights. One-flip changes generalize the quadratic row-sum form of the reference to arbitrary degree by crediting each monomial to every variable it contains. When a policy's validity conditions do not hold (for example, a negative objective coefficient under UBPositivePenalty, or a penalty function without a positive one-flip change), ToQUBO falls back to ToQUBO.Attributes.LegacyPenalty for that coefficient and records the reason in ToQUBO.Attributes.PenaltyPolicyMetadata.
ToQUBO.Attributes.UBPositivePenalty — Type
UBPositivePenalty()Upper-bound heuristic for objectives with nonnegative coefficients (UB, Ayodele 2022, Eq. 12): the penalty magnitude is the sum of every non-constant objective coefficient, i.e. the non-constant contribution to the objective value at the all-ones point (a constant offset does not affect the bound, matching Eq. 12's QUBO-matrix formulation). If any non-constant coefficient is negative the bound is invalid and ToQUBO falls back to LegacyPenalty for that coefficient, recording the reason in reformulation metadata.
Applied as $\rho = s \sigma (\lambda + \beta) / \epsilon$ like every automatic policy, where $s$ is the penalty scale, $\sigma$ the sense sign, $\beta$ the penalty offset, and $\epsilon$ the penalty function's positive gap.
Reference: M. Ayodele, Penalty Weights in QUBO Formulations: Permutation Problems (EvoCOP 2022), arXiv:2206.11040.
ToQUBO.Attributes.MaxCoefficientPenalty — Type
MaxCoefficientPenalty()Maximum QUBO coefficient heuristic (MQC, Ayodele 2022, Eq. 13; after Lucas 2014): the penalty magnitude is the largest non-constant objective coefficient. Falls back to LegacyPenalty when the objective has no non-constant term or its maximum coefficient is not strictly positive.
References: M. Ayodele, arXiv:2206.11040; A. Lucas, Ising formulations of many NP problems, Front. Phys. 2:5 (2014).
ToQUBO.Attributes.VLMPenalty — Type
VLMPenalty()Verma–Lewis method (VLM, Verma & Lewis 2022; Ayodele 2022, Eqs. 14–15): the penalty magnitude is the largest possible one-flip change of the objective, $\lambda = \max_i \max(W^+_i, W^-_i)$, where for each variable $i$
\[W^+_i = c_{\{i\}} + \sum_{T \ni i,\, |T| \ge 2} \max(c_T, 0), \qquad W^-_i = -c_{\{i\}} - \sum_{T \ni i,\, |T| \ge 2} \min(c_T, 0),\]
with each monomial of the compiled pseudo-Boolean objective credited to every variable it contains (the degree-$\ge 2$ generalization of the quadratic row-sum form). Falls back to LegacyPenalty when the bound is not finite and strictly positive.
References: A. Verma and M. Lewis, Penalty and partitioning techniques to improve performance of QUBO solvers, Discrete Optimization 44 (2022), doi:10.1016/j.disopt.2020.100594; M. Ayodele, arXiv:2206.11040.
ToQUBO.Attributes.MOMCPenalty — Type
MOMCPenalty()Maximum change in objective over minimum change in constraint (MOMC, Ayodele 2022, Eqs. 16–18), computed per penalty function: with $\lambda_{VLM}$ the VLMPenalty bound of the objective and $\gamma$ the smallest strictly positive one-flip change of this coefficient's penalty function, the penalty magnitude is $\lambda = \max(1, \lambda_{VLM} / \gamma)$. Falls back to LegacyPenalty when the objective bound is not finite and positive or the penalty function has no positive one-flip change.
Unlike the aggregated single-matrix form of the reference, ToQUBO computes one coefficient per constraint, variable-encoding, and slack-encoding penalty function.
Reference: M. Ayodele, arXiv:2206.11040.
ToQUBO.Attributes.MOCPenalty — Type
MOCPenalty()Maximum objective-to-constraint ratio (MOC, Ayodele 2022, Eq. 19), computed per penalty function: pairing the one-flip changes of the objective ($W^{c,\pm}_i$) with those of this coefficient's penalty function ($W^{g,\pm}_i$) per variable and flip direction, the penalty magnitude is
\[\lambda = \max\left(1, \max_{i,\, W^{g}_i > 0} \left| W^{c}_i / W^{g}_i \right| \right).\]
Falls back to LegacyPenalty when the penalty function has no strictly positive one-flip change or the objective bound is not finite.
Reference: M. Ayodele, arXiv:2206.11040.
Use the controls according to how much of the model you want to change:
- Use
ToQUBO.Attributes.PenaltyPolicyto select the automatic inference policy. Choose a literature heuristic above when the certified bound is too conservative for your sampler, or set it toToQUBO.Attributes.LegacyPenaltyonly when you need to reproduce the historical maxgap-based coefficients. - Use
ToQUBO.Attributes.PenaltyScaleandToQUBO.Attributes.PenaltyOffsetto change all automatically inferred penalties while preserving their policy-dependent objective and penalty-gap dependence. - Use
ToQUBO.Attributes.ConstraintPenaltyScaleandToQUBO.Attributes.ConstraintPenaltyOffsetwhen one source constraint needs a different automatic penalty. These overrides also apply to the slack-variable encoding penalty generated for that constraint. - Use explicit hints such as
ToQUBO.Attributes.ConstraintEncodingPenaltyHint,ToQUBO.Attributes.SlackVariableEncodingPenaltyHint, orToQUBO.Attributes.VariableEncodingPenaltyHintwhen you need a fixed coefficient. Hints bypass the automatic scale and offset settings.
These attributes control the ToQUBO compiler, so the reference for setting, overriding, and retrieving penalty coefficients belongs in this manual. End-to-end ecosystem examples can live in the QUBO.jl documentation and link back here when they tune ToQUBO penalties.
Changing Penalty Values
For feasibility tuning, start by inspecting ToQUBO.Attributes.PenaltyPolicyMetadata and sweeping PenaltyScale() while keeping explicit hints unset. If only one constraint needs adjustment, override that constraint's automatic scale or offset. Pin exact penalty values only when you have a known coefficient to apply.
Finite-run stochastic samplers such as DWave.Neal may need stronger penalties than the default exact-penalty bound to return feasible samples at a useful rate. In that case, prefer targeted ToQUBO.Attributes.ConstraintPenaltyScale overrides for the source constraints that are violated most often, instead of increasing the global ToQUBO.Attributes.PenaltyScale or replacing automatic inference with fixed hints everywhere. For example, if equality constraints c2, c3, and c4 need about a 400x larger automatic penalty under a sampler:
set_attribute.(c2, Ref(Attributes.ConstraintPenaltyScale()), 400.0)
set_attribute.(c3, Ref(Attributes.ConstraintPenaltyScale()), 400.0)
set_attribute.(c4, Ref(Attributes.ConstraintPenaltyScale()), 400.0)This keeps the selected automatic policy and its metadata, while reshaping the penalty landscape only around the constraints that need more sampler pressure.
using JuMP
using QUBODrivers
using ToQUBO
using ToQUBO: Attributes, Encoding
# Use an exact sampler for a small example. Replace it with your QUBO solver.
model = Model(() -> ToQUBO.Optimizer(ExactSampler.Optimizer))
@variable(model, x[1:2], Bin)
@variable(model, 0 <= z <= 3, Int)
@objective(model, Min, 3x[1] + x[2] + z)
capacity = @constraint(model, x[1] + x[2] <= 1)
assignment = @constraint(model, x[1] + x[2] == 1)
# Model-wide automatic penalty tuning.
set_attribute(model, Attributes.PenaltyScale(), 2.0)
set_attribute(model, Attributes.PenaltyOffset(), 1.0)
# Automatic tuning for one source constraint and its slack encoding.
set_attribute(capacity, Attributes.ConstraintPenaltyScale(), 4.0)
set_attribute(capacity, Attributes.ConstraintPenaltyOffset(), 2.0)
# Fixed values for specific generated penalties.
set_attribute(assignment, Attributes.ConstraintEncodingPenaltyHint(), 12.0)
set_attribute(capacity, Attributes.SlackVariableEncodingMethod(), Encoding.OneHot())
set_attribute(capacity, Attributes.SlackVariableEncodingPenaltyHint(), 9.0)
set_attribute(z, Attributes.VariableEncodingMethod(), Encoding.OneHot())
set_attribute(z, Attributes.VariableEncodingPenaltyHint(), 6.0)
optimize!(model)
rho_capacity = get_attribute(capacity, Attributes.ConstraintEncodingPenalty())
rho_assignment = get_attribute(assignment, Attributes.ConstraintEncodingPenalty())
eta_capacity = get_attribute(capacity, Attributes.SlackVariableEncodingPenalty())
theta_z = get_attribute(z, Attributes.VariableEncodingPenalty())
policy_metadata = get_attribute(model, Attributes.PenaltyPolicyMetadata())
# The capacity penalty is inferred by the automatic policy.
@assert rho_capacity !== nothing
@assert rho_assignment == 12.0
@assert eta_capacity == 9.0
@assert theta_z == 6.0
@assert policy_metadata["policy"] == "ObjectiveRangePenalty"Very small ϵ values or broad objective ranges can produce large penalties. Inspect the policy metadata before overriding the policy or pinning explicit penalties.
Value-Set Variable Encoding
Variables restricted to an explicit finite set of values — discrete component choices, tariff levels, or a non-uniform (for example, logarithmically spaced) grid for a continuous quantity — can be declared directly with ToQUBO.Attributes.VariableEncodingSet together with a set encoding method (Encoding.OneHot or Encoding.DomainWall):
using JuMP
using QUBODrivers
using ToQUBO
using ToQUBO: Attributes, Encoding
model = Model(() -> ToQUBO.Optimizer(ExactSampler.Optimizer))
@variable(model, x, Int)
@objective(model, Min, x)
set_attribute(x, Attributes.VariableEncodingMethod(), Encoding.OneHot())
set_attribute(x, Attributes.VariableEncodingSet(), [-1.0, 1.0, 3.0])
optimize!(model)
value(x)-1.0The set replaces the bounds-derived domain, so bounds are optional; when explicit bounds are present, every entry must respect them. Integer variables require integer-valued entries. Interval encoding methods (Encoding.Binary, Encoding.Unary, Encoding.Arithmetic, Encoding.Bounded) reject value sets with a compilation error — choose a set encoding for the variable instead. For continuous variables, pass the exact grid you want (for example exp10.(range(-1, 2; length = 4)) for logarithmic spacing). Encoding-feasible decoded states always land on a grid point; samples that violate the set encoding's penalty (for example, an all-zero or multi-hot one-hot state) can decode off-grid, so inspect sample feasibility or the penalty value as usual when working with raw sample sets.
ToQUBO.Attributes.VariableEncodingSet — Type
VariableEncodingSet()Explicit finite value set for a variable, e.g. [-1.0, 1.0, 3.0] or a non-uniformly spaced grid such as [0.1, 1.0, 10.0, 100.0]. The variable is encoded over the set instead of the bounds-derived domain: every encoding-feasible target state decodes to a set member, while samples that violate the set encoding's penalty can decode outside the set — inspect sample feasibility or the penalty value when consuming raw sample sets.
Requires the variable's VariableEncodingMethod to be a set encoding (Encoding.OneHot or Encoding.DomainWall); interval encodings such as Encoding.Binary, Encoding.Unary, Encoding.Arithmetic, and Encoding.Bounded reject value sets at compile time. Integer variables require integer-valued entries, and every entry must respect the variable's explicit bounds when such bounds are present. Bounds are otherwise optional: the set itself defines the domain.
set_attribute(x, ToQUBO.Attributes.VariableEncodingMethod(), ToQUBO.Encoding.OneHot())
set_attribute(x, ToQUBO.Attributes.VariableEncodingSet(), [-1.0, 1.0, 3.0])Continuous Variable Resolution
Bounded continuous variables need a finite binary representation before the compiler can build the QUBO. Set ToQUBO.Attributes.VariableEncodingBits or ToQUBO.Attributes.DefaultVariableEncodingBits to choose that bit count explicitly. When the bit count is unset, ToQUBO derives it from the variable bounds and ToQUBO.Attributes.VariableEncodingATol, falling back to ToQUBO.Attributes.DefaultVariableEncodingATol.
The tolerance rule is described in the booklet's Representation Error section. Smaller tolerances or wider bounds generally allocate more target binary variables. Slack variables generated from constraints use the analogous ToQUBO.Attributes.SlackVariableEncodingATol and ToQUBO.Attributes.SlackVariableEncodingBits settings. See Constraint Reformulation for how inequality constraints generate these slacks and where their finite resolution enters the penalty.
Slack Resolution and Penalty Contrast
First check whether the constraint actually generates a slack. EqualTo constraints encode their residual directly and do not own an inequality slack. LessThan, GreaterThan, and the two sides of Interval can generate one, although a sign-definite shortcut or an always-feasible constraint can avoid it. After compilation, inspect:
metadata = ToQUBO.reformulation_metadata(JuMP.unsafe_backend(model))
metadata["slack_variables"]Those entries identify the source constraints that own generated slacks and expose their encoding and expansion terms.
The ToQUBO.Attributes.Discretize setting determines which slack path is relevant:
Discretize(true)is the default. Integer-valued constraint residuals are divided by their exact positive coefficient GCD, preserving feasibility independently of term ordering. Noninteger residuals use approximate discretization. The compiler generates integer slacks on this path, so those slacks do not introduce the continuous-grid floor described below.Discretize(false)preserves noninteger residual coefficients and generates a continuous slack. Its finite binary encoding may not contain the exact value needed to cancel a feasible residual.
For the default binary encoding of a continuous slack on $[0, S]$ with $n$ bits, the grid spacing is
\[\Delta = \frac{S}{2^n - 1}.\]
If a feasible source assignment needs slack $z^\star$, its smallest squared penalty is
\[p_F = \min_k |z^\star - k\Delta|^2 \leq \frac{\Delta^2}{4}.\]
The floor is zero when $z^\star$ lies on the grid, and grid alignment means that it need not decrease strictly at every added bit. Resolution alone also does not determine a safe penalty coefficient. For a minimization model, let an infeasible assignment have objective advantage $B > 0$ and smallest penalty $p_I$. A positive coefficient $\rho$ prefers the feasible assignment only when
\[\rho (p_I - p_F) > B.\]
When p_I - p_F is positive, this gives $\rho > B / (p_I - p_F)$. When $p_I \leq p_F$, no positive rho can repair the ordering; increasing it can strengthen the wrong preference. Refining the slack encoding, changing the source model's tolerance, or choosing a different reformulation must first make the contrast positive.
ToQUBO does not currently relax a residual to a tolerance band or rescale a constraint automatically from slack resolution; the checks above diagnose whether either policy could be valid for a particular continuous-slack model.
Use this diagnostic sequence before changing penalties:
- Classify the violated source constraint and confirm slack ownership in the reformulation metadata. Equality violations are not caused by slack resolution.
- Check
Discretize(). Under the defaulttruepath, investigate the compiled integer penalty and solver behavior rather than applying a continuous-resolution multiplier. - Under
false, inspect the slack expansion, estimate $p_F$ and a relevant $p_I$, and establish positive contrast before increasing $\rho$. UseToQUBO.Attributes.SlackVariableEncodingBitsorToQUBO.Attributes.SlackVariableEncodingATolwhen finer resolution is the appropriate tradeoff. - Separate exact-model energy ordering from finite-run sampler behavior. If the energy ordering is correct but a stochastic sampler still returns violations, use targeted
ToQUBO.Attributes.ConstraintPenaltyScaletuning as described in Changing Penalty Values, and check whether violations move to other constraint families.
The Slack-resolution penalty analysis derives this condition with an executable public fixture. Its canonical #205 audit found that the troublesome c2-c4 families were slack-free binary equalities and that the model's generated inequality slacks were integral under Discretize(true). Their finite-run sampler behavior therefore supports the targeted constraint guidance above, not resolution-aware scaling as a remedy for #205.
Constraint Penalty Methods
Equality constraints are encoded with ToQUBO.Attributes.QuadraticPenalty by default. This normally squares the residual and lets the compiler infer a penalty coefficient when ToQUBO.Attributes.ConstraintEncodingPenaltyHint is not set. When the parsed residual is provably nonnegative, the compiler can instead add the residual directly to avoid unnecessary higher-order terms while preserving the same minimizer at zero. The same automatic penalty inference applies to this sign-definite shortcut.
Use ToQUBO.Attributes.LinearPenalty only when you want an equality constraint encoded as its signed residual. Since this form can make infeasible assignments cheaper when the sign or magnitude is wrong, automatic penalty inference is disabled. Every equality constraint that uses LinearPenalty() must also have an explicit ToQUBO.Attributes.ConstraintEncodingPenaltyHint.
The method is motivated by the linear Ising penalty approach of Mirkarimi et al.[Mirkarimi2024PRR], its quantum annealing demonstration,[Mirkarimi2024NJP] and the accompanying Durham data and code archive.[Mirkarimi2024Data] Those papers highlight the main tradeoff reflected in this API: linear penalties can avoid the extra couplings introduced by quadratic penalties, but they are heuristic and are not guaranteed to exactly enforce every constraint.
using JuMP
using ToQUBO
using ToQUBO: Attributes
model = Model(ToQUBO.Optimizer)
@variable(model, x[1:2], Bin)
@objective(model, Min, 0)
c = @constraint(model, x[1] + x[2] == 1)
set_attribute(model, Attributes.DefaultConstraintEncodingMethod(), Attributes.LinearPenalty())
set_attribute(c, Attributes.ConstraintEncodingPenaltyHint(), -2.0)For mixed models, keep the default method as ToQUBO.Attributes.QuadraticPenalty and set ToQUBO.Attributes.ConstraintEncodingMethod only on the constraints that should use the linear residual.
For scalar inequalities, ToQUBO.Attributes.UnbalancedPenalty removes the generated constraint slack. For a LessThan residual $g(x) \leq 0$ it uses
\[\lambda_1 g(x) + \lambda_2 g(x)^2,\]
and for a GreaterThan residual $g(x) \geq 0$ it negates the linear term. The default $\lambda_1 = 1$ and $\lambda_2 = 1/2$ come from truncating an exponential barrier at quadratic order; pass two finite positive values to UnbalancedPenalty(linear, quadratic) to tune their ratio. The explicit ConstraintEncodingPenaltyHint supplies the overall scale and must have the appropriate sign for the model sense.
using JuMP
using ToQUBO
using ToQUBO: Attributes
model = Model(ToQUBO.Optimizer)
@variable(model, x[1:3], Bin)
capacity = @constraint(model, 2x[1] + x[2] + x[3] <= 2)
set_attribute(
capacity,
Attributes.ConstraintEncodingMethod(),
Attributes.UnbalancedPenalty(),
)
set_attribute(capacity, Attributes.ConstraintEncodingPenaltyHint(), 4.0)Prefer this method when the target-variable budget is more important than an exact slack reformulation and you can tune and validate the resulting energy ordering on representative instances. Feasible assignments need not receive equal or zero penalty, so the method can change which feasible point is lowest in energy; automatic exact-penalty inference is therefore disabled. Keep the default QuadraticPenalty() slack formulation when exact zero penalty for a representable feasible slack and automatic penalty inference are required. Affine inequalities remain quadratic without new variables. A quadratic source inequality can still create higher-order terms and quadratization variables, and an Interval applies the unbalanced form to both bounds.
The method follows the unbalanced penalization formulation of Montañez-Barrera et al.[MontanezBarrera2024] An exact hinge such as $\max(0, g(x))^2$ is not generally a QUBO, while the real-coefficient approximation in Colucci et al.[Colucci2023] still uses $K$ auxiliary binary variables. Neither provides the no-new-variable affine QUBO used here.
ToQUBO.Attributes.VariableEncodingBits — Type
VariableEncodingBits()Set the number of target binary variables used to encode a bounded continuous variable. This explicit bit count takes precedence over VariableEncodingATol.
ToQUBO.Attributes.DefaultVariableEncodingBits — Type
DefaultVariableEncodingBits()Fallback value for VariableEncodingBits. When set, this fixes the number of target binary variables used for bounded continuous variables that do not have their own VariableEncodingBits value.
ToQUBO.Attributes.VariableEncodingATol — Type
VariableEncodingATol()Set the tolerance used to infer the number of target binary variables for a bounded continuous variable when VariableEncodingBits is unset. The compiler falls back to DefaultVariableEncodingATol when this attribute is unset. See Representation Error.
ToQUBO.Attributes.DefaultVariableEncodingATol — Type
DefaultVariableEncodingATol()Fallback value for VariableEncodingATol.
This tolerance is used to infer the number of target binary variables for a bounded continuous variable when neither VariableEncodingBits nor DefaultVariableEncodingBits supplies an explicit bit count. See Representation Error.
ToQUBO.Attributes.VariableEncodingMethod — Type
VariableEncodingMethod()Available methods are:
Encoding.Binary(default)Encoding.UnaryEncoding.ArithmeticEncoding.OneHotEncoding.DomainWallEncoding.Bounded
The Encoding.Binary, Encoding.Unary and Encoding.Arithmetic encodings can have their expansion coefficients bounded by wrapping them with the Encoding.Bounded method.
ToQUBO.Attributes.DefaultVariableEncodingMethod — Type
DefaultVariableEncodingMethod()Fallback value for VariableEncodingMethod.
ToQUBO.Attributes.VariableEncodingPenaltyHint — Type
VariableEncodingPenaltyHint()Set a fixed penalty coefficient for a variable encoding that generates a penalty function.
When unset, ToQUBO infers the coefficient from PenaltyPolicy, PenaltyScale, PenaltyOffset, and the generated penalty function gap. The hint is used as-is and bypasses automatic inference.
ToQUBO.Attributes.VariableEncodingPenalty — Type
VariableEncodingPenalty()Return the applied variable-encoding penalty coefficient after compilation.
This returns nothing when the variable encoding does not generate a penalty function. Use VariableEncodingPenaltyHint before compilation to pin a specific coefficient.
ToQUBO.Attributes.SlackVariableEncodingMethod — Type
SlackVariableEncodingMethod()Sets the encoding method for slack variables generated by constraints.
ToQUBO.Attributes.SlackVariableEncodingATol — Type
SlackVariableEncodingATol()Sets the tolerance for slack variables generated by constraints.
ToQUBO.Attributes.SlackVariableEncodingBits — Type
SlackVariableEncodingBits()Sets the number of bits for slack variables generated by constraints.
ToQUBO.Attributes.SlackVariableEncodingPenaltyHint — Type
SlackVariableEncodingPenaltyHint()Set a fixed penalty coefficient for a slack-variable encoding generated by a source constraint.
When unset, ToQUBO infers the coefficient from the automatic penalty policy. ConstraintPenaltyScale and ConstraintPenaltyOffset apply to the source constraint and to its generated slack-variable encoding penalty.
ToQUBO.Attributes.SlackVariableEncodingPenalty — Type
SlackVariableEncodingPenalty()Return the applied slack-variable encoding penalty coefficient after compilation.
This returns nothing when the constraint does not generate a slack-variable encoding penalty. Use SlackVariableEncodingPenaltyHint before compilation to pin a specific coefficient.
Slack variables are generated from source constraints, so the applied penalty is owned by the source constraint index rather than by any generated target variable.
ToQUBO.Attributes.ObjectiveRangePenalty — Type
ObjectiveRangePenalty(incumbent = nothing)Infer automatic penalty coefficients from a sufficient exact-penalty bound based on the compiled objective range. When ToQUBO can certify finite objective bounds and a positive violation gap for a generated nonnegative penalty function, penalties are inferred as $scale * sigma * ((objective_range + margin) / epsilon)$.
An optional candidate source assignment incumbent (or PenaltyIncumbent / VariablePenaltyIncumbent) may be supplied to tighten the whole-domain bound using a verified feasible incumbent:
- For minimization, let $L \le f(x)$ hold over the encoded domain and $U_{\text{inc}} = f(x_{\text{inc}})$ be the independently evaluated objective of a source-feasible, zero-penalty representable incumbent. Then $\rho_i \epsilon_i > U_{\text{inc}} - L$ for every nonnegative penalty is sufficient to place every infeasible assignment strictly above $U_{\text{inc}}$.
- For maximization, the sign-adjusted equivalent uses $|\rho_i| \epsilon_i > U - L_{\text{inc}}$, where $U \ge f(x)$ holds over the encoded domain and $L_{\text{inc}} = f(x_{\text{inc}})$.
If a supplied candidate is incomplete, stale, infeasible, unrepresentable with zero generated penalties, or if any source constraint or variable domain is not enforced across all zero-penalty encoded states, or if the stored coefficients cannot establish the strict sufficient inequality in exact arithmetic, ToQUBO declines the tightened incumbent bound, records the reason in PenaltyPolicyMetadata, and retains the whole-domain bound (or falls back to LegacyPenalty when the whole-domain bound cannot be certified).
ToQUBO.Attributes.PenaltyIncumbent — Type
PenaltyIncumbent()Set an optional candidate source assignment used by ObjectiveRangePenalty to tighten the automatic exact-penalty bound.
The candidate may be supplied as:
- an
AbstractDictkeyed byMOI.VariableIndex, integer source variable ids, or JuMP variable references, - an
AbstractVectororTupleordered according toToQUBO.original_variables(model), - or
nothingto clear the candidate.
On each compilation, ToQUBO independently validates that the candidate covers every source variable with finite values, satisfies every source constraint, lifts to a binary target representation with zero generated variable, constraint, and slack penalties, and evaluates the source objective (including constants and optimization sense) in exact rational arithmetic. Unvalidated variable primal starts (MOI.VariablePrimalStart) are never automatically used as a penalty certificate.
ToQUBO.Attributes.VariablePenaltyIncumbent — Type
VariablePenaltyIncumbent()Set a variable's value in a candidate feasible incumbent used by ObjectiveRangePenalty to tighten automatic exact-penalty bounds.
When any variable has VariablePenaltyIncumbent set, every source variable in the model must be assigned a finite value to form a complete candidate assignment. Pass nothing to clear the variable's candidate value. See also PenaltyIncumbent.
ToQUBO.Attributes.LegacyPenalty — Type
LegacyPenalty()Use the historical ToQUBO automatic penalty heuristic $scale * sigma * (delta / epsilon + beta)$, where delta is computed with PBO.maxgap on the compiled source objective. This policy remains available for compatibility and as a fallback when ObjectiveRangePenalty cannot be certified.
ToQUBO.Attributes.PenaltyPolicy — Type
PenaltyPolicy()Select the automatic penalty inference policy used when no explicit penalty hint is set. The default is ObjectiveRangePenalty, which uses a certified objective-range exact-penalty bound when available and falls back to LegacyPenalty otherwise.
ToQUBO.Attributes.PenaltyPolicyMetadata — Type
PenaltyPolicyMetadata()Return diagnostic metadata for the automatic penalty policy used during the last compilation.
The returned dictionary includes the selected automatic policy, objective bounds (including bound provenance and any verified incumbent tightening), incumbent validation/lifting outcome, sufficient_bound certification across applied coefficients, the legacy objective gap, fallback records, and inferred_penalties. inferred_penalties is grouped under "constraints", "variables", and "slack_variables". Each entry records the source item kind and id, final automatic coefficient, epsilon, epsilon_source, scale, offset, automatic policy, selected policy, sufficiency status, and any fallback reason.
Only automatically inferred coefficients are included in inferred_penalties. Explicit penalty hints bypass automatic inference; use AppliedPenalty or reformulation metadata's applied_penalties section when a complete list of applied coefficients is needed.
ToQUBO.Attributes.PenaltyOffset — Type
PenaltyOffset()Set the global offset or margin used by automatic penalty inference.
Under ObjectiveRangePenalty, this is the objective-range margin in $scale * sigma * ((objective_range + beta) / epsilon)$. Under LegacyPenalty, this is the historical additive offset in $scale * sigma * (delta / epsilon + beta)$. The default is 1.0. Use ConstraintPenaltyOffset to override this value for a specific source constraint and its slack-variable encoding penalty.
ToQUBO.Attributes.PenaltyScale — Type
PenaltyScale()Set the global multiplier applied to automatically inferred penalty coefficients.
When no explicit penalty hint is set, ToQUBO infers penalty coefficients from PenaltyPolicy. The default scale is 1.0. Use ConstraintPenaltyScale to override this value for a specific source constraint and its slack-variable encoding penalty.
ToQUBO.Attributes.ConstraintPenaltyOffset — Type
ConstraintPenaltyOffset()Override PenaltyOffset for a specific source constraint.
The override applies to automatically inferred source-constraint penalties and to the slack-variable encoding penalty generated for the same source constraint. Explicit penalty hints still take precedence.
ToQUBO.Attributes.ConstraintPenaltyScale — Type
ConstraintPenaltyScale()Override PenaltyScale for a specific source constraint.
The override applies to automatically inferred source-constraint penalties and to the slack-variable encoding penalty generated for the same source constraint. Explicit penalty hints still take precedence.
ToQUBO.Attributes.QuadraticPenalty — Type
QuadraticPenalty()Encode equality constraints with the standard squared residual penalty.
If the parsed residual is provably nonnegative, the compiler may use the residual directly instead of squaring it. This preserves the same minimizer at zero while avoiding unnecessary higher-order terms. Automatic penalty inference is still available for this sign-definite shortcut.
ToQUBO.Attributes.LinearPenalty — Type
LinearPenalty()Encode equality constraints with a signed linear residual penalty.
This method is heuristic: unlike QuadraticPenalty, it is not guaranteed to make every infeasible assignment more expensive. Use ConstraintEncodingPenaltyHint to tune the signed penalty strength. Automatic penalty inference is not available for this method.
This option follows the linear Ising penalty method studied by Mirkarimi et al. in "Quantum optimization with linear Ising penalty functions for customer data science" (doi:10.1103/PhysRevResearch.6.043241) and "Experimental demonstration of improved quantum optimization with linear Ising penalties" (doi:10.1088/1367-2630/ad7e4a).
ToQUBO.Attributes.UnbalancedPenalty — Type
UnbalancedPenalty(linear = 1.0, quadratic = 0.5)Encode scalar inequality constraints without a slack variable using an unbalanced linear-plus-quadratic penalty.
For a LessThan residual $g(x) \leq 0$, the generated penalty is
\[\lambda_1 g(x) + \lambda_2 g(x)^2,\]
and the linear term is negated for a GreaterThan residual $g(x) \geq 0$. Both coefficients must be finite and positive. The defaults come from the quadratic Taylor approximation of an exponential barrier.
This method is heuristic: feasible points need not have equal or zero penalty, so it can change their energy ordering. It requires an explicit ConstraintEncodingPenaltyHint and is not supported for equality constraints. For affine inequalities it introduces no slack or quadratization variables; quadratic inequalities can still require quadratization.
This formulation follows the unbalanced penalization method of Montañez-Barrera et al., "Unbalanced penalization: a new approach to encode inequality constraints of combinatorial problems for quantum optimization algorithms" (doi:10.1088/2058-9565/ad35e4).
ToQUBO.Attributes.AugmentedLagrangianPenalty — Type
AugmentedLagrangianPenalty(multiplier::Real = 0.0, rho::Real = 1.0)Composite penalty $\lambda \ell + \rho \ell^2$ over the constraint residual $\ell$, the augmented-Lagrangian (method-of-multipliers) shape. Supports equality and inequality constraints; inequalities are handled slack-free with the linear term oriented against the infeasible direction, i.e. iterated unbalanced penalization (the exact one-sided Rockafellar term is not expressible in a QUBO without slacks). multiplier ($\lambda$) may take any finite value — it is the dual estimate the subgradient refinement strategy updates, starting from zero — while rho ($\rho$) must be finite and strictly positive.
Unlike UnbalancedPenalty, constraints using this method need no ConstraintEncodingPenaltyHint: the compiler applies the sense sign directly and the coefficients live in the method itself.
Both coefficients are converted to the model's coefficient type when the penalty is built, so a method built from wider numbers (for example BigFloat) works on a Float64 model; a value that is not representable as a finite (and, for rho, positive) coefficient raises a compilation error rather than becoming Inf or 0.
References: M. R. Hestenes (1969); M. J. D. Powell (1969); D. P. Bertsekas, Constrained Optimization and Lagrange Multiplier Methods (1982); K. Yonaga, M. J. Miyama, M. Ohzeki, arXiv:2012.06119.
ToQUBO.Attributes.DefaultConstraintEncodingMethod — Type
DefaultConstraintEncodingMethod()Fallback method used to reformulate constraints.
Available options are:
QuadraticPenalty(default)LinearPenaltyUnbalancedPenalty(inequalities only)
ToQUBO.Attributes.ConstraintEncodingMethod — Type
ConstraintEncodingMethod()Sets the method used to reformulate a constraint.
When unset, this falls back to DefaultConstraintEncodingMethod. When set to LinearPenalty, the constraint must also have an explicit ConstraintEncodingPenaltyHint. Inequalities use the existing quadratic slack formulation unless set to UnbalancedPenalty, which also requires an explicit hint. UnbalancedPenalty is not supported for equality constraints.
ToQUBO.Attributes.ConstraintEncodingPenaltyHint — Type
ConstraintEncodingPenaltyHint()Set a fixed penalty coefficient for a source constraint.
When unset, ToQUBO infers the coefficient from the automatic penalty policy, unless the constraint uses LinearPenalty for an equality or UnbalancedPenalty for an inequality. These heuristic methods require an explicit hint because their sign and magnitude control whether the residual discourages infeasible assignments.
ToQUBO.Attributes.ConstraintEncodingPenalty — Type
ConstraintEncodingPenalty()Return the applied source-constraint penalty coefficient after compilation.
Use ConstraintEncodingPenaltyHint before compilation to pin a specific coefficient, or ConstraintPenaltyScale and ConstraintPenaltyOffset to tune automatic inference for one source constraint.
Discretization
ToQUBO.Attributes.Discretize — Type
Discretize()When set, this boolean flag guarantees that every coefficient in the final formulation is an integer.
- Mirkarimi2024PRRPuya Mirkarimi, Ishaan Shukla, David C. Hoyle, Ross Williams, and Nicholas Chancellor. Quantum optimization with linear Ising penalty functions for customer data science. Physical Review Research 6, 043241 (2024). {doi}
- Mirkarimi2024NJPPuya Mirkarimi, David C. Hoyle, Ross Williams, and Nicholas Chancellor. Experimental demonstration of improved quantum optimization with linear Ising penalties. New Journal of Physics 26, 103005 (2024). {doi}
- Mirkarimi2024DataPuya Mirkarimi, Ishaan Shukla, David C. Hoyle, Ross Williams, and Nicholas Chancellor. Quantum optimization with linear Ising penalty functions for customer data science [dataset]. Durham University data and code archive (2024). {doi}
- MontanezBarrera2024J. A. Montañez-Barrera, Dennis Willsch, A. Maldonado-Romo, and Kristel Michielsen. Unbalanced penalization: a new approach to encode inequality constraints of combinatorial problems for quantum optimization algorithms. Quantum Science and Technology 9, 025022 (2024). {doi}
- Colucci2023Giuseppe Colucci, Stan van der Linde, and Frank Phillipson. Power Network Optimization: A Quantum Approach. IEEE Access 11, 98926–98938 (2023). {doi}