Repository navigation
v0.15.0
0.15.0 (2026-10-04)
Divi 0.15 is a substantial release across quantum chemistry, optimization, execution backends and workflow reliability. LASSQD is considerably faster, uses less memory and is easier to configure: CCSD fragment preparation and second-order CIAH orbital optimization are now the defaults, while pluggable strategies retain the linear-method, VQE and L-BFGS alternatives. The release also adds portfolio selection and allocation with constrained and partitioned solving, general linear constraints, adaptive-shot ROSALIN and gCANS optimization, fitted QNN readout bias, spin-moment extraction, problem objects for VQE and LASSQD, and much wider Maestro and QPU configuration.
The correctness and operational work is just as broad. Divi now avoids duplicate Qoro jobs after submission timeouts, uses full Maestro noise simulation, records local simulator run time, and handles ensemble batching, failures and checkpoint restoration more reliably. It also fixes Trotter evolution, graph and molecular transformations, QNN and QAOA state handling, QASM validation, reporting and visualisation. LASSQD's density-matrix build for 64 orbitals falls from about 2.2 GB to 0.13 GB, and its core-potential build no longer reserves PySCF's roughly 3 GiB direct-SCF work buffer. Several public APIs and numerical defaults changed, so review the migration table below before upgrading.
⚠️ Breaking Changes
If you are upgrading from v0.14.x, review these changes:
| What changed | What to do |
|---|---|
| VQE, LASSQD and VQE sweeps use problem objects | Pass problem=HamiltonianProblem(...) to VQE, problem=MolecularProblem.from_molecule(...) to LASSQD, and problems= to VQEHyperparameterSweep. |
| LASSQD uses preparation and orbital-update strategies | Replace preparation_mode, optimizer, ansatz and max_iterations with a preparation strategy, and replace max_orbital_iterations with orbital_update. Use LinearMethodPreparation, VQEPreparation or FullOrbitalSolve to retain the previous paths. |
| Maestro and Qoro configuration names changed | Rename MaestroSimulator(config=...) to maestro_config=.... For Qoro jobs, use maestro_config for simulators, device_config for QPUs, and job_config for job settings; read backend time from ExecutionResult.run_time. |
| Initial-state classes and capability mixins moved | Import initial states from divi.qprog.initial_states and mixins from divi.qprog.mixins. |
| Graph, matching and routing problem keywords changed | Rename is_constrained to use_constrained_mixer, penalty_scale or constraint_penalty to penalty_weight, and capacity_penalty to capacity_penalty_weight. Pass QUBOPartitioningConfig(...) to CommunityDecomposer. |
| SPSA, QN-SPSA and QUIVER settings changed | Replace blocking_history and blocking_tol with allowed_increase; QUIVER also removes lipschitz. |
| Ensemble and algorithm checkpoints changed | ProgramEnsemble.save_state() is removed; run() now checkpoints each completed round. Earlier VQA and LASSQD checkpoints cannot be loaded. |
✨ Added
- LASSQD: choose how fragments are prepared (CCSD, linear method, or VQE) and how orbitals are optimized (CIAH or L-BFGS). CCSD and CIAH are now the defaults. Progress messages show what the fragment and orbital solves are doing. Breaking: replace the old preparation and orbital-iteration options with
preparation=andorbital_update=; useFullOrbitalSolveto keep L-BFGS (401f879, 654603f). - qprog: add portfolio selection and allocation problems, including return, volatility and Sharpe-ratio results, a ring XY mixer with
DickeState, and covariance-based partitioning that combines feasible cluster solutions (9009bdf, 8a0debd). - qprog: add
LinearConstrainttoBinaryOptimizationProblem; constrained QAOA and PCE results are checked or repaired against the original problem (bff8462). - qprog:
QNN(fit_bias=True)fits a constant offset to reduce squared prediction error and exposes it asfitted_bias(6c72f94). - qprog: when no initial parameters are supplied, Hartree–Fock and UCCSD ansätze start at the Hartree–Fock state instead of random angles (05f8e66).
- qprog:
get_correlations()andget_magnetisations()read two-site correlations and single-site spin expectations from sampled results (58b7a50). - optimizers: add ROSALIN and gCANS, which allocate measurement shots using gradient and variance estimates. ROSALIN enforces a total evaluation budget; VQE and QAOA gain generalized parameter-shift rules, measurement stages accept different shot counts per circuit, and programs report their actual circuit, shot, and backend-job usage (fa66343, fdb399b).
- backends: add
DeviceConfigfor per-job QPU settings and expose Maestro GPU, tensor-network, sampling and distributed-execution options. Config objects supportoverride(...)andreset(...), simulator seeding works, andforce_sampling=Trueincludes readout error in measurements (9c43e8e, 1a31047, 60e95c7, 4dcd95b). - qprog: add
HamiltonianProblemandMolecularProblemas VQE and LASSQD inputs. Breaking: construct VQE withproblem=, LASSQD withMolecularProblem.from_molecule(...), and VQE sweeps withproblems=(610f3ae).
🐛 Fixed
- LASSQD: respect supplied mean fields, core Hamiltonians and effective core potentials; initialize fragments from the reference determinant; validate fragments and returned orbital gradients; and restore completed rounds from their saved output. Exact density-matrix accumulation cuts a 64-orbital build from about 2.2 GB to 0.13 GB (f7a63bb, ff6b4ea, 401f879).
- backends: avoid duplicate Qoro jobs by not retrying creation or cancellation after timeouts, make polling honor cancellation, and split requests by their actual payload size. Qoro jobs now use the correct Maestro or vendor-specific QPU configuration (e07ac2f, 6002e63, a14427f).
- backends: record Maestro and Qiskit simulator time in
total_run_time, and obtain Qoro time from the completed job result (0b8d350). - backends: use Maestro's full noise simulation for noisy runs, with independent per-circuit seeds and identity gates treated as noise sites (677f7d5).
- qprog: prevent Qiskit transpilation from hanging in ensemble workers; keep batched results tied to the correct program and circuit; reject incompatible merged options; and report checkpoint, round and resume failures precisely (389cc7d, a39587a, 42bfc0d, aad595e).
- qprog: reject VQA checkpoints from a different Hamiltonian or parameter count, and restore completed LASSQD rounds with the orbitals that produced their results (931c7ee, 401f879).
- qprog: make graph problems consistent across NetworkX and rustworkx, preserve the correct node identifiers, avoid cutting the heaviest edges, and merge edgeless clusters before building subproblems (351f566, a3d62a3).
- qprog: geometry sweeps rebuild branched molecules without reflecting them and preserve a PySCF molecule's original length unit (4ef6ad0, b324df2).
- qprog: validate reassigned QNN data before submitting circuits, honor
measure_all_qubitsduring prediction, and retain the caller's trotterization strategy when loading QAOA state (bf1296e, 4ef6ad0, 299d800). - optimizers: make the pullback metric independent of Hamiltonian scaling and warn when a QNG step moves a parameter more than π/4 (3f11e36).
- circuits: accept declared QASM parameter names such as
x[0], reject undefined QASM functions, convert a length-one scalar input to one circuit, and invalidate cached bindings when feature data changes (4f23b25, fe13407, e238ccd). - reporting: preserve bracketed status text, require a console for
ProgressSession, and correct parameter-scan and multi-observable plots (923d05b, 3fad202, 4ef6ad0). - hamiltonians: apply evolution time with the correct sign when building Trotterized circuits (306828e).
- qem: QuEPP now enumerates symbolic circuits without warning and samples concrete circuits when possible; its previous default warned and fell back on every VQE or QAOA run (d9357f8).
🔄 Changed
- qprog:
BeamSearchStrategynow keeps up to 256 partial solutions and fetches six candidates per partition by default, instead of using a greedy beam of one. It also fetches at leasttop_ncandidates; set both limits toNoneto search without beam pruning (6423502). - backends: Pauli observables shorter than their circuit now act on the first qubits and are padded with trailing identities on every backend. Returned result keys use the padded term, and a warning reports the padding (dbe2812).
- qprog: import initial states from
divi.qprog.initial_statesand capability mixins fromdivi.qprog.mixins. Existing problem constructors renameis_constrainedtouse_constrained_mixer,penalty_scaleorconstraint_penaltytopenalty_weight, and CVRP'scapacity_penaltytocapacity_penalty_weight.PCE.get_top_solutions(n=0)now returns every solution (7c6b056, 53c2462, 47a34ec). - qprog: VQA checkpoints now store the random-number state and Hamiltonian identity, and ensembles checkpoint after every completed round; earlier VQA checkpoints cannot be loaded. Optimization and final result collection now run as separate steps, and
ProgramEnsemble.save_state()is removed (931c7ee, 3d5db2b, a39587a, 4ef6ad0). - qprog: IterativeQAOA's Fourier and Chebyshev starting parameters now follow the published interpolation formulas, so existing runs may follow a different path. Feature maps now reject inputs whose feature count does not match the number of qubits (71a0dd1).
- backends: rename
MaestroSimulator(config=...)and itsconfigattribute tomaestro_config. For Qoro jobs, replaceexecution_configandoverride_execution_configwithmaestro_configfor simulator jobs ordevice_configfor QPU jobs, and renameoverride_job_configtojob_config.ExecutionConfig,SimulationMethodandSimulatorare removed,api_metabecomesextra_kwargs, anddefault_dateis removed.JobConfig.shotsnow defaults to 1,000, and missing calibration dates remain missing (9c43e8e, 4dcd95b, 6002e63, 0fc5fac). - pipeline: use
PauliTwirlStagein place ofPauliTwirlPass; QEM protocols removedag_indicesandselect_by_dag_indices;DataBindingStage.namereports the class name; and Ising conversion results removewires,term_countandancilla_variables(b5b3c57, fe13407, 306828e). - optimizers: SPSA, QN-SPSA and QUIVER replace rolling
blocking_historyandblocking_tolwith an absoluteallowed_increasesetting; QUIVER also removeslipschitz. Setlearning_rateexplicitly when reproducing old runs (8977575). - performance: avoid PySCF's roughly 3 GiB direct-SCF work buffer in LASSQD, reduce repeated searches and allocations in algorithm loops, and reuse embeddings for unchanged AI index chunks (5b5955b, b573744, 33b516b).
🔧 Internal
- Update qoro-maestro to 0.3.5 and send the Divi and Python versions in Qoro API User-Agent headers (60e95c7, b2a4ca1, 50d26d9).
- Let manual nightly builds publish distinct hotfix pre-releases, skip test matrices on Release Please branches, and speed up tutorial CI (baf0d3a, 62f5d2c, 954b66c).