Manuscript Offprint
arXiv:2610.36976Toward Circuit-Aware Mutation Testing for Quantum Programs: Exact Visibility and Execution Planning
Abstract
Mutation testing assesses test suites by introducing program changes and checking whether tests detect them. In quantum programs, a surviving mutant may leave program behavior unchanged, produce a change hidden by the chosen input or measurement, or remain undetected because statistical evidence is insufficient. We develop a circuit-aware framework to distinguish these causes and guide execution planning and test changes. The framework covers ideal, noiseless programs and mutations that replace one gate or subcircuit. The method traces how a mutation can affect measured outputs and combines established mathematical checks with statistical estimates. For supported cases, we establish conditions under which a test cannot reveal a mutation and exact formulas for its effect when the required state information is available. Under stated assumptions, we bound the mutation score while retaining surviving and unresolved mutants, and identify a restricted circuit family whose mutation effects admit efficient classical classification. The deliverables include a decision procedure, mathematical guarantees, worked examples of test changes and their implementation requirements, and a small-circuit reference implementation for differential expectation tests. These results help testers decide what to execute, what to change, and what remains unknown. The evidence is limited to proofs and executable examples under the ideal model.
1 Introduction
Mutation testing evaluates whether a test suite can detect plausible faults. A mutation is a program change introduced to model such a fault, and a mutant is the modified program that results. A surviving mutant may preserve the declared program semantics or may change behavior without violating the suite's assertions. Whether such survival reveals a testing weakness depends on how the program contract and the oracle treat the behavioral difference. In quantum programs, measurement, finite shots, and the potentially enormous state space further complicate this distinction. A shot is one execution from input preparation through measurement; repeated shots estimate the program's output probabilities or expected measurement outcome.
Consider a one-qubit program that starts in state (the quantum representation of bit 0), applies a rotation , and measures the output bit. A sign-error mutant replaces that rotation by . For this input, both programs return bit 1 with probability , so an assertion over those computational-basis frequencies cannot distinguish them, regardless of the shot count. The output states nevertheless differ: an X-basis measurement, labeling the -1 outcome as bit 1, gives probabilities approximately 0.1464 and 0.8536, respectively. If the program’s entire interface is this fixed input and computational-basis output bit, the two implementations are observationally equivalent at that interface. If the output state is available to subsequent quantum operations, changing the measurement can expose a meaningful state difference.
Earlier work shows why classical testing and debugging do not transfer wholesale: intermediate measurements can disturb program state, finite-shot outputs are probabilistic, and classical simulation does not scale [1–3]. The recent quantum-software-engineering roadmap therefore identifies efficient test oracles, scalable test optimization, mutant subsumption, and fault representativeness as open problems [4]; our circuit-local analysis contributes exact visibility certificates and mutation-guided measurement design to the first two directions. A recent perspective similarly links quantum test adequacy to fault-based sensitivity and statistical power at a fixed shot budget [5], motivating explicit treatment of both mutation-induced observable gaps and the resources needed to detect them. This paper focuses first on the ideal, noiseless setting. We model a quantum program as a sequence of reversible quantum gates on a fixed register, followed by a measurement used by the test oracle. The ideal model lets us separate a change to program behavior from the ability of a particular test to observe that change. This separation guides execution planning. Practical application on quantum hardware will require device-specific noise and drift models. The ideal, noiseless analysis in this paper provides a baseline for understanding which mutation effects the declared tests can detect, against which changes caused by hardware noise can subsequently be assessed.
Quantum circuits with mixed states can represent non-unitary gates, including intermediate measurements and noise [6]. Mid-circuit measurements, resets, classical control, non-unitary channels, leakage out of a qubit's two-dimensional computational space, and device noise are outside the formal model. On noisy hardware, a mutation that is semantically equivalent in the ideal circuit model may still change execution through added gates, calibration effects, routing, unintended interactions between qubits (crosstalk), or other device-level artifacts.
The analysis starts from declared mutants. The space of possible quantum mutations is infinite: one may perturb angles by arbitrary amounts, replace gates in many ways, alter controls, permute wires, or modify subcircuits. When analyzing these mutants and planning their execution, we keep realism, non-equivalence, detectability, and non-redundancy distinct. Here, realistic means resembling plausible programming, modeling, or compilation mistakes; non-equivalent means changing the ideal output state for at least one input in the declared domain; detectable means reaching a selected test's declared detection threshold; and non-redundant means not duplicating the effect of another already selected mutant. These properties serve different purposes and must not be collapsed into a single adequacy claim.
For test-suite evaluation, the mutant population or its sampling design must be fixed independently of the suite being evaluated; otherwise, selecting mutants because that same suite produces a large gap makes a high mutation score partly true by construction. For execution planning with a fixed suite, by contrast, test-conditional information may legitimately be used to avoid executions that are provably irrelevant or unaffordable, provided that the resulting detection yield is not reported as an unbiased adequacy score.
The local-unitary model treats one gate or subcircuit replacement at a time. Higher-order mutants are outside its direct scope, although the exact relative-unitary identity applies to any mutated subcircuit represented by one unitary replacement. A quantum compiler, or transpiler, rewrites a circuit into gates and qubit mappings for a target device. A source-level edit may expand into multiple gate-level changes after transpilation; such a case must be represented as a subcircuit replacement or analyzed at the source-level semantic boundary.
1.2 Objectives and Contributions
Our goal is to provide a mathematically justified basis for acting on declared quantum mutants under explicit program semantics and test-oracle rules. The practical decisions are whether to execute a mutant against the current suite, whether a permitted change of test can reveal it, and how to report the result when evidence is incomplete.
The contribution is a testing procedure that combines established quantum response and statistical results into three kinds of decisions.
-
Diagnose surviving mutants. We distinguish semantic equivalence from input-dependent invisibility, measurement-dependent invisibility, finite-strength cancellation, and insufficient evidence. For fixed-axis rotations, two state expectations determine every strength with zero gap and the maximum possible gap for the selected test. For pure stabilizer states, Pauli mutation axes and observables, and a Clifford suffix, the response has one of three shapes that can be determined in polynomial time.
-
Plan executions with sound reporting. A constant-cost angle check can certify that a rotation is below a differential expectation or total-variation threshold before any state calculation. For native interval assertions, a bound smaller than the original value's acceptance margin certifies survival; larger changes require evaluating the actual acceptance rule. The planner combines valid certificates and uncertainty bounds into a mutation-score interval that retains the weights of survivors and unresolved mutants.
-
Guide test-oracle improvement. State-side and observable-side certificates identify when the input or measurement must change. The Helstrom observable supplies the unrestricted optimum for a fixed input, against which permitted measurements and their implementation costs can be assessed.
The reference implementation [7] and worked examples make the decisions reproducible.
Section 2 introduces the quantum model through inputs, assertions, and mutation effects before stating the formal results. Section 3 explains the execution decisions and score accounting, and Section 4 develops the examples and practitioner guidance. Section 5 states the validation requirements and limitations. Section 6 situates the framework within mutation-testing research and identifies the established mathematical tools it reuses, and Section 7 summarizes the engineering contribution. The appendices retain the detailed derivations, algorithms, and estimator comparisons for readers implementing or checking the framework.
2 Analyzing Mutants and Tests
This section states the results needed to understand and apply the framework. The detailed statistical argument, exact structured derivations, expanded discussion, and selection pseudocode are given in Appendix A, while the general perturbation proof is given in Appendix D.
2.1 Reading the Quantum Model as a Software Test
Our reference-based expectation-value test prepares the same input for the original and mutant circuits, measures the same output quantity, and compares their expected values. We call this a differential expectation-value test because detection depends on the difference between those values, using the original program as the reference and a declared threshold to decide which differences count. The quantum notation describes what is prepared and measured; the test oracle supplies the rule for judging the result. We assume familiarity with matrices and basic probability and introduce the quantum concepts used by the analysis here.
A pure state is a unit-length complex vector, and is its conjugate transpose. For qubits the vector has entries, called amplitudes, indexed by output bit strings; measuring in the computational basis returns a bit string with probability equal to the squared magnitude of its entry. The states and are the two computational-basis states of one qubit, while is a superposition. A density operator represents either a pure state, , or a probabilistic mixture of states; it is a positive semidefinite matrix with trace one. The circuit state mathematically describes the system; a test obtains information about it through measurement.
A gate is represented by a unitary matrix , where denotes conjugate transpose and is the identity. It updates a density operator to ; composing gates gives the circuit matrix . A channel describes the input-to-output transformation of states; in our unitary model this is . Multiplying by a scalar global phase leaves this transformation unchanged, so different circuit matrices can transform every input state in the same way. A relative phase is a phase difference between basis amplitudes; changing it can alter later measurement probabilities.
A joint state is a product state if it factors into states of its subsystems; it is entangled if it cannot be expressed even as a probabilistic mixture of such product states. An entangling gate can create entanglement from a product input. For example, the controlled-NOT gate flips target bit t when control bit c is 1 and leaves it unchanged when c is 0, extending linearly to superpositions.
An observable specifies a measurement and its numerical outcome labels and is represented by a Hermitian matrix, . The expectation is the mean outcome on output state , where the trace is the sum of diagonal matrix entries. For example, measuring labels computational-basis outcomes 0 and 1 by +1 and -1, respectively, so its expectation is . Measuring the projector instead uses labels 0 and 1, so its expectation is simply . The Pauli observables , , and are the three standard one-qubit measurement axes, each with outcomes ; changing the axis generally requires additional gates before computational-basis readout. The gates , , and rotate a qubit about these respective axes by the supplied angle. A Pauli string is a tensor product of , , , and across qubits, measuring the product of the corresponding local outcomes; for example, measures a two-qubit correlation. The tensor-product symbol combines subsystem operators or states, and subscripts identify the qubits on which an operator acts.
Changing the measurement is therefore part of changing the test, and it can expose a mutant that survives another measurement on the same input. The sign-reversal example in the introduc-tion requires precisely this change, provided that the declared interface permits it. Throughout, population-level expectation or detection refers to the exact output probabilities before finite sampling; a mutant population separately denotes the declared set of program variants. The formal model uses a finite-dimensional register, bounded Hermitian observables, and original and mutated unitary circuits acting on that same register.
2.2 Program Semantics and Permitted Observations
Whether a mutant is equivalent to the original depends on the allowed inputs and on what counts as observable behavior. Write U and for the original and mutant circuit unitaries, and for the declared set of allowed input states. Under state-transforming semantics, equivalence means that the two circuits produce the same output state for every allowed input:
When the domain contains every density operator, this is channel equivalence and, for the unitary circuits considered here, is equivalent to . On a restricted input domain, equal output states do not require globally equivalent channels.
As with a classical API, equivalence depends on what callers are allowed to observe. Let denote the set of output measurements permitted by the program's interface. For example, an interface that returns only a bit measured in the computational basis does not let callers choose an X-basis measurement instead. Two programs are observationally equivalent at that interface if, for every allowed input in and every permitted measurement in , they assign the same probability to each possible outcome. Equality of the complete output distributions allows individual runs to return different results. For separately prepared invocations, this equality also persists under independent repetition. Coherent control of the program, in which a quantum control selects whether it runs while preserving superpositions, or entangled inputs across multiple invocations require a separately declared interface contract. Equal output states guarantee this agreement for any measurement. If all measurements are permitted, agreement of their outcome distributions also guarantees equal output states; with restricted measurements, different states can produce identical permitted observations. The introductory sign-reversal example illustrates the latter case: on its fixed input, the original and mutant have different output states but the same computational-basis bit probabilities.
Comparing only an average can hide a further difference. For a measurement with possible outcomes , , and , always returning 0 and returning or with equal probability both give mean zero, despite having different distributions. For an observable with only two distinct outcomes, however, the mean determines both outcome probabilities. Matching output distributions is also different from satisfying the same acceptance condition. For example, a contract requiring bit 1 with probability at least 0.9 accepts both 0.92 and 0.98, although those probabilities describe different behavior.
The mathematical analysis below counts a mutant as non-equivalent when it changes the output state for at least one allowed input. This state-transforming semantics is appropriate for a quantum subroutine whose output qubits feed later quantum operations, because those operations may expose a state difference. For a top-level program whose interface exposes only classical bits, compare the declared bit-string distributions instead. Under that interface, the introductory sign-reversal mutant is equivalent on its fixed input and should not be counted as a fault that the interface's tests ought to detect.
The interface defines which inputs and observations are allowed; the current test suite chooses particular cases and assertions within those limits. A study using interface-relative equivalence must therefore fix the input domain and permitted measurements independently of the suite being evaluated. It must explain which mutants it excludes as equivalent and report the resulting mutant population separately from the population defined by state differences. Otherwise, a study could exclude a mutant merely because the current tests cannot observe it, concealing a testing weakness. Adding a test within the permitted interface can address such a weakness. Allowing a previously forbidden measurement, such as an X-basis measurement at an interface that exposes only computational-basis bits, extends the evaluation contract and evaluates behavior beyond the original interface.
2.3 Mutation Signal and Measurement Cost
For a fixed input and measurement, the mutation signal is the change in the expected result. Repeated measurements estimate this change, with uncertainty that depends on the number of shots and the range of possible outcomes. Write the ideal circuit around mutation site j as
where contains the gates before , contains the gates after it, and the rightmost operation acts first. For input state and observable , define the original and mutant expectations by
The population-level signal available to an expectation-value test is
The gap measures the change for this particular input and observable; equivalence requires agreement across the declared input and observation families. With more than two possible measurement outcomes, equal expectations can still hide different outcome distributions; the distribution assertions below retain their full decision rule. The spectrum of a Hermitian observable O is the set of its eigenvalues, which are the possible outcomes of an ideal direct measurement of O. Its spectral range
is therefore the width from the smallest to the largest possible measurement outcome. For example, the Pauli observable Z has eigenvalues -1 and +1, so , whereas the projector has eigenvalues 0 and 1, so its spectral range is one. We require : if , then O is proportional to the identity and no unitary mutant can change its expectation. Let denote the cost of one paired original-mutant comparison: one independent shot from each circuit, including preparation and measurement. Hoeffding's bound gives a sufficient sampling cost for estimating a nonzero gap to a fixed fraction of its size; Appendix A.2 derives the bound and an optional signal-to-cost ranking score. Deciding whether a gap crosses a detection threshold depends on its distance from that threshold. Execution planning must also account for preprocessing, pilot measurements, and the cost of implementing each measurement.
2.4 Test Collections, Detection, and Adequacy
A differential test counts a change as detection when the expectation gap reaches a threshold chosen before inspecting the mutant's effect. Write a suite of these differential expectation-value tests as . Each test specifies an allowed input , an observable , and a positive threshold . The mutant passes this population-level rule exactly when its expectation differs from the original by strictly less than . The threshold specifies the smallest mean difference counted as detection; the probability of making a wrong statistical decision is a separate quantity. Using the original as a reference does not establish that the original program is correct.
An existing test may judge outputs by a different rule, such as requiring an output probability to lie in a specified interval. We call that supplied pass/fail condition a native assertion. If its acceptance region is , an exact native assertion kill requires the original value to lie inside and the mutant value to lie outside it. For example, expectations 0 and 0.15 both satisfy , although their differential gap exceeds . Conversely, expectations 0.19 and 0.21 cross that acceptance boundary with a gap below 0.1. The triple represents a native assertion only when the two acceptance rules agree. Otherwise, retain the native rule, including how it treats boundary values and the requirement that the original passes. The gap formulas can still certify some native outcomes, as follows, but a native acceptance rule must not be replaced by a differential threshold.
Proposition 2.1 (Certificates for native expectation assertions). Fix a native acceptance region and establish that the original expectation lies in it. If , define the positive acceptance margin
Any valid upper gap bound gives the sufficient survival certificate
More generally, suppose the original expectation and signed shift have jointly valid bounds
Then the mutant expectation lies in
The inclusion certifies survival, and certifies a native kill; otherwise these bounds leave the outcome unresolved. These set tests use the native assertion's own open or closed boundary conventions.
Proof. A change smaller than cannot reach either endpoint of the open acceptance interval. The general enclosure follows from by interval subtraction, after which inclusion or disjointness settles the native predicate.
Reaching the nearest boundary distance does not establish a kill: for , the original mean 0.2 and mutant mean 0.7 both pass, although their gap 0.5 exceeds . If only an upper absolute-gap bound is available, use in Equation (5); a signed enclosure can give a sharper decision. Statistical bounds must cover the original-pass condition and the mutant enclosure simultaneously, with the error allocation and data-dependent execution safeguards used below. In particular, uncertainty in the original mean widens the mutant enclosure; it does not justify increasing the acceptance margin. These certificates concern the exact native predicate and remain distinct from the realized outcome of a sampled assertion, whose significance, sample size, and acceptance procedure must be retained.
With finitely many shots, a test estimates the expectations from samples and needs a statistical rule for deciding whether the gap reaches the threshold. The fixed-shot rule in Appendix A.2.1 distinguishes detected, below-threshold, and unresolved outcomes. It allocates error probabilities across the declared comparisons to control the chance of any wrong classification in that collection. Before execution, proofs, deterministic bounds, or intervals estimated from pilot measurements can help decide which pairs to run. An observed test outcome instead comes from the original and mutant samples under the prespecified statistical rule. The planning label execute-predicted above threshold therefore records a prediction, with an observed kill requiring the sampled test outcome described above.
The suite detects a mutant if at least one of its tests detects it. For each mutant m, collect the indices of those tests in
An empty set means that the mutant survives every test in the suite. For a prespecified nonempty population of non-equivalent mutants, the population-level mutation score is the fraction detected by the suite:
Each mutant counts once if at least one test detects it, regardless of how many other tests also detect it. For example, detecting eight of ten mutants gives a score of 0.8. A score of one means that every mutant in this population is detected by at least one test at its declared threshold. Individual tests may still miss mutants in that population, and faults outside it may still escape the suite.
To use this score to evaluate a suite’s adequacy, fix the mutant population independently of the suite T, including any sampling strata and exclusions. Selecting mutants because they have large gaps against the same suite would favor faults that the suite already detects and could inflate its apparent adequacy. Non-equivalent mutants that no test detects must therefore remain in the population and count as survivors. Exact analysis may identify these survivors without executing them, but they still belong in the mutation-score denominator.
Choose each detection threshold to represent the smallest mean change meaningful to the declared program contract, before inspecting mutant effects. The threshold is expressed in the observable's units, so its probability interpretation depends on the observable. For a observable, corresponds to a change of 0.05 in the probability of either outcome. For a projector, the same threshold corresponds to a probability change of 0.1. These examples explain the units; the threshold for a meaningful fault remains specific to the declared program contract.
The shot budget determines how precisely that mean change can be estimated. For a fixed mutant–test pair, Appendix A.2.1 gives the gap-estimation radius . Here is the failure probability allocated to the comparison, and is the number of independent shots taken from each circuit. To make this radius at most a chosen error tolerance , allocate shots per circuit. Even with this precision, a gap close to may remain unresolved because its confidence interval crosses the detection threshold. If the budget is too small to resolve such a case, retain the unresolved outcome and the declared threshold for a meaningful fault.
These thresholds and uncertainty bounds help determine which mutant–test pairs to run. The planner below handles one pair at a time; optimizing a schedule for the whole suite, sharing original-circuit samples, and reusing measurement bases are outside its scope. Ranking mutants by large gaps can support smoke testing and fault localization. Table 1 collects the notation used in these decisions.
We use for computational complexity and for observables.
Table 1: Principal notation; differently indexed quantities have distinct roles.
| Symbol | Meaning |
|---|---|
| Candidate set and its count; is the declared non-equivalent population. | |
| Number of tests and of fixed rotation axes. | |
| Mutation-site state, backward-propagated observable, and relative unitary. | |
| Absolute and range-normalized expectation gaps. | |
| Outcome range and paired-comparison cost. | |
| State-dependent first-order sensitivity and operator-level proxy. | |
| Set of test indices detecting . | |
| Retained Pauli-term cap and representative cap per bucket. | |
| Shots per known circuit and copies in the separate discrimination problem. | |
| Squared fidelity between quantum states. | |
| Offset of an Euler angle. | |
| Positive population threshold for test ; detection includes equality. | |
| Native acceptance region and the original mean's margin inside an open interval. | |
| Error target for equal-prior discrimination of an unknown original or mutant output source. | |
| Total failure budget for simultaneous pilot gap intervals. | |
| Total failure budget for simultaneous observed-test gap intervals. |
2.5 From Analysis to Execution Decisions
Analysis can sometimes settle a test's population-level outcome before the original and mutant circuits are executed. Given the original circuit, candidate mutations, allowed inputs and observations, and a fixed test suite, an execution planner decides which pairs to skip or run and records the evidence for each decision. For an adequacy evaluation, the mutant population remains the one fixed independently of the suite. Pairs selected for execution also need a sampling budget and a statistical decision rule, such as the one in Appendix A.2.1.
First, try to prove that the mutant and original are equivalent for every allowed input under the semantics declared in Section 2.2. A semantic-equivalence certificate is such a proof: it establishes equal output states under state-transforming semantics, or equal complete outcome distributions for every permitted measurement under interface-relative semantics. For example, applying the same deterministic compilation process to both programs can prove equivalence if it preserves program behavior and produces the same complete circuit representation. Appendices C.2 and C.3 give the assumptions needed for this check and describe other equivalence checks. Without a proof of equivalence, this step cannot exclude the mutant.
For each remaining pair, check whether the mutation has no effect on the tested expectation or an effect smaller than the detection threshold. For example, a changed operation that cannot influence the tested observable through the remaining gates has zero effect on that expectation. The backward-light-cone argument in Appendix A.7 proves this structural rule for the selected observable. If these checks do not settle the pair, evaluate exactly when feasible, or obtain an interval that accounts for approximation and estimation errors. Failure to obtain usable gap evidence leaves the threshold outcome unresolved.
A certified zero is a gap proved to be exactly zero under the stated circuit and test assumptions. The proof can follow from circuit structure, as in the light-cone example above, or from exact mathematical identities. An algebraic zero certificate is a proof of the latter kind: calculations with exact quantities, performed by hand or by symbolic software, establish that the gap equals zero. The use of symbolic software alone is insufficient; the proof must apply to the declared quantities with their exact values preserved. A value that rounds to zero or falls below a numerical tolerance remains only numerically compatible with zero, even when evaluated at high precision.
For the differential rule, a pair can be skipped when the exact gap, or the upper end of its interval, is strictly below . If the interval comes from statistical estimation, the skip retains its stated confidence qualification. A certified zero is below every positive detection threshold. If the exact gap, or the lower end of its interval, is at least , the analysis predicts detection; execution can then provide observed evidence. A pair whose outcome remains unresolved is also a candidate for execution. If a resource limit prevents that execution, record the limit and keep the outcome unresolved. Native assertions follow their own acceptance rules when deciding whether the available evidence supports a skip or predicts detection. Section 3 gives the detailed planning procedure and its guarantees, while Table 2 separates what must be recorded about the program, test, execution decision, and evidence.
Table 2: Information recorded separately for program semantics, each mutant–test outcome, execution planning, and supporting evidence.
| Dimension | Recorded information and meaning |
| Program semantics | Equivalent, non-equivalent, or unresolved under the declared input domain and permitted observations. Only a proof of equivalence under the declared semantics justifies excluding the mutant from the corresponding non-equivalent population. |
| Test outcome | For differential test , the mutant survives that test if and is detected at the population level if . Record unresolved if the available evidence cannot establish either relation. A proven zero gap establishes survival under this differential rule. Native assertions use their own pass/fail rule. Record survival for the full suite only when survival has been established for every test in the suite. |
| Execution decision | Skip or execute the mutant–test pair, with the reason supplied by the planning policy. Skipping because of a budget limit does not by itself establish whether the mutant passes the test, although separate analysis may settle that outcome. |
| Evidence | Record the support for the claim: algebra, validated bounds, numerical evaluation, pilot intervals, or observed samples, with any confidence qualification. Analytical detection and observed kills retain their respective provenance; insufficient evidence leaves the claim unresolved. |
For example, a mutant with a certified zero gap on one test can be skipped for that test but detected by another. It is a suite survivor only when every test is below its threshold; if no test establishes detection and some test outcomes remain unresolved, its suite status remains unresolved. Both survivors and unresolved mutants remain in the declared mutant population. Zero expectation gap also need not imply equal output distributions, so a certificate for one mean must not be extended to a distribution assertion without further justification. Several zero-effect conditions may hold for the same pair, so a mutant can have more than one explanation for surviving a test.
2.6 Computational-Basis Distribution Assertions
The same expectation-value framework also applies to tests that check a distribution of computational-basis output bit strings. For each bit string , the projector represents an indicator that is one when occurs and zero otherwise, so its expectation is exactly the probability of that outcome. The analysis can therefore determine how a mutation changes individual outcome probabilities, while the distribution assertion retains its own statistical procedure and pass/fail rule for judging them together. Skipping the test on the grounds of zero effect requires a proof covering every probability capable of changing that decision.
Checking a distribution also affects which structural shortcuts are available. When a test checks outcomes on only a subset of qubits, the backward light cone can exclude mutations that cannot influence those outputs through the remaining gates. For the full distribution over every qubit, however, each outcome projector acts on the entire register, so its structural backward light cone cannot exclude any mutation on that register. Other exact checks remain available: for example, a mutation that leaves the output state unchanged for a fixed input also leaves its output distribution unchanged. For an oracle that declares detection when the total-variation distance reaches a positive threshold, Corollary 2.9 also gives an angle-only skip rule that does not require propagating the outcome projectors. That certificate applies to the exact distance; sampled histogram and chi-square assertions retain their own decision procedures. The GHZ example in Section 3.2.2 illustrates how changing from a single expectation to a full-distribution assertion changes both the detectable mutants and the available filtering opportunities.
2.7 Analyzing a Mutant–Test Pair
For a chosen input and observable, the output mutation effect can be expressed and calculated at the changed gate. The calculation resembles backward program analysis: express the final observable at the mutation site, then compare its expectation before and after the local change. This mathematical rewriting leaves the circuit execution and its output measurement unchanged. Readers primarily interested in execution planning may proceed to Section 3 on a first reading and return here for the conditions supporting its decisions.
To place the state, observable, and mutation at the same point in the circuit, define
Here is the state immediately after the original gate , including the preceding circuit prefix . The propagated observable expresses the final measurement at that same point by accounting for the remaining gates in the suffix . The transformation is called unitary conjugation. The relative unitary isolates the gate change: undoes the original gate and supplies its replacement. Thus acts on the post-gate state , and the left-multiplication convention is . is not generally the replacement gate itself. At this common point, the original expectation is and the mutant expectation is . The analyses below compare these two expectations. Two operators commute when exchanging their order leaves their product unchanged; their commutator is then zero.
Equality for one input and observable does not establish equality for other tests. Table 3 distinguishes the conditions for one fixed test, every input, every observable, and both unrestricted families. The unrestricted rows quantify over all density operators at the mutation site, since the unitary prefix through maps the unrestricted circuit input domain onto that set. For a restricted domain or measurement interface, use the equivalence definition in Section 2.2; the unrestricted conditions require proofs over their full input and measurement domains.
The local and state-side propositions below justify these conditions. The lower-right condition follows because a unitary commuting with every Hermitian operator is a scalar phase.
Circuit connectivity can sometimes prove zero effect without computing either or ; Section 2.7.1 gives this structural filter. When it does not settle the pair, Section 2.7.2 gives the exact gap and the conditions under which exposing a mutation requires changing the input or observable. Section 2.7.3 specializes the gap to common Pauli-axis mutations, fixed one-qubit replacements, and
Table 3: Expectation and state equivalence for one unitary local replacement. Moving across columns enlarges the observable family; moving down rows enlarges the input family.
| Fixed observable | Every observable | |
|---|---|---|
| Fixed input | Expectation-test equivalence: | Output-state equivalence: , or |
| Every input | Observable equivalence: | Unitary equivalence up to global phase: |
Clifford mutations. For other small mutations whose exact effect cannot be evaluated tractably, Section 2.7.4 gives a first-order approximation with an explicit error bound. Section 2.7.5 explains what each kind of evidence permits the planner to conclude.
2.7.1 Sound Structural Filtering
A mutation cannot change the tested expectation if the remaining gates provide no path from the changed operation to the measured qubits. To check for such a path, trace backward from the measured output through the remaining gates, as in a conservative backward slice from a software assertion. The support of an operator is the set of qubits on which its action differs from the identity. Start with supp(O) and traverse the suffix backward, adding every wire of each gate that touches the current set. The resulting set, the structural backward light cone , uses only circuit connectivity and exact gate supports. It can therefore be computed before propagating the full observable or estimating the mutation-site state. The exact algebraic support can be expensive to compute, but it is contained in this structural set:
Therefore,
If the mutation acts entirely outside the cone, the pair can therefore be skipped during fixed-suite execution planning. The support-containment and zero-effect implications are proved in Appendix A.7. The zero-effect conclusion is exact under the unitary circuit model even when the structural cone contains more wires than the true operator support. Overlap with the cone only leaves open the possibility of an effect: commutation or state-dependent cancellation can still make the gap zero. Figure 1 illustrates the backward structural growth and distinguishes an in-cone mutation from operations on an excluded wire.
2.7.2 Exact Local Mutation Effect
When connectivity alone does not settle a pair, the local gap formula determines whether the replacement changes the selected expectation. It also identifies when changing the input alone or the observable alone cannot expose the mutation. Evaluating the formula requires the propagated observable and the mutation-site state , or the relevant expectations in that state. Obtaining those quantities can require exponential work; Theorem 4.1 identifies a particular family with polynomial-time classical analysis. Evaluating an exact formula in ordinary floating-point arithmetic also differs from certifying its value at a decision boundary.

