Skip to content

JuliaQUBO/MQLib.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQLib.jl

DOI QUBODRIVERS

MQLib wrapper for JuMP.

Installation

julia> import Pkg

julia> Pkg.add("MQLib")

Basic Usage

using JuMP, MQLib

Q = [
   -1  2  2
    2 -1  2
    2  2 -1
]

model = Model(MQLib.Optimizer)

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

optimize!(model)

Selecting Heuristics

This wrapper allows one to access all 39 QUBO and Max-Cut Heuristics provided by MQLib. Selecting the method to be used can be achieved via JuMP's attribute interface:

JuMP.set_optimizer_attribute(model, "heuristic", "ALKHAMIS1998")

or by calling MQLib helper functions:

MQLib.set_heuristic(model, "ALKHAMIS1998")

To list available heuristics and their descriptions, run:

MQLib.show_heuristics()