Skip to content

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.

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 ⟨ψ∣ψ⟩=1\langle\psi\vert\psi\rangle=1 or Tr⁡ρ=1\operatorname{Tr}\rho=1 Find the missing measure or coefficient; normalize only a nonzero state with finite norm.
Probability normalization ∑ap(a)=1\sum_a p(a)=1 or ∫p(x) dx=1\int p(x)\,dx=1 Check projector completeness, POVM effects, or integration domain.
Reality of observables ⟨A⟩\langle A\rangle is real when AA 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 ℏ\hbar, masses, lengths, or frequencies.
Basis change between orthonormal bases, the change matrix satisfies S†S=SS†=IS^\dagger S=SS^\dagger=I 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 ρ†=ρ\rho^\dagger=\rho, Tr⁡ρ=1\operatorname{Tr}\rho=1, 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.

For a pure state, the normalization check is

⟨ψ∣ψ⟩=1.\langle\psi\vert\psi\rangle = 1.

In a discrete orthonormal basis with components cnc_n, this becomes

∑n∣cn∣2=1.\sum_n \lvert c_n\rvert^2 = 1.

In a position representation, it becomes

∫∣ψ(x)∣2 dx=1,\int \lvert\psi(x)\rvert^2\,dx = 1,

with the correct measure for the chosen coordinates. In spherical coordinates, for example, the radial and angular measure is part of the normalization; omitting r2sin⁡θr^2\sin\theta is not a harmless convention change.

For a nonzero vector ∣χ⟩\lvert\chi\rangle with finite norm, compute

N=⟨χ∣χ⟩,∣ψ⟩=∣χ⟩N.N = \sqrt{\langle\chi\vert\chi\rangle}, \qquad \lvert\psi\rangle = \frac{\lvert\chi\rangle}{N}.

If a calculation starts from an unnormalized state, probabilities and expectation values must use the normalization explicitly:

⟨A⟩χ=⟨χ∣A∣χ⟩⟨χ∣χ⟩.\langle A\rangle_\chi = \frac{\langle\chi\vert A\vert\chi\rangle} {\langle\chi\vert\chi\rangle}.

For a projective measurement with projectors PaP_a, the completeness relation is

∑aPa=I.\sum_a P_a = I.

The Born probabilities then satisfy

∑ap(a)=∑a⟨ψ∣Pa∣ψ⟩=⟨ψ∣I∣ψ⟩=1\sum_a p(a) = \sum_a \langle\psi\vert P_a\vert\psi\rangle = \langle\psi\vert I\vert\psi\rangle = 1

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 [0,1][0,1].

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.

An observable is represented by a self-adjoint operator. For a normalized state,

⟨A⟩∗=⟨ψ∣A†∣ψ⟩.\langle A\rangle^* = \langle\psi\vert A^\dagger\vert\psi\rangle.

Therefore ⟨A⟩\langle A\rangle is real when A†=AA^\dagger=A 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:

Var⁡(A)=⟨(A−⟨A⟩)2⟩≥0\operatorname{Var}(A) = \langle (A-\langle A\rangle)^2\rangle \ge 0

when the second spectral moment is finite. For a pure state, evaluate it as ∥(A−⟨A⟩I)ψ∥2\|(A-\langle A\rangle I)\psi\|^2 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.

Many formal manipulations are conditional. Before using an identity, verify the property it requires.

  • A projector must satisfy P2=PP^2=P and P†=PP^\dagger=P.
  • A unitary operator must satisfy U†U=UU†=IU^\dagger U=UU^\dagger=I.
  • 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.

Dimensional analysis catches many wrong formulas before detailed algebra begins. In particular:

  • the exponent in e−iHt/ℏe^{-iHt/\hbar} is dimensionless;
  • the phase px/ℏpx/\hbar is dimensionless;
  • the commutator [x,p]=iℏI[x,p]=i\hbar I has units of action;
  • probabilities are dimensionless, while probability densities carry inverse measure units;
  • an expectation value of AA has the same units as AA.

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.

A change between orthonormal bases should be unitary. With

d=Sc,Af=SAeS†,d = Sc, \qquad A_f = S A_e S^\dagger,

the expectation value is preserved:

d†Afd=c†Aec.d^\dagger A_f d = c^\dagger A_e c.

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.

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 t→0t\to0;
  • very large mass or action compared with ℏ\hbar;
  • 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 ii, factors of ℏ\hbar, and swapped indices.

A density operator must satisfy

ρ†=ρ,Tr⁡ρ=1,⟨ϕ∣ρ∣ϕ⟩≥0\rho^\dagger=\rho, \qquad \operatorname{Tr}\rho=1, \qquad \langle\phi\vert\rho\vert\phi\rangle\ge0

for every vector ∣ϕ⟩\lvert\phi\rangle. In finite dimension, positivity is equivalent to all eigenvalues being nonnegative.

For a pure state,

ρ=∣ψ⟩⟨ψ∣,ρ2=ρ.\rho = \lvert\psi\rangle\langle\psi\rvert, \qquad \rho^2 = \rho.

In finite dimension, Tr⁡ρ2=1\operatorname{Tr}\rho^2=1 for a pure state and Tr⁡ρ2<1\operatorname{Tr}\rho^2<1 for a mixed state. Values above 11 exclude a valid state in exact arithmetic, but a purity below 11 does not establish positivity. For example, diag⁡(0.6,0.6,−0.2)\operatorname{diag}(0.6,0.6,-0.2) is Hermitian, has trace one and Tr⁡(ρ2)=0.76\operatorname{Tr}(\rho^2)=0.76, yet its negative eigenvalue makes it invalid. Always check positivity separately.

