Skip to main content

QUBO solvers

Project description

TNO Quantum: Optimization - QUBO - Solvers

TNO Quantum provides generic software components aimed at facilitating the development of quantum applications.

This package contains implementations of QUBO solvers.

Documentation

Documentation of the tno.quantum.optimization.qubo.solvers package can be found here.

Install

Easily install the tno.quantum.optimization.qubo.solvers package using pip:

$ python -m pip install tno.quantum.optimization.qubo.solvers

By default, the package is installed without external solver dependencies. You can specify which QUBO solvers you would like to install. Available options are [dwave, qubovert, qaoa]. Alternatively, you can install all solvers simultaneously using the [all] option

$ python -m pip install tno.quantum.optimization.qubo.solvers[all]

Usage

The following example shows how to list the available solvers and how to instantiate them.

from tno.quantum.optimization.qubo.components import SolverConfig

supported_solvers = list(SolverConfig.supported_items())
solver = SolverConfig(name='bf_solver').get_instance()

Once a solver is instantiated, it can be used to solve a QUBO as follows.

from tno.quantum.optimization.qubo.components import QUBO

# Construct QUBO
qubo = QUBO([
     [1,   2, 3],
     [4, -50, 6],
     [7,   8, 9]
 ])

# Solve QUBO
result = solver.solve(qubo)
result.best_bitvector # BitVector(010)
result.best_value # -50.0

(End)use limitations

The content of this software may solely be used for applications that comply with international export control laws.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tno_quantum_optimization_qubo_solvers-1.0.0.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file tno_quantum_optimization_qubo_solvers-1.0.0.tar.gz.

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_solvers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 515c823746f913039bd7a684165fc6301a7c13dfcaec03cdb6a6566075bc86c2
MD5 1449ddcfefb3717c2f45b744d0db6c29
BLAKE2b-256 c22f1802ba4347192ccce22c7cc8502605fda9438b0995e0d076e442d3b7174f

See more details on using hashes here.

File details

Details for the file tno_quantum_optimization_qubo_solvers-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_solvers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68d50cd951aabff2b45c241c721e91005bd5ec857e2f337b8e94b26a79dfc175
MD5 120b093a01707085036d3e86e1db02f7
BLAKE2b-256 263b7f88b6042f08595aa1b018ee00bb911c674ae921a1892bd6e15558a46547

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page