API
Actions
Path Routing
QUBOLib.library_path
— Functionlibrary_path()::AbstractString
Returns the absolute path to the QUBOLib artifact.
QUBOLib.database_path
— Functiondatabase_path(path::AbstractString=library_path())::AbstractString
Returns the absolute path to the database file, given a reference library path path
.
QUBOLib.archive_path
— Functionarchive_path(path::AbstractString=library_path())::AbstractString
Returns the absolute path to the archive file, given a reference library path path
.
QUBOLib.root_path
— Functionroot_path()::AbstractString
Returns the absolute path to the project's root folder.
The dist_path
, build_path
, and cache_path
functions are more often used when building the library, therefore they will point to the the project's root path by default, by referencing this function.
QUBOLib.dist_path
— Functiondist_path(path::AbstractString=root_path())::AbstractString
Returns the absolute path to the distribution folder, given a reference root path path
.
QUBOLib.build_path
— Functionbuild_path(path::AbstractString=root_path())::AbstractString
Returns the absolute path to the build folder, given a reference root path path
.
QUBOLib.cache_path
— Functioncache_path(path::AbstractString=root_path())::AbstractString
Returns the absolute path to the cache folder, given a reference root path path
.
Library Index
QUBOLib.LibraryIndex
— TypeLibraryIndex
The QUBOLib index is composed of two pieces: a SQLite database and an HDF5 archive.
QUBOLib.database
— Functiondatabase(index::LibraryIndex)::SQLite.DB
Returns a pointer that grants direct access to the SQLite database of the library index.
QUBOLib.archive
— Functionarchive(index::LibraryIndex)::HDF5.File
Returns a pointer that grants direct access to the HDF5 archive of the library index.
Data Access
QUBOLib.access
— Functionaccess(
+API · QUBOLib.jl API
Actions
Path Routing
QUBOLib.library_path
— Functionlibrary_path()::AbstractString
Returns the absolute path to the QUBOLib artifact.
sourceQUBOLib.database_path
— Functiondatabase_path(path::AbstractString=library_path())::AbstractString
Returns the absolute path to the database file, given a reference library path path
.
sourceQUBOLib.archive_path
— Functionarchive_path(path::AbstractString=library_path())::AbstractString
Returns the absolute path to the archive file, given a reference library path path
.
sourceQUBOLib.root_path
— Functionroot_path()::AbstractString
Returns the absolute path to the project's root folder.
Info The dist_path
, build_path
, and cache_path
functions are more often used when building the library, therefore they will point to the the project's root path by default, by referencing this function.
sourceQUBOLib.dist_path
— Functiondist_path(path::AbstractString=root_path())::AbstractString
Returns the absolute path to the distribution folder, given a reference root path path
.
sourceQUBOLib.build_path
— Functionbuild_path(path::AbstractString=root_path())::AbstractString
Returns the absolute path to the build folder, given a reference root path path
.
sourceQUBOLib.cache_path
— Functioncache_path(path::AbstractString=root_path())::AbstractString
Returns the absolute path to the cache folder, given a reference root path path
.
sourceLibrary Index
QUBOLib.LibraryIndex
— TypeLibraryIndex
The QUBOLib index is composed of two pieces: a SQLite database and an HDF5 archive.
sourceQUBOLib.database
— Functiondatabase(index::LibraryIndex)::SQLite.DB
Returns a pointer that grants direct access to the SQLite database of the library index.
sourceQUBOLib.archive
— Functionarchive(index::LibraryIndex)::HDF5.File
Returns a pointer that grants direct access to the HDF5 archive of the library index.
sourceData Access
QUBOLib.access
— Functionaccess(
callback;
path::Union{AbstractString,Nothing} = nothing,
create::Bool = false
@@ -7,6 +7,6 @@
QUBOLib.access() do index
print(index) # Show some information about the index
-end
sourceQUBOLib.load_collection
— Functionload_collection(index::LibraryIndex, code::Symbol)
sourceQUBOLib.load_instance
— Functionload_instance(index::LibraryIndex, instance::Integer)
sourceQUBOLib.load_solution
— Functionload_solution(index::LibraryIndex, solution::Integer)
-load_solution(index::LibraryIndex, instance::Integer, solution::Integer)
sourceData Management
QUBOLib.add_collection!
— Functionadd_collection!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})
Creates a new collection in the library index.
sourceQUBOLib.add_instance!
— Functionadd_instance!(index::LibraryIndex, coll::Symbol, model::QUBOTools.Model{Int,Float64,Int})
Adds a new instance to the library index.
sourceQUBOLib.add_solution!
— Functionadd_solution!(index::LibraryIndex, instance::Integer, solution::SampleSet{Float64,Int})
Registers a new solution for a given instance.
The solution
argument is a QUBOTools.SampleSet
, which is a collection of samples and their respective energies.
sourceQUBOLib.add_solver!
— Functionadd_solver!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})
Registers a new solver in the library index.
sourceQUBOLib.remove_collection!
— Functionremove_collection!(index::LibraryIndex, code::Symbol)
Removes a collection and its contents from the library index.
sourceQUBOLib.remove_instance!
— Functionremove_instance!(index::LibraryIndex, coll::Symbol, instance::Integer)
Removes an instance from the library index.
sourceQUBOLib.remove_solution!
— Functionremove_solution!(index::LibraryIndex, instance::Integer, solution::Integer)
Removes a solution from the library index.
sourceQUBOLib.remove_solver!
— Functionremove_solver!(index::LibraryIndex, code::Symbol)
Removes a solver from the library index.
sourceInstance Synthesis
QUBOLib.Synthesis.AbstractProblem
— TypeAbstractProblem{T}
sourceQUBOLib.Synthesis.generate
— Functiongenerate(problem::AbstractProblem{T}) where {T}
-generate(rng, problem::AbstractProblem{T}) where {T}
Generates a QUBO problem and returns it as a QUBOTools.Model
.
sourceProblem Types
QUBOLib.Synthesis.NAE3SAT
— TypeNAE3SAT{T}(m::Integer, n::Integer)
Not-all-equal 3-SAT on $m$ clauses and $n$ variables.
sourceQUBOLib.Synthesis.XORSAT
— TypeXORSAT{T}(n::Integer, r::Integer = 3, k::Integer = 3)
$r$-regular $k$-XORSAT on $n$ variables.
sourceQUBOLib.Synthesis.Wishart
— TypeWishart{T}(n::Integer, m::Integer)
Represents the Wishart model on $n$ variables whose $\mathbf{W}$ matrix has $m$ columns.
When true
, the discretize
keyword limits the entries of the $\mathbf{R}$ matrix to $\pm 1$. The precision
, on the other hand, is the amount of digits to round each entry $R_{i,j}$ after sampling from a normal distribution $\mathcal{N}(0, 1)$.
sourceQUBOLib.Synthesis.SherringtonKirkpatrick
— TypeSherringtonKirkpatrick{T}(n::Integer, μ::T, σ::T)
Generates a Sherrington-Kirkpatrick model in $n$ variables. Coefficients are normally distributed with mean $\mu$ and variance $\sigma$.
sourceSettings
This document was generated with Documenter.jl version 1.7.0 on Friday 18 October 2024. Using Julia version 1.9.4.
+end
QUBOLib.load_collection
— Functionload_collection(index::LibraryIndex, code::Symbol)
QUBOLib.load_instance
— Functionload_instance(index::LibraryIndex, instance::Integer)
QUBOLib.load_solution
— Functionload_solution(index::LibraryIndex, solution::Integer)
+load_solution(index::LibraryIndex, instance::Integer, solution::Integer)
Data Management
QUBOLib.add_collection!
— Functionadd_collection!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})
Creates a new collection in the library index.
QUBOLib.add_instance!
— Functionadd_instance!(index::LibraryIndex, coll::Symbol, model::QUBOTools.Model{Int,Float64,Int})
Adds a new instance to the library index.
QUBOLib.add_solution!
— Functionadd_solution!(index::LibraryIndex, instance::Integer, solution::SampleSet{Float64,Int})
Registers a new solution for a given instance.
The solution
argument is a QUBOTools.SampleSet
, which is a collection of samples and their respective energies.
QUBOLib.add_solver!
— Functionadd_solver!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})
Registers a new solver in the library index.
QUBOLib.remove_collection!
— Functionremove_collection!(index::LibraryIndex, code::Symbol)
Removes a collection and its contents from the library index.
QUBOLib.remove_instance!
— Functionremove_instance!(index::LibraryIndex, coll::Symbol, instance::Integer)
Removes an instance from the library index.
QUBOLib.remove_solution!
— Functionremove_solution!(index::LibraryIndex, instance::Integer, solution::Integer)
Removes a solution from the library index.
QUBOLib.remove_solver!
— Functionremove_solver!(index::LibraryIndex, code::Symbol)
Removes a solver from the library index.
Instance Synthesis
QUBOLib.Synthesis.AbstractProblem
— TypeAbstractProblem{T}
QUBOLib.Synthesis.generate
— Functiongenerate(problem::AbstractProblem{T}) where {T}
+generate(rng, problem::AbstractProblem{T}) where {T}
Generates a QUBO problem and returns it as a QUBOTools.Model
.
Problem Types
QUBOLib.Synthesis.NAE3SAT
— TypeNAE3SAT{T}(m::Integer, n::Integer)
Not-all-equal 3-SAT on $m$ clauses and $n$ variables.
QUBOLib.Synthesis.XORSAT
— TypeXORSAT{T}(n::Integer, r::Integer = 3, k::Integer = 3)
$r$-regular $k$-XORSAT on $n$ variables.
QUBOLib.Synthesis.Wishart
— TypeWishart{T}(n::Integer, m::Integer)
Represents the Wishart model on $n$ variables whose $\mathbf{W}$ matrix has $m$ columns.
When true
, the discretize
keyword limits the entries of the $\mathbf{R}$ matrix to $\pm 1$. The precision
, on the other hand, is the amount of digits to round each entry $R_{i,j}$ after sampling from a normal distribution $\mathcal{N}(0, 1)$.
QUBOLib.Synthesis.SherringtonKirkpatrick
— TypeSherringtonKirkpatrick{T}(n::Integer, μ::T, σ::T)
Generates a Sherrington-Kirkpatrick model in $n$ variables. Coefficients are normally distributed with mean $\mu$ and variance $\sigma$.