Skip to content

SECQUOIA/QCIOpt.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QCIOpt.jl

QUBODRIVERS

Quantum Computing Inc. Optimization Wrapper for JuMP

Installation

julia> import Pkg

julia> Pkg.add(url="https://github.com/SECQUOIA/QCIOpt.jl")

Basic Usage

using JuMP
using QCIOpt

model = Model(QCIOpt.Optimizer)

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

@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

Updating optimization parameters

set_attribute(model, QCIOpt.NumberOfReads(), 10) # Number of samples

Changing the backend device

set_attribute(model, QCIOpt.DeviceType(), "dirac-1")

API Token

To access QCI's devices, it is necessary to create an account at QCI to obtain an API Token and define

set_attribute(model, QCIOpt.APIToken(), "your_token_here")

Another option is to set the QCI_TOKEN environment variable before loading QCIOpt.jl:

$ export QCI_TOKEN="your_token_here"

$ julia

julia> using QCIOpt

Disclaimer: The QCI Optimization Wrapper for Julia is not officially supported by Quantum Computing Inc. If you are a commercial customer interested in official support for Julia from QCI, let them know!

Note: If you are using QCIOpt.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.

About

JuMP wrapper for QCI ft. QUBODrivers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages