-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from psrenergy/px/qubotools-v1
Update `QUBOTools -> v0.9; QUBODrivers -> 0.3`
- Loading branch information
Showing
55 changed files
with
1,590 additions
and
1,796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
name = "QUBODrivers" | ||
uuid = "a3f166f7-2cd3-47b6-9e1e-6fbfe0449eb0" | ||
version = "0.2.0" | ||
authors = [ | ||
"pedromxavier <[email protected]>", | ||
"pedroripper <[email protected]>", | ||
"AndradeTiago <[email protected]>", | ||
"joaquimg <[email protected]>", | ||
"bernalde <[email protected]>", | ||
] | ||
name = "QUBODrivers" | ||
uuid = "a3f166f7-2cd3-47b6-9e1e-6fbfe0449eb0" | ||
authors = ["pedromxavier <[email protected]>", "pedroripper <[email protected]>", "AndradeTiago <[email protected]>", "joaquimg <[email protected]>", "bernalde <[email protected]>"] | ||
version = "0.3.0" | ||
|
||
[deps] | ||
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" | ||
QUBOTools = "60eb5b62-0a39-4ddc-84c5-97d2adff9319" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
QUBOTools = "60eb5b62-0a39-4ddc-84c5-97d2adff9319" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[compat] | ||
MathOptInterface = "1" | ||
QUBOTools = "0.8" | ||
julia = "1.6" | ||
QUBOTools = "~0.9" | ||
julia = "1.9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
JuMP = "4076af6c-e467-56ae-b986-b466b2749572" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
JuMP = "4076af6c-e467-56ae-b986-b466b2749572" | ||
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
QUBOTools = "60eb5b62-0a39-4ddc-84c5-97d2adff9319" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
QUBODrivers = "a3f166f7-2cd3-47b6-9e1e-6fbfe0449eb0" | ||
QUBOTools = "60eb5b62-0a39-4ddc-84c5-97d2adff9319" | ||
|
||
[compat] | ||
Documenter = "0.27" | ||
JuMP = "1" | ||
Documenter = "1" | ||
JuMP = "1" | ||
MathOptInterface = "1" | ||
Plots = "1.38" | ||
QUBOTools = "0.8" | ||
Plots = "1.38" | ||
QUBOTools = "0.9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,42 @@ | ||
using Documenter | ||
using QUBODrivers | ||
using QUBOTools | ||
|
||
# Set up to run docstrings with jldoctest | ||
DocMeta.setdocmeta!(QUBODrivers, :DocTestSetup, :(using QUBODrivers); recursive = true) | ||
DocMeta.setdocmeta!(QUBOTools, :DocTestSetup, :(using QUBOTools); recursive = true) | ||
|
||
makedocs(; | ||
modules = [QUBODrivers], | ||
doctest = true, | ||
clean = true, | ||
format = Documenter.HTML( | ||
modules = [QUBODrivers, QUBODrivers.QUBOTools], | ||
doctest = true, | ||
clean = true, | ||
warnonly = [:missing_docs], | ||
format = Documenter.HTML( | ||
assets = ["assets/extra_styles.css"], #, "assets/favicon.ico"], | ||
mathengine = Documenter.KaTeX(), | ||
sidebar_sitename = false, | ||
), | ||
sitename = "QUBODrivers.jl", | ||
authors = "Pedro Xavier and Pedro Ripper and Tiago Andrade and Joaquim Garcia and David Bernal", | ||
pages = [ | ||
"Home" => "index.md", | ||
# "Manual" => "manual.md", | ||
# "Examples" => "examples.md", | ||
# "Samplers" => "samplers.md", | ||
"Home" => "index.md", | ||
"Manual" => [ | ||
"Introduction" => "manual/1-intro.md", | ||
"Solving QUBO" => "manual/2-solve.md", | ||
"Samplers" => "manual/3-samplers.md", | ||
"Sampler Setup" => "manual/4-setup.md", | ||
"Test Suite" => "manual/5-tests.md", | ||
"Benchmarking" => "manual/6-benchmarks.md", | ||
], | ||
"Booklet" => [ | ||
"Itroduction" => "booklet/1-intro.md", | ||
"Sampler Interface" => "booklet/2-interface.md", | ||
"Attribute System" => "booklet/3-attributes.md", | ||
], | ||
], | ||
workdir = @__DIR__, | ||
workdir = @__DIR__ | ||
) | ||
|
||
if "--skip-deploy" ∈ ARGS | ||
@warn "Skipping deployment" | ||
else | ||
deploydocs(repo = raw"github.com/psrenergy/QUBODrivers.jl.git", push_preview = true) | ||
deploydocs(; repo = raw"github.com/psrenergy/QUBODrivers.jl.git", push_preview = true) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# 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 | ||
|
||
```@contents | ||
Pages = ["2-interface.md", "3-attributes.md"] | ||
Depth = 2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Sampler Interface | ||
|
||
```@docs | ||
QUBODrivers.AbstractSampler | ||
``` | ||
|
||
```@docs | ||
QUBODrivers.set_model! | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Attributes | ||
|
||
## API | ||
|
||
```@docs | ||
QUBODrivers.SamplerAttribute | ||
``` | ||
|
||
```@docs | ||
QUBODrivers.RawSamplerAttribute | ||
QUBODrivers.@raw_attr_str | ||
``` | ||
|
||
```@docs | ||
QUBODrivers.get_raw_attr | ||
QUBODrivers.set_raw_attr! | ||
QUBODrivers.default_raw_attr | ||
``` | ||
|
||
## An advanced example | ||
|
||
```julia | ||
module SuperSampler | ||
|
||
import QUBODrivers | ||
import QUBODrivers: QUBOTools | ||
import MathOptInterface as MOI | ||
|
||
QUBODrivers.@setup Optimizer begin | ||
name = "Super Sampler" | ||
version = v"1.0.2" | ||
attributes = begin | ||
NumberOfReads["num_reads"]::Integer = 100_000 | ||
SuperAttribute["super_attr"]::String = "super" | ||
end | ||
end | ||
|
||
function MOI.set(sampler::Optimizer, attr::raw_attr"", value) | ||
if !(value isa Integer) | ||
error("'num_reads' must be an integer") | ||
else | ||
QUBODrivers.set_raw_attr!(sampler, attr, value) | ||
end | ||
|
||
return nothing | ||
end | ||
|
||
function MOI.set(sampler::Optimizer, attr::raw_attr"super_attr", value) | ||
if !(value isa AbstractString) | ||
error("'super_attr' must be a string") | ||
elseif !(value ∈ ("super", "ultra", "mega")) | ||
error("'super_attr' must be one of the following: 'super', 'ultra', 'mega'") | ||
else | ||
QUBODrivers.set_raw_attr!(sampler, attr, value) | ||
end | ||
|
||
return nothing | ||
end | ||
|
||
end # SuperSampler module | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
f517c0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
f517c0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/92106
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: