Skip to content

Luna 1.2.3

Luna 1.2.3

Warning

🚨 Breaking Changes Included – Released on July 21, 2026


⚠️ Breaking Changes

  • Use-Case Problem Library Moved to luna-usecases The bundled problem library under luna_quantum.solve.use_cases has been removed and now lives in the standalone luna-usecases package on PyPI. It provides 45+ ready-to-use optimization problems — TSP, MaxCut, Knapsack, Portfolio Optimization, Job Shop Scheduling, and many more — with helpers to generate instances, formulate a Model, and interpret the result.

    Bash
    pip install luna-usecases
    
    Python
    from luna_usecases.integer_knapsack_problem import IkpData, IkpFormulation, IkpInstance
    from luna_quantum import algorithms
    
    data = IkpData.generate_random(n_items=20, capacity=50, seed=42)
    instance = IkpInstance(data=data, formulation=IkpFormulation())
    
    model = instance.formulate()
    result = algorithms.SCIP().run(model).result()
    solution = instance.interpret(result)
    print(solution.print())
    

🛠️ Improvements

  • Faster Solve-Job Polling Waiting for a solve job to finish is now noticeably quicker. The first status check happens almost immediately, and the wait between checks grows with capped exponential backoff instead of a fixed increment — so short jobs return sooner while long-running jobs still back off gracefully. The progress output has also been reworked to render cleanly in Jupyter notebooks.

    Python
    solution = solve_job.result(
        sleep_time_initial=0.5,  # first check after 0.5s
        backoff_factor=2.0,      # double the wait after each check
        sleep_time_max=30.0,     # capped at 30s between checks
    )
    
  • More Resilient Connections The client now automatically retries transient connection errors when talking to the Luna platform, making solves more robust against brief network hiccups.