Architecture
Qmes implements a two-stage meta-learning pipeline. The quantum-expensive work happens once, offline; a user at inference time runs only classical code.

Stage (a): data processing and ground-truth label generation. Stage (b): recommender training with multiple classifiers and feature subset configurations.
Core components
Three pluggable components, each an abstract base class with one concrete implementation per task type:
| Component | Base class | Role | Phase |
|---|---|---|---|
| Extractor | BaseExtractor |
Dataset \(\rightarrow\) fixed-length complexity meta-feature vector | offline and inference |
| Evaluator (Oracle) | BaseEvaluator |
Performance score via quantum kernel \(\rightarrow\) meta-labels | offline only |
| Recommender | PairwiseRecommender |
Meta-features \(\rightarrow\) ranked circuit list | offline fit, inference predict |
Utility modules
| Module | Contents |
|---|---|
Preprocessing (Qmes.data.preprocessing) |
Categorical encoding, median imputation, subsampling to 600 samples |
Circuit registry (Qmes.circuits) |
CIRCUIT_POOL, quantum kernel-matrix computation |
Model selection (Qmes.recommender.selection) |
LOO search over 14 classifiers × MI-selected feature subsets |
Inference runner (Qmes.inference) |
recommend, preprocess_new_dataset, evaluate_recommendation |
The bundled Qsun simulator provides the quantum backend for all circuit evaluations and is invoked exclusively during the offline phase.
Extending Qmes
Both base classes use a small fixed contract, a subclass implements three members and the base class handles validation, sanitization, and the public API:
- New extractor:
task_type,_feature_names,_extract_raw(X, y) - New Oracle:
task_type,metric_name,evaluate_circuit(X, y, name) - New circuit: one dict entry in
CIRCUIT_POOL- no subclassing
Worked, executed examples for all three are in Advanced Usage.