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, dqo]. 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.5.0.tar.gz (47.0 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.5.0.tar.gz.

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_solvers-1.5.0.tar.gz
Algorithm Hash digest
SHA256 aca4ef6c6df128a4b35a1460bf93d707058506b7c1fb155e9e8f4a2e961382a8
MD5 0762886486d1d359e84f030fc53b4014
BLAKE2b-256 bd41929831df036381d04f6b191e0f40ae269bb8bf1184b7c29ee5dfeeb84c91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_solvers-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa2de615db0ba17051ed292af17ac9b7ea64475d1bc5da0b6132508ca8609e7
MD5 7d907c0379fe2ca1c7d3c7ac151a3587
BLAKE2b-256 4a82c1f2727ee8fccf91b9a446edbff36cccde23104e923259883f1eeea1a451

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