Pick one altitude option per flight to minimize fuel + contrail cost, with pairwise conflicts where two flights would seed the same ice-supersaturated region (ISSR) at the same time. Small enough to read line-by-line; still scientifically defensible (exact optimum, null baseline, feasibility metrics, seeded reproducibility).
-
cost —
$c_i$ = fuel proxy +$\alpha,\cdot$ contrail exposure of option$i$ - one-hot — every flight picks exactly one altitude option
-
conflict — conflicting option pairs
$\mathcal{C}$ must not both be chosen
Penalties are auto-computed with
| solver | role |
|---|---|
brute force (exact.py) |
exact ground truth |
greedy (exact.py) |
the repair heuristic run once from a blank slate — the honest classical bar |
uniform random + repair (exact.py) |
null baseline — structure-free floor |
analog-QAOA + Bayesian optimization (pasqal_analog.py) |
the algorithm under study |
Raw energy is the primary metric. The repair pass is itself a competent
greedy heuristic that solves easy instances from pure noise, so repaired cost
(and the approximation ratio built on it) measures the pipeline, not the
sampler. raw_best_E / raw_mean_E — QUBO energies of the unrepaired
bitstrings — are what the sampler itself achieves and cannot be gamed by
repair; the repaired-cost table is secondary.
pip install -e ".[dev]" # numpy only at runtime
python run.py --flights 4 --options 3 --seeds 10 --shots 1000 --csv results.csvThe CSV has one row per (seed, solver): n_vars, E_min, best_cost,
approx_ratio, feasibility_rate, wall_clock_s; a mean ± std summary
prints at the end.
The unit-disk embeddability study (purely classical — how large can the conflict graph grow before Pasqal's blockade geometry stops fitting?):
python -m contrail_env.embedding_study --csv embedding.csvEmbedding uses one pipeline everywhere (embed()): a greedy initial
placement, force-directed refinement with seeded annealing kicks, and
multi-start restarts with Gaussian jitter — deterministic given the seed.
Failures are attributed in the CSV: nodes of independence-degree ≥ 6 (2D
packing limit) or flight pairs conflicting at every level, whose prism
subgraph provably has no valid placement under the safety margins.
Optional: pip install -e ".[quantum]" adds the real Pulser/QuTiP emulator
backend (used automatically when the instance embeds and fits 12 qubits).
contrail_env/problem.py scenario generator (grid, ISSR blobs, costs, conflicts)
contrail_env/qubo.py QUBO matrix assembly (cost + one-hot + conflict)
contrail_env/exact.py brute force, repair, random baseline, metrics
contrail_env/pasqal_analog.py analog schedule, statevector simulator, BO loop
contrail_env/bayes_opt.py minimal GP + expected-improvement optimizer
contrail_env/embedding_study.py greedy unit-disk embedder + scaling study
run.py end-to-end experiment script
The full multi-solver version (CP-SAT, Xanadu GBS, PyQt6 GUI, diagnostics)
lives on the archive/full-benchmark branch.