Metamorphic Testing of Quantum Query Algorithms

Abstract Testing quantum programs remains challenging due to probabilistic measurement and the difficulty of establishing reliable test oracles. Although metamorphic testing, MT, has been explored in quantum software, its fault-detection effectiveness and input requirements remain insufficiently investigated. To address these challenges, we propose six metamorphic relations, MRs, for three quantum query algorithms: Deutsch-Jozsa, Bernstein-Vazirani, and Simon. We introduce a testing structure that translates these relations into executable tests and integrates with QCRMut to automate mutant generation, test execution, and evaluation. Some MRs also allow checks before measurement, minimising dependence on statistical analysis of measurement outcomes. We systematically evaluate the validity and fault-detection effectiveness of the proposed MRs through three experiments. Exhaustive evaluation confirms their validity for the selected configurations, with mutation scores ranging from 41.80% to 83.59%. We then investigate input reduction across 20 random selections per configuration, finding that all selections reproduce their exhaustive mutation scores within 15 inputs. Finally, we examine larger configurations without exhaustive reference scores, observing mutation-score stabilisation within the evaluated range. These findings demonstrate the fault-detection capability of the proposed MRs and show that reduced input sets can preserve this effectiveness, supporting MT as a promising approach when exhaustive evaluation becomes computationally impractical.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-12
DOI
https://doi.org/10.21203/rs.3.rs-11469178/v1
Primary Topic
Software Testing and Debugging Techniques
Type
preprint

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Metamorphic Testing of Quantum Query Algorithms

José Ignacio Requeno, Luis Llana, Sinhué García-Gil
Research Square
Software Testing and Debugging Techniques
preprint

Metamorphic Testing of Quantum Query Algorithms

José Ignacio Requeno, Luis Llana, Sinhué García-Gil
preprint en

Abstract

Abstract Testing quantum programs remains challenging due to probabilistic measurement and the difficulty of establishing reliable test oracles. Although metamorphic testing, MT, has been explored in quantum software, its fault-detection effectiveness and input requirements remain insufficiently investigated. To address these challenges, we propose six metamorphic relations, MRs, for three quantum query algorithms: Deutsch-Jozsa, Bernstein-Vazirani, and Simon. We introduce a testing structure that translates these relations into executable tests and integrates with QCRMut to automate mutant generation, test execution, and evaluation. Some MRs also allow checks before measurement, minimising dependence on statistical analysis of measurement outcomes. We systematically evaluate the validity and fault-detection effectiveness of the proposed MRs through three experiments. Exhaustive evaluation confirms their validity for the selected configurations, with mutation scores ranging from 41.80% to 83.59%. We then investigate input reduction across 20 random selections per configuration, finding that all selections reproduce their exhaustive mutation scores within 15 inputs. Finally, we examine larger configurations without exhaustive reference scores, observing mutation-score stabilisation within the evaluated range. These findings demonstrate the fault-detection capability of the proposed MRs and show that reduced input sets can preserve this effectiveness, supporting MT as a promising approach when exhaustive evaluation becomes computationally impractical.

Research Square
Universidad Complutense de Madrid (ES)
Banco Santander, Comunidad de Madrid, Universidad Complutense de Madrid, Ministerio de Ciencia e Innovación, Agencia Estatal de Investigación
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon