ShotWise is a Python toolkit for adaptive measurement allocation in noisy kernel learning.
The package targets settings where kernel entries are obtained through stochastic measurements and measurement resources are limited. Rather than allocating measurements uniformly across the kernel matrix, ShotWise allocates resources where they matter most for downstream learning tasks.
Typical applications include:
- Quantum kernel methods
- Measurement-limited kernel learning
- Kernelized SVMs
- Gaussian Processes
- Other kernel methods trained from noisy kernel estimates
Many kernel-learning pipelines implicitly assume exact access to the kernel matrix.
In emerging settings such as quantum machine learning, this assumption no longer holds. Kernel entries must be estimated from finite numbers of measurements, introducing uncertainty that depends directly on how measurement resources are allocated.
ShotWise provides algorithms that transform measurement allocation from a uniform estimation problem into a task-aware learning problem.
The first algorithm implemented in ShotWise is:
SupportShot — adaptive measurement allocation for kernelized Support Vector Machines.
SupportShot combines two complementary signals:
-
Margin sensitivity
- How strongly a kernel entry influences the SVM solution.
-
Active-set instability
- How likely support-vector membership is to change under kernel uncertainty.
These signals define an adaptive allocation policy that concentrates measurements in classifier-relevant regions of the kernel matrix.
Under fixed budgets, this can improve:
- support-vector recovery,
- margin estimation,
- decision-function reconstruction,
- overall classifier fidelity.
Miroszewski, A.
Adaptive Measurement Allocation for Learning Kernelized SVMs Under Noisy Observations.
arXiv:2605.22275 (2026).
- Adaptive allocation for noisy kernel estimation
- SupportShot algorithm for kernelized SVMs
- Backend-agnostic architecture
- Synthetic Bernoulli measurement backends
- Qiskit simulator support
- Qiskit hardware support
- Support for adaptive, uniform, and custom allocation policies
- Reproducible experimental and benchmarking pipeline
- Statistical analysis utilities for large experiment campaigns
pip install shotwisegit clone <repository-url>
cd shotwise
pip install -e .pip install -e .[qiskit]pip install -e .[qiskit,examples]ShotWise does not manage IBM Quantum authentication.
Configure your IBM Quantum account using:
qiskit_ibm_runtime save-account --token YOUR_TOKENor environment variables supported by Qiskit Runtime.
You can also add your IBM token with
python examples/qiskit_setup_account.pyNever store authentication tokens in source code.
Synthetic examples:
python examples/synthetic_backend.pypython examples/blob_benchmark.pyThese examples run the adaptive allocation pipeline using synthetic noisy kernel measurements.
Example scripts for quantum kernel experiments are available in:
examples/qiskit_toy8_simulator.py
examples/qiskit_toy8_Manila.py
examples/qiskit_toy8_ibm_shot.py
Utilities for reproducing the experimental analysis used in the accompanying papers:
examples/analyze_toy_experiments.py
examples/make_ibm_main_tables.py
Run the complete test suite:
pytest -qRun linting:
ruff check .ShotWise is an active research project.
Current methods focus on adaptive measurement allocation for kernelized SVMs. Ongoing work includes:
- Gaussian Processes
- Additional kernel-learning methods
- New allocation policies
- Hardware-aware adaptive strategies
- Resource-aware kernel learning beyond SVMs
If you use ShotWise in academic work, please cite:
@article{miroszewski2026adaptive,
author = {Miroszewski, Artur},
title = {Adaptive Measurement Allocation for Learning Kernelized SVMs Under Noisy Observations},
journal = {arXiv preprint arXiv:2605.22275},
year = {2026}
}A machine-readable citation is also available in CITATION.cff.
ShotWise is released under the Apache License 2.0.
See the LICENSE file for details.