-
BaseSolver — Abstract base class for all solvers (quantum or classical).
mis.pipeline.basesolver
module
mis.pipeline.basesolver
Shared definitions for solvers.
This module is useful mostly for users interested in writing new solvers.
Classes
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
method
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).
method
embedding
() → Register
Generate or retrieve an embedding for the instance.
Returns
-
dict — Embedding information for the instance.
method
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.
method
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.