Worked Examples
A worked example is useful when its assumptions, method, and checks match the calculation you need to do. This index helps you find that match: start from the observable or mathematical obstacle, then follow the link to the full calculation. The linked subject pages own the explanations and derivations; the tables here identify what to calculate and what would count as a successful check.
Use Examples by System when the Hamiltonian or physical system is fixed, Examples by Method when you need to practice a technique, or Examples by Level when you need to check your preparation. For a proof rather than an application, use the Derivation Index; for practice without immediately reading a solution, use the Problem Index.
Choose an example by the calculation
Section titled “Choose an example by the calculation”Each collection below links to teaching pages, compact formula checks, and related calculations. A formula card is useful after the assumptions have been established; it is rarely enough to diagnose an unfamiliar problem.
| Calculation | Example collection | Check before transferring the result |
|---|---|---|
| Normalize a wavefunction, spinor, or density operator | Normalization examples | Match the integration measure and distinguish square-integrable states from continuum normalization. Trace one does not by itself imply positivity. |
| Find a mean, variance, or outcome probability | Expectation-value examples | Specify the state, observable, and representation. An expectation value need not be an allowed individual outcome. |
| Diagonalize a finite Hamiltonian and evolve a state | Matrix-mechanics examples | State the ordered orthonormal basis; check Hermiticity, eigenvector normalization, and the initial condition. |
| Estimate energy shifts or transition amplitudes | Perturbation-theory examples | Identify the small parameter and the relevant spectral gaps. Treat degeneracy before using nondegenerate formulas. |
| Match waves and compute transmission or a cross section | Scattering examples | Fix the incident channel and amplitude convention; compare fluxes, not amplitudes alone. |
| Change measurement axis or couple angular momenta | Spin examples | Specify spin versus Pauli matrices, measurement axes, basis order, and any phase convention for coupled states. |
| Form a mixture, reduce a state, or apply a channel | Density-matrix examples | Fix subsystem order and test Hermiticity, positivity, and trace. Distinguish classical mixing from coherent superposition. |
Match the assumptions before the algebra
Section titled “Match the assumptions before the algebra”Write down four items before borrowing an example: the space and state, the operator and boundary conditions, the quantity being predicted, and the approximation or numerical limit. Two problems with similar equations can differ in all four.
For instance, a normalized radial state uses the measure appropriate to the chosen radial function. With a normalized spherical harmonic, obeys , whereas obeys . The radial Schrödinger equation explains the transformation and the boundary condition at the origin. A successful one-dimensional normalization calculation cannot be transferred to by changing the variable name alone.
Similarly, for a one-dimensional, stationary scattering problem with a real potential, equal mass on both sides, and one propagating channel in each asymptotic region, write the incident amplitude as one and the transmitted amplitude as . For positive wave numbers and ,
The velocity factor is part of the observable. Absorption, additional channels, or a closed transmitted channel change the applicable check. Use Reflection and Transmission Coefficients for the full flux argument. These distinctions are standard in Shankar’s treatments of wave mechanics and scattering, cited below.
A method-selection example: two nearly degenerate levels
Section titled “A method-selection example: two nearly degenerate levels”Suppose the task is to estimate the energies of the Hermitian two-level Hamiltonian
where both and have units of energy. If an exact answer is the goal, use Two-State Hamiltonians. If the goal is to test an approximation, compare its result with
The diagonal matrix elements of the perturbation vanish, so the first-order energy correction is zero. The state mixing is nevertheless of order , and the leading energy correction is second order. A zero first-order shift does not establish that the perturbation is harmless. Nondegenerate Perturbation Theory explains the gap denominators; Degenerate Perturbation Theory explains how to choose a basis inside a degenerate subspace.
As approaches zero at fixed nonzero , the expansion fails even though the exact eigenvalues remain finite. At they are . The relevant comparison is coupling versus level separation, not coupling versus an arbitrarily chosen zero of energy. This small example lets you choose the correct method before attempting a larger matrix or a near-degenerate atomic multiplet.
Extend a familiar example to graduate work
Section titled “Extend a familiar example to graduate work”Choose an extension that changes one physical or mathematical difficulty at a time.
| Starting calculation | Next worked route | New question to answer |
|---|---|---|
| A pure two-qubit state | Partial Trace Exercises | Which predictions can be recovered from the reduced state, and which correlations require the joint state? |
| Unitary two-level evolution | Amplitude Damping Channel | How do populations and coherences change while the map remains completely positive and trace preserving? |
| Exact barrier matching | WKB Barrier Tunneling | Which action scale controls the approximation, and where are turning-point connection formulas needed? |
| A weak short-range potential | Gaussian Potential Born | How does the momentum transfer enter the amplitude, and what limits the Born approximation? |
| A small matrix eigensystem | Sparse Eigensolvers | Has the computed eigenpair converged for the discretized operator, and has that operator converged to the intended continuum problem? |
For density operators and channels, Watrous’s The Theory of Quantum Information, Chapters 1–2, supplies the finite-dimensional mathematical framework. A channel requires complete positivity, which is stronger than checking that a few selected input states remain positive.
Use examples as numerical benchmarks
Section titled “Use examples as numerical benchmarks”An exactly solvable model can test an implementation, but agreement at one parameter value is weak evidence. Use Analytic Benchmarks to select a target and Convergence Tests to distinguish numerical errors.
For a normalized computed vector and approximate eigenvalue of a finite Hermitian matrix , calculate the residual
The distance from to the spectrum of is at most . This is a statement about the finite matrix, not an error bound relative to the continuum Hamiltonian. Nor does it identify a unique eigenvector inside a cluster of nearly degenerate eigenvalues. Trefethen and Bau explain the relevant residual and conditioning arguments.
Vary the grid spacing, basis size, finite-box size, or time step separately as applicable. Check a physical invariant and an observable against an independent result. Norm conservation alone cannot establish that a time-evolution algorithm has the correct phase or transition frequency. For an executable investigation, follow the Labs instructions and the Validation Tests guide.
Diagnostic exercises
Section titled “Diagnostic exercises”A vanishing first-order shift
Section titled “A vanishing first-order shift”In the two-level example, take . Estimate the positive energy using the second-order expansion, compare it with the exact value, and explain what the vanishing first-order correction does not tell you.
Solution
The approximation gives , whereas the exact value is . The absolute error is approximately , consistent with an error of order . The eigenstate also acquires mixing of order ; a zero first-order energy shift does not imply an unchanged state. When the gap becomes comparable to , use the exact two-level treatment or an appropriate coupled subspace.
A trace-one matrix that fails the state test
Section titled “A trace-one matrix that fails the state test”A calculation returns in an orthonormal qubit basis. It is Hermitian and has trace one. Which example route should you consult, and what check rejects it?
Solution
Use Density-Matrix Examples and its link to Density Operators. The eigenvalues are , namely and . The negative eigenvalue violates positivity: projection onto the corresponding normalized eigenvector would give a negative probability. Renormalizing the trace cannot repair this failure.
References
Section titled “References”- R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994 — wave mechanics, spin, perturbation theory, and scattering, with explicit worked calculations.
- L. N. Trefethen and D. Bau III, Numerical Linear Algebra, Society for Industrial and Applied Mathematics, 1997 — residuals, conditioning, and the distinction between an accurate matrix computation and a suitable mathematical model.
- J. Watrous, The Theory of Quantum Information, Cambridge University Press, 2018, Chapters 1–2 — positive operators, reduced states, measurements, and channels; author-hosted manuscript and errata.