Skip to content

mis.pipeline.basesolver

source module mis.pipeline.basesolver

Shared definitions for solvers.

This module is useful mostly for users interested in writing new solvers.

Classes

  • BaseSolver Abstract base class for all solvers (quantum or classical).

source class BaseSolver(instance: MISInstance, config: SolverConfig)

Bases : ABC

Abstract base class for all solvers (quantum or classical).

Provides the interface for solving, embedding, pulse shaping, and execution of MISproblems.

The BaseSolver also provides a method to execute the Pulse and Register

Initialize the solver with the MISinstance and configuration.

Parameters

  • instance : MISInstance The MISproblem to solve.

  • config : SolverConfig Configuration settings for the solver.

Methods

  • solve Solve the given MISinstance.

  • embedding Generate or retrieve an embedding for the instance.

  • pulse Generate a pulse schedule for the quantum device based on the embedding.

  • detuning Return detunings to be executed alongside the pulses.

source method BaseSolver.solve()list[MISSolution]

Solve the given MISinstance.

Parameters

  • instance if None (default), use the original instance passed during

  • initialization. Otherwise, pass a custom instance. Used e.g. for

  • preprocessing.

Returns

  • list[MISSolution] A list of solutions, ranked from best (lowest energy) to worst (highest energy).

source method BaseSolver.embedding()Register

Generate or retrieve an embedding for the instance.

Returns

  • dict Embedding information for the instance.

source method BaseSolver.pulse(embedding: Register)Pulse

Generate a pulse schedule for the quantum device based on the embedding.

Parameters

  • embedding : Register Embedding information.

Returns

  • Pulse Pulse schedule.

source method BaseSolver.detuning(embedding: Register)list[Detuning]

Return detunings to be executed alongside the pulses.

Parameters

  • embedding : Register Embedding information.

Returns

  • list[Detuning] The list of detunings.