Skip to content

JuliaQUBO/PseudoBooleanOptimization.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PseudoBooleanOptimization.jl

Introduction

$$ f(\mathbf{x}) = \sum_{\omega \subseteq [n]} c_{\omega} \prod_{j \in \omega} x_{j} $$

Installation

julia> import Pkg; Pkg.add("PseudoBooleanOptimization")

Getting Started

using PseudoBooleanOptimization
const PBO = PseudoBooleanOptimization

f = PBO.PBF{Symbol,Float64}([
    [:x, :y] => 10.0,
    [:x, :z] => 15.0,
    [:y, :z] => -5.0,
])

g = PBO.PBF{Symbol,Float64}([
    :x => 1.0,
    :y => 2.0,
    :z => 3.0,
])

h = f + g

Output:

1.0x + 2.0y + 3.0z + 10.0x*y + 15.0x*z - 5.0y*z