[Paper Review] MATLAB codes for teaching quantum physics: Part 1
This paper presents a pedagogical MATLAB-based framework for teaching introductory quantum mechanics by modeling wavefunctions as column vectors, operators as matrices, and using numerical simulations to reinforce Dirac's bra-ket formalism. It demonstrates how matrix operations in MATLAB help students intuitively grasp the vector nature of quantum states and the matrix representation of differential operators, with key results showing accurate simulation of time evolution and scattering from potential barriers.
Among the ideas to be conveyed to students in an introductory quantum course, we have the pivotal idea championed by Dirac that functions correspond to column vectors (kets) and that differential operators correspond to matrices (ket-bras) acting on those vectors. The MATLAB (matrix-laboratory) programming environment is especially useful in conveying these concepts to students because it is geared towards the type of matrix manipulations useful in solving introductory quantum physics problems. In this article, we share MATLAB codes which have been developed at WPI, focusing on 1D problems, to be used in conjunction with Griffiths' introductory text.
Motivation & Objective
- To help introductory quantum physics students grasp the abstract Dirac formalism by concretely representing quantum states as column vectors and operators as matrices using MATLAB.
- To address common misconceptions, such as treating wavefunctions ψ(x) and kets |ψ⟩ interchangeably, by emphasizing their distinct mathematical roles.
- To provide accessible, pedagogically focused MATLAB codes that prioritize conceptual clarity over numerical efficiency for 1D quantum problems.
- To empower students with computational tools to solve non-analytic quantum problems, fostering intuition and confidence in applying quantum principles.
- To lay the foundation for future extensions to angular momentum and non-commuting observables in part II of the series.
Proposed method
- Use MATLAB’s matrix operations to represent quantum states as column vectors (kets), dual vectors as row vectors (bras), and operators as matrices.
- Implement numerical integration and plotting using discrete x and y vectors to visualize wavefunctions and probability densities.
- Discretize the Schrödinger equation using finite differences to construct the Hamiltonian matrix, including kinetic and potential energy terms.
- Apply the time evolution operator exp(−iHΔt/ℏ) via matrix exponentiation (using expm) to propagate the wavefunction forward in time.
- Simulate scattering of wavepackets from step potentials and compute reflection probabilities by averaging over energy distributions.
- Validate results by comparing numerical reflection probabilities with analytical expressions from standard quantum mechanics.
Experimental results
Research questions
- RQ1How can MATLAB-based numerical simulations improve student understanding of the vector nature of quantum states and the matrix representation of operators?
- RQ2To what extent do numerical simulations help students avoid common misconceptions, such as conflating ψ(x) with |ψ⟩?
- RQ3How accurately can MATLAB simulate time evolution and scattering from potential barriers compared to analytical solutions?
- RQ4What is the impact of mesh resolution on the accuracy of reflection probability calculations in wavepacket scattering?
- RQ5Can numerical methods provide reliable intuition for quantum phenomena like partial transmission and reflection in classically forbidden regions?
Key findings
- Students who use the MATLAB codes develop an intuitive understanding that wavefunctions are components of kets (column vectors), bras are their adjoints (row vectors), and operators are matrices.
- The numerical simulation of time evolution via matrix exponentiation (expm) accurately reproduces expected quantum behavior, including wavepacket spreading and scattering dynamics.
- Reflection probabilities computed numerically agree well with analytical results for both low and high energy regimes, with discrepancies observed near E ≈ U₀ due to finite grid resolution.
- Increasing the number of spatial points from 800 to 1600 significantly reduces numerical errors near E ≈ U₀, though at the cost of increased computation time.
- The simulation framework successfully demonstrates that even non-analytic problems can be solved computationally, reinforcing the power and applicability of quantum formalism.
- The approach effectively bridges abstract Dirac notation with concrete matrix operations, enabling students to 'see' the mathematical structure of quantum mechanics in action.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.