Common Checks and Sanity Tests
Before trusting a quantum-mechanical calculation, check that the formal ingredients still satisfy the constraints that made them meaningful: normalized states, complete probabilities, correct operator assumptions, consistent units, consistent basis changes, valid density operators, correctly traced subsystems, sensible limits, and a clear distinction between global and relative phase.
Use these checks after a derivation, numerical computation, or basis translation. For the underlying ideas, see state vectors, the Born rule, observables, change of basis, or density operators. Passing these checks is necessary but does not prove that the chosen Hamiltonian or detector model describes the experiment.
Checking a quantum prediction
Section titled “Checking a quantum prediction”Start by naming five objects: the Hilbert space, the state, the measurement or observable, the representation, and any approximation. Then run the checks below in order.
| Check | What to verify | If it fails |
|---|---|---|
| State normalization | or | Find the missing measure or coefficient; normalize only a nonzero state with finite norm. |
| Probability normalization | or | Check projector completeness, POVM effects, or integration domain. |
| Reality of observables | is real when is self-adjoint | Recheck adjoints, boundary terms, and domains. |
| Operator assumptions | projectors, unitaries, Hamiltonians, and observables obey their defining conditions | Do not use a theorem whose hypotheses are absent. |
| Units | every sum adds like dimensions; every exponent and phase is dimensionless | Restore factors of , masses, lengths, or frequencies. |
| Basis change | between orthonormal bases, the change matrix satisfies and all objects transform together | Transform states, operators, and inner products consistently. |
| Limiting cases | zero coupling, small time, large mass, or known exact cases behave correctly | Identify which term or approximation has the wrong scale. |
| Density matrix validity | , , and eigenvalues are nonnegative | Find the source of the error; trace one alone does not establish positivity. |
| Reduced state | the trace is over the intended subsystem | Rebuild the tensor-product ordering and index contraction. |
| Phases | global phases cancel; relative phases affect interference | Decide whether the phase is removable or observable. |
The rest of the page expands each item into tests that catch common mistakes.
State Normalization
Section titled “State Normalization”For a pure state, the normalization check is
In a discrete orthonormal basis with components , this becomes
In a position representation, it becomes
with the correct measure for the chosen coordinates. In spherical coordinates, for example, the radial and angular measure is part of the normalization; omitting is not a harmless convention change.
For a nonzero vector with finite norm, compute
If a calculation starts from an unnormalized state, probabilities and expectation values must use the normalization explicitly:
Probability Normalization
Section titled “Probability Normalization”For a projective measurement with projectors , the completeness relation is
The Born probabilities then satisfy
when the state is normalized. For a continuous outcome, use the spectral or POVM measure; use a density integral when such a density exists. Densities may exceed one because they have inverse-measure units. Probabilities for actual events must lie in .
If probabilities do not sum or integrate to one, the likely causes are:
- a non-normalized state;
- an incomplete set of outcomes;
- a missing degeneracy label;
- a missing integration measure;
- a projector or effect applied in the wrong basis.
See Born Rule for Continuous Spectra when the outcome set is continuous.
Reality and Positivity Checks
Section titled “Reality and Positivity Checks”An observable is represented by a self-adjoint operator. For a normalized state,
Therefore is real when and the domains are appropriate. In exact arithmetic, an imaginary part indicates an error. In floating-point work, compare it with a scale-aware rounding estimate and convergence under increased precision. A significant imaginary part calls for checking adjoints, conjugation, boundary conditions, and domains.
The variance provides a second check:
when the second spectral moment is finite. For a pure state, evaluate it as when possible; subtracting two large nearly equal moments can lose numerical precision. A negative exact variance is impossible, while a tiny computed negative value needs a rounding and cancellation check.
Operator Assumptions
Section titled “Operator Assumptions”Many formal manipulations are conditional. Before using an identity, verify the property it requires.
- A projector must satisfy and .
- A unitary operator must satisfy .
- A Hamiltonian used to generate unitary time evolution must be self-adjoint.
- An observable must be self-adjoint, not merely a formal differential expression.
- A density operator must be positive and trace class in infinite-dimensional settings.
For finite matrices, Hermitian and self-adjoint are equivalent. In wave mechanics, boundary conditions and domains can decide whether a formal operator really is self-adjoint. The finite versus infinite-dimensional overview explains when those extra conditions affect a calculation.
Units and Dimensionless Phases
Section titled “Units and Dimensionless Phases”Dimensional analysis catches many wrong formulas before detailed algebra begins. In particular:
- the exponent in is dimensionless;
- the phase is dimensionless;
- the commutator has units of action;
- probabilities are dimensionless, while probability densities carry inverse measure units;
- an expectation value of has the same units as .
If a result contains a sum of terms with unlike dimensions, it is wrong. If a probability density is treated as a probability without integration, it is incomplete.
Basis-Change Checks
Section titled “Basis-Change Checks”A change between orthonormal bases should be unitary. With
the expectation value is preserved:
If a basis change changes a probability or expectation value, either the state, the operator, or the inner product was not transformed consistently. The Representation Translation Table gives the quick map between abstract, matrix, wavefunction, and density-operator notation.
For nonorthogonal bases, use the Gram matrix in the inner product; a valid coordinate change need not be unitary. Nonorthogonal bases and the inner-product matrix gives the transformation rules.
Limiting Cases
Section titled “Limiting Cases”A formula should behave sensibly in limits where the answer is already known or easier to understand.
Useful limits include:
- zero coupling or zero perturbation;
- short-time evolution ;
- very large mass or action compared with ;
- diagonal Hamiltonians or commuting observables;
- pure-state limits of density-operator formulas;
- product-state limits of composite-system formulas.
A limiting-case check is not a proof, but it is an efficient detector of missing signs, factors of , factors of , and swapped indices.
Density-Matrix Checks
Section titled “Density-Matrix Checks”A density operator must satisfy
for every vector . In finite dimension, positivity is equivalent to all eigenvalues being nonnegative.
For a pure state,
In finite dimension, for a pure state and for a mixed state. Values above exclude a valid state in exact arithmetic, but a purity below does not establish positivity. For example, is Hermitian, has trace one and , yet its negative eigenvalue makes it invalid. Always check positivity separately.
Reduced-State Checks
Section titled “Reduced-State Checks”For a bipartite state , the reduced state of subsystem is
The most common error is tracing over the wrong subsystem or using an inconsistent tensor-product ordering. After computing a reduced state, check
and verify local expectation values for bounded observables:
If this identity fails, check the indices, basis ordering, and subsystem labels. One successful observable is only a spot check; a complete operator basis tests the entire reduced matrix.
Phase Checks
Section titled “Phase Checks”A global phase does not change the physical pure state:
Relative phases do change interference. In an orthonormal two-level basis, take a normalized state, :
the probability of the outcome in the basis
is
Thus changing the relative phase between and can change , even though multiplying both amplitudes by the same phase cannot.
Worked checks with a complex qubit
Section titled “Worked checks with a complex qubit”Consider
The norm is
so the normalized state is
For a measurement in the basis,
For the basis outcome,
The probability is more revealing: , so . Thus the balanced result does not mean the state has lost its phase information. The common replacement leaves every probability unchanged.
Exercises
Section titled “Exercises”- Let . Normalize the state and compute the probabilities for measuring and .
Solution
The norm is . Therefore
The measurement probabilities are and .
- Is the matrix
a valid density matrix?
Solution
It is Hermitian and has trace one, but its eigenvalues are and . The negative eigenvalue violates positivity, so it is not a valid density matrix.
- In the ordered basis , let
Find both reduced states and use to check which subsystem each describes. Why is this a more sensitive test of factor ordering than a Bell state?
Solution
Sum over the index to obtain
Consequently and , agreeing with the joint traces using and . Swapping the two reductions gives the wrong local averages. A Bell state has equal reductions , so that particular swap error can go undetected.
References
Section titled “References”- P. A. M. Dirac, The Principles of Quantum Mechanics, 4th ed., Oxford University Press, 1958.
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, 2010.
- M. Reed and B. Simon, Methods of Modern Mathematical Physics I: Functional Analysis, revised ed., Academic Press, 1980.
- J. J. Sakurai and J. Napolitano, Modern Quantum Mechanics, 3rd ed., Cambridge University Press, 2020.
- R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994.
- J. von Neumann, Mathematical Foundations of Quantum Mechanics, Princeton University Press, 1955.