Quantum circuit results are easier to trust when you separate amplitudes, probabilities, samples, and expectation values. This guide provides a reusable checklist for interpreting measurement output in simulators, Qiskit, Cirq, and quantum hardware, including bit ordering, histograms, shot counts, and common debugging checks.
Overview
A quantum circuit does not usually return one classical answer in the same way a conventional function does. Before measurement, an n-qubit state is described by amplitudes associated with basis states such as |00>, |01>, and |11>. An amplitude is generally a complex number. Its squared magnitude gives the probability of observing that basis state when the circuit is measured in the corresponding basis.
For example, a two-qubit state might be written as:
|ψ> = (|00> + |11>) / √2
The ideal probabilities are 50% for 00 and 50% for 11, with zero probability for 01 and 10. A run with 1,000 shots will not necessarily produce exactly 500 counts for each result. It produces samples from the distribution, so small fluctuations are expected.
Keep these output types distinct:
- Statevector: the simulated amplitudes before sampling. This is a compact mathematical description, not a list of measurement outcomes.
- Probability distribution: the ideal probability assigned to each basis state, usually calculated from amplitude magnitudes.
- Counts or samples: observed bitstrings from repeated measurements. These depend on the number of shots and, on hardware, noise.
- Expectation value: the average of an observable, such as a Pauli operator. It summarizes results numerically and may not be a probability.
For a broader example of interpreting an algorithm circuit, see the Grover’s Algorithm Tutorial. The same measurement principles apply whether the circuit is a search algorithm, a variational model, or a small learning exercise.
Checklist by scenario
When reading a statevector
- Confirm the number of qubits. An n-qubit statevector has
2^namplitudes. - Identify the basis-state ordering used by the tool. Do not assume the first array entry means the same qubit convention in every framework.
- Match each amplitude to its basis label.
- Compute the probability as
|amplitude|². - Check normalization: the probabilities should add to approximately 1, allowing for small numerical error.
A statevector can show interference that is invisible in a final histogram. Two amplitudes may have opposite phases and cancel after later gates, or combine constructively. Therefore, inspecting only the largest current amplitude can give a misleading picture of what the final measurement will show.
When reading shot counts or a histogram
- Confirm the shot count and whether every shot produced a valid recorded result.
- List the possible bitstrings for the measured qubits, including outcomes with zero counts if a complete comparison is useful.
- Convert each count to an empirical probability:
count / total shots. - Compare the empirical distribution with the ideal probabilities, not with a single expected bitstring.
- Look for concentration, forbidden outcomes, asymmetry, and changes caused by circuit depth or hardware execution.
For instance, counts such as {00: 493, 11: 507} support an approximately even two-outcome distribution. They do not prove that the state was exactly the ideal Bell state, because measurement counts alone do not reveal all phase information.
When using Qiskit or Cirq
Read the result object according to the measurement configuration rather than relying on a copied example. In Qiskit, counts are commonly returned as bitstrings associated with classical registers. The displayed order can appear reversed relative to the numerical order of qubit labels, particularly when comparing a count string with a circuit diagram. Check which qubit was mapped to each classical bit and document that mapping before interpreting a result.
In Cirq, measurement results are associated with measurement keys and are commonly represented as arrays of sampled bits. Histogram utilities may encode bit patterns as integers, so confirm the key, bit position order, and conversion convention before labeling a plot. A useful practice in both frameworks is to test a circuit with an unmistakable output, such as preparing one qubit in |1>, and verify that the reported label matches your intended mapping.
When evaluating an expectation value
- Write down the observable and its eigenvalue convention.
- Determine which measurement basis is required. A Z measurement, for example, is not automatically a measurement of X or Y.
- Map each outcome to its eigenvalue or contribution.
- Average the contributions over shots.
- Report uncertainty or at least the shot count when comparing close values.
An expectation value can be near zero even when individual outcomes are frequent and highly structured. It is an average, not a replacement for the underlying distribution.
What to double-check
Before acting on a result, use this compact review:
| Check | Question |
|---|---|
| Measurement basis | Were the qubits measured in the basis required by the question? |
| Register mapping | Which classical bit records each qubit? |
| Ordering | Does the framework display the most significant bit on the left, or use another convention? |
| Shots | Is the apparent difference larger than ordinary sampling variation? |
| Normalization | Do probabilities sum to approximately one? |
| Noise | Was the result produced by an ideal simulator, noisy simulator, or hardware? |
| Post-processing | Were results filtered, marginalised, rounded, or rescaled? |
If a distribution looks wrong, isolate the smallest circuit that reproduces it. The Quantum Circuit Debugging guide can help structure that process. When comparing hardware with an ideal simulator, also record connectivity assumptions, transpilation or compilation changes, measurement calibration choices, and the exact circuit submitted.
Common mistakes
- Treating the statevector as a measurement result: amplitudes describe possibilities; a measurement returns one sampled outcome per shot.
- Confusing amplitude with probability: an amplitude of
0.5does not mean a 50% probability unless its squared magnitude is 0.5. - Ignoring phase: complex phase may not change one immediate probability but can change later interference.
- Reading bitstrings without checking order: reversed labels can make a correct circuit appear incorrect.
- Expecting exact frequencies: finite shots introduce sampling variation.
- Comparing unlike outputs: a marginal distribution over two qubits is not directly comparable with a full distribution over four qubits.
- Assuming a simulator is hardware: ideal simulation omits many device effects. For a structured transition to a QPU, use the hardware job submission checklist.
When to revisit
Revisit this checklist whenever you change the SDK, backend, measurement keys, classical-register layout, simulator method, or plotting code. Tool APIs and display conventions can change, and a result object that was once easy to read may be represented differently after an upgrade. Treat release documentation as the authority for the version you are running.
It is also worth reviewing your interpretation before comparing a new algorithm run with an earlier benchmark, moving from an ideal simulator to noisy hardware, increasing circuit width, or adding error mitigation. Error-mitigation workflows can transform raw counts, so preserve both the original and processed results; the quantum error mitigation workflow covers that comparison in more detail.
As a final practical routine, save the circuit, backend or simulator name, software versions, shot count, measurement mapping, raw counts, and any post-processing steps together. Then write one sentence describing what the distribution should show. If the observed output disagrees, check ordering and measurement basis first, sampling second, and noise or circuit construction third. This habit turns quantum measurement from a confusing histogram into an auditable result.