Two quantum circuits can produce the same ideal output and have different costs on a physical processor. Reducing the number of two-qubit gates is often a useful objective. But the experimenter usually cares about something more specific than a gate count: an energy, a magnetization, a probability of satisfying a constraint, or another quantity extracted from the output.

The effect of noise on these quantities need not be the same. Understanding this difference can help us choose the circuit metrics that matter most for a particular experiment.

Three quantities with different sensitivities

In a materials simulation, magnetization may be estimated by averaging local Z measurements across a register. In quantum chemistry, the expectation of a Hamiltonian is calculated from a weighted sum of Pauli observables, some of which involve many qubits. In a constrained optimization experiment, the probability of sampling a feasible assignment may be an important result in its own right.

A change to one measured bit has a modest effect on an average over a large register. It can change the sign of a parity observable completely. It can also take a feasible assignment outside the permitted set. These are different mathematical responses to the same kind of readout error.

An illustrative noise model

Suppose that every measured bit is independently flipped with probability p. Write its ideal Z measurement as z ∈ {−1, +1}. The mean measured value is (1 − 2p)z. For a product of k such measurements, independence gives an attenuation factor of (1 − 2p)k.

Consequently, the expectation of a mean of local Z values scales by (1 − 2p), while the expectation of a k-qubit Z parity scales by its kth power. Neither statement requires us to assume a particular compiled circuit. They follow directly from the deliberately simple measurement model.

The example below calculates these factors and the probability that an initially feasible two-bit, one-hot assignment remains feasible after the same independent bit flips. Both bits can flip and the assignment remains one-hot. If exactly one flips, the assignment becomes invalid. Its feasible probability is therefore (1 − p)2 + p2.

Illustration: standalone Python calculation.

from math import isclose
p = 0.05
for k in (1, 4, 8):
    print('parity support', k, 'attenuation', (1-2*p)**k)
feasible = (1-p)**2 + p**2
print('one-hot feasible probability', feasible)
assert isclose(feasible, 0.905)
assert (1-2*p)**8 < (1-2*p)

The example prints:

parity support 1 attenuation 0.9
parity support 4 attenuation 0.6561
parity support 8 attenuation 0.4304672100000001
one-hot feasible probability 0.9049999999999999

Actual experiments can have correlated errors, state-preparation errors, gate errors and relaxation throughout the circuit. The simple model is valuable because it isolates why different observables can react differently even to one source of noise.

What should a compilation experiment measure?

Start with the ideal quantity and a circuit that produces a meaningful nontrivial state. Compile that circuit for a fixed hardware description and retain the mapping between the measured bits and the original logical qubits. Evaluate each output with the same observable definition. If using a calibration-derived noise model, keep the calibration and assumptions common to the alternatives, then identify the results explicitly as simulations.

Record circuit depth and two-qubit gate count alongside the observable of interest. For a sampling-based estimate, calculate uncertainty from the observations. A difference smaller than the uncertainty may require more shots to distinguish reliably. For a Hamiltonian, consider the contributions and covariances within measurement groups rather than treating each term as independent by default.

On actual hardware, interleaving the circuit alternatives within a common calibration period can help reduce confounding from device drift. Repeated executions also help distinguish a persistent difference from ordinary statistical variation.

Choosing an objective that serves the experiment

Gate counts characterize the implementation. The measured observable and its uncertainty characterize the experiment. For an eight-qubit parity, even independent readout errors alone can have a much greater effect than on a single-qubit mean.

With the 4colors Quantum Compiler, you can search for hardware-specific implementations of your circuits and use the outputs in your own observable-level experiments.