mis.pipeline.fixtures
source module mis.pipeline.fixtures
Classes
-
Fixtures — Handles all preprocessing and postprocessing logic for MIS problems.
source class Fixtures(instance: MISInstance, config: SolverConfig)
Handles all preprocessing and postprocessing logic for MIS problems.
This class allows centralized transformation or validation of the problem instance before solving, and modification or annotation of the solution after solving.
Initialize the fixture handler with the MIS instance and solver config.
Parameters
-
instance : MISInstance — The problem instance to process.
-
config : SolverConfig — Solver configuration, which may include flags for enabling or customizing processing behavior.
Methods
-
preprocess — Apply preprocessing steps to the MIS instance before solving.
-
postprocess — Apply postprocessing steps to the MIS instance after solving.
source method Fixtures.preprocess() → MISInstance
Apply preprocessing steps to the MIS instance before solving.
Returns
-
MISInstance — The processed or annotated instance.
source method Fixtures.postprocess(solutions: list[MISSolution]) → list[MISSolution]
Apply postprocessing steps to the MIS instance after solving.
These postprocessing steps consist in
- first, any explicit postprocessor we have setup in
config, used e.g. to compensate for noise - second, any implicit postprocessors (aka rebuilders) previously registered by the preprocessor to convert solutions on preprocessed graphs into solutions on the original graph, executed in the reverse order in which they were registered.
Note: Neither of the operations maintains the frequency. Past this point, the frequency of a solution may end up being > 1.0.
Parameters
-
solutions : MISSolution — The solutions returned by the quantum device.
Returns
-
list[MISSolution] — The cleaned or transformed solution.