QUBODrivers.jl Documentation

Introduction

This package aims to provide a common MOI-compliant API for QUBO Sampling & Annealing machines. It also contains a few utility samplers and testing tools for performance comparison, sanity checks and basic analysis features.

Quick Start

Installation

QUBODrivers.jl is registered in Julia's General Registry and is available for download using the standard package manager.

julia> import Pkg

julia> Pkg.add("QUBODrivers")

Example

using JuMP
using QUBODrivers

model = Model(ExactSampler.Optimizer)

Q = [
    -1.0  2.0  2.0
     2.0 -1.0  2.0
     2.0  2.0 -1.0
]

@variable(model, x[1:3], Bin)
@objective(model, Min, x' * Q * x)

optimize!(model)

for i = 1:result_count(model)
    xi = value.(x; result=i)
    yi = objective_value(model; result=i)

    println("f($xi) = $yi")
end
f([0.0, 1.0, 0.0]) = -1.0
f([1.0, 0.0, 0.0]) = -1.0
f([0.0, 0.0, 1.0]) = -1.0
f([0.0, 0.0, 0.0]) = 0.0
f([1.0, 0.0, 1.0]) = 2.0
f([1.0, 1.0, 0.0]) = 2.0
f([0.0, 1.0, 1.0]) = 2.0
f([1.0, 1.0, 1.0]) = 9.0

<!– ## Citing QUBODrivers.jl

@software{QUBODrivers.jl:2023,
  author    = {Pedro Xavier and Pedro Ripper and Tiago Andrade and Joaquim Garcia and David Bernal},
  title     = {QUBODrivers.jl},
  month     = {apr},
  year      = {2023},
  publisher = {Zenodo},
  version   = {v0.1.0},
  doi       = {10.5281/zenodo.6390515},
  url       = {https://doi.org/10.5281/zenodo.6390515}
}

–>