TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for...

22
TEACHING QUANTUM MECHANICS WITH PYTHON Andrew M.C. Dawes @drdawes amcdawes.com https://github.com/amcdawes/QMlabs

Transcript of TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for...

Page 1: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

TEACHING QUANTUM MECHANICS WITH PYTHON

Andrew M.C. Dawes@drdawes amcdawes.com

https://github.com/amcdawes/QMlabs

for submission to the Board of Trustees for action. The Program Director may request additional information, an interview with the applicant, or a visit to the applicant’s organization. The full proposal, including staff summary and analysis, is made available to the Trustees for their consideration and decision.

The applicant is notified promptly when a decision has been reached. While some level of merit is evident in nearly every proposal received by the Trust, only a fraction of the requests reviewed can result in awards. When an application has been declined, it will not be carried over for future consideration. Under normal circumstances, re-submission of a proposal that was declined is not encouraged.

Each proposal becomes the property of the Trust and will not be returned. It will be treated as a privileged communication with the understanding, however, that it may be peer reviewed.

All letters of inquiry and completed formal applications should be mailed in hard copy to:

John Van Zytveld, Ph.D. Senior Program Director M. J. Murdock Charitable Trust P. O. Box 1618 Vancouver, WA 98668

For More Help If your questions have not been answered by this document or you need some additional information, please call us at 360.694.8415.

Mailing Address: M. J. Murdock Charitable Trust PO Box 1618 Vancouver, Washington 98668

Office Location: M. J. Murdock Executive Plaza 703 Broadway, Suite 710 Vancouver, Washington 98660

Contact:Phone WA: 360.694.8415 Phone OR: 503.285.4086 Fax: 360.694.1819 Website: www.murdock-trust.org

22

Page 2: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

AND

…and Github

Page 3: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

• interactive computing

• large community

• self-help is built-in (IPython)

• notebook self-documenting

Page 4: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac
Page 5: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

Inline Graphics Markdown

GitHub/Gist

Page 6: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac
Page 7: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

QUTIP

• Not a toy - Students learn in a full-strength computing framework

• Convenient object definitions

• Many existing examples

Page 8: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

STANDARD OBJECTS• Analogous to:from numpy import pifrom scipy.constants import speed_of_light

• QuTip defines standard quantum objects

• “objects” in the programming sense, not the physical sense

• Same QM objects we see in the textbook

Page 9: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

Pauli matrix

Basis states

Density matrix

Page 10: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

POWERFUL SOLVERS

• Schrödinger

• Master-Equation

• Monte-Carlo

Page 11: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

VISUALIZATION TOOLS

Page 12: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

COURSE FORMAT

Page 13: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

AUDIENCE

• Junior/Senior Majors

• No CS experience req’d

• 50% had intro-level C++

• 14-18 students

• 3x 65-min & a 3-hr lab

Page 14: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

TEXTBOOK

• Mark Beck, Quantum Mechanics: Theory and Experiment

• Matrix-mechanics—an approach to quantum mechanics based on linear algebra aka “Dirac Notation”

Page 15: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

TWO-STATE SYSTEMS

• single spin in magnetic field

• hydrogen atom (ground and excited state)

• photon polarization

• represented by 2-element vectors

Page 16: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

OPERATOR-AS-MATRIX

Basis change

Rotation matrix

Easily compare computation to pen & paper

Page 17: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

CHAPTER-SPECIFIC• One notebook per chapter

• Definitions and techniques relevant to that content

• Solved problems, picked from end-of-chapter)

• Re-created examples turn book notation into code

Page 18: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

LABS

• Larger (multi-hour) exploration of a topic

• Follows chapter content

• include chapter problems

• in addition to single-photon experiments

Page 19: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

NUMERICAL EXPERIMENTS

• Use solvers to explore advanced dynamics

• Higher-order problems not tractable by hand

• Demo Lab 7

Page 20: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

KEY POINTS• Use a real-world computing framework (many

other field-specific examples exist)

• Re-create examples to reinforce what students see in other references

• Don’t be afraid to give fully-worked examples

• Encourage tinkering

Page 21: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

FOR MORE:• Aaron Titus: Using Jupyter

Notebook for Computational Thinking, Monday 8pm (FB03)

• Mark Beck, Richtmyer Award Lecture, Tuesday10:30-11:30

• Partnership for Integration of Computation into Undergraduate Physics: picup.org

Page 22: TEACHING QUANTUM MECHANICS WITH PYTHON€¦ · analysis, is made available to the Trustees for their consideration and decision. ... mechanics based on linear algebra aka “Dirac

THANK YOU

• Pacific Univ., Murdock Trust, RCSA, NSF logos used with permission

• Jupyter & QuTiP open source projects

• Images and logo from QuTiP documentation, QuTiP is: J. R. Johansson, P. D. Nation, and F. Nori: "QuTiP 2: A Python framework for the dynamics of open quantum systems.", Comp. Phys. Comm. 184, 1234 (2013) [DOI: 10.1016/j.cpc.2012.11.019].

Credits:

Andrew M.C. Dawes@drdawes amcdawes.com

https://github.com/amcdawes/QMlabs