A quantum machine learning model should not be judged by whether it produces an interesting circuit or a promising single score. This guide provides a reusable evaluation workflow for quantum kernels, variational classifiers, and hybrid neural networks: define honest data splits, fit preprocessing only on training data, compare against appropriate classical baselines, report metrics that match the task, repeat experiments across seeds, and document enough detail for someone else to reproduce the result.
Overview
Quantum machine learning evaluation is fundamentally a model-comparison problem. The relevant question is not simply, “Did the quantum model achieve a high accuracy?” It is, “Under the same data, preprocessing, compute budget, and evaluation protocol, does this model offer a meaningful improvement over simpler alternatives?”
That comparison is easy to compromise unintentionally. A feature scaler may be fitted on the complete dataset. A test set may influence ansatz selection. A classical baseline may receive more hyperparameter tuning than the quantum model. Or a result may be reported from the most favorable random seed rather than from a distribution of runs. These issues can make a model appear stronger without improving its ability to generalize.
A defensible quantum ML evaluation has five properties:
- Separation: training, validation, and test data have distinct roles.
- Parity: classical and quantum approaches use comparable inputs, tuning effort, and evaluation data.
- Task alignment: metrics reflect the real cost of errors and the structure of the target.
- Stability: results are repeated across seeds, folds, or resampled datasets where practical.
- Traceability: data versions, software versions, circuits, optimizers, hardware settings, and budgets are recorded.
Before running experiments, decide whether the objective is predictive quality, resource efficiency, robustness to noise, interpretability, or a combination. A quantum method may be useful for one objective without winning on every metric.
Checklist by scenario
For classification models
- Create the split before model development. Use training data for fitting parameters, validation data for selecting features and hyperparameters, and a held-out test set for the final estimate. For small datasets, use stratified cross-validation inside the training portion, then preserve the test set until the end.
- Check class proportions. Record the number of examples in each class for every split. If classes are imbalanced, accuracy alone can be misleading. Consider balanced accuracy, precision, recall, F1 score, area under a precision-recall curve, or area under a receiver operating characteristic curve as appropriate to the application.
- Choose a decision threshold deliberately. A variational classifier or quantum kernel method may output scores or probabilities rather than final labels. Select a threshold using training or validation data, never by inspecting test performance.
- Use a meaningful baseline ladder. Start with a majority-class or simple heuristic baseline. Then include a regularized linear model and at least one nonlinear model suited to the feature representation. A quantum model that cannot beat a simple baseline under the same protocol needs further investigation.
- Repeat the complete pipeline. Change the random seed for data shuffling, parameter initialization, and any stochastic optimizer. Report the mean and spread of the test metric across runs, not only the best run.
For regression models
- Inspect the target distribution. Report its scale, range, outliers, and whether a transformation is applied. A logarithmic or standardized target transformation must be learned from training data and reversed consistently for evaluation.
- Report complementary error metrics. Mean absolute error is easier to interpret in the target's units, while root mean squared error gives more influence to large errors. Include a normalized metric only when the normalization reference is clearly defined.
- Compare against simple predictors. Include a mean or median predictor where appropriate, followed by linear and nonlinear baselines. If observations are temporal or grouped, use a split that respects that structure rather than a random split.
- Inspect residuals. Plot or summarize errors against predicted values, important features, groups, and target magnitude. A similar average error can conceal systematic failures in a particular region of the dataset.
For quantum kernels
Keep the feature map fixed while comparing the quantum kernel with classical kernels, unless the experiment explicitly studies feature-map selection. Define how the kernel matrix is estimated, including shot count, measurement settings, symmetry handling, and any regularization. Train the downstream classical kernel method only on the training kernel matrix. Validation and test kernel entries must be computed without allowing labels or test outcomes to influence feature-map or hyperparameter choices.
Compare against classical kernels using comparable tuning procedures. Useful controls may include a linear kernel, polynomial kernel, radial basis function kernel, and a classical approximation that uses the same reduced feature set. For an operational comparison, record kernel-construction time and memory as well as predictive metrics.
For variational classifiers and hybrid neural networks
Record the number of qubits, feature-encoding method, circuit depth, trainable parameter count, ansatz structure, observable or measurement rule, optimizer, learning-rate schedule, stopping condition, batch size, shot count, and simulator or hardware mode. Keep the classical portion of the hybrid model visible: a quantum circuit embedded in a larger network is not comparable to a small standalone classifier unless the full systems are compared.
When hardware is involved, distinguish ideal simulation, noisy simulation, and device results. For device runs, document the backend and relevant execution settings. The quantum backend selection guide and error mitigation guide can help structure those decisions.
Metrics at a glance
| Task | Primary metrics | Useful companion checks |
|---|---|---|
| Balanced classification | Accuracy, macro F1 | Confusion matrix, per-class recall |
| Imbalanced classification | Balanced accuracy, macro F1, precision-recall area | Class-specific precision and recall, threshold analysis |
| Cost-sensitive classification | Expected cost or utility | Calibration, confusion matrix at the operating threshold |
| Regression | MAE, RMSE | Residual analysis, median absolute error, normalized error |
What to double-check
Preprocessing boundaries
Fit every data-dependent transformation on the training partition only. This includes standardization, normalization, imputation, feature selection, dimensionality reduction, vocabulary construction, and target encoding. Apply the fitted transformation to validation and test data without refitting. A pipeline object or equivalent single source of preprocessing logic reduces accidental leakage.
Leakage and duplicated information
Look for duplicate or near-duplicate records across splits, features derived from future events, identifiers that encode the label, and repeated measurements from the same entity. If observations belong to users, patients, devices, experiments, or time windows, split by the relevant group when independent examples are not actually independent.
Fair baseline construction
Use the same train, validation, and test partitions for all models. Give classical baselines a reasonable tuning budget and the same access to the permitted features. Conversely, do not add extensive feature engineering to one approach while presenting an untuned version of another as the comparison. Report model-selection rules before looking at final test scores when possible.
Statistical reporting
For repeated runs, report the number of seeds, the average, and a dispersion measure such as standard deviation or an interquartile range. Include the individual scores when the sample is small. If comparing two models, report paired differences across the same splits or seeds where possible. A small average improvement with wide variation should be described as uncertain rather than as a reliable advantage.
Resource accounting
Predictive quality is only one part of the evaluation. Record wall-clock time, circuit evaluations, shots, memory requirements, queue or execution time when relevant, and the number of optimization steps. For simulators, identify the simulation method and noise assumptions. The quantum resource estimation worksheet and simulator selection guide provide useful companion checklists.
Reusable experiment-report template
For every experiment, record: dataset name and version; sample counts and split method; preprocessing steps and fit boundaries; feature dimension and qubit mapping; model architecture; trainable parameter count; optimizer and stopping rule; simulator or hardware configuration; shot and measurement settings; baseline implementations; metric definitions; seed list; compute budget; final test results; and known limitations. A dedicated quantum experiment reporting template can serve as the project record.
Common mistakes
- Using the test set as a development set: repeated inspection turns the test set into another tuning resource. Keep it sealed until the protocol is fixed.
- Reporting only the best seed: optimization landscapes can produce materially different outcomes. Show the distribution and preserve failed or unstable runs in the record.
- Comparing different feature budgets: a quantum model using aggressively compressed features should be compared with classical models using the same inputs, alongside separate experiments that study compression itself.
- Confusing simulation with hardware evidence: ideal simulation can isolate algorithm behavior, but it does not establish performance under device noise or execution constraints.
- Claiming advantage from a single dataset: a result may depend on the dataset, encoding, ansatz, optimizer, or split. Treat it as a result for that defined setup unless broader testing supports a stronger conclusion.
- Ignoring failed configurations: barren optimization, unstable gradients, excessive circuit depth, or high kernel-estimation variance are part of the engineering result and should be documented.
- Changing multiple variables at once: if the feature map, ansatz, optimizer, shot count, and baseline all change together, it becomes difficult to identify what caused an improvement.
When to revisit
Revisit this evaluation workflow whenever the dataset, label definition, feature pipeline, split strategy, ansatz, encoding, optimizer, simulator, hardware backend, or classical baseline changes. A framework update can also change defaults, supported primitives, transpilation behavior, numerical results, or API semantics, so record the package versions and rerun a small reference experiment after major changes.
At the start of a new benchmark, work through this action list:
- Write the prediction objective and the primary metric before training.
- Create and freeze the split, including group or time constraints.
- Implement preprocessing as a training-fitted pipeline.
- Define a baseline ladder and equal tuning rules.
- Choose the quantum model, resource budget, and seed list.
- Run leakage checks and a small pipeline validation before the full experiment.
- Evaluate all models on the same untouched test set.
- Report mean performance, variation, resource use, and limitations.
- Archive code, configuration, data identifiers, environment details, and raw results.
The result should make it possible to answer three separate questions: does the model generalize, is it better than a fair classical alternative, and is the improvement stable and affordable under the intended execution setting? Keeping those questions separate is the foundation of credible quantum machine learning evaluation.