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.2.0.tar.gz.

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_components-1.2.0.tar.gz
Algorithm Hash digest
SHA256 fac4c08314d489a40fac642f4d0684b723f992d408e97bcb8efd081d9fef44f9
MD5 b008917ccaafe3fa37c0c3b218d1cd41
BLAKE2b-256 73d449d7e593463e44a51dfbf56882e4388d6431cf1a3da4381c56c365ef56d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tno_quantum_optimization_qubo_components-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65f4c306c4aa1069e30faaa94dbd4266ab13349d3bc0681f816e5aeb6114afaa
MD5 7f5dd942b371509b8eb430834aedb741
BLAKE2b-256 1bbd6af6fbedbb046753892f32cee1b0d92482e798606db4d228013653804d36

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