Skip to main content

QUBO components

Project description

TNO Quantum: Optimization - QUBO - Components

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

This package contains the components to define QUBOs and solvers.

Documentation

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

Install

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

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

Usage

The QUBO Components package can be used to define custom solver classes as shown in the following example.

from tno.quantum.optimization.qubo.components import QUBO, Solver, BasicResult

class CustomSolver(Solver[BasicResult]):
   def _solve(self, qubo: QUBO) -> BasicResult:
      result = ... # solve QUBO and construct result
      return result

The example below shows how to obtain all installed solvers.

An instance of a solver can be obtained via the get_instance() function on an SolverConfig instance.

Note: the "simulated_annealing_solver" solver shown in the example requires tno.quantum.optimization.qubo.solvers to be installed.

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

supported_solvers = SolverConfig.supported_items()

solver_config = SolverConfig(name="simulated_annealing_solver", options={})
solver = solver_config.get_instance()

(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

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_components-1.0.0.tar.gz.

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_components-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2b2e0ea41926bd513ba2d764718857f3509fe6726a3fd6094896e555af5b7dae
MD5 eff55f3921a5fbf4084c0bbd1ad82e77
BLAKE2b-256 cd39040bfe07c3c105db23a00ec99e07610e57b0c54bb85eec7ae0907af531bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_components-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b80839feed7b35af5bb368cf216a334b40d46cd1508ed0717dd2e78a691faf7
MD5 a394a9c1acd3f7ddba7315c2bcf5d134
BLAKE2b-256 fab79d54a31041c90a498801ac985aa867e9cf52992927da4b364b954434d799

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