Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/juliaqubo/qubolib.jl

QUBO Instances for benchmarking
https://github.com/juliaqubo/qubolib.jl

benchmark database instances quantum-optimization qubo

Last synced: about 1 month ago
JSON representation

QUBO Instances for benchmarking

Awesome Lists containing this project

README

        

# QUBOLib.jl



ToQUBO.jl



## Getting Started

### Installation

```julia
julia> import Pkg; Pkg.add(url="https://github.com/JuliaQUBO/QUBOLib.jl")

julia> using QUBOLib
```

### Example

```julia
julia> using QUBOLib

julia> QUBOLib.access() do index
println(index)
end
```

## Accessing the instance index database

> **Warning**
> This requires [SQLite.jl](https://github.com/JuliaDatabases/SQLite.jl) and [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl) to be installed.

```julia
julia> using QUBOLib

julia> using SQLite, DataFrames

julia> models = QUBOLib.access() do index
df = DBInterface.execute(
QUBOLib.database(index),
"SELECT instance FROM Instances WHERE size BETWEEN 100 AND 200;"
) |> DataFrame

return [load_instance(index, i) for i in df[!, :instance]]
end
```

### Listing Collections

```julia
julia> QUBOLib.access() do index
DBInterface.execute(
QUBOLib.database(index),
"SELECT * FROM Collections;"
) |> DataFrame
end
```