Skip to content

mis.pipeline.config

source module mis.pipeline.config

Configuration for MIS solvers.

Classes

  • SolverConfig Configuration class for setting up solver parameters.

  • GreedyConfig Configuration for greedy solving strategies.

Functions

source dataclass SolverConfig(use_quantum: bool = False, backend: BaseBackend | None = None, method: MethodType = MethodType.EAGER, max_iterations: int = 1, max_number_of_solutions: int = 1, device: Device | None = None, embedder: BaseEmbedder | None = None, pulse_shaper: BasePulseShaper | None = None, preprocessor: Callable[[nx.Graph], BasePreprocessor] | None = field(default_factory=default_preprocessor), postprocessor: Callable[[], BasePostprocessor] | None = default_postprocessor, greedy: GreedyConfig = field(default_factory=GreedyConfig))

Configuration class for setting up solver parameters.

Attributes

  • use_quantum : bool Whether to use quantum hardware or simulation for solving.

  • backend : BaseBackend | None Backend configuration to use. If None, use a non-quantum heuristic solver.

  • method : MethodType The method used to solve this instance of MIS.

  • max_iterations : int Maximum number of iterations allowed for solving.

  • max_number_of_solutions : int A maximal number of solutions to return.

  • device : Device | None Quantum device to execute the code in. If unspecified, use a reasonable default device.

  • embedder : BaseEmbedder | None If specified, an embedder, i.e. a mechanism used to customize the layout of neutral atoms on the quantum device. Ignored for non-quantum backends.

  • pulse_shaper : BasePulseShaper | None If specified, a pulse shaper, i.e. a mechanism used to customize the laser pulse to which the neutral atoms are subjected during the execution of the quantum algorithm. Ignored for non-quantum backends.

  • preprocessor : Callable[[nx.Graph], BasePreprocessor] | None A graph preprocessor, used to decrease the size of the graph (hence the duration of actual resolution) by applying heuristics prior to embedding on a quantum device.

  • postprocessor : Callable[[], BasePostprocessor] | None A postprocessor used to sort out and improve results.

  • greedy : GreedyConfig If specified, use this for solving the GreedyMIS. Needs to be specified when method is GreedyMIS

source default_preprocessor()Callable[[nx.Graph], BasePreprocessor]

Instantiate the default preprocessor.

As of this writing, the default preprocessor is mis.pipeline.kernelization.Kernelization.

source default_postprocessor()BasePostprocessor

Instantiate the default postprocessor.

As of this writing, the default postprocessor is mis.pipeline.maximization.Maximization.

source dataclass GreedyConfig(default_solving_threshold: int = 2, subgraph_quantity: int = 5, mis_sample_quantity: int = 1)

Configuration for greedy solving strategies.

Attributes

  • default_solving_threshold : int Size threshold (number of nodes) for using MIS solving when greedy method is used.

  • subgraph_quantity : int Number of candidate subgraphs to generate during greedy mapping.

  • mis_sample_quantity : int Number of MIS solutions to sample per iteration (if applicable).