diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index d0e8762..1aade91 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-09-25T22:16:23","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-09-25T22:24:20","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/booklet/1-intro/index.html b/dev/booklet/1-intro/index.html index d61a406..181203b 100644 --- a/dev/booklet/1-intro/index.html +++ b/dev/booklet/1-intro/index.html @@ -1,2 +1,2 @@ -Itroduction · QUBODrivers.jl

QUBODrivers.jl Booklet

This booklet aims to provide an advanced overview of the QUBODrivers.jl package, delving into the details of the package's inner workings. It is meant to discuss the package's design choices and provide a guide for developers who wish not only to implement new interfaces but also to extend the package's functionality. Reading this booklet is not required to use the package, but it is strongly recommended for those who wish to contribute to the project.

Table of Contents

+Itroduction · QUBODrivers.jl

QUBODrivers.jl Booklet

This booklet aims to provide an advanced overview of the QUBODrivers.jl package, delving into the details of the package's inner workings. It is meant to discuss the package's design choices and provide a guide for developers who wish not only to implement new interfaces but also to extend the package's functionality. Reading this booklet is not required to use the package, but it is strongly recommended for those who wish to contribute to the project.

Table of Contents

diff --git a/dev/booklet/2-interface/index.html b/dev/booklet/2-interface/index.html index 3da4ba7..9e13fab 100644 --- a/dev/booklet/2-interface/index.html +++ b/dev/booklet/2-interface/index.html @@ -1,2 +1,2 @@ -Sampler Interface · QUBODrivers.jl
+Sampler Interface · QUBODrivers.jl
diff --git a/dev/booklet/3-attributes/index.html b/dev/booklet/3-attributes/index.html index a558b14..d64c1cb 100644 --- a/dev/booklet/3-attributes/index.html +++ b/dev/booklet/3-attributes/index.html @@ -1,5 +1,5 @@ -Attribute System · QUBODrivers.jl

Attributes

API

An advanced example

module SuperSampler
+Attribute System · QUBODrivers.jl

Attributes

API

An advanced example

module SuperSampler
 
 import QUBODrivers
 import QUBODrivers: QUBOTools
@@ -36,4 +36,4 @@
     return nothing
 end
 
-end # SuperSampler module
+end # SuperSampler module
diff --git a/dev/index.html b/dev/index.html index a917562..3595db0 100644 --- a/dev/index.html +++ b/dev/index.html @@ -38,4 +38,4 @@ version = {v0.1.0}, doi = {10.5281/zenodo.6390515}, url = {https://doi.org/10.5281/zenodo.6390515} -}

–>

+}

–>

diff --git a/dev/manual/1-intro/index.html b/dev/manual/1-intro/index.html index 4dde75c..469908f 100644 --- a/dev/manual/1-intro/index.html +++ b/dev/manual/1-intro/index.html @@ -2,4 +2,4 @@ Introduction · QUBODrivers.jl

Introduction

QUBO

An optimization problem is in its QUBO form if it is written as

\[\begin{array}{rl} \min & \alpha \left[ \mathbf{x}'\mathbf{Q}\,\mathbf{x} + \mathbf{\ell}'\mathbf{x} + \beta \right] \\ \text{s.t.} & \mathbf{x} \in S \cong \mathbb{B}^{n} -\end{array}\]

with linear terms $\mathbf{\ell} \in \mathbb{R}^{n}$ and quadratic $\mathbf{Q} \in \mathbb{R}^{n \times n}$. $\alpha, \beta \in \mathbb{R}$ are, respectively, the scaling and offset factors.

The MOI-JuMP optimizers defined using the QUBODrivers.AbstractSampler{T} <: MOI.AbstractOptimizer interface only support models given in the QUBO form. QUBODrivers.jl employs QUBOTools on many tasks involving data management and querying. It is worth taking a look at QUBOTool's docs.

Table of Contents

+\end{array}\]

with linear terms $\mathbf{\ell} \in \mathbb{R}^{n}$ and quadratic $\mathbf{Q} \in \mathbb{R}^{n \times n}$. $\alpha, \beta \in \mathbb{R}$ are, respectively, the scaling and offset factors.