For a bipartite state ρAB\rho_{AB}, the reduced state of subsystem AA is

ρA=Tr⁡BρAB.\rho_A = \operatorname{Tr}_B\rho_{AB}.

The most common error is tracing over the wrong subsystem or using an inconsistent tensor-product ordering. After computing a reduced state, check

Tr⁡ρA=1\operatorname{Tr}\rho_A = 1

and verify local expectation values for bounded observables:

Tr⁡A(ρAA)=Tr⁡AB(ρAB(A⊗IB)).\operatorname{Tr}_A(\rho_A A) = \operatorname{Tr}_{AB}(\rho_{AB}(A\otimes I_B)).

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.

A global phase does not change the physical pure state:

∣ψ⟩↦eiα∣ψ⟩.\lvert\psi\rangle \mapsto e^{i\alpha}\lvert\psi\rangle.

Relative phases do change interference. In an orthonormal two-level basis, take a normalized state, ∣a∣2+∣b∣2=1|a|^2+|b|^2=1:

∣ψ⟩=a∣0⟩+b∣1⟩,\lvert\psi\rangle = a\lvert0\rangle + b\lvert1\rangle,

the probability of the ++ outcome in the basis

∣+⟩=∣0⟩+∣1⟩2\lvert+\rangle = \frac{\lvert0\rangle+\lvert1\rangle}{\sqrt2}

is

p(+)=∣a+b∣22.p(+) = \frac{\lvert a+b\rvert^2}{2}.

Thus changing the relative phase between aa and bb can change p(+)p(+), even though multiplying both amplitudes by the same phase cannot.

Consider

∣χ⟩=2∣0⟩+i∣1⟩.\lvert\chi\rangle = 2\lvert0\rangle + i\lvert1\rangle.

The norm is

⟨χ∣χ⟩=5,\langle\chi\vert\chi\rangle = 5,

so the normalized state is

∣ψ⟩=2∣0⟩+i∣1⟩5.\lvert\psi\rangle = \frac{2\lvert0\rangle+i\lvert1\rangle}{\sqrt5}.

For a measurement in the {∣0⟩,∣1⟩}\{\lvert0\rangle,\lvert1\rangle\} basis,

p(0)=45,p(1)=15,p(0)+p(1)=1.p(0) = \frac{4}{5}, \qquad p(1) = \frac{1}{5}, \qquad p(0)+p(1)=1.

For the ++ basis outcome,

p(+)=∣2+i∣210=12.p(+) = \frac{\lvert 2+i\rvert^2}{10} = \frac{1}{2}.

The +Y+Y probability is more revealing: ⟨Y⟩=4/5\langle Y\rangle=4/5, so p(+Y)=(1+4/5)/2=9/10p(+Y)=(1+4/5)/2=9/10. Thus the balanced XX result does not mean the state has lost its phase information. The common replacement ∣ψ⟩↦eiα∣ψ⟩\lvert\psi\rangle\mapsto e^{i\alpha}\lvert\psi\rangle leaves every probability unchanged.

  1. Let ∣χ⟩=(1+i)∣0⟩+2∣1⟩\lvert\chi\rangle=(1+i)\lvert0\rangle+2\lvert1\rangle. Normalize the state and compute the probabilities for measuring ∣0⟩\lvert0\rangle and ∣1⟩\lvert1\rangle.
Solution

The norm is ⟨χ∣χ⟩=∣1+i∣2+∣2∣2=2+4=6\langle\chi\vert\chi\rangle=\lvert1+i\rvert^2+\lvert2\rvert^2=2+4=6. Therefore

∣ψ⟩=(1+i)∣0⟩+2∣1⟩6.\lvert\psi\rangle = \frac{(1+i)\lvert0\rangle+2\lvert1\rangle}{\sqrt6}.

The measurement probabilities are p(0)=2/6=1/3p(0)=2/6=1/3 and p(1)=4/6=2/3p(1)=4/6=2/3.

  1. Is the matrix
ρ=(1/23/43/41/2)\rho = \begin{pmatrix} 1/2 & 3/4 \\ 3/4 & 1/2 \end{pmatrix}

a valid density matrix?

Solution

It is Hermitian and has trace one, but its eigenvalues are 5/45/4 and −1/4-1/4. The negative eigenvalue violates positivity, so it is not a valid density matrix.

  1. In the ordered basis ∣00⟩,∣01⟩,∣10⟩,∣11⟩|00\rangle,|01\rangle,|10\rangle,|11\rangle, let
ρAB=diag⁡(12,16,13,0).\rho_{AB}=\operatorname{diag}\left(\frac12,\frac16,\frac13,0\right).

Find both reduced states and use ZZ to check which subsystem each describes. Why is this a more sensitive test of factor ordering than a Bell state?

Solution

Sum over the BB index to obtain

ρA=diag⁡(23,13),ρB=diag⁡(56,16).\rho_A=\operatorname{diag}\left(\frac23,\frac13\right), \qquad \rho_B=\operatorname{diag}\left(\frac56,\frac16\right).

Consequently ⟨ZA⟩=1/3\langle Z_A\rangle=1/3 and ⟨ZB⟩=2/3\langle Z_B\rangle=2/3, agreeing with the joint traces using Z⊗IZ\otimes I and I⊗ZI\otimes Z. Swapping the two reductions gives the wrong local averages. A Bell state has equal reductions I/2I/2, so that particular swap error can go undetected.

  • 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.