Figure 1: Four wires carry gates from left to right. The blue backward cone starts at O on , adds at the -control/ -target CNOT and at , and excludes . Thus, m needs analysis, whereas and operations on such as V cannot affect O in the ideal unitary model.
The first proposition holds the observable fixed and asks whether any input can give a nonzero gap. The second holds the input fixed and asks whether any observable can do so. These are applications of trace cyclicity and norm duality to the two choices available when augmenting a test.
Proposition 2.2 (Exact local replacement). For any unitary replacement acting on a common subsystem, or with both operations embedded into the union of their supports,
The maximum of this gap over all density operators at the mutation site is
The mutation is invisible to for every state if and only if
The prefix through is a bijection on density operators, so the maximization also ranges over all circuit inputs when arbitrary inputs are allowed.
The proof, including attainment of the operator-norm maximum, is given in Appendix A.3. Here is the operator norm; for a Hermitian difference , it is the largest absolute eigenvalue and gives the largest possible absolute expectation over input states. The next result asks the complementary testing question: with the input fixed, how much could changing the measurement expose?
Proposition 2.3 (State-side dual and optimal observable). For fixed and , define the traceless Hermitian state difference
Then
and the maximum over Hermitian propagated observables with is
attained by , with on the zero eigenspace. The mutation is invisible to every observable for this input if and only if , equivalently .
The specialization of standard trace-norm duality to the mutation site is given in Appendix A.4. For the Hermitian difference , the trace norm is the sum of its absolute eigenvalues. The sign observable assigns +1, -1, or 0 to the positive, negative, or zero eigenvalues of that difference, respectively. It supplies a best possible measurement benchmark for the fixed input, whose construction and implementation may still be expensive. Dividing the gap by the observable's outcome range connects this measurement benchmark to how well the two output states can be distinguished. Let and , and write . This quantity is the trace distance between the states, and it bounds the normalized gap:
For nonzero , equality is attained by the Helstrom observable , propagated to the output. Its minimum and maximum eigenvalues are -1 and +1, so its spectral range is two; a nontrivial kernel adds the intermediate outcome zero without changing that range. If , every nonconstant observable attains the zero normalized gap and trace distance. If an unknown output is equally likely to come from either circuit, the Holevo–Helstrom theorem gives the best single-shot probability of identifying its source as [8, Sec. 2.1, especially Eqs. (2.5)–(2.9), 9, Theorem 3.4 and Eq. (3.11)]. This optimum assumes unrestricted measurements; the permitted interface may prevent a test from attaining it. The derivation and the resulting observable-independent efficiency ceiling are given in Appendix A.4.
Theorem 2.2 therefore requires two things for a nonzero gap: the mutation must change the propagated observable, and that change must have nonzero expectation in . If , changing the input cannot expose the mutation through this observable. If , changing the observable cannot expose it on this input. If neither commutator vanishes, the selected expectation can still be unchanged, so determining the gap requires evaluating that expectation difference.
2.7.3 Exact Effects for Common Gate Changes
Common gate changes let us evaluate the local effect without assuming that the change is small. For a Pauli-axis rotation, two state expectations determine the gap at every angle; fixed one-qubit and Clifford replacements also admit exact constructions below. These formulas simplify the observable change, although obtaining the required state expectations can still be expensive.
First consider a relative mutation that rotates about an axis A by an angle in radians:
The condition means that is its own inverse, or an involution. Every Pauli string satisfies it, so the axis may involve several qubits, as in joint rotations and . The formulas apply to every Hermitian involution. The Bloch sphere represents pure one-qubit states as points on a unit sphere whose coordinates are their , , and expectations. On one qubit, these involutions include every Bloch-sphere axis with , where and specifies the axis direction. Decompose the propagated observable into the parts that commute and anticommute with :
Anticommutation means . The commuting part is unchanged by the rotation, so only the anticommuting part can contribute to the mutation effect. Because , its exponential reduces to sine and cosine terms, giving the conjugation identity below [10, Sec. III.A, Theorem 1, and Eq. (12)]. Parameter-shift methods use this same sinusoidal structure to recover expectation derivatives from evaluations at shifted gate angles, while analytic optimization reconstructs and optimizes the response from three evaluations [11, 12]. The corollary uses the same response to find angles that leave the original expectation unchanged and angles that produce the largest gap.
Proposition 2.4 (Exact involutory-axis rotation effect). For every mutation strength ,
Consequently,
The proof is given in Appendix A.5. The identity holds for any angle, including cases where the linear term near zero vanishes but higher-order terms produce an effect. For the common same-axis replacement , the relative mutation has . Thus, the same theorem exactly covers rotation-gate removal with , a sign flip with , and fixed large-angle changes such as . The size of the angle alone does not require an approximation or full-circuit simulation.
For a fixed site, axis, and test, all dependence on the input state enters through two expectation values. They multiply the cosine and sine contributions to the signed change; define them as
Both coefficients are real because and are Hermitian.
Corollary 2.5 (Finite-strength visibility and optimal strength). For a fixed-axis involutory relative rotation,
Consequently,
and the mutation is invisible for every strength if and only if . If , its complete zero set modulo is
The two residues are distinct exactly when ; in particular, and gives the nontrivial zero . The phase form, maximizing strengths, restricted-domain optimization, and proof of the zero set are given in Appendix A.5.
Once and have been computed, a testing tool can reuse them for every declared angle change at the same site and axis under the same test. Their joint vanishing means that no angle changes this expectation; otherwise, the zero set identifies the particular angles at which the effect cancels. The maximizing angle can help with smoke testing or fault localization when the strength is controllable, but maximizing the gap does not generally model a plausible fault. For an adequacy study, the mutation operator must fix independently of the suite. The formulas then diagnose whether that declared strength lies near or whether makes every strength invisible.
Even without the state coefficients, an upper bound can sometimes establish that the gap is below the test threshold. Write the Hermitian observable difference as
The exact norm identity proved in Appendix B.7 bounds its expectation for every state:
Some state at the mutation site attains this bound, although the selected test state may give a smaller gap or exact cancellation. Let . Because the anticommuting component is unchanged by the scalar shift , it satisfies , and Equation (21) immediately yields . Thus the angle and outcome range alone can certify a below-threshold gap.
Proposition 2.6 (Rotation threshold gate). For with and , an observable of range , and a differential threshold ,
The check takes scalar operations when the angle and outcome range are supplied, with exact or validated arithmetic required to certify the strict inequality.
If the upper bound equals , this rule alone leaves the threshold decision unresolved. The rule requires no execution budget: it bounds the population gap itself. The independent-copy lower bound below addresses a different question—how many outputs are needed to identify an unknown original or mutant source at a prescribed error probability. Both scalar rules use the periodic quantity , or the canonical effective angle in ; retain the original signed offset when evaluating the fixed-axis gap formulas. For , the operator proxy introduced below satisfies . When a Clifford suffix propagates a unit-norm Pauli observable to a single Pauli string, this proxy is just zero or one according to commutation, so it cannot rank sites beyond that distinction.
To determine what changing the measurement could achieve on the same input, apply the rotation analysis to the state difference instead. This also supplies the trace-distance bound, an observable attaining it, and the basis for the independent-copy lower bound.
Corollary 2.7 (State-side involutory rotation). If with and , define
Then
The opposite sine sign relative to the observable-side expression in Equation (15) reflects the two conjugations: the state by and the observable by . Its trace norm is exactly
Apart from the unchanged strengths , the rotation is therefore invisible to every observable for this input if and only if , equivalently .
The derivation is given in Appendix A.4. The two zero conditions answer complementary testing questions. If , the chosen observable has zero gap for every input and strength. If , the chosen input has zero gap for every observable and strength.
Corollary 2.8 (Test-independent involutory-rotation ceiling). Let satisfy and have nonzero +1 and -1 eigenspaces. For Pauli strings this excludes only . For the relative rotation , every input and nonconstant observable satisfy
Both ceilings are tight. For the discrimination problem, consider independent executions with inputs fixed before any outcomes are observed. The inputs may differ across executions, and each may be entangled with its own untouched reference system, but the joint input-reference states must be products across executions. Even with an arbitrary joint measurement on all output-reference copies, attaining any fixed nonzero advantage over random guessing under equal priors requires as . This lower bound holds for every such predetermined product-input strategy.
The tightness construction, fidelity proof, and boundary with entangled multi-use channel discrimination are given in Appendix A.4. The tightness construction permits arbitrary input-state preparation; a tool restricted to computational-basis or simple product inputs can realize a strictly smaller ceiling. For example, acting directly on either computational-basis state changes no output state, so the attainable trace distance on those inputs is zero even when .
Corollary 2.9 (Distribution rotation ceiling). Let with and , and apply the same fixed output measurement to the original and mutant circuits. Write its effects as with , and its outcome probabilities as and . Each measurement effect is the positive semidefinite operator specifying the probability of outcome ; this allows measurements more general than basis projectors. Then
Consequently, for a differential distribution test with detection rule ,
Proof. Let be the sum of effects for outcomes with . Since the probabilities each sum to one, . The inequality bounds this trace by half the trace norm of the traceless state difference, and Corollary 2.8 supplies the rotation ceiling. For , both distances vanish directly.
This rule covers computational-basis distributions and their marginals without enumerating outcomes. It does not imply that a sampled histogram or chi-square test will accept: a population distance and a finite-sample rejection are different quantities. Nor does a small TV bound uniformly control Pearson chi-square divergence when reference probabilities can approach zero. For , the distributions and have as , while . More generally, a specified statistic satisfying admits the bound on its change; deciding acceptance still requires that statistic's threshold or acceptance region. For a native expectation interval, combining Equations (4) and (22) gives the sufficient condition for survival, with no converse detection rule.
The same rotation formulas also cover any fixed one-qubit unitary replacement, even when the original and replacement gates rotate about different axes. The relative unitary determines the effective axis and angle; a global phase has no effect on the output state.
Corollary 2.10 (Fixed one-qubit unitary replacement). Let and be one-qubit unitaries and let . If , set and leave undefined; the replacement is channel-equivalent to the original operation. Otherwise, there exist a global phase , an effective angle , and a unit vector such that
The global phase cancels from conjugation, so Equations (14), (15) and (21) apply exactly to this fixed replacement with and . If the replacements form a declared fixed-axis family, Corollary 2.5 also gives that family's complete zero set and maximum. An arbitrary multiparameter path need not retain one effective axis, so each fixed replacement on such a path must instead be reduced separately.
The constructive axis-angle reduction is given in Appendix A.5.
Clifford replacements allow a different exact construction: update each Pauli term of the propagated observable separately. A Clifford operation maps each Pauli string to another Pauli string, possibly with a sign change, under conjugation. This property lets the tool transform a list of Pauli terms without creating a larger list at that step. If and the relative mutation is Clifford, the Clifford normalizer property [13, Sec. 3 and Table 1] implies that for each Pauli string there are a Pauli string and a sign such that
Therefore,
can be constructed exactly term by term without a perturbative expansion. If is a Pauli up to global phase, this expression reduces to twice the part of that anticommutes with that Pauli. Evaluating the realized gap from Equation (15) or the Clifford replacement identity still requires the corresponding expectations in . Exact formulas are also available when the mutation generator can be decomposed into its eigenvalues and eigenspace projectors, including every Hermitian generator with two distinct eigenvalues. Computing those projectors and the required state expectations may still be expensive. The Clifford derivation and spectral formula are given in Appendix A.5.
2.7.4 Bounded Approximation for Other Small Mutations
Small non-Pauli gate replacements ordinarily have a tractable local spectral decomposition and should use the exact branch in Section 2.7.3. The fallback below extends the analysis to more general subcircuit changes when exact evaluation is unavailable but the required commutators, state expectations, and remainder bound remain tractable. Many-qubit generators with more than two eigenvalues are candidate cases; no scalable implementation or measured benefit for this fallback is established here.
The generator is the Hermitian matrix specifying the direction of the gate change, while the real parameter controls its strength. The first-order approximation keeps the term proportional to in the gap and bounds the error from the remaining terms. For a left-multiplied perturbation,
define the sensitivity of the selected input and observable by
(29) and the operator-level proxy, which does not use the selected input, by
The state-dependent quantity is the actual first-order coefficient for the selected test; bounds that coefficient over all states. At the declared strength, the finite-change gap may also include higher-order contributions. The expectation derivative underlying the fallback is the standard parameterized-circuit derivative [10, Sec. III, especially Eqs. (3), (5), and (6)]. The quantitative remainder bound is
The Taylor derivation and the error bound, valid at finite strength, are given in Appendix D. Let be the first-order gap estimate and its error bound. The exact gap must then lie in
The clipping uses the universal bound . If the upper endpoint is strictly below , the gap is certified below threshold. If the lower endpoint is at least , the analysis establishes population-level detection; otherwise the decision remains unresolved. This interval gives a deterministic bound on approximation error, with its guarantee independent of statistical confidence levels. Its guarantee assumes exact values of the quantities used to compute it or validated bounds on their numerical errors. Ordinary floating-point evaluation must retain its numerical provenance.
The interval can settle a threshold decision even when the first-order estimate alone is unreliable. Use only to bound the worst-case first-order response, and use for ranking only when the first-order term is nonzero and dominates the remainder. If , the result supplies only an upper bound, and a second-order calculation is needed to predict a nonzero leading effect. If , the effect is exactly zero for every .
2.7.5 Evidence Supporting the Decisions
The same execution decision can rest on a proof, a bounded approximation, or a statistical estimate, each supporting a different strength of claim. The framework therefore records the execution-decision status separately from the evidence type. For fixed-suite planning, the statuses in Algorithm 1 distinguish semantic-equivalence, certified-zero, and below-threshold skips (plus an optional discrimination-policy skip) from predicted-above-threshold and threshold-unresolved execution decisions. The six evidence categories below record what was actually obtained.
The exact category means mathematically exact under the stated assumptions; computing such a result may still be expensive. The local identities and commutation conditions in Theorem 2.2 and Proposition 2.3, the rotation ceiling in Corollary 2.8, and the structural rule in Equation (8) require neither a small-mutation approximation nor pilot measurements. In particular, the commutation and structural rules can certify that a mutant is invisible under their stated scope. An exact record must also state how the result was obtained: for example, equality after transpilation with pinned settings, a strength bound, a proof of zero gap using circuit structure or exact identities, a structured formula, or simulation. The distinction between an exact formula and its numerical evaluation still applies; an ordinary floating-point result is not by itself a validated certificate.
The structured analysis in Section 2.7.3 exactly describes how Pauli rotations, fixed one-qubit replacements, Clifford replacements, and other spectrally tractable mutations change the propagated observable. When the corresponding state expectations in are unavailable, this result receives the exact observable-side update only evidence type and does not by itself determine the realized gap or an above- or below-threshold decision.
The state-dependent perturbative category uses the first-order coefficient for the selected test when exact evaluation is computationally unavailable, as in Section 2.7.4. The remainder bound in Equation (31) supplies the deterministic interval in Equation (32), which can decide a threshold even when a first-order ranking is unreliable.
When the propagated state cannot be computed classically, the pilot measurements in Appendix B.9 provide pilot-estimated gaps with simultaneous error bars that include the declared propagation and sampling errors. Finite pilot data can show that an effect is compatible with a declared visibility tolerance, but they cannot prove that the exact effect is zero.
The operator proxy evidence type records only as a state-independent worst-case bound. A large value permits a large first-order response for some state; it establishes neither that response for the selected test nor a large finite-strength gap. The unavailable evidence type records that none of the supported gap, interval, perturbative, or proxy quantities was obtained, leaving the size of the mutation effect unresolved.
3 Circuit-Aware Execution Planning
The clearest opportunities to avoid executions are reusable equivalence proofs, the constant-cost rotation ceiling, structural exclusion, commutation when the propagated observable is cheap, and the exact stabilizer family. These checks can settle outcomes without constructing a general mutation-site state. The rule-by-rule scalability conditions are collected in Section 4.6. Their value depends on the oracle and on whether analysis costs less than the execution it replaces; a full-distribution oracle, for example, loses the structural shortcut but retains the TV rotation ceiling. General dense state evaluation can cost more than simulating the mutant directly, and pilot estimation offers a further, as yet unvalidated, opportunity when shared measurements can amortize its cost.
An execution planner records a skip or execute decision, its evidence, and any unresolved outcome for every declared mutant–test pair. Figure 2 shows the flow, and Table 4 gives the reference costs. The scalar pseudocode in Algorithm 1 uses the differential expectation rule; Table 5 specifies which certificates transfer to other oracles. For simultaneous Euler-angle changes, each fixed candidate is reduced separately unless the entire family is known to retain one effective axis. Euler angles parameterize a one-qubit gate by three ordered rotations about specified axes, up to global phase. The filter order is a reproducible baseline, not a cost-optimal schedule: transpiler checks are reusable across tests but can cost more than the scalar and structural checks. Any reordered planner must record its order and preserve the distinction between semantic exclusions and test-relative skips.
For small circuits, the relevant classical baseline is direct statevector evaluation of the same mutant outcomes, including any reusable original-circuit calculation. A fair comparison charges propagation, equivalence checking, state evaluation, and memory to the planner; it does not compare that work only with the number of shots avoided. When exact analysis settles an outcome, further execution is needed only if observed evidence is required. Otherwise, the execute decision schedules known original and mutant circuits under the declared sampling rule, whether the samples come from an ideal simulator or a suitably specified execution model. Hardware costs and noise require the additional model described in Section 5.
A prefix pilot repeatedly executes the original circuit only through the mutation site and measures quantities needed to estimate several candidate effects. The local-Pauli version of classical shadows measures each qubit along an independently and uniformly chosen X, Y, or Z axis on each pilot shot.