The MOI-JuMP optimizers defined using the QUBODrivers.AbstractSampler{T} <: MOI.AbstractOptimizer interface only support models given in the QUBO form. QUBODrivers.jl employs QUBOTools on many tasks involving data management and querying. It is worth taking a look at QUBOTool's docs.

Table of Contents

diff --git a/dev/manual/2-solve/index.html b/dev/manual/2-solve/index.html index 9ee02cb..4497056 100644 --- a/dev/manual/2-solve/index.html +++ b/dev/manual/2-solve/index.html @@ -18,11 +18,11 @@ yi = objective_value(model; result=i) # Energy println("f($xi) = $(yi)") -end
f([0.0, 1.0, 0.0]) = -1.0
+end
f([1.0, 0.0, 0.0]) = -1.0
+f([0.0, 1.0, 0.0]) = -1.0
 f([0.0, 0.0, 1.0]) = -1.0
-f([1.0, 0.0, 0.0]) = -1.0
 f([0.0, 0.0, 0.0]) = 0.0
+f([1.0, 0.0, 1.0]) = 2.0
 f([1.0, 1.0, 0.0]) = 2.0
 f([0.0, 1.0, 1.0]) = 2.0
-f([1.0, 0.0, 1.0]) = 2.0
-f([1.0, 1.0, 1.0]) = 9.0
+f([1.0, 1.0, 1.0]) = 9.0 diff --git a/dev/manual/3-samplers/index.html b/dev/manual/3-samplers/index.html index 48fd65d..75f0a04 100644 --- a/dev/manual/3-samplers/index.html +++ b/dev/manual/3-samplers/index.html @@ -1,2 +1,2 @@ -Samplers · QUBODrivers.jl

Samplers

Utility Samplers

Exact Sampler

QUBODrivers.ExactSampler.OptimizerType
ExactSampler.Optimizer{T}

This sampler performs an exhaustive search over all $2^{n}$ possible states.

Warn

Due to the exponetially large amount of visited states, it is not possible to use this sampler for problems any larger than $20$ variables big.

source

Random Sampler

QUBODrivers.RandomSampler.OptimizerType
RandomSampler.Optimizer{T}

Attributes

  • RandomSeed, "seed": Random seed to initialize the random number generator.
  • NumberOfReads, "num_reads": Number of random states sampled per run.
  • RandomGenerator, "rng": Random Number Generator instance.
source

Identity Sampler

Showcase

Before explaining in detail how to use this package, it's good to list a few examples for the reader to grasp. Below, there are links to the files containing the actual interface implementations. These are mostly thin wrappers interfacing with common algorithms and heuristics written in Python, Julia or C/C++.

ProjectSource Code
DWave.jlDWave
DWaveNeal.jlDWaveNeal
IsingSolvers.jlGreedyDescent
ILP
MCMCRandom
QuantumAnnealingInterface.jlQuantumAnnealingInterface
CIMOptimizer.jlCIMOptimizer
+Samplers · QUBODrivers.jl

Samplers

Utility Samplers

Exact Sampler

QUBODrivers.ExactSampler.OptimizerType
ExactSampler.Optimizer{T}

This sampler performs an exhaustive search over all $2^{n}$ possible states.

Warn

Due to the exponetially large amount of visited states, it is not possible to use this sampler for problems any larger than $20$ variables big.

source

Random Sampler

QUBODrivers.RandomSampler.OptimizerType
RandomSampler.Optimizer{T}

Attributes

  • RandomSeed, "seed": Random seed to initialize the random number generator.
  • NumberOfReads, "num_reads": Number of random states sampled per run.
  • RandomGenerator, "rng": Random Number Generator instance.
source

Identity Sampler

Showcase

Before explaining in detail how to use this package, it's good to list a few examples for the reader to grasp. Below, there are links to the files containing the actual interface implementations. These are mostly thin wrappers interfacing with common algorithms and heuristics written in Python, Julia or C/C++.

