Migration from 0.2.x¶
QQA 0.3 is backwards compatible with 0.2 at the Python level: the classes
you already use (MaximumIndependentSet, MaxCut, Coloring, …) are still
imported from the same qqa.* top-level namespace and the qqa.anneal()
signature has not changed.
What changed¶
qqa.problemsis now a subpackage. Internally the classes live inqqa/problems/{qubo,categorical,spin}.py, butfrom qqa import MaximumIndependentSetkeeps working.- New problem classes are available:
Ising1D,EdwardsAnderson,SherringtonKirkpatrick,BinaryPerceptron,HopfieldMemory, plus the supportingSpinRelaxation. qqa.visualizationnow accepts abackend=argument and exposesplot_best_trajectory,plot_schedule,plot_run_comparison,plot_parallel_coordinates,plot_solution_heatmapin addition toplot_history.- CLI (
qqa version / solve / bench / gui) and Streamlit GUI are new in 0.3. HistoryRecordernow recordsbest_objandloss_minper epoch in addition to the existing fields.
Deprecations¶
qqa.legacy.* (wrappers for the old batch_annealing_* functions) keeps
working and emits DeprecationWarning. Port to qqa.anneal() when you get
a chance.
Checklist¶
- [ ] Replace
batch_annealing(...)calls withqqa.anneal(problem, ...). - [ ] If you used a custom plotting helper, consider switching to
qqa.visualization.plot_history(result, backend="plotly"). - [ ] If you want spin problems, use the new
qqa.SpinRelaxationvia one of theIsing1D/EdwardsAnderson/SherringtonKirkpatrick/BinaryPerceptron/HopfieldMemoryclasses.