Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

JuliaQUBO/CIMOptimizer.jl

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CIMOptimizer.jl

cim-optimizer Coherent Ising Machine wrapper for JuMP

DOI QUBODRIVERS

Installation

julia> import Pkg; Pkg.add(url="https://github.com/JuliaQUBO/CIMOptimizer.jl")

julia> using CIMOptimizer

Python runtime compatibility

CIMOptimizer uses PythonCall and CondaPkg to install cim-optimizer ==1.0.4 with conda pytorch-cpu. The CondaPkg runtime supports Python >=3.10,<3.12, including Python 3.11 for shared benchmark environments with DWave v0.7.2.

QiskitOpt v0.7.0 currently requires an isolated Python environment when used alongside CIMOptimizer. Its PyPI numpy ~=2.2.0 constraint conflicts with the conda NumPy version pinned by the pytorch-cpu stack used here.

Getting started

using JuMP
using CIMOptimizer
const CIM = CIMOptimizer

model = Model(CIM.Optimizer)

n = 3
Q = [ -1  2  2
       2 -1  2
       2  2 -1 ]

@variable(model, x[1:n], 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("[$i] f($(xi)) = $(yi)")
end

Note: The cim-optimizer wrapper for Julia is not officially supported by Cornell University's McMahon Lab. If you are interested in official support for Julia from McMachon Lab, let them know!

Note: If you are using CoherentIsingMachine.jl in your project, we recommend you to include the .CondaPkg entry in your .gitignore file. The PythonCall module will place a lot of files in this folder when building its Python environment.

Releases

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.