ProjectSource Code
DWave.jlDWave
DWaveNeal.jlDWaveNeal
IsingSolvers.jlGreedyDescent
ILP
MCMCRandom
QuantumAnnealingInterface.jlQuantumAnnealingInterface
CIMOptimizer.jlCIMOptimizer
diff --git a/dev/manual/4-setup/index.html b/dev/manual/4-setup/index.html index 149a46a..51a77a8 100644 --- a/dev/manual/4-setup/index.html +++ b/dev/manual/4-setup/index.html @@ -9,7 +9,7 @@ SuperAttribute["super_attr"] = nothing MegaAttribute::Union{String,Nothing} = "mega" end -endsource

This macro takes two arguments: the identifier of the sampler's struct (usually Optimizer), and a begin...end block containing configuration parameters as key-value pairs.

The first parameter of the configuration block is the sampler's name, which will be used to identify it in the MOI.SolverName attribute.

The next entry is the version assignment, which is accessed by the MOI.SolverVersion attribute. In order to consistently support semantic versioning it is required that the version number comes as a v-string e.g. v"major.minor.patch".

Note

If missing, the version parameter matches the current version of QUBODrivers.jl.

A simple yet valid @setup call would look like this:

QUBODrivers.@setup Optimizer begin
+end
source

This macro takes two arguments: the identifier of the sampler's struct (usually Optimizer), and a begin...end block containing configuration parameters as key-value pairs.

The first parameter of the configuration block is the sampler's name, which will be used to identify it in the MOI.SolverName attribute.

The next entry is the version assignment, which is accessed by the MOI.SolverVersion attribute. In order to consistently support semantic versioning it is required that the version number comes as a v-string e.g. v"major.minor.patch".

Note

If missing, the version parameter matches the current version of QUBODrivers.jl.

A simple yet valid @setup call would look like this:

QUBODrivers.@setup Optimizer begin
     name    = "Super Sampler"
     version = v"1.0.2"
 end

We expect that most users will be happy with this approach and it is likely that it will fit most use cases.

Attributes

The attributes parameter is also given by a begin...end block and contains the sampler's attributes. These attributes are used to configure the sampler's behavior and are accessed by the MOI.get method.

QUBODrivers.@setup Optimizer begin
@@ -19,7 +19,7 @@
         NumberOfReads["num_reads"]::Integer = 1_000
         SuperAttribute::String = "super"
     end
-end

The QUBODrivers.sample method

QUBODrivers.sampleFunction
sample(::AbstractSampler{T})::SampleSet{T} where {T}
source

The [QUBODrivers.SampleSet] collection

A complete example

module SuperSampler
+end

The QUBODrivers.sample method

QUBODrivers.sampleFunction
sample(::AbstractSampler{T})::SampleSet{T} where {T}
source

The [QUBODrivers.SampleSet] collection

A complete example

module SuperSampler
 
 import QUBODrivers
 import QUBODrivers: QUBOTools
@@ -94,4 +94,4 @@
     return ψ
 end
 
-end # module
+end # module diff --git a/dev/manual/5-tests/index.html b/dev/manual/5-tests/index.html index 3613ba6..f1bd872 100644 --- a/dev/manual/5-tests/index.html +++ b/dev/manual/5-tests/index.html @@ -1,3 +1,3 @@ Test Suite · QUBODrivers.jl

Test Suite

Besides establishing the connection between QUBO solvers and JuMP, this package also provides a test suite to ensure that the interface is implemented correctly.

QUBODrivers.testFunction
test(optimizer::Type{S}; examples::Bool=false) where {S<:AbstractSampler}
-test(config!::Function, optimizer::Type{S}; examples::Bool=false) where {S<:AbstractSampler}
source
+test(config!::Function, optimizer::Type{S}; examples::Bool=false) where {S<:AbstractSampler}source diff --git a/dev/manual/6-benchmarks/index.html b/dev/manual/6-benchmarks/index.html index 9963f6d..730efa4 100644 --- a/dev/manual/6-benchmarks/index.html +++ b/dev/manual/6-benchmarks/index.html @@ -1,2 +1,2 @@ -Benchmarking · QUBODrivers.jl
+Benchmarking · QUBODrivers.jl