Skip to main content

Qiboopt

Qiboopt is a plugin to Qibo for solving combinatorial optimization problems.

Documentation

For the complete documentation on qiboopt, please refer to qiboopt.

Minimum working example

This repository can create QAOA circuits given a QUBO. For certain applications such as maximum independent set and traveling salesman problem, more functionalities have been coded to prepare the QUBO faster.

For example, to construct a Maximal Independent Set problem instance as a QUBO and solving it using QAOA:

import networkx as nx
from qiboopt.combinatorial.combinatorial import MIS

# Defining the problem, and converting it to a QUBO
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 0)])
mis = MIS(G)
penalty = 10
qp = mis.penalty_method(penalty)  # qp is a QUBO class in qiboopt

# Train 2 layers of regular QAOA
gammas = [0.1, 0.2]
betas = [0.3, 0.4]
output = qp.train_QAOA(gammas=gammas, betas=betas)
print(output)

Contact

To get in touch with the community and the developers, consider joining the Qibo workspace on Matrix:

Matrix

If you have a question about the project, contact us at 📫.

Contributing

Contributions, issues and feature requests are welcome.

Metadata

Release files for qiboopt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qiboopt 0.1.0
File Size Uploaded
qiboopt-0.1.0.tar.gz 20.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qiboopt 0.1.0
File Interpreter ABI Platform
qiboopt-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.0 kB

Release files / qiboopt-0.1.0.tar.gz

Download URL qiboopt-0.1.0.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9eb149077a2fdce6dee2461f2b5c439620bfdd0745e53bf99e3c05970e306914
BLAKE2b-256 checksum
How to use checksums
d15d345ab1676a7c639db874fc67e71321c0539ad69ef6de7dc0b8e92fcf4ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / qiboopt-0.1.0-py3-none-any.whl

Download URL qiboopt-0.1.0-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
918888d51931e560525daf4b0dab56e1bb6420718be644b512a8a5752b9b3d76
BLAKE2b-256 checksum
How to use checksums
136a7df239932f984f15f215c1af4ffe0b42ce98e88f822454584f3d4ad5a278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page