Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliaqubo/qubotools.jl
🧬 Tools for Quadratic Unconstrained Binary Optimization models in Julia
https://github.com/juliaqubo/qubotools.jl
binary-quadratic-form julia quantum-optimization qubo
Last synced: 13 days ago
JSON representation
🧬 Tools for Quadratic Unconstrained Binary Optimization models in Julia
- Host: GitHub
- URL: https://github.com/juliaqubo/qubotools.jl
- Owner: JuliaQUBO
- License: other
- Created: 2022-06-30T02:32:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T06:06:43.000Z (about 2 months ago)
- Last Synced: 2024-10-31T17:26:06.701Z (20 days ago)
- Topics: binary-quadratic-form, julia, quantum-optimization, qubo
- Language: Julia
- Homepage: https://juliaqubo.github.io/QUBOTools.jl/
- Size: 1.93 MB
- Stars: 15
- Watchers: 7
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QUBOTools.jl
## Introduction
The `QUBOTools.jl` package implements codecs for QUBO (*Quadratic Unconstrained Binary Optimization*) instances.
Its purpose is to provide fast and reliable conversion between common formats used to represent such problems.
This allows for rapid leverage of many emergent computing architectures whose job is to solve this kind of optimization problem.The term QUBO is widely used when referring to *boolean* problems of the form
$$\begin{array}{rl}
\min & \mathbf{x}'\ Q\ \mathbf{x} \\
\text{s.t.} & \mathbf{x} \in \mathbb{B}^{n}
\end{array}$$with symmetric $Q \in \mathbb{R}^{n \times n}$. Nevertheless, this package also fully supports *Ising Models*, given by
$$\begin{array}{rl}
\min & \mathbf{s}'\ J\ \mathbf{s} + \mathbf{h}'\ \mathbf{s} \\
\text{s.t.} & \mathbf{s} \in \left\lbrace-1, 1\right\rbrace^{n}
\end{array}$$where $J \in \mathbb{R}^{n \times n}$ is triangular and $\mathbf{h} \in \mathbb{R}^{n}$.
## Getting Started
### Installation
```julia
import PkgPkg.add("QUBOTools")
```### Basic Usage
```julia
using QUBOToolsmodel = QUBOTools.read_model("problem.json")
QUBOTools.write_model("problem.qubo", model)
```## Supported Formats
The `r` and `w` marks indicate that reading and writing modes are available for the corresponding file format, respectively.
### [QUBin](/docs/models/QUBin.md) `rw`
[QUBOTools](https://github.com/JuliaQUBO/QUBOTools.jl)' home-brewed HDF5-based file format.
### [BQPJSON](/docs/models/BQPJSON.md) `rw`
The [BQPJSON](https://bqpjson.readthedocs.io) format was designed at [LANL-ANSI](https://github.com/lanl-ansi) to represent Binary Quadratic Programs in a platform-independet fashion.
This is accomplished by using `.json` files validated using a well-defined [JSON Schema](/src/models/bqpjson.schema.json).### [QUBO](/docs/models/QUBOTools.md) `rw`
The QUBO specification appears as the input format in many of D-Wave's applications.
A brief explanation about it can be found in [qbsolv](https://github.com/arcondello/qbsolv#qbsolv-qubo-input-file-format)'s repository README.### [Qubist](/docs/models/Qubist.md) `rw`
This is the simplest of all current supported formats, where each row contains a pair of variable indices and their corresponding coefficient value.
### [MiniZinc](/docs/models/MiniZinc.md) `w`
[MiniZinc](https://www.minizinc.org) is a constraint modelling language that can be used as input for many solvers.
---