Introduction to the linear variation method
In this lesson students implement the linear variation method to calculate approximate solutions to the time-independent Schrodinger equation.
Overview
Students are introduced to basic tenets of the linear variation method for computing approximate solution to the Schrodinger equation. Sections 1 and 2 summarize the method while sections 3 and 4 introduce atomic units and the syntax for matrix diagonalization in Python. If desired, the appendix contains a worked-out example for a 2-parameter trial function to demonstrate the steps of linear variational method and to highlight the connection between matrix diagonalization and solving for the optimal set of expansion coefficients.
In part 1, the instructor leads a live coding session to demonstrate the implementation of the linear variation method for a modified particle in a box potential and the students are then asked to write their own code to solve the time-independent Schrodinger equation for a double-well potential.
Scientific Learning Objectives
- Describe the key aspects of the linear variational method
- Apply the linear variational method to obtain approximate solutions to the time-independent Schrodinger equation
- Explore dependence of tunneling probability on particle mass
- Explain the cost to benefit ratio of accuracy versus computational complexity
Cyberinfrastructure Learning Objectives
- Write code to access and modify elements of arrays and/or matrices
- Use SciPy libraries to solve eigenvalue equations and numerical integration
- Use Matplotlib to visualize data
- Demonstrate skills for debugging code designed for scientific applications
Prerequisites
Scientific Prerequisites:
- Introductory quantum mechanics including the time-independent Schrodinger equation and the particle in an infinite well model.
Programming Prerequisites:
- It is assumed that students are familiar with basic Python syntax including variable assignment, for loops, user-defined functions, plotting, array initialization, and utilizing Python libraries.
Course Materials
Part 1: Linear vatiational method - live coding session
Jupyter notebook for instructor-led live coding session to demonstrate the implementation of the linear variation method.
Part 2: Linear variational method - double well potential
Jupyter notebook to assess student learning. Students are asked to write code to obtain approximate solutions to a double-well potential and examine properties of solutions.
Student Repository
Complete Student Materials
Download or clone the complete repository with all notebooks, datasets, and supporting files.
View Repository Launch on ChemComputeInstructor Materials
Complete Instructor Package
Solutions for all notebooks, teaching notes, assessment rubrics, and additional examples.
Instructor ResourcesRequires instructor verification. Request access if you don't have permission.
Instructor Notes
• If needed, lesson-01-introduction-to-programming-and-python introduces students to basic programming concepts (loops, conditional statements, user-defined functions), data types (scalars, strings, vectors, and matrices), and built-in Python libraries and functions for numerical integration, curve fitting, plotting.
• To demonstrate the implementation of the linear variational method, it is recommended that the instructor lead a live coding session using the notebook for part 1. See approximate timing below.
• After the live coding session students should be ready to tackle the assignment outlined in the notebook for part 2. The assignment includes using the linear variation method to compute approximate solutions for a double-well potential and to examine properties of the ground state solution.
Timing notes:
• At the beginning of the live coding session, the instructor is encouraged to spend time reviewing the key steps of applying the method (section 3 of notebook) and highlight elements of code design.
• A three-hour live coding session should provide enough time for the instructor to complete part 1 and demonstrate 1) the application of the method, 2) use of SciPy functions for numerical integration and linear algebra, and 3) code design and debugging. A useful example could be a particle confined to an infinite well with a raised floor in the right half of the box. Approximately 2-2.5 hours for this would be appropriate.
• Students are then asked to write their own code to obtain approximate solutions for a modified double-well potential. This notebook can be assigned either as homework for students to complete on their own outside of class/lab or with instructor supervision during a 3-hour lab period.
Common student questions:
• "Students need several reminders related to the use of functions"
• "Students, especially those with no linear algebra background, often have questions related to diagonalization and how it is equivalent to finding the optimal coefficients in the wave function expansion (the appendix addresses this)"
• "Students often get confused between the quantum number index and the matrix index due to the zero offset in Python when building the matrix representation of the Hamiltonian"