Figure 2: Execution planning after the contract and population are fixed. Pairs settled by a certificate can bypass later analysis or execution and enter accounting with their evidence. Only certified semantic equivalence supports exclusion from the corresponding non-equivalent population; test-relative survivors remain in its denominator.
It stores the chosen axes and outcomes as classical data and reuses them to estimate many Pauli expectations. Three-point interpolation instead reconstructs a rotation response from three circuit configurations, while targeted measurements directly estimate the needed Pauli terms. Shared shadows can amortize their locality-dependent cost over many target strings, but strength reuse also benefits three-point interpolation and targeted measurements. Appendices B.9.6 and B.9.7 compare these alternatives and delimit the simpler paired-execution break-even calculation.
An executable Python reference implementation, tests, and a worked notebook are available in the implementation repository [7]. The package implements the planning procedures in Algorithms 1 and 2 and a separate fixed-shot classifier. The package's scalar planner and fixed-shot classifier use differential expectation rules; the TV and native-assertion certificates above are mathematical extensions that they do not implement. The implementation repository's README documents installation and reproduction of the worked examples. Section 5 details the implementation's coverage, limitations, and remaining validation needs.
Table 4: Reference fixed-test execution-planning stages and their costs. The decisions shown use the differential expectation rule; Table 5 gives the oracle-specific extensions and Appendix B.9.1 details representation growth.
| Stage | Decision | Required work |
| Compiler comparison and exact proof | Remove certified semantic matches before test-conditional planning. | Compare circuits compiled under identical pinned settings; verify matches on the changed support after exact context cancellation, or by bounded full-register exact algebra. Results are reusable across tests. |
| Rotation threshold gate | If , label the pair below threshold. | with known strength; a fixed one-qubit replacement also permits local axis-angle reduction. |
| Structural light cone | Label a site outside the cone as zero-effect for this test. | Linear in the size of the circuit dependency graph; no state data. |
| Propagation and commutation | Form and test . | A Clifford suffix maps each input Pauli term to one term; retaining at most terms through suffix gates requires local term updates. |
| Exact state evaluation | Evaluate or the exact replacement expectation. | Numerical statevectors store amplitudes; density matrices store entries. Pauli expectations do not require a dense observable. |
| Prefix pilot | Estimate the Pauli expectations needed by the remaining candidates. | Repeated prefix executions; shared-shadow sampling cost grows exponentially in Pauli weight (number of nonidentity factors), as detailed in Appendix B.9. |
| Mutant execution | Run candidates predicted above the threshold or unresolved at the declared confidence. | Prespecified shots from each known circuit, plus test-specific overhead; this allocation differs from the unknown-source copy budget. |
Table 5: Certificates available under different oracle rules. All rows retain the declared semantics, numerical-certification requirements, and evidence provenance.
| Oracle | Zero-effect checks | Nonzero-effect decision |
| Differential expectationDifferential TV distance | Light cone and commutation for ; state invariance or an exact zero expectation.State invariance or collective equality of outcome probabilities; structural exclusion only for restricted measured outputs. | Compare the gap bounds with ; the angle ceiling is .Compare TV bounds with ; the angle ceiling is . |
| Native expectation interval | The expectation checks establish unchanged acceptance when the original passes. | Use the acceptance margin for sufficient survival, or test the mutant-mean enclosure against (Proposition 2.1). |
| Sampled histogram or chi-square | Distribution equality preserves the oracle's outcome law under the same sampling procedure, not each realized outcome. | Retain the statistic, shot count, significance, and acceptance rule; the TV ceiling alone gives no acceptance certificate. |
3.1 Preserving Classifications and Mutation Scores
Skipping executions must preserve what the report says about the declared mutant population. A certified below-threshold skip cannot hide a population-level detection for that pair, whereas a budget-based skip can leave its outcome unresolved. The following proposition shows how valid pair-level evidence supports correct classifications and mutation-score bounds when execution is incomplete.
Proposition 3.1 (Planning soundness and mutation-score bounds). Fix a differential test collection T as in Section 2.4, with prespecified positive thresholds and a nonempty mutant population chosen independently of the evaluated suite. Assume sound semantic exclusions leaving only non-equivalent mutants, valid deterministic gap bounds and zero certificates, and simultaneous statistical coverage with pilot and observed-test failure budgets and , preserved under data-dependent execution. If representatives are used, require certified identical per-test population detection indicators within each class and retain its original multiplicity, as detailed in Appendix A.1. For each mutant or representative class, declare detection when some test has a certified lower gap bound at least its threshold, survival when every test has a certified upper gap bound strictly below its threshold, and otherwise leave it unresolved. Budget-floor skips and unexecuted pairs supply no classification by themselves. Then, with probability at least , all resolved classifications are correct, no certified below-threshold skip omits a population-level detection for its pair, and
where are the sums of class multiplicities in the detected, survivor, and unresolved categories. For deterministic evidence alone the corresponding claims are unconditional.
The complete assumptions and proof are given in Appendix A.1. For example, 60 certified detected mutants, 25 certified survivors, and 15 unresolved mutants in a population of 100 support a mutation score between 60/100 and 75/100. Dropping the unresolved mutants would change the denominator and answer a different question. The score interval is a point exactly when no unresolved population weight remains.
The proposition establishes that combining valid evidence preserves classifications and population accounting. Pilot-supported or analytically resolved population detections must retain that provenance and must not be relabelled as observed finite-shot kills.
The same accounting argument applies to other fixed oracle rules once their own outcomes are certified. For a TV-threshold test, use valid TV intervals in place of expectation-gap intervals. For a native assertion, first establish that the original passes, then use Proposition 2.1 or another valid certificate for that acceptance predicate. Declare a suite kill when some native test certifies a kill, survival only when every native test certifies survival, and otherwise leave the mutant unresolved. Under the same semantic, multiplicity, and simultaneous-coverage assumptions, Equation (33) then bounds the score defined by those oracle-specific detection indicators. The proof uses only the correctness of the resolved indicators: detected weight is certainly killed, survivor weight certainly survives, and unresolved weight can contribute between zero and its full value. This extension changes the per-test classifiers, not the accounting; in particular, setting in the scalar planner would not implement native detection correctly.
3.2 GHZ Example: Decisions and Population Accounting
Prepare the three-qubit Greenberger–Horne–Zeilinger (GHZ) state ( )/ from using , , and . This entangled state is an equal superposition of all-zero and all-one bit strings, so computational-basis measurements return three perfectly correlated bits. Table 6 compares two tests of the same eight author-defined mutants: first the expectation of , then the entire computational-basis output distribution. The circuit, input, and mutant population stay fixed while the test changes. All eight mutants change the output state on this input, so all eight remain non-equivalent under the declared state-transforming semantics. The detailed mutation strengths and certificates are given in Appendix B.2.
3.2.1 Single-Qubit Expectation Test
The first test uses and detects a mutant when its expectation gap reaches . This expectation is the probability that qubit is zero minus the probability that it is one; the original GHZ state gives equal probabilities and hence mean zero. A mutant that preserves this balance survives the test even if it changes the other bits or their correlations with . The column of Table 6 records why the planner skips or executes each mutant for this test.
The exact gaps are zero for , for , and one for and . Thus , , and , giving the population mutation score 2/8 before any observed mutant execution. The planner schedules two candidates; removing the six skipped survivors would instead give the misleading score 2/2.
3.2.2 Full Output-Distribution Test
Now replace the single-qubit expectation test by a comparison of the joint probabilities of all three output bits, keeping the same input and mutants. Both tests use computational-basis measurements, but the new test retains information about which combinations of bits occur that the mean discards. Order bits as and write p and for the original and mutant distributions. The original assigns probability 1/2 to each of 000 and 111, and zero to every other bit string. Measure the distribution change by total-variation (TV) distance and declare detection under the separate population rule
Because both distributions sum to one, probability lost from some outcomes is gained by others, so the sum of absolute differences counts the redistributed probability mass twice. The factor 1/2 corrects this double counting and makes the distance range from zero to one. This illustrative differential distribution contract is separate from any supplied benchmark's native assertion, which retains its own acceptance rule. QuMu's normalized histogram discrepancy is the empirical analogue of this distance [14, Sec. 4.2]. The two thresholds apply to different quantities: for corresponds to a probability change of 0.05 for either value of , whereas applies to the joint distribution. Table 6 places the two tests side by side; write .
The additional detections are , , and : each preserves the equal probabilities of zero and one on but moves probability to bit strings absent from the original output. For example, appending in replaces 000 and 111 by 010 and 101, so the mean remains zero while the full distributions have disjoint support and total-variation distance one. The structural shortcut also changes: each full-register outcome projector acts on every qubit, so no mutation site can be excluded by the structural light-cone rule for these projectors.
Equal computational-basis probabilities can still conceal a changed quantum state. For , the diagonal final commutes with every output projector and therefore certifies the entire distribution unchanged. Its output is nevertheless , so the state-side invariance certificate fails. State invariance guarantees distribution equality, which can also hold for different states. The sign
Table 6: The same eight GHZ mutants under the expectation test () and the full-distribution test (). Every skip is a survivor; every execute entry predicts detection. For distributions, assigns probability to each listed bit string in order; all unlisted probabilities are zero. All detections are established analytically; the example includes no finite-shot test outcomes.
| ID | Mutation | test (Section 3.2.1) | Full-distribution test (Section 3.2.2) | |
|---|---|---|---|---|
| Planning decision | Nonzero probabilities | ; outcome | ||
| Delete CNOT | Skip: outside light cone | ; detected | ||
| Append | Skip: outside light cone | ; detected | ||
| Append | Skip: observable commutation | ; survivor | ||
| Append | Skip: state-dependent zero | ; detected | ||
| Reverse the angle | Skip: finite-strength zero | ; survivor | ||
| Offset the angle by 0.01 | Skip: below threshold | / | ; survivor | |
| Offset the angle by | Execute: predicted detection | ; detected | ||
| Delete CNOT | Execute: predicted detection | ; detected | ||
reversal has the same probabilities through cancellation for the specified input. The remaining survivor, , changes the probabilities, but its distance stays below . The TV rotation ceiling already settles this case without calculating those probabilities: .
Thus changing the test raises the population mutation score from 2/8 to 5/8 while keeping the state-transforming population fixed. Changing the program's declared semantics would be a separate step: under an interface restricted to this fixed input and computational readout, and would be interface-equivalent and require a separately declared score denominator. A sampled histogram or chi-square oracle must still use its own sample-size, significance, and acceptance rules; handling zero expected bins must avoid division by zero. Neither the analytical outcomes here nor term-wise projector gaps constitute observed finite-shot rejections.
4 Practical Implications and Representative Examples
4.1 One-Qubit Pauli-Axis Rotation
A changed output state can leave a measurement unchanged, as the GHZ survivors illustrate. For a single rotation, the exact gap shows how this depends on both the original angle and the mutation strength. Consider the circuit with input and observable . The original expectation is ; replacing the gate by changes it to . Thus Theorem 2.4 with gives the exact gap
and expanding Equation (17) for small gives the first-order expression
A zero first-order coefficient, as at or , does not establish a zero exact gap. The exact expression must still be evaluated at the declared mutation strength.
The outcome range is , so dividing the gap by two gives the normalized signal and its upper bound from Corollary 2.8:
Equality holds when , so a suitable original angle attains the ceiling. The same small-strength limit also constrains the separate task of identifying which circuit produced an unknown output. Under the independent-execution assumptions of Corollary 2.8, any fixed nonzero advantage over random guessing with equal priors requires executions as .
For a fixed original angle, the coefficients in Equation (16) are and . The largest gap over all mutation strengths, from Equation (18), is therefore
The zero set in Equation (19) includes , which is distinct from the unchanged angle when . This strength reverses the sign of the original angle: . The replacement preserves the expectation on input and is therefore test-equivalent for this pair, although the two circuit unitaries are generally not equivalent. Figure 3 shows this cancellation and the maximizing strength for the representative choice .

Figure 3: Exact finite-strength gap for with input and observable . Besides the unchanged angle , the sign-reversal strength is exactly test-equivalent, while the gap reaches at .
The same mechanism applies to other Pauli-axis rotations covered by Theorem 2.4. Under the same test, gives the identical gap . Changing the measurement to X gives gap for the sign reversal; changing it to Y gives the same gap for the sign reversal.
Changing the measurement cannot help if the mutation leaves the state itself unchanged. For example, changes only a global phase. Since , the state-side criterion in Proposition 2.3 certifies that every angle mutation is invisible to every observable on this input. Changing the input to removes that obstruction: an measurement then gives , and a measurement gives gap for the sign reversal.
4.2 Fixed Cross-Axis One-Qubit Replacement
The rotation formula also applies when a replacement changes the gate's axis. Consider a one-gate circuit with , replacement , input , and observable .
To express the replacement as a change applied after the original gate, compute the relative unitary from Corollary 2.10:
where
The replacement is therefore one exact rotation about an axis combining X, Y, and Z. Adding separate X- and Z-axis effects would not describe this relative operation. To evaluate its gap, first compute the state after the original gate:
The part of the propagated observable that anticommutes with the effective axis is
These expressions give and in Equation (16). Substituting the coefficients and effective angle into Equation (17) gives
The circuit outputs provide a direct check: the original Z expectation is zero, while gives mutant expectation one. If a replacement instead differs from the original only by a global phase, then and . In that branch of Corollary 2.10, every test has zero gap and no effective axis is defined.
4.3 Mutation-Guided Test Augmentation
The rotation examples distinguish two ways to expose a surviving mutant: change the input or change the measured output quantity. To assess the same program contract, the new test must stay within its declared input domain and permitted measurement interface. A measurement outside that interface can show that the states differ, but does not by itself reveal a weakness in the native assertions.
For a fixed mutant strength , the two coefficients in Equation (16) allow candidate inputs and observables to be compared. For each candidate pair , Equation (17) gives the signed expectation change
By Equation (6), the mutant survives the current suite when for every existing test . A new test detects it under the differential rule exactly when reaches that test's declared threshold. A zero gap is the stronger, special case of test-relative invisibility. For a fixed site and axis, Corollary 2.5 makes every strength invisible to the suite exactly when for every test . Even when these coefficients do not all vanish, one strength can be invisible to the entire suite if it lies in every test's zero set from Equation (19).
For a fixed input, the state difference determines the largest gap among Hermitian observables whose outcomes lie in , equivalently whose operator norm is at most one. Form from Equation (10) and choose , as in Proposition 2.3. This observable assigns , , or 0 to the positive, negative, or zero eigenspaces of the state difference. Propagating it forward gives the output measurement . By Equation (12), its gap is exactly . If , no change of observable can expose the mutant on this input.
Attaining this mathematical optimum can be expensive. Constructing requires the full mutation-site state and may be intractable in a wide circuit. Measuring requires a circuit that changes to its eigenbasis, or an equivalent measurement construction. Its depth, routing, calibration, and noise can dominate the cost. The optimum therefore remains an information-theoretic benchmark unless the measurement is permitted, its construction is available, and its cost is included in the test budget. Even an attainable nonzero gap must reach the declared threshold to count as differential detection; a native acceptance assertion must still be judged by its own rule.
When measurements are restricted, declare an admissible output family with and an implementation cost for each candidate. Screen each using its gap and that cost. Restricting the output to Pauli observables differs from restricting the mutation-site observable to Paulis unless the suffix maps the relevant families into one another. The best gap in the restricted family is a lower bound on the unrestricted optimum and can be exponentially smaller. The evaluation identity and this limitation are given in Appendix B.8. Both the unrestricted construction and the restricted screen can use original-prefix information and the known relative unitary without first executing the mutant, provided that the needed expectations and observable representations are accessible.
For the sign-reversal mutant , changing the observable is enough to obtain a nonzero gap when . Substituting into Equation (17) gives zero for , while gives
Measuring Y would still give zero gap because both states have real amplitudes and zero Y expectation. To measure X, add a Hadamard gate H before the usual computational-basis readout, using . For the introductory example , that readout returns bit 1 with probabilities for the original and for the mutant. Their difference is , corresponding to the X-expectation gap under the outcome labels.
This X test also attains the unrestricted optimum. At the mutation site, Equation (10) gives . Hence Proposition 2.3 and Equation (12) give and . The state difference thus identifies the optimal observable without a candidate search. To show how the gap changes between the original and optimal measurements, consider the unit-norm axes
The sign-reversal gap along this family is
For , Figure 4 shows the gap increasing continuously from zero for Z to the optimum for X supplied by Proposition 2.3.
Two-qubit measurement construction. The optimal observable need not be a single Pauli string, even for two qubits. Prepare and let the mutant append the phase

observable direction
Figure 4: Observable-direction gap for the sign reversal under input . The existing Z test is invisible, intermediate axes provide partial separation, and the state-side optimum X attains the trace-norm gap .
gate on the first qubit, giving . Computational-basis readout gives the same probabilities for both states, although their difference is
The difference has nonzero eigenvalues on the subspace spanned by and . Its sign observable therefore gives the optimum:
Each individual Pauli string has gap at most one in this example, below the optimum . To measure , use bit order and apply , then and on , followed by computational readout. For , direct multiplication gives . Assign outcomes 00, 01, 10, 11 the values +1, 0, -1, 0, respectively; the two output means are and . This realizes the optimal gap with one additional CNOT and two one-qubit gates per measured circuit, plus both readouts and classical relabeling. The zero labels correspond to the zero eigenspace of the state difference; neither ideal state has weight there. Whether this construction costs less than separate Pauli measurements depends on basis synthesis, connectivity, and execution costs, which this illustration does not measure. The measurement is admissible only when the program contract permits this basis change.
These tests are constructed from the very mutations they expose. An adequacy claim for the augmented suite therefore requires evaluation on held-out mutants, representative faults, or another population not used to construct the tests.
4.4 A Local Mutation Exposed Through Correlation
A measurement on one qubit can reveal a mutation on another when the suffix couples them. Consider a mutation site followed by the suffix and final observable . Propagating the observable backward as in Theorem 2.2 gives
Thus the final expectation reads the two-qubit correlation at the mutation site. For an angle mutation on qubit , Equation (15) gives
The first-order response depends on the correlation: the state-dependent sensitivity in Equation (29) is . If this coefficient vanishes, the term can still produce a gap at finite strength. For example, take . Then and , giving
even though the first-order approximation about is zero. As Figure 5 shows, the gap grows quadratically near the unchanged circuit and reaches the full outcome range at a half-turn mutation.

