Skip to content

Add opt-in automatic solver-parameter scaling from problem size #78

Description

@bernalde

Motivation

MQT QAO (arXiv:2406.12840, companion paper arXiv:2408.03613 Sec IV-B) exposes an auto_setting flag on every solver (src/mqt/qao/solvers.py:61): SA sweeps 10^(0.5*sqrt(N)) (:111-114), QA anneal time 10^(0.7*sqrt(N)) clamped to [0.5, 2000] microseconds (:268-273), QAOA reps ceil(2*sqrt(N)), GAS threshold 2N (:436, :485). All are guarded by "# To change with the experience" comments, i.e. unvalidated heuristics — but the convenience knob itself is a real parity item.

Current state

Grep for auto_setting/size-based scaling across all seven driver repos: only hit is CIMOptimizer.jl src/CIMOptimizer.jl:50,128 (hyperparameters_autotune passthrough — time-budget-based on the Python side, not size-based, so it does not close this gap). Fixed defaults everywhere: DWave.jl src/neal/sampler.jl:44-45 (num_reads=1000, num_sweeps=1000), src/sampler.jl:10-13 (num_reads=100, annealing_time=20.0), QiskitOpt.jl src/QAOA.jl:67 (num_layers=1), PySA.jl src/PySA.jl:39-41.

Proposed change

  • Add a generic opt-in SamplerAttribute (e.g. AutoConfigure) in QUBODrivers.jl src/interface/attributes.jl, following the RandomSeed/FinalNumberOfReads struct pattern (lines 41-68) plus the honors_final_reads-style trait pattern.
  • Pre-sample hook in _sample! (src/interface/sampler.jl:267-273) or MOI.optimize! (src/library/sampler/wrappers/moi.jl:69-71); problem size n is already available to drivers via QUBOTools.ising(sampler, ...).
  • Per-driver formulas live in each driver's sample() where attributes are read (e.g. DWave.jl src/neal/sampler.jl:92-108); driver PRs can follow separately, but at least one reference implementation (DWave neal) should land with the trait.

Acceptance criteria

  • AutoConfigure attribute defined with a capability trait; default off, no behavior change for existing drivers.
  • Reference implementation in one driver scales its parameter from n and logs the chosen value in solution metadata.
  • Conformance suite (QUBODrivers.test) passes with the attribute on and off.

Part of the MQT QAO parity epic: JuliaQUBO/QUBO.jl#69

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions