psrenergy / anneal.jl Goto Github PK
View Code? Open in Web Editor NEW๐ต QUBO Annealing & Sampling MOI Interfaces
Home Page: https://psrenergy.github.io/Anneal.jl
License: Other
๐ต QUBO Annealing & Sampling MOI Interfaces
Home Page: https://psrenergy.github.io/Anneal.jl
License: Other
I'm not familiar with how close Optim.jl and MOI.jl are, but in Optim.jl they provide implementations of simulated annealing and particle swarm optimization (https://github.com/JuliaNLSolvers/Optim.jl/tree/master/src/multivariate/solvers/zeroth_order) which might be useful for this repository.
Similarly, the repo https://github.com/lanl-ansi/QuantumAnnealing.jl has simulators for Quantum Annealing which might be useful to add an interface here.
This package will be renamed based on the discussion here JuliaQUBO/ToQUBO.jl#62
Please leave your thoughts there!
I had to do manually (also to "fix" ToQUBO.jl):
(@v1.9) pkg> conda add dwave-neal
Then:
julia> model = Model(SimulatedAnnealing.Optimizer)
ERROR: UndefVarError: SimulatedAnnealing not defined
However the full "Simple Example" at ToQUBO did work including:
julia> model = Model(() -> ToQUBO.Optimizer(Anneal.SimulatedAnnealer.Optimizer))
I have no need for these packages, just checking how far I get with packages depending on PythonCall.jl.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
As pointed out in JuliaQUBO/ToQUBO.jl#35, multiple results are not being delivered correctly after optimize!
MWE:
using JuMP
using ToQUBO
using Anneal
A = [1 0 0 1 1 1 0 1 1 1 1 ; 0 1 0 1 0 1 1 0 1 1 1; 0 0 1 0 1 0 1 1 1 1 1]
b = [1, 1, 1]
c = [2, 4, 4, 4, 4, 4, 5, 4, 5,6, 5]
model = Model(() -> ToQUBO.Optimizer(ExactSampler.Optimizer))
@variable(model, x[1:11], Bin)
@constraint(model, A*x .== b)
@objective(model, Min, c'x)
optimize!(model)
solution_summary(model)
Anneal version v0.4.3
I've begun writing DWaveNeal.jl
(currently private) using Anneal to provide the necessary interface. Integrating the full parameter spectrum (we currently support only 2 of them) took less than 200 lines of code, since I didn't use the @anew
macro.
Before taking #5 more seriously, I think it is important to come up with a solid interface aiming to support the bqpjson schema.
We already provide Anneal.qubo_normal_form
and Anneal.ising_normal_form
. These functios have methods to convert models back and forth. An ideia is to require from the API developer to implement at least one of them as Anneal.xxxx_normal_form(::Optimizer)
. This, together with the optimizer's attributes and the Anneal.sample(::Optimizer)
method should be enough to make things work.
Currently, we suppose that the optimizer has the x
, Q
and c
fields (variable map, QUBO matrix & constant term).
There is an error while building PythonCall. Issue JuliaPy/PythonCall.jl#136 was opened to address this.
pkg> add Anneal # error
pkg> precompile # error, but with log
# copy this from the failed proccess in the precompile error log
julia> run(`'C:\Users\user\.julia\artifacts\d628738c351341856bc6e8abe94cd6c8d8a7bf66\Library\bin\micromamba.exe' -r 'C:\Users\user\.julia\scratchspaces\0b3b1443-0f03-428d-bdfb-f27f9c1191ea\root' create -y -p 'C:\Users\user\.julia\environments\v1.7\.CondaPkg\env' --override-channels --no-channel-priority pip 'python >=3.5,<4' 'python >=3.7,<4' -c anaconda -c conda-forge`)
pkg> precompile # again, but now it works
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.