SPAM Errors
State-preparation and measurement (SPAM) errors affect the two ends of a quantum experiment. An imperfect preparation emits a different state from the target; an imperfect measurement changes outcome probabilities or the state left afterward. The observed frequencies combine both. Even infinitely many repetitions need not tell us which end caused a discrepancy.
This page explains that ambiguity, when a classical assignment matrix describes readout, and what calibration can support. The examples use finite-dimensional systems; leakage, discarded outcomes and persistent detector memory must be included when present.
Helpful background. Measurement in circuits supplies outcome probabilities and conditional states. Quantum instruments distinguishes a detector’s effects from its backaction; variance and covariance explains the uncertainty propagation below.
States and detector effects in the Born rule
Section titled “States and detector effects in the Born rule”Let command prepare actual state , let describe the intervening process, and let setting select POVM effects . Then
An error must be defined relative to an intended state, effect or operation. For example, preparation infidelity relative to a pure target is . Inferring this quantity from frequencies requires a known or independently bounded detector. Conversely, inferring detector effects requires known or bounded probe states. A small observed basis-state error alone establishes neither claim separately.
A device that simply emits can be represented by the replacement channel . This specifies the output, not the physical reset mechanism. When preparation has a retained herald or reset result , use a CP branch acting on a specified reference input:
The sum of complete branches is trace preserving. Normalize a selected branch only when its probability is positive, and retain that probability when comparing yield or combining runs. Similarly, retain leakage flags, losses and invalid detector outcomes rather than silently converting every event into a bit.
If preparation leaves correlations with an environment that subsequently interacts with the system, a reduced state and a fixed system channel may not suffice. Likewise, a detector can depend on previous measurements. The simple Born expression assumes that its state and map describe the specified experiment; leakage and crosstalk develops examples where a reused local map fails.
What an assignment matrix describes
Section titled “What an assignment matrix describes”For a fixed orthonormal basis, write . A classical readout model first measures this basis and then reports with probability . Reported outcomes are rows, ideal outcomes are columns:
Its effective quantum effects are
For arbitrary input states, this represents a terminal POVM exactly if and only if every effect is diagonal in this rank-one basis. A general POVM can agree with this model on all basis inputs and disagree on superpositions. For a coarse projective measurement with higher-rank , the stronger requirement is that be a scalar multiple of identity within each block, with no cross-block terms; commuting with the projectors alone is insufficient.
This condition concerns outcome probabilities. It says nothing about the state after measurement. Classical correction based on a detector model is studied by Maciejewski, Zimborás and Oszmaniec (2020); measurement-error mitigation develops the estimators.
A detector error missed by basis calibration
Section titled “A detector error missed by basis calibration”Consider two effects for outcome zero:
Both are physical: their eigenvalues lie in , so their complements are positive too. The tilted effect has eigenvalues approximately and . Both report zero with probabilities on and on . On , however, those probabilities are and .
For ,
The same basis-state calibration supports both effects. Their predictions separate between the calibration states because one effect contains an off-diagonal matrix element. Additional trusted superposition probes can test this difference; the circle shown here cannot determine an imaginary off-diagonal component.
Measurement tomography reconstructs effects from sufficiently informative trusted probes; detector tomography was demonstrated experimentally by Lundeen et al. (2009). A calibration performed only on basis states estimates diagonal entries, not the entire detector.
First outcomes do not determine repeated outcomes
Section titled “First outcomes do not determine repeated outcomes”An instrument supplies conditional maps with effect . Compare
Both have the ideal POVM. The first leaves the measured eigenstate; the second prepares afterward. Given first outcome zero, a second ideal measurement reports zero with probability one or one half. An assignment fidelity cannot determine this backaction or establish a nondemolition measurement.
Why a confusion table does not separate SPAM
Section titled “Why a confusion table does not separate SPAM”Without an intervening process, calibration measures
The command is not automatically the actual ideal outcome . If preparation is a classical mixture with weights and measurement has response , then
Already this restricted model has nonunique physical factorizations. For symmetric flips,
The table can arise from perfect preparation and readout flips, from the reverse allocation, or from flips at each end. Another allocation is . All yield the same frequencies. Additional shots narrow uncertainty in without selecting a factorization.
State tomography uses calibrated measurement; detector tomography uses calibrated preparations; conventional process tomography uses both. Independent references, physical bounds or additional experiments can resolve some ambiguities, but their assumptions matter. For example, Lin et al. (2021) analyze SPAM separation using gate assumptions and an initially uncorrelated qubit, with bounds for imperfect gates. An unknown extra component does not become a trusted reference merely by being added to the circuit.
Self-consistent characterization and gauge freedom
Section titled “Self-consistent characterization and gauge freedom”Gate-set tomography fits preparation, measurement and operations jointly. In Liouville coordinates a sequence probability is
For an invertible coordinate transformation , all such probabilities remain unchanged under
The adjacent factors cancel. Not every preserves physical states, effects and channels, so algebraic equivalence must not be confused with an arbitrary physical reassignment. Nevertheless, ambiguity can persist among fully physical models.
For example, suppose all intervening gates are unitary rotations, preparations have Bloch vectors , and binary effects are . Replacing the preparation length by and the detector contrast by preserves every probability:
Both descriptions are physical. Even arbitrary unitary sequences do not distinguish these two allocations. A genuinely trusted preparation or a further experiment with justified extra structure can do so. Nielsen et al. (2021) explains gauge freedom and practical gate-set tomography; device characterization gives the experimental methods.
Separate three questions: identifiability asks whether different parameters predict exactly the same data; conditioning asks how much uncertainty distinguishable parameters acquire; model adequacy asks whether the assumed model predicts the experiment at all. More shots address statistical uncertainty, not an exact gauge freedom or an omitted physical mechanism.
Correlations and drift in calibration
Section titled “Correlations and drift in calibration”A shared fluctuating variable can affect preparation and detection together. Then
in general. For an extreme example, half the runs prepare with effect , while the other half prepare with . Outcome zero always occurs. Averaging the state and effect separately gives and predicts probability . Jackson and van Enk (2015) discuss tests for correlated SPAM.
For classical responses varying across epochs, the exact relation is
Thus matching calibration and science epoch weights and keeping the science distribution fixed across epochs are sufficient for using the averaged response. They are not necessary: cancellation of the covariance term can also occur. Matching weights alone does not suffice when the prepared distribution changes with detector quality.
Acquire different commands in interleaved or randomized order, retain times and compare predictions on additional settings and later runs. This helps distinguish drift from command dependence; it does not make the device stationary (Proctor et al., 2020). Similarly, matching one-bit readout marginals does not establish a product multiqubit response. A simultaneous error can flip both bits together; exercise7 quantifies the resulting discrepancy.
Observed correlations can originate in preparation, gates, readout or postprocessing. Tests aimed at readout correlations need trusted product probes or explicit preparation bounds. Control and readout calibration discusses the detector hardware, and device characterization develops tests using varied settings and sequences.
Readout correction and its uncertainty
Section titled “Readout correction and its uncertainty”For binary response, let and . Then
For and observed ,
Known calibration and independent shots give an unbiased estimator with
Invertibility requires , not positivity of this denominator. An anticorrelated detector can be relabeled. A small magnitude, however, magnifies sampling uncertainty. For symmetric error and true , the following standard deviations of the corrected population use shots and exactly known calibration:
| Error | Observed | Corrected standard deviation |
|---|---|---|
Values are rounded to six decimals. At the detector is uninformative and cannot be inverted. The second row illustrates poor conditioning even though the response is formally invertible.
Estimated calibration adds uncertainty. For and independent calibration covariance , first-order propagation adds , where
Shared data require cross-covariance terms. This linear approximation is unreliable when calibration fluctuations can approach the singular denominator. Clipping inverse estimates to physical probabilities changes the estimator and generally introduces bias; an inverse estimate outside is not a negative physical probability.
Correction changes an estimate under a model; it does not repair preparation, gates or measurement backaction. Correlated multiqubit response can also change the sampling cost (Bravyi et al., 2021). See measurement-error mitigation for constrained and observable-specific estimators. Likewise, fixed SPAM can enter randomized benchmarking as nuisance amplitude and offset under the standard stationary model; the fitted decay does not separately estimate preparation and readout errors (Magesan et al., 2012).
Exercises
Section titled “Exercises”1. Build an emitted-state channel
Section titled “1. Build an emitted-state channel”Show that is CPTP for any finite input dimension, and construct a preparation with success probability .
Solution
Write and use input basis . The rectangular Kraus operators satisfy
Branches and , for any density operator on the same output space, form a complete instrument. The successful output on a normalized input is ; its conditional state is only for . This example has input-independent success, whereas general preparation filters need not.
2. Reconstruct a coherent effect
Section titled “2. Reconstruct a coherent effect”Trusted inputs give outcome-zero probabilities . Find the effect and determine whether a binary assignment matrix can describe it on all states.
Solution
Write . The first two inputs give . The other probabilities are
Hence . The minus sign in the second equation follows from the stated convention. The eigenvalues are approximately and , so is a valid POVM. Its off-diagonal component rules out an exact classical assignment model in the computational basis, although the same basis-state table also fits a diagonal effect.
3. Compare repeated measurements
Section titled “3. Compare repeated measurements”Give Kraus operators for the two instruments and above, and compute their conditional second-read distributions.
Solution
One Kraus operator per branch suffices: and . Both have effect , and each complete family has a trace-preserving sum. After outcome zero, the normalized states are and . A second ideal read gives distributions and respectively. Identical first outcomes therefore do not imply identical instruments.
4. Find equivalent physical descriptions
Section titled “4. Find equivalent physical descriptions”Check the three factorizations of , and verify the Bloch-length example for an arbitrary sequence of unitary gates.
Solution
Multiplication gives . The pairs all give ; reversing either pair gives the same table. All factors are stochastic.
Unitary gates rotate Bloch vectors without changing their length. For state radius and detector contrast , the probability is . Both and give . A Liouville scaling of the three Bloch coordinates by implements this change on the specified states and effects; it commutes with every unitary rotation. It is not a physical state map on the entire Bloch ball, which illustrates why a coordinate gauge need not itself be a quantum channel.
5. Include finite calibration statistics
Section titled “5. Include finite calibration statistics”Take , , , science shots, and independent trusted basis-calibration shots per column. Find the leading standard deviation of corrected .
Solution
Here and . The science contribution to the variance is approximately . Independent binomial calibration has variances and . Contracting these with the squared derivatives and adds approximately . The combined leading standard deviation is .
This is a first-order uncertainty estimate, not an exact assertion of unbiasedness after substituting random calibration into a ratio. It also assumes the basis probes themselves are known and the calibration applies to the science shots.
6. Test an averaged calibration
Section titled “6. Test an averaged calibration”Two equally weighted epochs have symmetric readout errors . First take science population only in the second epoch. Then take equally weighted science epochs with populations . Compare inversion using average error with the desired population.
Solution
In the first case . Average-error inversion gives , whereas the contemporaneous response recovers .
In the second case the observed probabilities are and , averaging to . Despite matching epoch weights, average-response inversion gives , not the true average population . Here , and the difference between averaged observed probability and the product-of-averages prediction is . Equal weights remove one confounding mechanism, not the correlation between detector quality and prepared distribution.
7. Compare correlated and independent readout flips
Section titled “7. Compare correlated and independent readout flips”On a trusted probe, a detector flips both bits together with probability . Compare this with independent flips having the same marginal probabilities.
Solution
In order , the correlated and product distributions are
Both have one-bit error , but their total-variation distance is . The correlated error indicators have covariance ; the product covariance is zero. The parity-sign expectations are and . Thus marginal calibration misses a substantial parity difference. Without trusted preparation or quantitative bounds, this experiment would reveal a discrepancy in the complete preparation–readout experiment rather than identify its physical cause.
References
Section titled “References”- S. Bravyi, S. Sheldon, A. Kandala, D. C. McKay, and J. M. Gambetta, “Mitigating measurement errors in multiqubit experiments,” Physical Review A 103, 042605 (2021), doi:10.1103/PhysRevA.103.042605.
- C. Jackson and S. J. van Enk, “Detecting correlated errors in state-preparation-and-measurement tomography,” Physical Review A 92, 042312 (2015), doi:10.1103/PhysRevA.92.042312.
- J. Lin, J. J. Wallman, I. Hincks, and R. Laflamme, “Independent state and measurement characterization for quantum computers,” Physical Review Research 3, 033285 (2021), doi:10.1103/PhysRevResearch.3.033285.
- J. S. Lundeen, A. Feito, H. Coldenstrodt-Ronge, K. L. Pregnell, Ch. Silberhorn, T. C. Ralph, J. Eisert, M. B. Plenio, and I. A. Walmsley, “Tomography of quantum detectors,” Nature Physics 5, 27–30 (2009), doi:10.1038/nphys1133.
- F. B. Maciejewski, Z. Zimborás, and M. Oszmaniec, “Mitigation of readout noise in near-term quantum devices by classical post-processing based on detector tomography,” Quantum 4, 257 (2020), doi:10.22331/q-2020-04-24-257.
- E. Magesan, J. M. Gambetta, and J. Emerson, “Characterizing quantum gates via randomized benchmarking,” Physical Review A 85, 042311 (2012), doi:10.1103/PhysRevA.85.042311.
- E. Nielsen, J. K. Gamble, K. Rudinger, T. Scholten, K. Young, and R. Blume-Kohout, “Gate set tomography,” Quantum 5, 557 (2021), doi:10.22331/q-2021-10-05-557.
- T. Proctor, M. Revelle, E. Nielsen, K. Rudinger, D. Lobser, P. Maunz, R. Blume-Kohout, and K. Young, “Detecting and tracking drift in quantum information processors,” Nature Communications 11, 5396 (2020), doi:10.1038/s41467-020-19074-4.