Figure 5: Exact correlation-mediated gap for , an mutation on control qubit , a CNOT suffix, and final observable . The first-order coefficient vanishes, but the exact gap grows as and reaches the full observable range at .
For (mod ), the mutation lies inside the structural light cone and its relative unitary does not commute with . Neither zero-effect certificate in Equation (8) and Theorem 2.2 therefore applies, but these facts alone do not determine the gap. To see the role of the state, keep the same site, axis, and observable and take . Both and now vanish, so the exact gap is zero at every strength. At nontrivial strengths the relative unitary still commutes with neither nor . Thus the absence of a zero-effect certificate does not guarantee a nonzero signal for the selected test.
4.5 Efficient Analysis for Stabilizer Circuits
The correlation example needs only two state expectations, but computing even those quantities can be expensive for a general circuit. For pure stabilizer states and a Clifford suffix, they can be obtained efficiently on a classical computer. A pure stabilizer state is specified by n independent commuting Pauli constraints that leave it unchanged. Products of these signed Pauli constraints form its stabilizer group. A signed stabilizer tableau stores those constraints as a compact binary matrix with sign information, avoiding a vector of amplitudes. Standard stabilizer simulation supplies the required state information [13, 15]. A Clifford suffix also maps a Pauli output observable backward to a single signed Pauli string. When the mutation axis anticommutes with the propagated observable, the two Pauli observables that determine the response also anticommute. They cannot both have nonzero expectations in a pure stabilizer state. This leaves exactly three possible gap curves, even when the mutation itself introduces a non-Clifford rotation.
Theorem 4.1 (Three-shape stabilizer visibility). Suppose is a pure stabilizer state supplied by a signed stabilizer tableau, the suffix is Clifford, the output observable is a unit-norm Hermitian Pauli string, and for a Hermitian Pauli string A. Write , including the sign introduced by Clifford propagation. If , the gap vanishes for all strengths. Otherwise P and are anticommuting Hermitian Pauli observables, and their expectations and give the exhaustive classification
For an original circuit of L one- and two-qubit Clifford gates on a supplied pure stabilizer input, a fixed Pauli output observable, and M explicitly listed site-axis candidates, all M response curves can be obtained with an binary-operation bound and no quantum shots. This bound concerns the symbolic curves; certified comparison with numerical thresholds additionally requires exact or validated angle arithmetic.
Proof. Clifford propagation maps the output string to a signed Pauli P. If P commutes with A, then and the gap is zero. Otherwise , is Hermitian with , and . A Pauli expectation in a pure stabilizer state is 1 or -1 when the appropriately signed Pauli belongs to the stabilizer group, and zero otherwise. The two expectations cannot both be nonzero, because that would make the state a simultaneous eigenvector of anticommuting observables. Substitution in Equation (17) gives Equation (37).
Group candidates by site and propagate the output Pauli backward once, storing its signed value at each candidate site. Then propagate the supplied input tableau forward once, evaluating all candidates at each site before advancing. These shared passes cost : elementary Clifford tableau updates take operations [15, Sec. III], and propagating and storing each signed Pauli takes at most operations per gate. For each candidate, Pauli commutation and multiplication take operations, and at most two signed stabilizer-membership tests determine the required expectations. Each signed stabilizer-membership test can be implemented by Gaussian elimination over in operations. The candidate checks therefore cost in total, giving the overall bound . This bound establishes polynomial cost and allows for faster update and membership-test implementations. No enumeration of the stabilizer elements or construction of a dense state vector is needed.
A faster implementation uses a full Aaronson–Gottesman tableau, which stores destabilizer generators in addition to the signed stabilizer generators [15, Sec. III]. Each destabilizer anticommutes with its paired stabilizer generator and commutes with the other stabilizer generators. For a queried Pauli, anticommutation with any stabilizer generator implies zero expectation; otherwise, its commutation relations with the destabilizers identify the stabilizer product whose sign relative to the queried Pauli determines the expectation. Scanning these rows and multiplying the selected stabilizer generators takes binary operations per query without changing the state tableau. Maintaining the full tableau preserves the shared-pass cost, so a supplied full input tableau gives an overall bound of . If only the signed stabilizer generators are supplied, Gaussian elimination and symplectic completion can construct the additional rows once in operations, giving including preprocessing.
For a concrete family, prepare for any , and append an identity mutation site after the preparation. At that site, the pairs , , and give respectively , , and zero. In the last case the axis
acts inside the measured qubit's structural cone and anticommutes with its observable, yet both coefficient expectations vanish. This gives a state-dependent zero that neither structural exclusion nor observable commutation explains, for arbitrarily large registers. The same coefficient pairs can be reused for any number of declared strengths without further state analysis or quantum shots. Evaluating or reporting each strength still incurs scalar arithmetic or output cost.
The state representation is an essential assumption. A Clifford suffix alone does not supply the mutation-site tableau, and the cost bound does not include recognizing whether an arbitrary preparation yields a stabilizer state. Even one non-Clifford preparation gate can invalidate the three-shape conclusion: has nonzero X and Z expectations. Decomposing a state into stabilizer components may still permit efficient expectation calculations for restricted circuits, but that is a separate computational claim.
The theorem also excludes arbitrary convex mixtures of pure stabilizer states. For , , and , the coefficients are and the gap is . An arbitrary non-Clifford suffix or a sum of Pauli output terms can likewise produce other gap curves. Even within the theorem's assumptions, a threshold decision at a boundary requires a symbolic comparison or validated bounds; without them it remains unresolved under Proposition 3.1.
4.6 Computational Scope and Scalability
The stabilizer theorem shows why register width alone does not determine the cost of these rules. The local response identities hold for any finite number of qubits; obtaining the state expectations and operator representations needed to use them can nevertheless be expensive. The reference implementation's four-qubit default applies to dense symbolic proofs, or to the changed support in a local channel proof, rather than to the circuit width admitted by every rule. Structural exclusion and sparse Pauli commutation can operate on much wider circuits without constructing a full-register matrix. An exact identity therefore has to be distinguished from an efficient algorithm for evaluating all of its inputs.
Tables 7 and 8 separate these costs for the rules developed in this paper. Here n is the register width, L the relevant circuit length, k the mutation or gate support size, K the represented Pauli-term count, and M the number of declared candidates. Arithmetic bounds assume fixed precision unless exact symbolic expressions are explicitly involved; their simplification and bit lengths require additional accounting. The tables describe available mathematical routes, while Table 9 identifies which routes the reference code implements. Appendix B.9.1 gives the representation sizes and configured fallback limits.
There are three distinct ways to make state-dependent rules practical beyond small registers. A supplied product or stabilizer description can make the required expectations tractable, with the explicit stabilizer bounds given in Theorem 4.1. Alternatively, the union of the original and mutant backward causal cones may contain only qubits. When the corresponding reduced input is supplied, a pure state uses amplitudes and a mixed state uses a density matrix with entries. For fixed-width gates and polynomial circuit length, then gives polynomial simulation work; a small mutation support alone does not imply a small causal cone or a cheaply available reduced input. Finally, executing the relevant prefixes and measuring the required observables can replace classical state simulation, subject to the sampling, circuit-depth, and measurement costs in Appendices B.9 and B.9.7. The present planner does not automatically choose a tableau backend or reduce state evolution to the causal cone.
State-invariance checks particularly require care about correlations. For a Bell pair, the reduced state of either qubit is I/2 and commutes with a local Z, yet that operation changes the global pure
Table 7: Scaling of semantic, structural, and observable-side rules. A cheap operator calculation does not by itself supply the state-dependent gap.
| Rule | Route for larger circuits | Limiting quantity |
| Semantic equivalence and duplicate channels | Compare compiled representations at the cost of compilation; with verified common context, prove a scalar relative phase on changed qubits. | A local dense matrix stores entries.Dense full-register proofs store entries and symbolic expressions can grow further; compiler equality alone is insufficient for the implemented certificate. |
| Rotation ceiling and optional copy-budget floor | Scalar arithmetic once the strength, observable range, and budget are known; the TV ceiling needs no full output distribution. | Deriving the spectral range of an arbitrary observable can itself be expensive. A fixed one-qubit axis-angle reduction remains local. |
| Structural light cone | Traverse gate operands and exclude disjoint mutation supports without state simulation. | A large cone reduces the number of exclusions. The implementation stores boundary supports with up to memory, although a streaming check need not store every boundary. |
| Observable commutation and Clifford updates | Pauli-axis commutation costs using explicit strings. A Clifford suffix preserves , requiring local term updates. | A general suffix can generate terms.Truncation can control work but cannot prove an exact zero from the retained terms alone. |
| Exact local and spectral replacement rules | A -qubit relative action expands each Pauli term into at most terms; local eigendecomposition uses conventional arithmetic. | Small controls the local action, not the cost of representing or obtaining its state expectations. |
| Perturbative interval and operator proxy | Sparse commutators and coefficient-norm bounds can avoid full matrices when both the generator and have manageable expansions. | Exact spectral norms or dense nested commutators can be exponential in . A loose remainder can leave the threshold unresolved, and a proxy is not a realized gap. |
Table 8: Scaling of state-dependent decisions, measurements, and accounting. Sampling bounds concern data acquisition separately from classical simulation.
| Rule | Route for larger circuits | Limiting quantity |
|---|---|---|
| Input-state invariance | Use a proved state symmetry; for a pure , state invariance is equivalent to . | Access to that expectation or symmetry is required. Invariance of a local reduced state alone does not establish invariance of an entangled register. |
| Cancellation, all-strength zeros, and optimal strength | Obtain once, then evaluate each strength with constant scalar work. The stabilizer theorem supplies polynomial exact expectation queries under its assumptions. | Arbitrary state preparation remains expensive. Numerical or sampled coefficients do not certify an exactly vanishing gap or an exact zero set. |
| Signed pilots and threshold intervals | For target strings of weight at most , shared shadows use shots at additive error and failure budget . | Large Pauli weight, stringent precision, prefix execution cost, or truncation error can dominate. The built-in simulated pilot also pays classical state-simulation costs. |
| TV and native-assertion rules | Apply the scalar distance ceiling or acceptance-margin enclosure; restrict explicit distributions to the measured qubits when the oracle permits it. | A complete distribution has entries. Full-register distribution comparison can be exponential even when expectation tests are cheap; a native baseline margin must also be obtained. |
| Helstrom and restricted test augmentation | Screen a declared finite list of measurable Paulis using the same propagation and expectation machinery. | All Paulis number ; a general dense Helstrom construction uses matrix entries. Pure-state rank-two constructions can use amplitudes instead, still exponential. Measurement synthesis adds its own cost. |
| Finite-shot classification, ranking, and score bounds | Once samples and certified indicators are supplied, threshold arithmetic and weighted counting are scalar per record; ranking candidates costs . | Reading samples, enumerating candidates and tests, and obtaining their certificates must be charged separately. Polynomial post-processing does not remove those costs. |
state to an orthogonal Bell state. Thus local reduced-state commutation cannot replace the global condition for a mixed or entangled register. The pure-state expectation criterion in Table 8 follows because two pure output states coincide up to phase exactly when their overlap has unit modulus. It requires that overlap, rather than merely unchanged local marginals.
Sparse coefficient bounds also offer a scalable, potentially conservative perturbative route. For complete Pauli expansions and , define and . Submultiplicativity and the commutator inequality give
This replaces a dense norm calculation in Equation (32) by coefficient sums, but the state-dependent first-order expectation is still needed and the bound can be too loose to decide the threshold. Using truncated expansions additionally requires allowances for the omitted terms. The current general-generator fallback uses bounded dense products; the coefficient bound states an available extension rather than an implemented performance result.
Population-wide redundancy and subsumption add costs in the number of candidates and tests. Identical compiled representations can be grouped by hashing followed by equality checks, whereas unrestricted pairwise equivalence checking can require proof attempts. Once exact detection indicators for T tests are supplied, a direct all-pairs subsumption comparison costs Boolean operations; obtaining those indicators remains a separate analysis or execution cost. Grouping by syntactic metadata can be inexpensive, but effect-based buckets first require the corresponding profiles and provide no semantic certificate.
Scalability therefore depends on register width, causal-cone size, gate locality, represented term count, state structure, Pauli weight, required precision, and the number of candidates and tests. A Clifford suffix can keep one Pauli term compact while spreading its weight to n, making classical propagation cheap but the stated shadow bound exponential. Conversely, a wide circuit with a small relevant cone or a tractable state can admit informative exact decisions well beyond the symbolic fallback limit. A resource-limited or statistically unresolved case retains its population weight; inability to evaluate a rule is not evidence of equivalence or survival.
4.7 Practitioner Checklist: Do, Do Not, and Report
A planning decision must be reported together with its test, supporting evidence, and cost. Apply the conditions in the order given by Table 4, following the evidence rules in Section 2.7.5. The implementation steps appear in Algorithms 1 and 2. For each analysis, record:
-
The declared semantics, mutant population, test, threshold, original and replacement operations, union of the qubits they act on, and left-multiplied relative unitary. Keep a family’s signed angle offsets distinct from a fixed replacement’s canonical axis and angle; a scalar relative unitary has no defined axis.
-
The decision, evidence type, provenance, uncertainty, and computational limits. For a fixed-axis analysis intended for reuse, retain , the signed response, and its zero set.
-
The measurement implementation and complete preprocessing, pilot, and execution costs, using the alternatives in Appendix B.9.7. Report population weights, including the weight of unresolved mutants, using Proposition 3.1. Evaluate proposed test improvements on a population independent of the mutants used to construct them.
Use the threshold ceiling as an initial check before more expensive analysis. For and , canonical angles below radians cannot be detected by that test. Pilot measurements need a separate cost and error analysis: their error allocations and retained terms must satisfy the sampling and truncation inequalities in Appendix B.9. Compare pilot settings with direct execution and reconstruction baselines using total preprocessing, sampling, and execution costs at matched precision and confidence.
5 Validation Requirements and Limitations
5.1 Evidence and Implementation Scope
The evidence comprises proofs, hand-checkable examples, executable demonstrations, and bounded synthetic feasibility checks under the stated model; Table 9 records the implementation limits. No corpus-effect results, filter hit rates, measured savings, or held-out adequacy gains are reported here.
During the preparation of this work, the authors used OpenAI Codex [16] and Anthropic Claude Code [17] to assist with manuscript editing and to obtain additional feedback on theorem statements and proofs. These tools also supported the review and revision of the reference implementation, which was initially written by the authors, with human review of code produced or modified through this process. Throughout, AI feedback served as an aid to review and revision, rather than as evidence of mathematical or implementation correctness. The authors retain responsibility for the final manuscript, proofs, and implementation.
5.2 Bounded Synthetic Feasibility Probes
The implementation repository [7] contains scripts/probe_scalability.py, which exercises fixed constructed families with known answers. The grid, environment, and per-case measurements from one batch are recorded in scalability-results/reference.json; scalability-results/README.md documents how to reproduce it. These paths are relative to the repository root. These checks measure implementation feasibility separately from the proposed population and execution-planning studies. The measurements used an Apple M1 Max, Python 3.13.15, Qiskit 2.5.1, NumPy 2.5.2, and SymPy 1.14.0, with one requested linear-algebra thread and fresh worker processes. Each completed case reports the median of three analysis-and-check timings, excluding imports and case construction; peak resident memory includes the entire worker. Symbolic caches were cleared before each repetition. Each worker had a 20-second total timeout and a polled resident set size (RSS) watchdog with a 768 MiB stopping threshold. Table 10 summarizes the 39 attempted cases: 33 completed, 4 crossed the RSS threshold, and 2 timed out. A completed case finished all repetitions and result checks; the compiler filter can complete while declining to certify equivalence. The structural, Clifford-propagation, local-certificate, and compiler-filter families share the register-width grid . The non-Clifford family instead fixes and varies the independent-rotation count ; the statevector and dense families retain smaller width grids because they allocate exponentially sized representations. These grids measure probe coverage, not maximum supported widths, and timings on different tasks do not establish execution savings.
The circuit families are deliberately simple, with qubits numbered from 1 to n. Let denote the ordered chain of gates , , ..., , listed in execution order. The structural-cone and Clifford-propagation rows use with output observable , whose backward image is . The local-proof, compiler-filter, and dense-symbolic rows compare the same equivalent pair: a common prefix consisting of followed by , then either or its three-gate implementation , , . These three rows time different computations on that pair: a
Table 9: Scope of mathematical results and reference implementation.
| Capability | Established or implemented | Conditions and implementation limits |
|---|---|---|
| Exact local analysis | Exact identities and structural rules; supported fixed-strength calculations and algebraic zero checks. | Numerical gaps and bounds use ordinary floating point, without validated numerical threshold certification; reports concern fixed strengths rather than reusable response families. |
| Oracle extensions | TV rotation ceiling and native acceptance-margin and interval certificates. | Mathematical results only; the implementation’s decision rules remain differential expectation rules. |
| Symbolic certificates | Independent channel-equivalence and full-circuit zero proofs for supported explicitly exact data. | Default symbolic limit: four changed qubits for local channel proofs, or four register qubits for full-circuit proofs; unsupported cases retain fallback provenance. |
| Tractable circuit family | Polynomial-time response classification under the stabilizer theorem’s assumptions. | Sparse Pauli preprocessing is implemented; supplied states and simulated pilots remain dense. The full tableau-based classification algorithm is not implemented. |
| Pilot estimation | Simulated mutation-site sampling with reported error allocation. | Separate pilots per candidate estimate only the declared fixed-strength response. |
| Outcome accounting | Separate fixed-shot classifier; planning soundness proposition with score bounds; worked examples. | Soundness covers classifications and score bounds under the proposition’s assumptions; execution savings require separate evaluation. |
proof after cancelling the common context, the compiler-plus-proof filter, and a full-register symbolic comparison without context cancellation.
The non-Clifford family applies independently to the first qubits of a 64-qubit register and propagates backward, with identity on the remaining qubits. Its exact expansion contains terms, so this sweep measures term growth at fixed register width. The statevector-planner row prepares from using followed by , inserts on qubit 1 after preparation, and evaluates the mutant against . The dense-numerical row uses only three gates, , on qubit 1, and in that order, with output observable ; it materializes the full-register matrix of the backward image . Thus this last row exercises dense matrix growth even though only two qubits participate in gates.
The 8,192-qubit Pauli and local-proof cases invoke sparse library helpers without a state input; they do not demonstrate an end-to-end planner accepting such a register. The 22-qubit planner case supplies a dense basis-state vector, raises the state limit explicitly, disables equivalence filtering and pilots, and computes one known GHZ response with dense operator fallback disabled.
The stored-cone computation completed through 4,096 qubits with a peak of 676.0 MiB. The four memory-stopped cases exceeded the 768 MiB threshold, with sampled RSS values of 879.0–1,263.5 MiB. The watchdog polls approximately every 0.2 seconds, allowing overshoot; sampled maxima are lower bounds on the worker peaks. These observations establish threshold crossings, not operating-system out-of-memory failures or the memory required to finish. Full-register symbolic
Table 10: All declared synthetic feasibility cases, grouped by computation and outcome. counts register qubits, including idle qubits; counts independent rotations in the non-Clifford sweep, and a dash in these columns means that parameter does not apply. Bold (or for the rotation sweep) identifies the completed case supplying the median time in seconds and peak worker memory in MiB. For stopped cases, MiB is the largest sampled RSS rather than a completed worker's peak; these cases have no completed analysis timing.
| Computation | Outcome | Seconds | MiB | ||
|---|---|---|---|---|---|
| Structural cone | 64, 256, 1024, 4096 | — | Completed | 676.0 | |
| 8192 | — | Memory stop | — | 1028.8 | |
| Clifford Pauli propagation | 64, 256, 1024, 4096, 8192 | — | Completed | 124.5 | |
| Exact local channel proof | 64, 256, 1024, 4096, 8192 | — | Completed | 126.9 | |
| Compiler filter | 64, 256, 1024, 4096, 8192 | — | Completed | 213.9 | |
| Non-Clifford propagation | 64 | 4, 8, 12, 24 | Completed | 113.0 | |
| Statevector planner | 12, 16, 20, 22 | — | Completed | 367.7 | |
| 24 | — | Memory stop | — | 879.0 | |
| Dense numerical observable | 4, 6, 8, 10 | — | Completed | 285.3 | |
| 12 | — | Memory stop | — | 1263.5 | |
| Dense symbolic channel proof | 4, 6 | — | Completed | 112.2 | |
| 8 | — | Timed out | — | 116.5 | |
| 10 | — | Timed out | — | 199.3 | |
| 12 | — | Memory stop | — | 1138.2 |
comparisons completed at six qubits after raising the default limit; eight- and ten-qubit workers exceeded the total budget, which includes setup and all three repetitions rather than timing one call alone.
The compiler filter completed at every shared width through 8,192 qubits but declined the known-equivalent SWAP/three-CX pair even though the separate local proof succeeded, illustrating the compiled-match precondition's incompleteness. For independent non-Clifford rotations, a 256-term cap kept the computation small while discarding enough coefficient mass to make the general gap-error allowance uninformative for the selected Pauli test. The calculated shadow budget likewise rises from 13,248 shots at weight one to 357,696 at weight four for 256 targets, , and per-call failure probability 0.05; these are formula evaluations, not collected measurements. Together, these checks distinguish compact representation, successful certification, useful precision, and end-to-end state access; none can be inferred from register width alone.
5.3 Choosing Rules for a Circuit
Practical use does not require every analysis rule to run on every circuit. The applicable subset depends on the oracle, gate structure, mutation support, observable representation, available state representation, and resource budget. The complexity bounds in Section 4.6 identify rules whose computations remain tractable under suitable structure: scalar threshold ceilings, structural dependency checks, sparse Clifford propagation, and exact comparisons on small changed supports. The completed cases in Table 10, including Pauli propagation and local channel proofs at 8,192 qubits, demonstrate that several implemented computations can operate well beyond the default four-qubit symbolic limit. Their usefulness on a particular circuit still depends on the stated structural assumptions and on whether they supply a decisive certificate or bound.
A planner should omit full-register dense or symbolic calculations when their exponentially sized representations exceed its time or memory budget. For a non-Clifford suffix, it should bound Pauli-term growth and retain the discarded coefficient mass in the error allowance; an allowance too large to resolve the threshold cannot justify a decision. Pilots may likewise be disabled when observable weight makes their shot requirement exceed the budget. State-dependent rules require an affordable way to obtain the needed expectations; a Clifford suffix alone does not make an arbitrary input state tractable. Compiler filtering is also optional when its cost cannot be justified by reuse across candidates or tests.
The reference implementation provides equivalence and pilot switches, width limits for local, dense, symbolic, and state calculations, and a retained-term cap; it does not automatically choose these settings from circuit characteristics. An evaluation should fix the selection policy and resource limits before inspecting mutation effects and report which analyses were omitted or stopped and why. Disabling or exhausting a check supplies no evidence of equivalence or test survival. The planner must continue with the remaining applicable rules and, if none decides the outcome, retain the candidate's population weight as unresolved under Proposition 3.1.
5.4 Empirical Validation Still Required
Empirical evaluation must distinguish how often the survival mechanisms occur from whether using them improves testing. An exact census would fix the programs, mutant populations, test suites, and classification rules before inspecting mutation effects, then report how often each mechanism explains survival in that population. Results must be reported separately for each combination of mutant population and test suite, keeping tool-generated mutants distinct from author-defined mutants and native assertions distinct from companion differential tests. Algebraically certified zeros, high-precision numerical compatibility with zero, and tolerance-based zero classifications must remain distinguishable. Such a census describes the declared population; execution savings and improved test adequacy require separate evaluations. Execution-planning and pilot-estimation benefits require comparisons under a common resource budget that includes preprocessing, measurement, and execution costs. Test augmentation must be evaluated on mutants not used to construct the added tests.
5.5 Model and Interpretation Limits
Seven boundaries govern interpretation. First, the formal results assume finite-dimensional noiseless unitary circuits and do not cover mid-circuit measurement, reset, leakage, or device noise. Second, measures a difference of means; for observables with more than two outcomes, equal means do not imply equal outcome distributions. The population threshold rule concerns reference-based differential tests, and neither a state difference outside the permitted interface nor a gap between two accepted values establishes a native assertion failure. Third, for generators not covered by an exact structured identity, first-order sensitivity does not predict the leading nonzero effect when its coefficient vanishes. Fourth, transpiler equality is sound only under the stated semantic-preservation and reproducibility assumptions, while approximate redundancy and bucket selection can omit distinguishable behavior. Fifth, the formal decomposition represents a single gate or subcircuit replacement and does not by itself analyze interacting higher-order mutants or the mapping from one source edit to several transpiled gate changes. Sixth, Euler-coordinate offsets are representation dependent, and a simultaneous parameter path need not retain a fixed effective axis; consequently, the fixed-axis zero-set and maximizing-angle formulas apply to each reduced replacement, and applying them to an entire parameter path requires a fixed-axis family. Seventh, the trace-norm-optimal observable is an information-theoretic benchmark unless its diagonalizing measurement circuit is available and its depth, routing, calibration, and noise costs are included.
Ideal-equivalence certificates do not establish hardware indistinguishability. Hardware evaluation additionally requires a noise and drift model and measured calibration, routing, and mitigation costs; the noiseless analysis supplies none of these.
6 Related Work
Prior work supplies mutation generators, test oracles, equivalence checks, and methods for computing quantum responses. Table 11 compares the closest approaches with our decisions about mutant visibility, execution, and score accounting.
6.1 Mutation Generation and Observed Survival
Classical mutation testing uses seeded program variants to assess and improve test suites, but equivalent mutants, redundant mutants, cost, and the relationship between mutants and real faults are longstanding validity concerns [18–20]. Mutation-based assessments can also produce invalid conclusions when their mutant dependencies and selection choices are not controlled [21].
Quantum mutation tools generate gate insertions, deletions, and replacements, with some also changing parameters, qubit locations, controls, initialization, or measurements [14, 22–26]. Our earlier unit-testing study uses small-angle rotational mutants and compares several test oracles [27]. Appendix E records the individual operator families, test rules, and applicability of our local-unitary analysis; the fraction of generated mutants covered remains unmeasured.
QMutBench and the empirical mutant-survivability study provide candidate validation corpora [28, 29], while Bugs4Q and studies of quantum-platform bugs provide evidence for investigating fault plausibility [30, 31].
6.2 Equivalence and Test-Relative Detection
Classical mutation research already distinguishes equivalent mutants from stubborn non-equivalent mutants that survive reasonably thorough testing [32]. Our contribution is a circuit-level explanation of some such survivors, including changes hidden by the input or measurement and cancellations at a particular strength; these mechanisms need not be mutually exclusive. Coverage-based work uses changes in execution coverage to help classify equivalent mutants [33]. That empirical indication differs from a proof of semantic equivalence or an exact zero-effect certificate for a specified quantum test. The structural backward light cone also follows the program-slicing idea of tracing the dependencies of selected outputs [34]; exact operator and state calculations refine that dependency test.
Compiler-based equivalent-mutant detection identifies some equivalent or duplicate mutants through optimized representations under explicit compiler assumptions [35]. Quantum transpiler-based equivalence, decision diagrams, and ZX-calculus supply complementary semantic checks [36–42]. ZX-calculus represents quantum operations as diagrams and uses semantics-preserving rewrite rules to simplify or compare them. Our analysis also asks why a mutant that changes program behavior can remain invisible to a particular input and measurement. Information-theoretic testability research connects such fault masking and failed propagation to information loss [43–45]. Dynamic subsumption and dominator-mutant research compare detection across a test collection, which cannot be replaced by a single scalar mutant score [46, 47].
Predictive mutation testing learns from mutant and test features to predict kill or survival without executing each new mutant, trading prediction error against execution cost [48]. The present planner addresses a related cost question through exact certificates or bounds with stated simultaneous coverage, retaining unresolved outcomes when neither decision is supported. Its accounting guarantee therefore depends on valid evidence for the declared oracle, rather than on a classifier's empirical prediction accuracy.
Mutation-based search, QuSBT, and Quito generate tests using mutation, search, or coverage objectives, while QuraTest varies input magnitude, phase, and entanglement [49–52]. These methods complement our diagnosis of whether a surviving mutant requires a different input or measurement. Statistical and projection-based assertions, property-based testing, and metamorphic testing provide other oracle contracts [53–56]. QDiff uses differential comparisons and semantics-preserving transformations to test quantum software stacks [57]. Our reference-based oracle measures the effect of a declared program mutation; a difference from the original does not by itself violate a native acceptance assertion.
6.3 Established Mathematical Methods
The analysis uses standard results in trace duality, circuit propagation, stabilizer simulation, and quantum statistical decision theory [9, 13, 58, 59]. Two-eigenvalue response identities, parameter-shift rules, and Fourier reconstruction supply established methods for differentiating or reconstructing expectations [10, 60, 61]. Three-evaluation sinusoidal reconstruction also supports response reuse within a fixed-axis family and provides a competing strategy for estimating mutation effects, as reflected in Table 11. Our specializations use these responses to identify mutation strengths with zero or maximal gap for a declared test, while Proposition 3.1 composes semantic exclusions, mutant-test evidence, and population weights into a mutation-score guarantee. Randomized benchmarking and gate-set tomography characterize implemented hardware errors [62, 63]; our visibility analysis concerns ideal circuits within the broader quantum-software-testing problem [64]. Randomized benchmarking estimates average gate errors from the decay of success probabilities as randomized gate sequences grow longer. Gate-set tomography jointly estimates models of the gates, state preparation, and measurement from experimental data, without assuming perfectly calibrated preparation or readout.
Table 11: Established methods and their testing-specific use in this framework.
| Established method | Standard result or prior capability | Testing-specific use |
|---|---|---|
| Compiler comparison: transpiler-based equivalence (TBE) [36] QUMUG [65] | Certifies some mutants as equivalent when a semantics-preserving transpiler produces identical compiled circuits under fixed settings.Searches for gate mutations that survive a supplied test suite. | Analyzes visibility to a specified test after equivalence filtering; retains unresolved cases and population weights in mutation-score bounds.Identifies exactly which strengths in a declared fixed-axis family give zero gap, including cancellation; fixes the adequacy population independently of the suite. |
| Quantum Squeeziness [66] | Characterizes information loss under state perturbations and reports an empirical association with mutation scores. | Computes the signed expectation change for a specified mutant and test, distinguishes causes of zero gap, and applies the detection threshold with explicit evidence requirements. |
| Rotosolve / NFT [11, 12] | Reconstructs and optimizes a sinusoidal expectation using three evaluations. | Uses the same response to find every strength that preserves the original expectation and the largest absolute change; keeps the adequacy population fixed. |
| Trace distance and Helstrom discrimination [9] Stabilizer simulation [15] | Bound changes under measurement and characterize optimal state discrimination.Computes Pauli propagation and stabilizer-state expectations efficiently. | Give angle-only expectation and TV skip rules, and an unrestricted measurement benchmark for a fixed input.Classifies the three possible gap curves under the stated Pauli and Clifford assumptions. |
| Simultaneous coverage and weighted counting | A union bound controls failures; valid indicators bound a weighted total. | Compose oracle-specific certificates into a mutation-score interval without dropping survivors or unresolved weight. |
7 Conclusion
The engineering problem addressed here is how to act on a surviving quantum mutant without confusing program equivalence, test-relative invisibility, and insufficient evidence. The three objectives stated in the introduction connect this problem to concrete testing decisions.
We addressed the first objective, diagnosing surviving mutants, by combining semantic checks, circuit-dependency analysis, and exact local-effect formulas for supported unitary replacements. These checks distinguish semantic equivalence, input-dependent invisibility, measurement-dependent invisibility, and finite-strength cancellation, while keeping insufficient evidence separate from a certified zero effect. For the supported fixed-axis rotations, the response classification identifies every zero-gap strength; under the stated stabilizer assumptions, the response curves can be classified in polynomial time. The practical consequence is an explanation of survival that separates a proved zero gap from a nonzero effect below the detection threshold or a gap that remains unresolved.
We addressed the second objective, planning executions with sound reporting, by specifying which decisions certificates, bounds, and estimates justify. Under its stated assumptions, the planning guarantee preserves resolved classifications and bounds the mutation score when analysis or execution is incomplete, retaining the population weights of survivors and unresolved mutants. Skipping an execution therefore does not remove a non-equivalent mutant from adequacy accounting. The resource comparison includes preprocessing, pilot measurements, and execution, together with simpler estimation alternatives, so an exact formula or reusable pilot does not by itself establish a saving.
We addressed the third objective, guiding test-oracle improvement, by using the state difference to determine whether any observable can expose a mutant on the fixed input. The unrestricted optimal observable supplies a mathematical benchmark, while restricted measurement screens and explicit measurement circuits connect that benchmark to permitted tests and their implementation costs. In the running sign-error example, an allowed basis change exposes a state difference that the original output-bit assertion cannot observe. Under state-transforming semantics, the mutant remains a survivor in the original suite's adequacy denominator; under a fixed computational-basis interface on that input, the programs are observationally equivalent and the added measurement changes the contract being assessed. Test improvement must therefore respect the declared interface, meet the chosen detection rule, and be evaluated independently of the mutants used to construct it.
Together, these results provide a basis for deciding what to execute, what to change in a test, and what remains unknown. The contribution is the testing-specific analysis and composed guarantees built from established mathematical tools, supported by proofs, worked examples, and a reference implementation under ideal unitary semantics. How often the mechanisms explain survival, whether planning reduces total cost, and whether augmentation improves adequacy on independent mutants remain questions for empirical validation.
Acknowledgments
This work was supported by the Natural Sciences and Engineering Research Council of Canada (NSERC) under grants RGPIN-2022-03886 and ALLRP 613846-25. It was also funded by the FCT - Fundação para a Ciência e a Tecnologia, I.P., under the projects ref. 2025.00002.QUANTUMVLAB.DEUCALION and 2025.08074.CPCA.A1, and under the LASIGE Research Unit, ref. UID/00408/2025, DOI 10.54499/UID/00408/2025.
References
[1] A. Miranskyy and L. Zhang, “On testing quantum programs,” in Proceedings of the 41st International Conference on Software Engineering: New Ideas and Emerging Results, IEEE Press, 2019, pp. 57–60. DOI: 10.1109/ICSE-NIER.2019.00023
[2] A. Miranskyy, L. Zhang, and J. Doliskani, “Is your quantum program bug-free?” In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering: New Ideas and Emerging Results, ACM, 2020, pp. 29–32. DOI: 10.1145/3377816.3381731
[3] A. Miranskyy, L. Zhang, and J. Doliskani, On testing and debugging quantum software, 2021. arXiv: 2103.09172.
[4] J. M. Murillo et al., “Quantum software engineering: Roadmap and challenges ahead,” ACM Transactions on Software Engineering and Methodology, vol. 34, no. 5, pp. 1–48, 2025, Art. no. 154. DOI: 10.1145/3712002
[5] R. Abreu et al., “Software testing in the quantum world,” Computer, vol. 59, no. 4, pp. 135–138, 2026. DOI: 10.1109/MC.2026.3655854
[6] D. Aharonov, A. Kitaev, and N. Nisan, “Quantum circuits with mixed states,” in Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, ser. STOC '98, New York, NY, USA: ACM, 1998, pp. 20–30. DOI: 10.1145/276698.276708 arXiv: quant-ph/9806029.
[7] “Quantum mutant planner.” Reference implementation and supplementary material, GitHub. [Online]. Available: https://github.com/miranska/quantum-mutant-planner
[8] C. W. Helstrom, “Quantum detection theory,” National Aeronautics and Space Administration, NASA Contractor Report NASA-CR-121784, 1971. [Online]. Available: https://ntrs.nasa.gov/citations/19710027625
[9] J. Watrous, The Theory of Quantum Information. Cambridge University Press, 2018, ISBN: 9781107180567. DOI: 10.1017/9781316848142
[10] M. Schuld, V. Bergholm, C. Gogolin, J. Izaac, and N. Killoran, “Evaluating analytic gradients on quantum hardware,” Physical Review A, vol. 99, no. 3, p. 032331, 2019. DOI: 10.1103/PhysRevA.99.032331
[11] M. Ostaszewski, E. Grant, and M. Benedetti, “Structure optimization for parameterized quantum circuits,” Quantum, vol. 5, p. 391, 2021. DOI: 10.22331/q-2021-01-28-391 arXiv:1905.09692.
[12] K. M. Nakanishi, K. Fujii, and S. Todo, “Sequential minimal optimization for quantum-classical hybrid algorithms,” Physical Review Research, vol. 2, p. 043158, 2020. DOI: 10.1103/PhysRevResearch.2.043158 arXiv: 1903.12166.
[13] D. Gottesman, “The heisenberg representation of quantum computers,” in Group22: Proceedings of the XXII International Colloquium on Group Theoretical Methods in Physics, S. P. Corney, R. Delbourgo, and P. D. Jarvis, Eds., Cambridge, MA: International Press, 1999, pp. 32–43. arXiv: quant-ph/9807006.
[14] M. Polo-Usaola, M. A. Serrano, and I. García-Rodríguez de Guzmán, “Mutation-based quantum software testing,” in Proceedings of the 1st International Conference on Quantum Software, ser. IQSOFT, SciTePress, 2025, pp. 138–145, ISBN: 978-989-758-761-0. DOI: 10.5220/0013561000004525
[15] S. Aaronson and D. Gottesman, “Improved simulation of stabilizer circuits,” Physical Review A, vol. 70, no. 5, 2004, Art. no. 052328. DOI: 10.1103/PhysRevA.70.052328
[16] OpenAI. "Codex," Accessed: Oct. 26, 2026. [Online]. Available: https://openai.com/codex/
[17] Anthropic. "Claude Code," Accessed: Oct. 26, 2026. [Online]. Available: https://claude.com/product/claude-code
[18] Y. Jia and M. Harman, “An analysis and survey of the development of mutation testing,” IEEE Transactions on Software Engineering, vol. 37, no. 5, pp. 649–678, 2011. DOI: 10.1109/TSE.2010.62
[19] M. Papadakis, M. Kintis, J. Zhang, Y. Jia, Y. Le Traon, and M. Harman, “Mutation testing advances: An analysis and survey,” in Advances in Computers, vol. 112, Elsevier, 2019, pp. 275–378. DOI: 10.1016/bs.adcom.2018.03.015
[20] R. Just, D. Jalali, L. Inozemtseva, M. D. Ernst, R. Holmes, and G. Fraser, “Are mutants a valid substitute for real faults in software testing?” In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, 2014, pp. 654–665. DOI: 10.1145/2635868.2635929
[21] M. Papadakis, C. Henard, M. Harman, Y. Jia, and Y. Le Traon, “Threats to the validity of mutation-based test assessment,” in Proceedings of the 25th International Symposium on Software Testing and Analysis, 2016, pp. 354–365. DOI: 10.1145/2931037.2931040
[22] D. Fortunato, J. Campos, and R. Abreu, “Qmutpy: A mutation testing tool for quantum algorithms and applications in qiskit,” in Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis, 2022, pp. 797–800. DOI: 10.1145/3533767.3543296
[23] D. Fortunato, J. Campos, and R. Abreu, “Mutation testing of quantum programs: A case study with qiskit,” IEEE Transactions on Quantum Engineering, vol. 3, pp. 1–17, 2022, Art. no. 2500517. DOI: 10.1109/TQE.2022.3195061
[24] E. Mendiluze Usandizaga, S. Ali, P. Arcaini, and T. Yue, “Muskit: A mutation analysis tool for quantum software testing,” in Proceedings of the 36th IEEE/ACM International Conference on Automated Software Engineering, 2021, pp. 1266–1270. DOI: 10.1109/ASE51524.2021.9678563
[25] S. García Gil, L. Llana Díaz, and J. I. Requeno Jarabo, QCRMut: Quantum circuit random mutant generator tool, 2024. arXiv: 2410.01415.
[26] M. Shao, S. Xia, and J. Zhao, QuanForge: A mutation testing framework for quantum neural networks, 2026. arXiv: 2604.20706.
[27] A. Miranskyy, J. Campos, A. Mjeda, L. Zhang, and I. G. R. de Guzmán, On the feasibility of quantum unit testing, 2025. arXiv: 2507.17235.
[28] E. Mendiluze Usandizaga, T. Laurent, P. Arcaini, and S. Ali, Qmutbench: A dataset of quantum circuit mutants, 2026. arXiv: 2604.15870. [Online]. Available: https://arxiv.org/abs/2604.15870
[29] E. Mendiluze Usandizaga, S. Ali, T. Yue, and P. Arcaini, “Quantum circuit mutants: Empirical analysis and recommendations,” Empirical Software Engineering, vol. 30, 2025, Art. no. 100. DOI: 10.1007/s10664-025-10643-z
[30] P. Zhao, Z. Miao, S. Lan, and J. Zhao, “Bugs4Q: A benchmark of existing bugs to enable controlled testing and debugging studies for quantum programs,” Journal of Systems and Software, vol. 205, 2023, Art. no. 111805. DOI: 10.1016/j.jss.2023.111805
[31] M. Paltenghi and M. Pradel, “Bugs in quantum computing platforms: An empirical study,” Proceedings of the ACM on Programming Languages, vol. 6, no. OOPSLA1, 2022, Art. no. 86. DOI: 10.1145/3527330
[32] X. Yao, M. Harman, and Y. Jia, “A study of equivalent and stubborn mutation operators using human analysis of equivalence,” in Proceedings of the 36th International Conference on Software Engineering, 2014, pp. 919–930. DOI: 10.1145/2568225.2568265
[33] D. Schuler and A. Zeller, “Covering and uncovering equivalent mutants,” Software Testing, Verification and Reliability, vol. 23, pp. 353–374, 2013. DOI: 10.1002/stvr.1473
[34] M. Weiser, “Program slicing,” IEEE Transactions on Software Engineering, vol. SE-10, no. 4, pp. 352–357, 1984. DOI: 10.1109/TSE.1984.5010248
[35] M. Papadakis, Y. Jia, M. Harman, and Y. Le Traon, “Trivial compiler equivalence: A large scale empirical study of a simple, fast and effective equivalent mutant detection technique,” in Proceedings of the 37th IEEE/ACM International Conference on Software Engineering, 2015, pp. 936–946. DOI: 10.1109/ICSE.2015.103
[36] J. Campos and A. Miranskyy, “Quantum mutant equivalence via transpilation,” in Quantum Week 2026: 6th International Workshop on Quantum Software Engineering & Technology, collocated with IEEE International Conference on Quantum Computing and Engineering (QCE26), Accepted, 2026. [Online]. Available: https://arxiv.org/abs/2606.26604
[37] G. F. Viamontes, I. L. Markov, and J. P. Hayes, “Improving gate-level simulation of quantum circuits,” Quantum Information Processing, vol. 2, no. 5, pp. 347–380, 2003. DOI: 10.1023/B:QINP.0000022725.70000.4a
[38] D. M. Miller and M. A. Thornton, “QMDD: A decision diagram structure for reversible and quantum circuits,” in Proceedings of the 36th International Symposium on Multiple-Valued Logic, IEEE, 2006, p. 30. DOI: 10.1109/ISMVL.2006.35
[39] B. Coecke and R. Duncan, “Interacting quantum observables,” in Automata, Languages and Programming: 35th International Colloquium, ICALP 2008, Proceedings, Part II, ser. Lecture Notes in Computer Science, vol. 5126, Springer, 2008, pp. 298–310. DOI: 10.1007/978-3-540-70583-3_25
[40] B. Coecke and R. Duncan, “Interacting quantum observables: Categorical algebra and diagrammatics,” New Journal of Physics, vol. 13, no. 4, p. 043016, 2011. DOI: 10.1088/1367-2630/13/4/043016
[41] L. Burgholzer and R. Wille, “Advanced equivalence checking for quantum circuits,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 40, no. 9, pp. 1810–1824, 2021. DOI: 10.1109/TCAD.2020.3032630
[42] T. Peham, L. Burgholzer, and R. Wille, “Equivalence checking of quantum circuits with the ZX-calculus,” IEEE Journal on Emerging and Selected Topics in Circuits and Systems, vol. 12, no. 3, pp. 662–675, 2022. DOI: 10.1109/JETCAS.2022.3202204
[43] D. Clark and R. M. Hierons, “Squeeziness: An information theoretic measure for avoiding fault masking,” Information Processing Letters, vol. 112, no. 8–9, pp. 335–340, 2012. DOI: 10.1016/j.ipl.2012.01.004
[44] K. Androutsopoulos, D. Clark, H. Dan, R. M. Hierons, and M. Harman, “An analysis of the relationship between conditional entropy and failed error propagation in software testing,” in Proceedings of the 36th International Conference on Software Engineering, 2014, pp. 573–583. DOI: 10.1145/2568225.2568314
[45] K. Patel, R. M. Hierons, and D. Clark, “An information theoretic notion of software testability,” Information and Software Technology, vol. 143, p. 106759, 2022. DOI: 10.1016/j.infsof.2021.106759
[46] P. Ammann, M. E. Delamaro, and J. Offutt, “Establishing theoretical minimal sets of mutants,” in 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation, 2014, pp. 21–30. DOI: 10.1109/ICST.2014.13
[47] B. Kurtz, P. Ammann, J. Offutt, M. E. Delamaro, M. Kurtz, and N. Gökçe, “Analyzing the validity of selective mutation with dominator mutants,” in Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, 2016, pp. 571–582. DOI: 10.1145/2950290.2950322
[48] J. Zhang et al., “Predictive mutation testing,” in Proceedings of the 25th International Symposium on Software Testing and Analysis, 2016, pp. 342–353. DOI: 10.1145/2931037.2931038
[49] X. Wang, T. Yu, P. Arcaini, T. Yue, and S. Ali, “Mutation-based test generation for quantum programs with multi-objective search,” in Proceedings of the Genetic and Evolutionary Computation Conference, 2022, pp. 1345–1353. DOI: 10.1145/3512290.3528869
[50] X. Wang, P. Arcaini, T. Yue, and S. Ali, “QuSBT: Search-based testing of quantum programs,” in Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings, ACM, 2022, pp. 173–177. DOI: 10.1145/3510454.3516839
[51] X. Wang, P. Arcaini, T. Yue, and S. Ali, “Quito: A coverage-guided test generator for quantum programs,” in 36th IEEE/ACM International Conference on Automated Software Engineering, 2021. DOI: 10.1109/ASE51524.2021.9678798
[52] J. Ye et al., “QuraTest: Integrating quantum specific features in quantum program testing,” in 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE), 2023. DOI: 10.1109/ASE56229.2023.00196
[53] Y. Huang and M. Martonosi, “Statistical assertions for validating patterns and finding bugs in quantum programs,” in Proceedings of the 46th International Symposium on Computer Architecture, 2019. DOI: 10.1145/3307650.3322213
[54] G. Li, L. Zhou, N. Yu, Y. Ding, M. Ying, and Y. Xie, “Projection-based runtime assertions for testing and debugging quantum programs,” Proceedings of the ACM on Programming Languages, vol. 4, no. OOPSLA, pp. 1–29, 2020, Art. no. 150. DOI: 10.1145/3428218
[55] S. Honarvar, M. R. Mousavi, and R. Nagarajan, “Property-based testing of quantum programs in Q#,” in Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops, 2020, pp. 430–435. DOI: 10.1145/3387940.3391459
[56] M. Paltenghi and M. Pradel, “MorphQ: Metamorphic testing of the Qiskit quantum computing platform,” in Proceedings of the 45th IEEE/ACM International Conference on Software Engineering, 2023. DOI: 10.1109/ICSE48619.2023.00202
[57] J. Wang, Q. Zhang, G. H. Xu, and M. Kim, “QDiff: Differential testing of quantum software stacks,” in 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE), 2021. DOI: 10.1109/ASE51524.2021.9678792
[58] C. W. Helstrom, Quantum Detection and Estimation Theory (Mathematics in Science and Engineering). Academic Press, 1976, vol. 123, ISBN: 9780123400505.
[59] A. S. Holevo, “Statistical decision theory for quantum systems,” Journal of Multivariate Analysis, vol. 3, no. 4, pp. 337–394, 1973. DOI: 10.1016/0047-259X(73)90028-6
[60] K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, “Quantum circuit learning,” Physical Review A, vol. 98, p. 032309, 2018. DOI: 10.1103/PhysRevA.98.032309
[61] D. Wierichs, J. Izaac, C. Wang, and C. Y.-Y. Lin, “General parameter-shift rules for quantum gradients,” Quantum, vol. 6, p. 677, 2022. DOI: 10.22331/q-2022-03-30-677
[62] E. Magesan, J. M. Gambetta, and J. Emerson, “Scalable and robust randomized benchmarking of quantum processes,” Physical Review Letters, vol. 106, no. 18, p. 180504, 2011. DOI: 10.1103/PhysRevLett.106.180504
[63] E. Nielsen, J. K. Gamble, K. Rudinger, T. Scholten, K. Young, and R. Blume-Kohout, “Gate set tomography,” Quantum, vol. 5, p. 557, 2021. DOI: 10.22331/q-2021-10-05-557
[64] S. Ali, T. Yue, and R. Abreu, “When software engineering meets quantum computing,” Communications of the ACM, vol. 65, no. 4, pp. 84–88, 2022. DOI: 10.1145/3512340
[65] E. Mendiluze Usandizaga, T. Laurent, P. Arcaini, and S. Ali, Search-based generation of undetected quantum circuit mutants, 2026. arXiv: 2608.09318.
[66] A. Bensoussan, H. Menendez, and M. R. Mousavi, “Quantum squeezing: Information-theoretic foundations of quantum software testability,” in Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering, In press; author accepted manuscript, 2026. [Online]. Available: https://kclpure.kcl.ac.uk/ws/portalfiles/portal/380867421/mousavi-ase-2026.pdf
[67] W. Hoeffding, “Probability inequalities for sums of bounded random variables,” Journal of the American Statistical Association, vol. 58, no. 301, pp. 13–30, 1963. DOI: 10.1080/01621459.1963.10500830
[68] A. Miranskyy, The cost of certainty: Shot budgets in quantum program testing, 2025. arXiv:2510.22418.
[69] A. Uhlmann, “The ‘transition probability’ in the state space of a *-algebra,” Reports on Mathematical Physics, vol. 9, no. 2, pp. 273–279, 1976. DOI: 10.1016/0034-4877(76)90060-4
[70] C. A. Fuchs and J. van de Graaf, “Cryptographic distinguishability measures for quantum-mechanical states,” IEEE Transactions on Information Theory, vol. 45, no. 4, pp. 1216–1227, 1999. DOI: 10.1109/18.761271
[71] A. Acín, “Statistical distinguishability between unitary operations,” Physical Review Letters, vol. 87, no. 17, p. 177901, 2001. DOI: 10.1103/PhysRevLett.87.177901
[72] M. Ragone et al., “A lie algebraic theory of barren plateaus for deep parameterized quantum circuits,” Nature Communications, vol. 15, no. 1, p. 7172, 2024. DOI: 10.1038/s41467-024-49909-3
[73] S. Bravyi, N. Parham, and M. Tran, “Identity check problem for shallow quantum circuits,” in 17th Innovations in Theoretical Computer Science Conference (ITCS 2026), S. Saraf, Ed., ser. Leibniz International Proceedings in Informatics (LIPIcs), vol. 362, Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2026, 27:1–27:17, ISBN: 978-3-95977-410-9. DOI: 10.4230/LIPIcs.ITCS.2026.27
[74] P. Hayden, D. W. Leung, and A. Winter, “Aspects of generic entanglement,” Communications in Mathematical Physics, vol. 265, no. 1, pp. 95–117, 2006. DOI: 10.1007/s00220-006-1535-6
[75] P. Rall, D. Liang, J. Cook, and W. Kretschmer, “Simulation of qubit quantum circuits via pauli propagation,” Physical Review A, vol. 99, no. 6, p. 062337, 2019. DOI: 10.1103/PhysRevA.99.062337
[76] T. Begušić, J. Gray, and G. K.-L. Chan, “Fast and converged classical simulations of evidence for the utility of quantum computing before fault tolerance,” Science Advances, vol. 10, no. 3, eadk4321, 2024. DOI: 10.1126/sciadv.adk4321
[77] T. Begušić, K. Hejazi, and G. K.-L. Chan, “Simulating quantum circuit expectation values by clifford perturbation theory,” The Journal of Chemical Physics, vol. 162, no. 15, p. 154110, 2025. DOI: 10.1063/5.0269149
[78] H.-Y. Huang, R. Kueng, and J. Preskill, “Predicting many properties of a quantum system from very few measurements,” Nature Physics, vol. 16, pp. 1050–1057, 2020, Theorem, lemma, and equation numbering follows arXiv:2002.08953v2. DOI: 10.1038/s41567-020-0932-7 arXiv: 2002.08953v2 [quant-ph].
[79] D. Janzing, P. Wocjan, and T. Beth, ““Non-Identity-Check” Is QMA-Complete,” International Journal of Quantum Information, vol. 3, no. 3, pp. 463–473, 2005. DOI: 10.1142/S0219749905001067
A Detailed Statistical and Local Framework
This appendix uses the circuit, oracle, and local mutation notation of Section 2. It supplies the statistical bounds, local derivations, and implementation algorithms supporting the main text.
A.1 Planning Soundness: Assumptions and Proof
Proposition 3.1 composes valid evidence into population-level classifications and score bounds under the following conditions.
(i) Semantic exclusions are sound for the declared state-transforming semantics on , use a prespecified policy, and leave the target population consisting of non-equivalent mutants. Any transpiler certificate therefore requires semantic preservation and equality of the complete compiled representation under the pinned settings.
(ii) Every certificate proving an exactly zero gap is valid, and every deterministic gap interval contains the true gap, including propagation, perturbative-remainder, and numerical errors. Ordinary floating-point evaluation of an ideal formula alone does not meet this condition at an uncertified threshold comparison.
(iii) Pilot target sets and error allocations are prespecified with total failure probability at most across all sites, tests, and candidates. Reused samples cover the union of their declared targets simultaneously. Observed-test intervals have total failure probability at most , using fixed allocations and sample sizes or a separately valid sequential procedure. Data-dependent execution choices preserve these guarantees, for example by using fresh observed samples with conditional coverage given the planning data.
(iv) Representative classes, if used, have certified identical population detection indicators for every test in T, and retain their original positive integer multiplicities . Singleton classes are always permitted. For example, semantics-preserving pinned transpilation can certify equality between two mutants, which implies equal detection indicators across the suite. The reference implementation does not construct such mutant–mutant classes; approximate buckets do not establish this condition.
Apply the threshold rule only to evidence meeting these conditions. An exact gap supplies equal lower and upper bounds; an exact zero is a below-threshold certificate because the threshold is positive. For statistical intervals, the certified classification carries the stated simultaneous confidence guarantee.
Proof of Proposition 3.1. Take the intersection of every declared pilot-coverage and observed-test-coverage event. The union bound gives probability at least without requiring independence between intervals. Conditional coverage for fresh observed samples implies the required unconditional bound even when the planner chooses which declared comparisons to execute. On this event all statistical and deterministic intervals contain their true gaps, so an upper endpoint below implies , while a lower endpoint at least implies detection. The same implications hold for exact gaps and certified zeros. Thus one detected pair establishes a detected mutant, whereas survival requires a below-threshold conclusion for every test. A budget certificate concerns independent-copy discrimination and supplies neither implication. Sound semantic exclusions remove only mutants outside the declared non-equivalent population, and certified class indicators permit expansion back to every original member using . The detected classes therefore contribute exactly
detections, survivor classes contribute zero, and unresolved classes contribute between zero and . Dividing by W proves Equation (33).
The guarantee requires neither execution completeness nor optimal scheduling, and specifies no particular observed kill count. Equality of detection indicators is sufficient for the population score; transferring full outcome distributions or sample-level behavior requires the stronger corresponding equivalence. If semantic equivalence remains unresolved, one may report bounds for the retained candidate population, but cannot silently identify its denominator with the fully non-equivalent population in Equation (7). An empty eligible population has no defined mutation score under that equation.
A.2 Hoeffding-Based Estimation Efficiency
In the noiseless expectation-estimation protocol considered here, the statistical uncertainty comes from finite sampling. Write for the spectral range of . If , then is proportional to the identity on the modeled register, for every unitary mutant, and the observable should be discarded as non-informative. Suppose that the original and mutant means are estimated from shots of each circuit, with all observations independent within this comparison. Write and . The signed estimator is a sum of independent scaled observations, each of range , so the sum of squared ranges is . Applying Hoeffding's bounded-variable inequality directly to this sum and combining its two tails gives [67, Theorem 2 and Eq. (2.6)]
For a fixed-separation decision problem in which the alternative satisfies , taking shows that
shots per circuit suffice to separate equality from that alternative with error probability at most by thresholding at . This distribution-independent upper bound gives a sufficient shot count; establishing a lower bound for particular distributions requires a separate argument. Variance-aware estimators or direct hypothesis tests can require fewer samples, especially when one outcome distribution is nearly deterministic.
A.2.1 Classification at a Practical Threshold
For independent shots of each circuit and prespecified failure probability , put and
Equation (39) and the reverse triangle inequality give . Declare below threshold if the upper endpoint is strictly below , detected if the lower endpoint reaches , and unresolved otherwise. This is a fixed-shot decision; repeatedly checking the same fixed-time interval requires a separate sequential-validity argument or prespecified error spending. Away from the boundary, sufficient classification cost scales with ; the scaling concerns resolution relative to zero. There is no finite fixed-shot procedure with uniformly nontrivial error control that resolves every gap arbitrarily close to both sides of . Consequently, detecting a prespecified difference from zero, classifying a practical threshold, and ranking by remain different tasks. For multiple decisions, choose allocations with ; the union bound does not require independence between the resulting decisions. Original-circuit samples may consequently be reused across mutants, provided that the samples within each original-mutant comparison remain independent and the target comparisons and allocations are prespecified. The reference function classify_fixed_shot implements this rule from equal-length outcome samples and known outcome bounds; its observed classifications are separate from planner statuses.
Let be the cost of one paired comparison, meaning one independent sample from the original circuit and one from mutant m, including state preparation, circuit execution, and measurement overhead. One concrete additive baseline is
The examples below set these components equal across mutants, whereas an empirical cost-efficiency claim must measure or otherwise prespecify their variation. For equal shot counts and a fixed confidence level, define the optional estimation-efficiency score
This score ranks signal relative to a sufficient mean-estimation cost; it does not decide a practical detection threshold or measure suite adequacy. The range normalization is invariant under observable rescaling; unequal shot allocation or reused reference estimates require corresponding cost accounting.
The quadratic dependence of on the gap follows from applying a uniform additive-error estimation bound for bounded observables. Identifying the detectable signal size with
gives the sufficient worst-case shot bound
where denotes the number of paired comparisons used to resolve a prespecified nonzero separation by this variance-blind protocol. The substitution changes the decision problem from a common prespecified alternative to a mutant-specific retrospective resolution calculation. Therefore, comparing across mutants compares their signal-to-cost values under one protocol; comparing the power of identical tests against one fixed alternative requires retaining a common threshold . When the scientific question is whether every mutant clears the same practical detection boundary, the analysis should retain that common boundary and report power or confidence relative to it.
The per-decision error level also does not automatically extend to a collection of tests and mutants. For tests and M mutants, the union bound controls family-wise error at if each of the decisions is controlled at , regardless of dependence. Reusing original-circuit shots induces correlation among comparisons, so less conservative simultaneous inference must model that shared randomness explicitly.
Thus, is a standardized worst-case ranking score for expectation estimation; optimal hypothesis-testing costs depend on the outcome regime.
This observable-gap scaling should be distinguished from fidelity-based state-comparison tests, such as the inverse
A.3 Exact Local Replacement Form
Before specializing to small perturbations, an arbitrary unitary gate or subcircuit replacement can be expressed exactly at the mutation site.
Proof of Theorem 2.2. The argument specializes unitary composition and trace cyclicity to the mutation site. Embedding both operations into the union of their supports gives and . With the post-gate state and propagated observable defined in the main text,
Their difference proves Equation (9) with the declared left-multiplication convention. For the Hermitian operator , Schatten norm duality bounds by for every density operator [9, Eqs. (1.173)–(1.174)]. A pure eigenstate for an eigenvalue of largest absolute value attains this bound. Thus every state gives zero gap exactly when , equivalently . For one fixed , the trace can instead vanish by cancellation even when .
A.4 State-Side Dual and Trace-Distance Interpretation
To prove Proposition 2.3, cyclicity of the trace rewrites the exact local gap as . The trace-norm variational characterization [9, Eqs. (1.173)–(1.174)], specialized to the Hermitian operator , gives Equation (12); the Hermitian contraction is an attaining choice. Because is a norm-preserving bijection on Hermitian observables, the site optimizer corresponds to the final observable . The equality is equivalent to and hence to .
For the Pauli-rotation specialization, decomposing into its commuting and anticommuting parts gives Equation (23). The operator is Hermitian, anticommutes with , and has the same square. Consequently,
Thus, , and taking the trace proves Equation (24).
or swap test. For pure-state comparisons, the inverse test reverses the reference preparation on the tested output and checks for return to the initial state; the swap test uses an auxiliary control qubit and controlled exchanges of two registers to estimate their state overlap. Here denotes squared fidelity, a similarity measure ranging from zero for states with orthogonal supports to one for identical states; for pure states it is the squared magnitude of their inner product. When the comparison has a nonzero failure probability, the shots needed to observe that failure with constant confidence scale as near [27, 68]. The two views complement one another by quantifying distinct aspects of state and observable differences. For a small coherent perturbation with strength , the leading nonzero infidelity is typically quadratic: for pure states under unitary perturbations, unless the variance term vanishes. Indeed, expanding gives the quadratic coefficient in , and removes odd powers. When the chosen observable is first-order visible, , the gap is , and the uniform additive-mean bound is . For a general generator, when the first-order coefficient vanishes and no exact structured identity is available, one can conclude from the perturbative coefficient only that ; if the quadratic coefficient is nonzero, the same uniform bound becomes . For nontrivial involutory-axis rotations, Corollary 2.8 sharpens this comparison: an optimized bounded-observable test matches the independent-copy lower bound only in its small-angle exponent; the constants and decision objectives remain separate. Outside that structured class, no unconditional asymptotic ordering follows from these bounds alone, because direct or variance-aware detection can be faster and because either the fidelity or observable coefficient may vanish. The light-cone and commutator analysis below characterizes when first-order visibility holds.
Let and . Unitary invariance under the suffix gives
For any nonconstant Hermitian observable, set , so the centered and rescaled observable is feasible in Equation (12). Because , applying that variational characterization proves Equation (13). For nonzero , the tracelessness of the state difference ensures that has spectral range two and attains equality. If , any nonconstant Hermitian observable attains equality with both sides zero, without using the constant sign observable in a range-normalized ratio. The corresponding equal-prior single-shot discrimination success probability is by the Holevo–Helstrom theorem [8, Sec. 2.1, especially Eqs. (2.5)–(2.9), 9, Theorem 3.4 and Eq. (3.11)]. If is held fixed across observables, the same optimum gives
For the involutory-axis rotation in Corollary 2.7, the anticommuting state component satisfies
because and are density operators and the trace distance between two states is at most one. Combining this inequality with Equations (13), (24) and (43) proves Equation (25). The bound is tight whenever both eigenspaces of are nonzero: choose eigenvectors and with eigenvalues and , respectively, and set . Then and are orthogonal, so for , and the Helstrom observable attains the normalized-gap ceiling. Because the prefix through is unitary, this mutation-site state is attainable by a circuit input. Together with Equation (44), it also proves the tight optional score ceiling when the comparison cost is test independent.
Extending the one-copy trace-distance ceiling to the independent-copy lower bound requires an additional fidelity argument. Use the squared fidelity
A purification represents a possibly mixed state as part of a larger pure state: ignoring the added reference system recovers the original density operator. For any purification of , the state purifies . Uhlmann's purification characterization of fidelity therefore gives [69, Eqs. (4) and (23)]
The suffix is unitary, so the same lower bound holds for the two output states associated with any one circuit input. This argument also holds for a joint mutation-site state and an untouched reference : replace by and use in the same purification bound. The one-copy trace-distance ceiling likewise applies on , since is an involution. References may thus be entangled with their own circuit input, while the joint input-reference states must remain products across executions. For predetermined inputs indexed by , let and be the corresponding original and mutant output states. Each pair obeys independently of the chosen input. Fidelity is multiplicative over the resulting product states [70, Eq. (31)]. With the squared-fidelity convention above, the Fuchs–van de Graaf inequality gives [70, Theorem 1, Eq. (44)]
If an equal-prior discrimination procedure has success probability at least for fixed , Helstrom's formula requires the left-hand side of Equation (45) to be at least . Consequently, for ,
Equivalently, a budget of independent copies can attain advantage only if , which is a test-independent necessary affordability condition. Setting gives and proves Equation (47); for fixed , its leading behavior is . The tight input and Helstrom observable above give a bounded two-outcome expectation test with gap proportional to , so its Hoeffding upper bound matches this lower bound in its small-angle dependence. Here “predetermined” means that the input to each execution is fixed independently of outcomes from earlier executions, which is exactly what makes the two hypotheses fixed product states; adaptive input selection is outside this argument. With inputs entangled across parallel uses, the product-input argument no longer applies. For an involutory axis with both eigenspaces nonzero and canonical angle , an entangled multi-use construction achieves perfect discrimination with channel uses, yielding scaling compared with the independent-execution scaling [71, pp. 177901-3–177901-4, Eqs. (16), (20), and (23)–(24), including the arbitrary-dimension discussion].
A.4.1 Optional Unknown-Source Discrimination Policy
Ordinary mutation testing executes known program versions and evaluates an assertion. A different problem is to identify an unknown original or mutant source, given predetermined independent output copies and equal prior probabilities. Under the assumptions of Equation (46), error at most requires , where
For and , this gives approximately 0.0258 radians. This necessary condition neither decides whether a differential gap exceeds nor rules out classical analysis. The reference implementation disables this policy by default; enable_discrimination_budget=True inserts it after the rotation threshold ceiling and records a separate skip-below budget floor disposition. Its error target is separate from the pilot and observed-test failure allocations, and any skipped pair remains unresolved for population accounting unless other evidence settles it.
A.5 Exact Structured Rotation and Clifford Forms
The exact local replacement form becomes especially explicit when the relative mutation acts structurally on a Pauli expansion. First consider
where and . Define
These components satisfy and , where denotes the anticommutator. Using the elementary involutory exponential identity,
and multiplying the commuting and anticommuting components separately gives
Subtracting this conjugated observable from and substituting into Equation (9) proves Theorem 2.4.
For , anticommutation gives
Left multiplication by the unitary A preserves the operator norm, so
For a unit-norm Pauli observable propagated to a single Pauli string, this value is 1 when the string anticommutes with A and 0 otherwise, so it supplies no ranking resolution beyond the commutation test in that regime. More generally, unitary invariance gives at every site, so backward propagation supplies no site-dependent norm scale. The commutator proxy can vary only through the orientation and anticommuting content of relative to the local generator, with the norm of O preserved by the suffix. The corresponding first-order state sensitivity is
The general definition writes instead; anticommutation changes its sign, which disappears under the modulus. It is the coefficient obtained by expanding the exact sine term; the full finite-angle expression remains available.
For the Pauli expansion , retain only the Hermitian Pauli strings that anticommute with the Hermitian Pauli axis . For every such string, is an anti-Hermitian Pauli operator, meaning its conjugate transpose is its negative, so define the Hermitian Pauli string and sign by
Equivalently,
The exact finite-angle gap is then
This expression uses the same propagated Pauli strings as the first-order coefficient but preserves the exact trigonometric dependence and the additional state expectation that becomes relevant when the sine contribution cancels.
To prove Corollary 2.5, set
Both coefficients are real because and are Hermitian. Then Equation (15) gives
For , choose . The identities and give
The sine ranges over , so the maximum absolute value is and is attained by aligning the sine term with the sign of . When , one maximizing choice is modulo . When and , either sign of the quarter-period choice is maximizing. For a restricted admissible set of strengths, the maximum follows by evaluating Equation (17) on that set. The expression vanishes for every only if its sine and cosine coefficients vanish, which is equivalent to . For the finite-strength zero set, factor the signed shift as
The first factor gives . When , the second factor gives , which proves Equation (19) without a division-by-zero convention. This second residue coincides with zero exactly when . In the signed Pauli expansion, the same coefficients are
The scope includes common same-axis mutation operators directly. Writing gives
Gate removal has , sign reversal has , and a fixed offset has . No step of this derivation assumes that A has weight one.
Now suppose that is Clifford on the mutated subsystem. The normalizer property used here is the standard Clifford action on Pauli operators [13, Sec. 3 and Table 1]. For every Pauli string P, Clifford conjugation yields
where and is a Pauli string. Consequently, for ,
Like terms should be combined before either exact expectation evaluation or pilot scoring. If for a Pauli string , define
Then Equation (50) simplifies to
Thus, a Pauli relative mutation changes exactly the anticommuting component, while a general Clifford relative mutation may also permute Pauli strings. In either case, constructing the observable difference is exact, but evaluating its expectation still requires state information.
Finally, suppose a relative mutation has the form and the spectral decomposition is available. Then
so direct multiplication gives
If H has two distinct eigenvalues and , define
Then , , and differs by a global phase from . Thus every two-eigenvalue generator reduces exactly to the involutory-axis rotation algebra, although evaluating the projector blocks or state expectations may still be computationally expensive.
For completeness, every fixed one-qubit relative unitary admits the constructive reduction used in Corollary 2.10. Here is the set of two-by-two unitary matrices, and is its subset with determinant one, obtained by removing a scalar phase. Let and choose one square root of so that
has positive trace whenever its trace is nonzero; the two square-root choices differ only by the globally irrelevant sign of . Every matrix has the expansion
where , the coefficients are real, and . When , fix the remaining sign ambiguity by requiring the first nonzero entry in the ordered tuple to be positive. If , set and leave undefined; then is a global phase and the replacement is channel-equivalent to the original operation. Otherwise, define
The chosen sign makes , and Equation (52) becomes . Multiplying back the discarded scalar proves Equation (28); because , the exact involutory-axis formulas apply without a perturbative approximation. This is the canonical representation used to compare fixed replacement channels. For a declared fixed-axis family, retain separately its oriented axis and signed family coordinate , because those conventions determine the sign of and the reported coordinate in Equation (19).
A.6 Fallback General-Generator Local Perturbation Form
Lie-algebraic analyses study gate generators and their commutators to characterize variational circuits, whose gate parameters are optimized against an objective [72]. Such analyses examine circuit sensitivity and the concentration of gradients near zero; here we use the same generator viewpoint for one fixed mutant-test pair. For , use the definitions of and in Equations (29) and (30) and the remainder derivation in Appendix D. Schatten Hölder duality gives [9, Eq. (1.174)]. The operator quantity therefore bounds the first-order response across states; the realized gap requires the selected state's expectations and finite-strength effects. The deterministic interval in Equation (32) remains valid even when first-order dominance fails, although it may then leave the threshold unresolved. A right-multiplied perturbation instead uses the pre-gate state, or equivalently the conjugated generator on . Keeping the left-multiplication convention is essential for the signed shift and for the state at which expectations are evaluated. If is certified algebraically, exponentiation proves exact invisibility at every strength; alone does not.
A.7 Backward Light Cone Criterion
Two related notions of backward support must be distinguished. The exact algebraic support at location is , the smallest qubit set outside which acts as the identity. Computing this exact support can itself be expensive, so the scalable filter uses the structural backward light cone obtained from the circuit dependency graph. Applying the standard circuit support relation [73, Eq. (22)] to the reversed suffix gives
If , this inclusion implies . Operators with disjoint support commute, so and hence . Substitution into the exact formula in Theorem 2.2 gives for every input state. For the perturbative model, , so disjoint support of and is a readily checked sufficient condition for the same conclusion. The structural inclusion may be strict because a gate can commute with the current operator or different algebraic terms can cancel, neither of which a connectivity-only traversal detects. Therefore, membership in the structural cone is necessary but not sufficient for visibility. Such a mutation may still be semantically real for another observable or input test.
A.8 Circuit Characteristics That Predict Efficient Mutants
The preceding quantities suggest several structural features that can be used to prioritize mutants before execution. Some of these features give exact zero-effect conditions in the ideal circuit model, while others are practical heuristics for estimating which nonzero effects are likely to be detectable or classically tractable to approximate.
-
Light-cone membership. A candidate mutation must lie inside the structural backward light cone of the observable. If its relative mutation support is outside this cone, the propagated observable has no support on the changed subsystem, and the mutation has zero effect on that observable in the ideal circuit model. Membership is only a necessary condition for visibility; exact propagated support, commutation, or state-dependent cancellation can still make the effect zero.
-
Noncommutation with the propagated observable. For a gate at location j, compute or approximate the observable propagated backward to the mutation location. For a Pauli-axis rotation, the exact effect is controlled by the anticommuting component in Equation (15); for a general small perturbation generated by , the first-order effect is controlled by . The operator-level sensitivity in Equation (30) bounds the first-order response by its largest possible value over states; evaluating the circuit's actual response requires its particular state. For a single Pauli propagated through a Clifford suffix, this proxy is binary and should not be expected to resolve candidates that all pass the noncommutation test.
-
State support. Noncommutation is not sufficient for detectability. Even when , the particular state reaching the mutation location may have no support on the component of the commutator that changes the expectation value. The corresponding state-dependent first-order sensitivity is given in Equation (29). For a Pauli-axis rotation, the exact finite-angle response instead uses both state expectations in Equation (48).
-
Distance to measurement. Among mutations that satisfy the preceding visibility conditions, mutations closer to the measured observable are often easier to analyze. Distance to measurement serves as a tractability heuristic; a zero-effect claim still requires one of the exact conditions above. As O is propagated backward through additional entangling gates, its support can grow, and can become a sum of many Pauli terms. The state-side trend need not match the operator-side trend: a later mutation has a shorter suffix but a longer prefix, so its may be simpler while its is more entangled. Consequently, distance to measurement alone does not predict either mutation effect or total estimation cost. Mutations near the measurement layer often have more localized propagated observables, but the tractability of the state-dependent sensitivity still depends on both and .
-
Observable locality. The locality of O determines the initial size of the backward light cone. If O is local, then only mutations in its causal past can affect its expectation value, and this causal past may remain small in shallow or geometrically local circuits. If O is global, then many more mutation sites may be visible because the observable initially has support on many qubits. However, global observables also tend to make both and the corresponding state-dependent sensitivity harder to reason about, especially after propagation through entangling layers.
An execution-planning algorithm for a fixed test is given in Algorithm 1. Its effect-evaluation subprocedure is given separately in Algorithm 2 so that the two stages can flow across pages without compressing the decision logic. Returned intervals are deterministic enclosures or simultaneous statistical intervals. It predicts or labels outcomes for that test; adequacy evaluation requires an independently constructed mutant set. In the algorithm, abbreviates and is the fixed outcome range defined above. Its threshold rule assigns skip-certified zero only when exact mathematical identities or circuit structure prove that the gap is exactly zero. It assigns skip-below test threshold to a gap below or a deterministic upper bound strictly below , and skip-below test threshold at declared confidence when a simultaneous statistical interval lies wholly below . A tolerance-compatible numerical zero retains numerical provenance and uses the below-threshold rule; the certified-zero label requires the exact proof specified above. It assigns execute-predicted above threshold when a gap or the lower endpoint of either interval reaches , and execute-threshold unresolved otherwise. An unavailable gap leaves the outcome unresolved; an exact observable-side update still requires state information for a threshold decision. Every candidate record stores this execution-decision status separately from one of the evidence types in Section 2.7.5, and exact evidence also records its certificate or gap-computation provenance. A skip-below budget floor label certifies that the specified equal-prior discrimination success cannot be attained within the declared independent-copy budget; establishing requires separate test-specific evidence.
Algorithm 1: Test-conditional mutant execution planning
Input: Circuit U, test ( ), candidate mutations M, optional discrimination policy with budget ( ), pilot failure budget , and pinned equivalence settings
Output: An execution-decision status, score, evidence type, and any exact-evidence provenance for every candidate
1 Initialize the decision records ;
2 Initialize ; retain the declared population M unchanged;
3 Allocate total pilot failure budget per declared candidate before filtering (no allocation is needed if );
4 Verify pinned transpiler matches by exact channel comparison; record certified active candidates in R as skip-semantically equivalent with exact evidence and pinned transpiler match verified by exact channel comparison provenance; remove them from ;
5 Record active candidates satisfying Equation (22) in R as skip-below test threshold with exact bound evidence, interval , and rotation threshold ceiling provenance; remove them from ;
6 If the separate discrimination policy is enabled, record active involutory-axis rotations below the periodic strength floor in Equation (47) in R as skip-below budget floor with exact evidence and strength-bound certificate provenance; remove them from ;
7 Compute the structural backward light cone of O by graph traversal;
8 foreach mutation do
9 Let j be the mutation site of m;
10 if the subsystem changed by m is outside the structural backward light cone at site j then
11 record m in R as skip-certified zero with exact evidence and structural zero certificate provenance for this test;
12 continue;
13 Propagate O backward to the mutation location, obtaining ;
14 Use Algorithm 2 to obtain the available gap evidence, score, evidence type, and any exact-evidence provenance;
15 Apply the preceding threshold rule, record the execution-decision status in R, and attach the returned score, evidence type, and provenance;
16 Rank only the candidates labelled for execution, within comparable score types and according to the declared execution objective;
17 return R;
Algorithm 2: Candidate effect and score evaluation
Input: Mutation m, propagated observable , local test data, cost , outcome range , and available exact, state, or pilot information
Output: Gap, interval, or unavailable; score, evidence type, and provenance
1 if a supplied Hermitian generator satisfies an algebraically certified then
2 return , exact zero score, exact evidence, and generator commutation certificate provenance;
3 if m is a same-axis Pauli rotation change, including removal or sign reversal then
4 Construct from Equation (20);
5 else if the relative mutation is Clifford then
6 Construct the exact observable difference term by term using Equation (50);
7 else if m has a tractable spectral decomposition then
8 Construct using Equation (51);
9 else if m has a general small Hermitian generator then
10 if the local propagated state is available then
11 Compute and ;
12 Form from Equation (32); attach score only as a first-order ranking estimate;
13 return the deterministic interval, remainder bound, perturbative score, and state-dependent perturbative evidence;
14 else
15 Compute using Equation (30);
16 return the unavailable gap marker, operator-proxy score, and operator proxy evidence;
17 else
18 if exact simulation is tractable then
19 Compute and ;
20 return the exact gap, exact score, exact evidence, and simulated gap provenance;
21 else
22 return the unavailable gap marker, unavailable score, and unavailable evidence;
23 if an exact structured observable difference was constructed then
24 if was certified algebraically then
25 return , exact zero score, exact evidence, and algebraic zero certificate provenance;
26 if was certified algebraically for the declared input then
27 return , exact zero score, exact evidence, and state-dependent cancellation certificate provenance;
28 if the required expectations in are available then
29 Compute and ;
30 return the exact gap, exact score, exact evidence, and structured gap provenance;
31 else if m is a Pauli rotation or relative Clifford replacement with a tractable retained Pauli expansion and an executable pilot then
32 Apply the pilot procedure in Appendix B.9 to obtain the signed estimate, simultaneous confidence interval , and cancellation diagnostic;
33 return the simultaneous interval, pilot score, and pilot-estimated evidence;
34 else if exact simulation is tractable then
35 Compute and ;
36 return the exact gap, exact score, exact evidence, and simulated gap provenance;
37 else
38 return the unavailable gap marker, unavailable score, exact observable-side update only evidence, and structured observable-difference provenance;
A fixed one-qubit replacement not handled by the preceding rotation or Clifford branches enters the tractable spectral branch of Algorithm 2. The axis-angle reduction in Corollary 2.10 and Equation (53) gives an equivalent construction of its exact observable difference through the involutory-axis formula, including non-Pauli axes; a scalar relative unitary gives without assigning an axis. For a simultaneous Euler-parameter path, this construction is applied separately to each fixed candidate and does not assume a common axis along the path. Approximate propagation supports pilot intervals only when all discarded coefficient mass is bounded; it never supplies a proof that the full gap is exactly zero. For small circuits with explicitly exact gates and inputs, a separate symbolic path constructs from the complete circuits and proves either observable invariance or a zero expectation in . This is equivalent to the local zero conditions by Theorem 2.2 and provides a check independent of the implemented local-response formulas. The exact-input path accepts recognized discrete Clifford gates, explicitly exact one-qubit or multiqubit unitary gates and Pauli rotations, and explicitly exact pure or mixed states, including computational-basis inputs. Angles must be supplied as symbolic expressions such as rational multiples of ; rounded angles are not promoted to exact declarations. The default symbolic width limit is four qubits, and supplied floating-point observable coefficients retain their binary-rational values. Unsupported data or an exceeded resource limit leaves a certificate unavailable, preserving the numerical or pilot fallback. The semantic filter verifies each pinned transpiler match independently of the selected input and observable. It first checks common prefix and suffix instructions using exact gate semantics and ordered operands, then proves that the relative unitary on the remaining changed support is a scalar of unit modulus times the identity. This local proof uses the symbolic width limit on the changed support and can therefore certify supported circuits wider than four qubits. If it is unavailable, a full-register symbolic comparison is attempted only within both the symbolic and dense width limits. The implementation propagates discrete Clifford gates directly on Pauli strings and evaluates general local conjugations on their bounded gate supports. Its relative-Clifford branch still uses numerical recognition, so it expands the actual local matrix rather than substituting a rounded Clifford tableau; exact zero labels require a separate algebraic proof. A complete numerical Pauli expansion is used for state expectations when it fits the term cap; otherwise the planner attempts bounded dense evaluation, a pilot with a truncation allowance, or bounded direct simulation. Exhausted resources leave the candidate unresolved, and a truncated observable alone never receives complete-observable evidence. The built-in pilot samples a simulated mutation-site state separately for each candidate and allocates before filtering, without recycling unused allocations. It estimates the fixed-strength difference; reusable coefficient pairs are outside the current implementation. The remaining dense gaps and deterministic bounds use ordinary floating-point arithmetic to evaluate ideal formulas, with numerical errors left uncertified. Results therefore retain numerical provenance and precision; an application requiring rigor at a numerical threshold boundary must use validated arithmetic or leave that comparison unresolved. The operator score is a state-independent first-order upper-bound proxy; estimating realized efficiency requires the test's state-dependent gap. The pilot estimators in Appendix B.9 use truncated observable-side updates for Pauli rotations and relative Clifford replacements, together with measured signed state expectations and explicit propagation and sampling errors. They must not be applied to other replacement classes without a mutation-specific observable construction and error analysis. When proxy, pilot, and realized scores are mixed, they must remain separately labeled, and rankings should be formed only within comparable score types.
A.9 Interpretation and Consequence
In the noiseless setting, mutation testing asks whether the selected tests extract distinguishing information from the quantum program; hardware robustness requires a separate device model.
For structured mutations, a promising candidate lies in the backward light cone of the measured observable, changes the propagated observable under the exact relative-unitary action, has state support on that exact difference, produces an expectation-value shift large enough to be detected under the selected protocol, and does not require expensive state-preparation or measurement changes. For a general generated perturbation, the commutator and state-dependent sensitivity provide the corresponding first-order fallback.
The central test-specific signal is the observable gap . When exact expectation evaluation is infeasible, a truncated structured observable difference can be paired with pilot measurements of the required signed expectations; when no exact structured form is available, first-order behavior can be approximated using state-dependent sensitivities, while operator-norm quantities bound the worst-case first-order response across states. Thus, in the noiseless setting, circuit-aware analysis can reduce the cost of executing a fixed suite and can stratify mutants by expected difficulty. It does not justify defining the mutant population by the same suite-specific gaps used to score that suite.
B Extended Examples and Pilot-Estimator Details
The examples instantiate the observable gap in Equation (2) and optional estimation-efficiency score in Equation (42); the later sections develop pilot estimators for wider circuits.
B.1 Concrete Examples of Mutation-Efficiency Scores
For simplicity, all examples use pure input states and Pauli observables, so the cost term is treated as constant. Within each fixed observable, the range is also constant, so the displayed proportional efficiency values suppress the common factor and rank mutants by .
Example B.1 (Angle perturbation). Consider
The original expectation is . Mutate . Then
For small , this becomes and . For and , the exact values are and , whereas the first-order values are approximately 0.035355 and . At that small fixed offset the mutant is more efficient when is near and inefficient when is near 0 or ; the exact finite-strength dependence is periodic and is governed by Equation (17).
Example B.2 (Gate removal). Again consider , , and . Remove the gate: . This is exactly the Pauli-axis relative rotation in Theorem 2.4 with , so the same exact formulas apply. The original expectation is , whereas the mutant expectation is 1. Therefore,
If , then and . If , then , so removing a near-identity gate can be highly inefficient.
Example B.3 (Pauli gate replacement). Consider
The original circuit gives . Mutating gives , so and . Mutating , however, gives , which differs only by a global phase for this input and observable. Thus . For this input, the two output density operators are identical, so the replacement is output-state equivalent and therefore invisible to every observable, even though syntactically. The relative mutation is , so the exact Pauli replacement formula also shows that every propagated observable commuting with is unchanged for every state at the mutation site.
Example B.4 (Controlled-gate mutation). Consider , input , and observable . The original output is
so . Removing the control gives , which maps the input to , so . Hence and . If the input is instead , both the original CNOT and the mutated unconditional produce , so .
Example B.5 (Flipped control condition). Again use , , and . Flipping the control condition produces
Both original and mutant states have , so for . But for , the original state has expectation 1, whereas the mutant state has expectation -1. Thus and . This example shows that mutant efficiency is observable-dependent.
Example B.6 (Entangling-gate removal). Consider
The original circuit prepares the Bell state , so . Removing the CNOT gives , for which . Hence . For the local observable , both states give , so the same mutation is invisible to the local marginal observable.
Example B.7 (Qubit permutation mutation). Let denote the Pauli-Z observable on the first tensor factor. Consider and . Without mutation, . A swap mutation produces , so , , and . But if the observable is symmetric, , the expectation is unchanged by the swap and .
Example B.8 (Global phase mutation). Let . Then
Therefore, for every observable , . A global phase mutation is always equivalent and should be discarded when that equivalence is certified. The reference implementation’s sufficient transpiler-match filter can miss such a mutant because the compiled comparison retains global phase; the remaining rules then give a conservative test-relative decision rather than a semantic exclusion.
Example B.9 (Relative phase insertion). Consider , input , and observable . Insert a relative phase gate . The original expectation is , while . Thus
For , . Under direct X-outcome detection, the original state never produces outcome -1, while the mutant produces it with probability . After mutant shots, the probability of missing that outcome is . Thus, for fixed confidence, observing the rare outcome takes shots, illustrating why the uniform mean-estimation bound need not be tight. However, if , then and , so . Thus the same relative-phase insertion is weak under but stronger under .
Example B.10 (Subcircuit replacement). Suppose a subcircuit prepares
and the mutant subcircuit prepares
For , the original expectation is 1, while the mutant expectation is -1. Therefore, and . For the local observable , both states have expectation 0, so . Subcircuit replacement can therefore be highly efficient when the observable captures the changed semantic property, but invisible when the observable only measures an unaffected marginal.
B.2 End-to-End GHZ Planning Walk-Through
Consider the three-qubit GHZ preparation
with input and the single expectation test . The eight-candidate set in Table 12 combines illustrative gate deletions and insertions, as supported by existing quantum mutation-testing tools, with the structured rotation family analyzed here [22]. These author-defined candidates form a hand-checkable planning example; outcome frequencies for tool-generated populations require a separate benchmark census. Use the illustrative population gap threshold and the default planner with the discrimination policy disabled. The 0.01-radian offset probes sensitivity; its representativeness as a programming fault remains unestablished.
Table 12: End-to-end fixed-test planning for eight declared mutations of the three-qubit GHZ preparation.
| ID | Mutation | First decisive rule | Exact |
|---|---|---|---|
| delete CNOT | outside the backward light cone of | ||
| append | outside the backward light cone of | ||
| append | |||
| append | noncommuting but | ||
| angle offset | |||
| angle offset | exact predicted gap above threshold; retain for execution | ||
| delete CNOT | no zero-effect certificate; retain for execution |
The scalar threshold gate removes before circuit analysis, the structural traversal removes and , commutation removes , and exact state-dependent evaluation labels and as skip-certified zero at their generated strengths, leaving only and for execution. The executable walkthrough supplies exact angles and certifies both cancellations symbolically; the corresponding floating-point inputs retain numerical zero provenance instead. Thus, this fixed-test planner schedules two of eight declared candidates without treating any test-relative zero as program equivalence, as summarized with population outcomes in Section 3.2. In a suite-adequacy study, all six non-executed but non-equivalent mutants remain in the independently fixed denominator, and the prespecified detection rule determines their survivor or kill labels independently of the planning disposition.
B.3 Summary of Example Scores
Table 13 collects the representative gaps and their test-dependent interpretations.
Table 13: Representative gaps from the worked examples. Each effect is conditional on the displayed input and observable where specified.
| Mutation | Typical effect | Efficiency implication |
|---|---|---|
| Large near . | ||
| Large for nontrivial rotations. | ||
| Maximal. | ||
| Test-equivalent. | ||
| Efficient. | ||
| Flip CNOT control | Observable-dependent. | |
| Correlation-sensitive. | ||
| SWAP | Symmetry-dependent. | |
| Equivalent. | ||
| Observable-dependent. | ||
| Subcircuit replacement | Property-dependent. |
B.4 Simultaneous Parameter Mutations of a General One-Qubit Gate
Consider the standard three-parameter one-qubit Euler gate, also commonly denoted , with the phase convention
Write for equality up to global phase. The absence of an explicit factor is only a consequence of the ZYZ Euler convention:
so the decomposition remains universal up to global phase. Let one mutation change two or three parameters simultaneously:
Under the left-multiplication convention, the complete relative mutation is
(54)
The original value of cancels from Equation (54) because the adjacent rotations combine as ; only its offset remains, while the original and determine the orientations of later relative rotations.
The common one-parameter mutation operators are fixed-axis families:
only:
only:
only:
Each axis in Equation (55) is independent of its coordinate offset. Consequently, one coefficient pair gives the complete zero set and maximum along the corresponding one-parameter sweep, with the signed coordinate offset used directly as . For each generated replacement, its canonical effective angle supplies the strength used by the test-independent floor in Corollary 2.8.
For a simultaneous mutation, the component parameter effects must not be scored and added independently, because their ordered rotations can reinforce or cancel one another. For each fixed offset vector , first construct the complete in Equation (54), then use Equation (53) to obtain , and finally evaluate the exact gap through Equation (15). This reduction also detects coordinate changes that implement only a global phase, for which the mutant is semantically equivalent despite a nonzero Euler-coordinate offset. Two singular families make these null directions explicit:
Thus, modulo , is a null direction at , while is a null direction at . An individual offset by an integer multiple of in any Euler coordinate likewise changes the gate by at most a global phase. These cases are analytically certifiable as globally equivalent whenever they occur in the chosen mutant population. Their incidence depends on that population’s mutation operators and allowed offsets.
If a family is swept along , then in general
with an axis that varies with t. Accordingly, one fixed coefficient pair does not generally determine the complete zero set or maximum over that path, even though every fixed candidate on it is covered exactly. To state the local expansion as a matrix equality, remove the relative scalar phase and define
In a neighborhood of , this is the near-identity, positive-trace branch of the determinant-normalized representative used in Equation (52). The local reason is then visible from its first-order generator:
The physical relative matrix is ; its scalar phase cancels from conjugation, so the observable gap and canonical effective angle are unchanged. Let , , and be the Bloch vectors of , , and , respectively. They satisfy , , and , so
At , the three coordinate directions are locally orthogonal and the leading term is the Euclidean squared norm. At and , it instead becomes and , respectively, exposing the cancellations in Equation (56). The Euclidean norm of the Euler-coordinate offset depends on the representation; the relative unitary up to global phase and its effective rotation angle provide invariant measures of the physical mutation.
For a generic effective axis , the projection is not a binary Pauli-string commutation filter. Each retained Pauli string can contribute up to three local Pauli components to the coefficient observables and , after like strings are combined. This is only a constant-factor expansion at a one-qubit mutation site, but the Pauli-expansion analysis below specializes to Pauli-string axes because they permit the cheaper anticommutation test and single-partner-string update used by the pilot estimator.
B.5 Pauli-Expansion View
Expand the backward-propagated observable in a Pauli basis:
For the unnormalized n-qubit Pauli basis used here, the expansion is unique with coefficients , which are real because and are Hermitian. Only Pauli terms that anticommute with the mutation axis contribute to the exact observable difference. Write each Pauli string as
where acts on the mutated qubit and acts on the remaining qubits. Then
Therefore, the exact effect comes only from terms where
For each such contributing string, the commutator with the rotation generator gives
where is the third single-qubit Pauli (the one orthogonal to both and ) and is the Levi-Civita symbol associated with the ordered triple . Concretely, , , , and the opposite orderings give the corresponding minus signs. Defining (the same Pauli string with replaced by ), the exact gap is
with defined by in Appendix A.5; for this single-qubit factor it equals . The familiar state-dependent sensitivity is the absolute coefficient of the sine term at . The exact expression also retains the contribution, which is quadratic near zero and can remain nonzero when the first-order coefficient vanishes.
B.6 How Surrounding Gates Amplify or Wipe Out the Mutation
- Wiping out by commutation. If the backward-propagated observable commutes with the mutation generator,
then the left-multiplied rotational mutation has exactly. For example, a Z-rotation mutation followed by direct Z-measurement is invisible for every mutation strength because .
- Amplification by basis rotation. A later gate can rotate the measured observable into a noncommuting basis. For example, if and , then
A mutation in a Z-rotation has generator , and . The Hadamard therefore makes a Z-rotation mutation potentially visible. The exact response depends on both and , with the latter giving the first-order term.
- Spreading through entangling gates. Entangling gates can spread a local observable into a multiqubit observable. For example, let the suffix contain and suppose the final observable is . Then
Now an angle mutation on qubit q has the exact gap
Thus the effect of a one-qubit mutation can depend on two distinct two-qubit correlations, with controlling the first-order response.
-
Wiping out by missing correlations. Even if , the mutation can still be invisible if the state has no support on the corresponding correlation. In the previous example, removes the first-order response but does not remove the possible quadratic contribution from . If both correlations vanish, the mutation is exactly invisible to this expectation-value test for every .
-
Cancellation among Pauli components. If , several terms may contribute with different signs:
The effect can be large if terms add coherently, or small if they cancel. Thus destructive interference among propagated contributions can wipe out a mutation's observable effect even inside the light cone.
B.7 Bounded Amplification
A suffix circuit can make a mutation visible in new observables and correlations, but it cannot make the mutation effect arbitrarily large. Set . Anticommutation with A makes Hermitian and gives
Therefore, the exact structured difference satisfies
Because is Hermitian, taking operator norms gives
The exact local identity in Theorem 2.2 then proves Equation (21). The result recovers linear small-strength scaling and the global ceiling at . For a unit-norm Pauli observable, the gap is therefore at most . Surrounding gates redistribute the mutation effect across observables and correlations within this bound.
B.8 Restricted Pauli Test-Augmentation Screen
Declare a nonempty admissible output family of Hermitian observables with , together with an implementation and cost for each measurement. For a finite candidate list, its restricted optimum is
Cyclicity supplies the original-prefix identity
Thus , but tractable screening additionally requires a manageable candidate list, propagated representations, and access to the required expectations. For output Pauli measurements,
is measured by local basis changes followed by computational-basis measurements and multiplication of the outcomes on its support. A non-Clifford suffix may nevertheless make expensive to represent or estimate; inexpensive output measurement does not imply inexpensive analysis.
A different restriction starts with site Pauli strings and admits output observables . Their scores are , but their measurement implementations must be supplied separately. One implementation applies to the output before measuring ; its inverse-suffix depth, routing, and compilation costs count in the test budget. Executing a truncated prefix instead changes the tested interface and is not automatically an output test of the original program. For a Clifford suffix the full Pauli family is preserved up to signs, so the two unrestricted Pauli screens coincide and local output basis changes suffice. Weight caps or other restricted Pauli lists must still be mapped explicitly because Clifford propagation can change Pauli weight. Accordingly, the site screen supplies an inexpensive implementable oracle only when both its analysis and the corresponding output measurement have bounded declared cost.
The Pauli restriction can be exponentially loose even with an identity suffix. A Haar-random orthogonal pair is sampled uniformly over orthogonal pure-state pairs, with no preferred basis. Applying Lévy’s lemma (a concentration bound on high-dimensional spheres) [74, Lemma III.1] and a union bound over the Pauli strings to such an -qubit pair bounds the largest Pauli expectation difference by with high probability, even though the trace norm of the state difference is 2. A small retained-Pauli score therefore does not imply that the mutant is intrinsically hard to detect; its distinguishing observable may be non-Pauli or spread over exponentially many Pauli components.
For the running sign-reversal example, has trace norm one. Applying Equation (24) at gives the same optimum obtained from and its sign observable.
B.9 Pilot Estimation of Mutation Effect in Wide Circuits
For wide circuits, exact evaluation of the state and the propagated observable can require exponential resources in the worst case, although structured circuit families may admit efficient exact methods. The proposed extension below truncates the observable-side Pauli expansion and measures the required signed state expectations with a shared pilot experiment; its practical benefit remains unvalidated. It therefore replaces an assumed state-support model with an empirical estimate and an explicit error budget, while unrestricted wide-circuit simulation retains its worst-case resource requirements.
B.9.1 Computational Growth and Bounded Fallbacks
Let be the register width, the number of suffix gates, the largest local gate width, the number of supplied observable terms, and the retained-term cap. The scalar rotation ceiling requires constant work once the angle and outcome range are supplied. Structural cone traversal inspects circuit operands without constructing a state or operator; the reference implementation also stores one support set per circuit boundary, requiring up to storage for a circuit with gates. Compiler comparison has the cost of the pinned compilation procedure, followed by an independent exact proof; no polynomial bound for arbitrary compilation or equivalence checking is assumed. For a verified factorization and , channel equivalence reduces to checking on the changed support. The reference local certificate obtains this factorization by comparing source instructions with exact semantics, rather than assuming it from mutation metadata. Unsupported common context can therefore prevent this sufficient proof even when the circuits are equivalent.
An -qubit Pauli string requires explicit storage, so strings require storage. A Clifford suffix preserves term count, giving local term updates; full-string copying and sign bookkeeping can add an factor in an implementation. Conjugating a Pauli term by a general -qubit gate produces at most local Pauli terms. After each truncation, the next gate therefore generates at most terms, in addition to the cost of obtaining its local conjugation rule. The reference implementation computes and caches these rules within each gate update using matrices, merges equal strings, and sorts coefficients for truncation; sorting coefficients costs , rather than the linear-time selection bound discussed below. It separately retains all terms of a complete discrete-Clifford image for algebraic checks, including coefficients omitted by the pilot approximation. Without truncation, general propagation can populate all Pauli strings; a term cap bounds the retained representation but does not guarantee a useful error bound.
A dense statevector stores amplitudes, and applying fixed-width gates costs arithmetic operations under ordinary statevector simulation. A density matrix or full-register operator stores entries; generic dense matrix multiplication costs scalar operations with conventional multiplication. A pure unitary Choi ket also has amplitudes, while its dense Choi density matrix would have entries; neither is constructed by this implementation’s symbolic comparison. Symbolic unitary matrices have the same entry count as numerical unitary matrices, but exact expression growth and simplification add costs not captured by that count. The four-qubit symbolic default is a computational safeguard, not a mathematical restriction on the identities.
The implementation declares independent limits: local_max_qubits=4 for local numerical matrices, dense_max_qubits=10 for full-register numerical operators and density-matrix evolution, and symbolic_max_qubits=4 for exact matrix comparisons. State preparation and direct simulation have separate width limits, both ten by default; lowering the dense limit does not disable permitted statevector calculations or sparse checks. Observable validation uses Pauli coefficients for Hermiticity and analytical spectral ranges for pairwise anticommuting or independent commuting Pauli families, or diagonalizes only the active support within the dense limit. An unsupported over-limit range calculation or gate validation produces an explicit input-validation error rather than an unchecked contract or an unbounded allocation. These limits constrain calculations initiated by the planner, not the storage of already supplied dense states and mutation operators. The simulated pilot still prepares a numerical state, and its probability cache is capped at 32 measurement settings; the hardware shot bound in Equation (64) does not remove classical state-simulation costs. The tableau-based polynomial bound in Section 4.5 applies under its separate assumptions and is not established for the complete reference implementation by these resource limits.
B.9.2 Backward Pauli Propagation
Assume that the final observable is supplied as an exact Pauli expansion or as an initial truncated expansion whose discarded mass is included below. The backward propagation step follows the Heisenberg-picture Pauli propagation used by Rall et al. [75, Sec. II.C and Eqs. (14)–(15)]. In the Heisenberg picture, circuit evolution is accounted for by transforming the observable while holding the state at the chosen reference point fixed. The coefficient-based truncation used here is closely related to later sparse-Pauli dynamics methods [76, 77]. Starting from O, propagate each retained Pauli term backward through the suffix:
Clifford conjugation maps each Pauli string to one Pauli string, whereas a non-Clifford gate can produce a linear combination. For example,
To limit representation growth, retain the largest Pauli coefficients after each propagation step. Rank coefficients by magnitude after combining contributions to identical Pauli strings. If coefficients are presented for truncation at step , linear-time selection and accumulation of the discarded coefficient mass require scalar operations, without sorting the full list. For a list of at most retained terms, this selection cost is per step when each term expands into at most a fixed number of terms, as for gates acting on a fixed number of qubits with supplied local conjugation rules. Generating the expanded terms, combining identical strings, manipulating their representations, and the precision of coefficient arithmetic require separate cost accounting; the selection bound alone is not a bound on the full propagation cost. If the terms discarded at step have total absolute coefficient mass , then their operator norm is at most . Unitary conjugation preserves the operator norm, and successive discarded contributions add by the triangle inequality, so
Here when the supplied expansion of O is exact. For the exact observable-difference map
the retained structured difference obeys
For a Pauli-axis relative rotation, let and . The exact norm identity in Equation (58) sharpens the general certificate to
Unlike the mutation-independent certificate, this rotation-specific error shrinks at the same linear rate as the structured signal near . Exact zero-effect labels must still use the structural light cone because terms discarded from may carry omitted support.
B.9.3 Pilot Measurements of Signed State Support
Prepare by executing the prefix followed by the original gate , and collect randomized single-qubit Pauli measurements. Median-of-means classical-shadow post-processing gives simultaneous signed estimates
for every retained Pauli string Q required by the candidates at site j [78, Theorem 1 and Eq. (S13)]. For each target string, median-of-means post-processing partitions the independent shots into batches, averages the single-shot estimates within each batch, and takes the median of those averages. A single-shot classical-shadow estimator is unbiased; the median of independent batch means need not be unbiased and can lie outside the physical interval . Throughout this section, denotes that median-of-means estimate projected onto before scoring. Clipping can alter its bias, but it cannot increase pointwise absolute error because the true Pauli expectation lies in the interval, and it therefore preserves the simultaneous error guarantee below. Independently of clipping, using the same expectation estimates in the signed sum and magnitude-only envelope makes the triangle inequality ensure whenever its denominator is nonzero. For target Pauli strings of weight at most , substituting the weight- Pauli shadow norm into the simultaneous-estimation theorem gives [78, Theorem 1 and Eq. (S13), Lemma 3 and Eq. (S50)]
samples to estimate all targets to additive error with simultaneous failure probability at most for this fixed site and test. The squared shadow norm bounds the single-shot estimator's worst-case second moment; for a weight-w Pauli string under these local measurements it is , producing the weight dependence above. The dependence is independent of the total register size for fixed , but it is exponential in the retained Pauli weight, so truncation controls both classical propagation and pilot-measurement cost. The same site- pilot data can be reused across all candidate mutations whose scores use those target strings. This guarantee covers the declared target set in one pilot; coverage across sites and tests requires the allocation below. For a study-wide failure target , prespecify pilot allocations with and include every reused target in its pilot's simultaneous guarantee. The reference implementation collects a separate pilot per candidate, with its allocation policy documented in the implementation README [7]. If belongs to an analytically tractable family, such as a known stabilizer or product state, its Pauli expectations may instead be evaluated exactly and no pilot error is incurred.
B.9.4 Pauli-Rotation Coefficient Estimates
Let
be the retained propagated observable for a relative rotation . Estimate the two strength-independent coefficients separately:
where . This pair supports every admissible mutation strength at the site without collecting a new pilot sample. Define
On the simultaneous event for every target string, projection onto the anticommuting component and Equation (61) give
The fixed-strength signed shift, gap estimate, and efficiency estimate are
Combining the rotation-specific truncation certificate with the pilot error gives
The same right-hand side bounds . The strength-independent pilot visibility score and nontrivial zero estimate are
Finite pilot data cannot certify the exact equality . Instead, the joint confidence region implied by Equation (66) reports whether all-strength invisibility is compatible with the selected tolerance; should be reported with propagated uncertainty and omitted when that region contains the origin.
The magnitude-only companion
deliberately removes cancellation to provide an envelope of the estimated contributions. When , define
A value near one flags retained contributions that are individually large but nearly cancel in the signed estimate. The sampling error and the truncation allowance must be included before the magnitude envelope is treated as an upper confidence bound on the true gap.
B.9.5 Relative Clifford Replacements
For a relative Clifford mutation, conjugate every retained Pauli string exactly, combine like terms, and write
The same site-j pilot sample gives
With , the simultaneous pilot event gives
The squared signed gap divided by is the pilot efficiency estimate, while the relative difference between the signed and magnitude-only values is the Clifford cancellation diagnostic. For a Pauli relative mutation, is twice the retained component that anticommutes with that Pauli; for a general Clifford, combining permuted strings before measurement preserves observable-side cancellation.
B.9.6 Cost, Amortization, and Interpretation
Pilot preparation, execution, measurement, and classical post-processing must be charged to the total selection budget. The weight dependence in Equation (64) supplies a measurement cost, without an additional ad hoc geometric correlation penalty. The resulting quantities estimate retained signed expectations from pilot data with declared confidence; establishing a candidate's efficiency also requires the declared error and cost analysis. They become exact only when and the required state expectations are evaluated exactly. The strength-independent pair is preferable to screening only at one chosen angle because it exposes possible all-strength invisibility, the maximum signal, and the nontrivial cancellation strength from the same pilot data. This reuse can save work relative to separate candidate executions, but three-point interpolation and targeted coefficient measurements also reuse the response across strengths. The comparison in Appendix B.9.7 is therefore needed before attributing an economic advantage specifically to shared shadows. At fixed and , the certified rotation error is
Because
both the truncation and pilot-sampling terms vanish at the same linear rate in near zero. Thus, decreasing the mutation strength does not by itself improve the relative precision of the certified interval.
A target error specifies estimation precision; a population-boundary decision uses the full interval and can remain unresolved when the gap lies near the detection threshold . For a fixed test and site , let be the rotation candidates and admissible strengths sharing one pilot state, let be the number of target Pauli strings of maximum weight , and define
When , keeping the pilot-sampling contribution in Equation (68) below a fraction of a common target estimation error for every candidate is ensured by
Meeting that error target also requires the retained propagation to satisfy
otherwise, increasing the pilot sample cannot compensate for the truncation interval. The resulting pilot and direct paired-comparison shot counts scale as
If is the cost of one prefix pilot shot, is the cost of one paired original-mutant sample, and is the fraction of candidate comparisons that the pilot allows the planner to avoid, the rough break-even scaling can be written
Here absorbs constants suppressed by the big-O bounds, and is the realized avoided-comparison fraction. This is a retrospective scaling comparison: a forecast requires calibrated constants and a pre-execution estimate or conservative bound for from disjoint calibration circuits. The shared precision factor cancels, but coefficient mass, Pauli weight, truncation, and measurement costs remain; changing can improve one contribution while worsening another. Strength reuse alone establishes no advantage over the reconstruction baselines below.
B.9.7 Precision-Matched Analytical Baselines
Consider one fixed input, output observable, and mutation site with declared Pauli axes and declared axis-strength candidates. All families share the original expectation , and denotes the mutated expectation for axis . Assume that the full circuits at the interpolation strengths can be executed, the original prefix can be prepared for Pauli measurements, and all target families are fixed before sampling. For an arbitrary Hermitian involution the interpolation baseline remains valid, but the Pauli-measurement baselines below require the declared tractable Pauli representations. Make the comparisons at simultaneous additive gap error at most and a common failure budget , keeping threshold decisions and observed kill counts separate from this estimation criterion. An estimate used for planning charges its failure probability to ; fresh observed classifications use their separate allocation as in Proposition 3.1.
The established three-point reconstruction [11, 12] gives, in the present signed convention,
To propagate errors without allocating another failure probability to each strength, put and . The signed shift is
If every measured configuration mean has error at most e, simultaneously, then
The same bound holds for the absolute gaps by the reverse triangle inequality. Thus configurations, with , suffice for every strength in every declared family, including a continuum; each sampled configuration requires enough shots to achieve that precision. The common original estimate is measured once, and an exactly known original expectation can instead be inserted at zero sampling cost. The auxiliary strengths need not belong to the mutant population, but their executable circuits and costs must be included.
Use a serial-time baseline in which each preparation, circuit execution, and measurement has cost c, and the method's classical analysis, compilation, and post-processing have total cost in the same units. Parallel execution requires a different scheduling model. Empirical comparisons should also report quantum duration, classical time, and peak memory separately. For independent outcomes of range R, Hoeffding's inequality permits the explicit mean-estimation shot count
For direct execution, estimate the original and each of the mutants to error , reusing the original estimate. For interpolation, estimate the configuration means to error . Let
S be the number of distinct nonidentity Pauli targets in the retained coefficient expansions, with maximum weight w. For either prefix method, require the same certified truncation bound from Equation (75) and put with as defined in Appendix B.9.6. Then simultaneous Pauli errors at most keep every sampling contribution below ; if , no retained-coefficient sampling is needed and only the truncation interval remains. The three elementary shot counts are
For an explicit conservative shadow count matching the reference implementation, use shots per batch and the smallest positive odd integer batches, so . Indeed, a local-Pauli shadow estimator for a weight-at-most-w string has variance at most ; Chebyshev's inequality bounds a batch's failure probability by 1/4. Hoeffding's inequality across independent batches bounds a median failure by , and a union bound over targets gives failure at most . Clipping the medians preserves this guarantee. For , , , and , this gives , , and ; a planner pilot uses its allocated per-candidate failure budget in place of . These counts suffice for the specified estimators; establishing optimal sample-complexity lower bounds requires a separate analysis.
Writing for full-circuit shot costs, for a targeted prefix Pauli shot, and for a randomized prefix shot, the comparable total costs are
The prefix setup costs include propagation and every discarded-coefficient certificate; all setup costs include the processing required to return the declared estimates. The targeted baseline measures strings separately; grouping compatible measurements can improve it and should be included when available. High Pauli weight does not introduce a shot penalty for a directly measured Pauli product with outcomes , although it can affect basis-change, readout, and per-shot costs. With a single propagated Pauli and one noncommuting Pauli axis, , so targeted measurement is the natural prefix competitor.
The conditional regimes follow directly from Equation (83). Direct execution is competitive when few candidates are requested and the setup or auxiliary-configuration cost exceeds the saved sampling cost. For many strengths on a few axes, interpolation uses configurations independently of and avoids a potentially intractable propagated Pauli expansion. For a modest target list, especially at large weight, targeted prefix measurements avoid the shadow locality penalty and can also exploit a shorter prefix than the full interpolation circuits. Shared shadows are attractive only when many targets can reuse low-weight measurements sufficiently to compensate for their sample count and setup cost: their precise comparison against separate targeted measurements is . Reuse across additional observables can enlarge that target union, but all targets and costs must enter its simultaneous guarantee. For any proposed deployment, these comparisons must account for calibrated costs and compatible truncation error alongside candidate count. All four methods can still leave threshold classifications unresolved near .
B.9.8 Light-Cone Filtering
Use Equation (8) before collecting pilot data; a retained Pauli approximation cannot prove that the full mutation effect is exactly zero.
B.9.9 Algorithm
- Expand O in the Pauli basis and initialize the retained coefficient–Pauli list:
If this initial list is truncated, record its discarded coefficient mass as .
-
For gates from the end of the circuit to the beginning, conjugate each Pauli term through the gate. If non-Clifford expansion occurs, combine contributions to identical Pauli strings and retain at most terms with largest coefficient magnitudes. Record every discarded coefficient mass and compute from Equation (61).
-
At each mutation site j, collect the union of retained Pauli strings required by its Pauli-rotation and relative Clifford candidates.
-
Execute the original prefix through , collect one randomized single-qubit pilot sample, estimate all required signed expectations with a simultaneous accuracy target , and clip the raw estimates to .
-
For each Pauli-axis candidate, compute from Equation (65), the fixed-strength score and error bar from Equations (67) and (68), and the all-strength diagnostics from Equation (69).
-
Separately compute the magnitude-only envelope in Equation (70) and report as a cancellation diagnostic.
-
For each relative Clifford candidate, combine the retained observable-difference terms and compute Equations (72) and (73) from the same site-level pilot data.
-
Select against combined truncation, pilot error, and total cost; charge propagation and pilot costs to the execution-planning budget; record the evidence type separately from the execution-decision status; and report the result as a truncated estimate with separate truncation and pilot-sampling uncertainties.
B.9.10 Interpretation
The pilot estimators preserve the signs needed to represent state orthogonality, Pauli-term interference, and cancellation between the sine and cosine contributions. They also expose the actual resource limitation: high-weight retained strings require exponentially more local-Pauli shadow samples even though the bound is independent of the total register size at fixed weight. For a single Pauli observable propagated through a Clifford suffix, a noncommuting finite-strength rotation generally requires the two signed expectations and . One suffices only when a coefficient is known or its strength multiplier vanishes; a known stabilizer tableau permits both to be computed without measurements. Comparisons of execution-planning benefit should include the precision-matched interpolation and targeted-measurement baselines in Appendix B.9.7, alongside structural and operator-based heuristics and random selection, and must charge pilot costs to the execution budget.
C Detailed Pre-Execution Filters
The formal score ranks normalized signals per comparison cost, but computing it may itself be costly. Before estimating , inexpensive analysis can remove globally equivalent mutants or label test-relative zero effects without executing them. Apply the population-accounting rule following Equation (7) to these exclusions and skips.
C.1 Backward-Light-Cone Filter
Apply the structural rule in Equation (8), whose proof is given in Appendix A.7. It uses only exact topology and gate supports, independently of the input state and of any truncated approximation to .
C.2 Transpiler-Based Equivalence Filter
A test-independent filter uses circuit optimization. Let T denote a semantics-preserving transpilation or optimization pass. If a deterministic, semantics-preserving optimization pipeline maps U and to the same canonical circuit representation, then the mutant can be treated as equivalent under that pipeline. This gives a sufficient practical test:
For example, a mutation that replaces a gate by another gate that is optimized away, merged with a neighbor, or reduced to the same basis-gate sequence need not be executed. This specializes the established idea of compiler-based equivalent-mutant detection to quantum-circuit compilation [35, 36]. The implication requires equality of the complete compiled representation, including gate parameters, qubit and classical-bit mappings, and any output convention relevant to the test. It also requires the same transpiler version, options, target, and random seed, or another mechanism that makes the transformation deterministic. Most importantly, the filter assumes that the transpiler preserves the implemented channel for both inputs. If the purpose of the analysis is to test the transpiler itself, this assumption is inappropriate. Tolerance-based gate removal, numerical synthesis, or approximate circuit comparison does not supply the exact premise, even when synthesis approximation is nominally disabled. The reference implementation therefore treats Qiskit matches only as candidates for an independent exact channel comparison of the source circuits, with a default four-qubit symbolic limit. Only a successful proof supplies the semantic-exclusion certificate; unsupported or unproved matches continue through the remaining planning rules, and failure to prove equivalence does not prove non-equivalence.
C.3 Circuit-Equivalence Filter
Transpiled text equality guarantees equivalence under the stated assumptions. Two circuits may have different textual representations but the same physical action on states, possibly up to global phase.
Therefore, stronger filters may compare circuit objects, canonicalized DAGs, decision diagrams, stabilizer representations, or other circuit-equivalence abstractions; decision-diagram methods provide an established exact approach for relevant circuit families [41]. Section 2.2 and Table 3 distinguish channel equivalence, state equivalence on a declared input domain, interface-relative observational equivalence, and equality of a selected expectation. An adequacy population must state which semantics defines its equivalence exclusions; the unrestricted channel results continue to quantify over every circuit input. For small unitary circuits, comparing the full unitaries up to global phase provides circuit-equivalence ground truth, whereas state-vector comparison for one input provides only output-state ground truth for that input. For general quantum circuits, the standard promise version of non-identity checking up to global phase is QMA-complete, and the corresponding non-equivalence problem inherits that worst-case hardness [79, Sec. 4, especially Definition 3, Theorem 1, and the remark following Definition 3 on p. 469]. In QMA (Quantum Merlin–Arthur), a polynomial-time quantum verifier checks a polynomial-size quantum witness with bounded error. Canonicalization, stabilizer methods, decision diagrams, and other specialized equivalence tools can nevertheless remove many mutants in tractable circuit families without solving the unrestricted problem.
C.4 Mutant–Mutant Redundancy Filter
The same filtering idea applies to both original-versus-mutant and mutant-versus-mutant comparisons. If two mutants produce identical optimized circuits,
then they are redundant under the same transpiler assumptions stated above. For expectation-value behavior, define
Two mutants are exactly redundant under the fixed expectation-value test when . Equality of the absolute original-mutant gaps, , is not sufficient because the signed expectation shifts can point in opposite directions. For a distribution-level test, redundancy instead requires equality of the relevant outcome distributions, and equality of their means is generally insufficient. Two mutants that are redundant under one test may differ under another, so the classification must name the input, observable or measurement, and equivalence tolerance. Certified equality of population detection indicators across the declared suite permits representative classification as specified in Proposition 3.1; transferring full distributions or sample-level outcomes requires the stronger corresponding equivalence. For a fixed adequacy population, weight resolved class indicators by their original multiplicities: if class has size and common detection indicator , the score is . Unresolved classes instead contribute to the bounds in Equation (33). An unweighted score over representatives instead measures a different, class-level population and must be named as such. Near-equivalence inferred from finite samples or approximate output profiles is only a budgeted clustering heuristic and can discard behavior that a stronger test would distinguish. This supports a budgeted mutation strategy:
generate many candidates filter equivalent mutants
→ cluster redundant mutants → sample representatives.
C.5 Subsumption and Mutation Buckets
Subsumption is defined relative to a test collection and a detection rule. Using from Equation (6), mutant dynamically subsumes when is nonempty and , because any test that detects also detects . This framework uses the established test-collection-relative notion of dynamic subsumption [46, 47]. This relation cannot be inferred from a single value of or from syntactic mutation type alone. The population-level relation uses exact detection sets; subsumption inferred from finite-shot kills is a noisy estimate whose errors are correlated across mutants when original-circuit shots are reused.
Many mutation operators produce similar behavioral effects. For example, replacing X by Y and replacing X by Z may both strongly disturb the same tests. Executing both may provide little additional information. We therefore group candidate mutants into buckets according to expected effect profile. A bucket may be defined by gate type, mutation type, local topology, estimated , or empirical output-distance profile. Under a fixed budget, we select at most representatives per bucket. For smoke testing or debugging, a practical rule is to prefer diverse high-effect mutants over many similar high-effect mutants. For comparing suite adequacy, representative selection should instead preserve the declared population or stratification and include difficult mutants near the detection boundary; maximizing the evaluated suite's own gaps would make the assessment circular. Unlike exact equivalence or established subsumption, bucket membership provides no semantic guarantee and must be evaluated by the coverage or fault-detection behavior lost when representatives are omitted.
D Local Perturbation Remainder
The first-order generator derivative is standard [10, Sec. III, especially Eqs. (3), (5), and (6)]; this appendix records only its local specialization and the nonasymptotic remainder used in Equation (31).
Proof of Equation (31). By Equation (9), the signed local expectation difference is for
The standard generator derivative and one further differentiation give
and
Taylor's theorem with an integral remainder and unitary invariance of the operator norm give
Because , Hölder's inequality bounds by . The reverse triangle inequality then yields Equation (31) with first-order magnitude .
E Mutation Operators, Test Oracles, and Applicability
Table 14 records what each tool or study changes, how its tests judge the resulting mutant, and which parts of our analysis can handle the edit. The final column describes our proposed application of the analysis to the published operators; the cited tools supply the mutations and tests in the preceding columns. The inventory records applicability by operator family; the fraction of generated mutants covered remains unmeasured. QuanForge additionally applies gate and parameter mutations to quantum neural networks, parameterized quantum circuits trained as learning models [26].
For each unitary edit, form on the union of the original and replacement supports before choosing an analysis. The table uses rotation for a fixed involutory axis, one-qubit for every fixed one-qubit relative unitary, Clifford when is Clifford, and spectral for other tractable local replacements. These cases overlap; deletion uses and insertion uses . A changed control or wire can enlarge the union support even when both operations have small arity. A tractable observable update still requires state expectations to determine the test's gap. Large-support non-involutory updates may instead need the bounded perturbative fallback; measurement, reset, and classical-control edits require a different model.
Passing one of these tests is distinct from establishing semantic equivalence. QMutPy’s syntactically equivalent gates and QCRMut’s gate classes group compatible signatures; channel equivalence requires a separate semantic check. QCRMut rejects unchanged circuit objects, while QuMu leaves equivalent-mutant identification to future work. Our earlier unit-testing study removes matching output statevectors at tolerance for the tested input [27, Secs. III-B, IV-A–IV-C]. Such input-specific numerical filtering must be distinguished from an algebraic certificate of channel equivalence. An absence of semantic certification is not evidence that every generated mutant is non-equivalent.
The Rotation Gate Insertion (RGI) operator in that study is on the inserted gate's qubit [27, Sec. IV-A]. For fixed , its axis satisfies , so Theorem 2.4 and Corollary 2.10 apply even though need not be a Pauli string. This establishes applicability to the published rotational operator; evaluating the present planner and establishing the fault realism of our illustrative 0.01-radian offset require further evidence beyond that study.
Table 14: Published mutation operators and tests, mapped to the analyses available in this paper. The final column uses the overlapping cases defined in Appendix E; equivalence checks are discussed separately in the text.
| Tool / study | Mutations generated | Test used in the cited work | Analysis available here |
|---|---|---|---|
| QMutPy [22, Sec. 2.2] | Gate replacement, deletion, insertion; measurement insertion and deletion. | Existing Python test assertions. | Unitary edits: rotation, one-qubit, Clifford, or spectral according to ; measurement edits outside scope. |
| Muskit [24] | Add, remove, and replace gates. | Specified valid outputs and probabilities; wrong-output and statistical oracles. | Same unitary cases; gate names alone do not establish a rotation family. |
| QCRMut [25, Secs. 2.3–2.4, 3.2] | Insert, delete, change gate name, or change attributes (parameters and qubit locations); immutable positions. | Experiment uses specified outputs and chi-square comparison. | Parameter changes may be rotations; other changes use one-qubit, Clifford, or spectral analysis on the support union. |
| QuMu [14, Secs. 4–5] | Initialization errors, gate swaps, control-gate faults, gate duplication and deletion. | Sampled output-histogram distance with tolerance. | Unitary gate and control edits use the matching case; a changed input is outside the fixed-input model unless represented as a unitary preparation edit. |
| Unit-testing study [27, Secs. III-B, IV-A-IV-C] | Gate replacement, deletion, insertion, and Rotation Gate Insertion (RGI) with . | Statistical, Swap, Statevector, and Inverse tests. | RGI has one-qubit support and a fixed involutory axis; other gate edits use the case determined by . |