Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

TEACHING _____ WITH PYTHON • Topic-neutral where possible • Some specific examples • Generalize using other computational frameworks • Jupyter, Python, Github Workflow

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

• ubiquitous in interactive computing • large community • self-help is built-in (IPython) • notebook self-documenting

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Inline Graphics Markdown GitHub/Gist

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

QUTIP • Not a toy - Students start out using a full-power computing framework • Convenient object definitions • Many existing examples

Slide 9

Slide 9 text

STANDARD OBJECTS • Analogous to: from numpy import pi from scipy.constants import speed_of_light • QuTip defines standard quantum objects • objects in the programming sense, not the physical sense • The same objects we see in the textbook

Slide 10

Slide 10 text

Pauli matrix Basis states Density matrix

Slide 11

Slide 11 text

POWERFUL SOLVERS • Schrödinger • Master-Equation • Monte-Carlo

Slide 12

Slide 12 text

VISUALIZATION TOOLS

Slide 13

Slide 13 text

COURSE FORMAT

Slide 14

Slide 14 text

AUDIENCE • Junior/Senior Physics Majors • No CS experience req’d • 50% had intro-level C++ • 14-18 students • 3x 65-min & a 3-hr lab

Slide 15

Slide 15 text

TEXTBOOK • Mark Beck, Quantum Mechanics: Theory and Experiment • Matrix-mechanics—an approach to quantum mechanics based on linear algebra aka “Dirac Notation”

Slide 16

Slide 16 text

TWO-STATE SYSTEMS • single spin in magnetic field • hydrogen atom (ground and excited state) • photon polarization • represented by 2-element vectors

Slide 17

Slide 17 text

VECTORS AS STATES Spin-up Spin-down

Slide 18

Slide 18 text

VECTORS AS STATES Ground state Excited state

Slide 19

Slide 19 text

OPERATOR AS MATRIX Basis change Rotation matrix

Slide 20

Slide 20 text

LARGER PROBLEMS • 2x2 is doable by hand • QuTip exposes students to large-scale systems of modern practical relevance

Slide 21

Slide 21 text

ROLE OF THE NOTEBOOK

Slide 22

Slide 22 text

CHAPTER SPECIFIC • One notebook per chapter • Definitions and techniques relevant to that content • Solved problems (demo Chap. 4) • Re-created examples (demo Chap. 6)

Slide 23

Slide 23 text

“LABS” • Larger (multi-hour) exploration of a topic • Follows chapter content • include chapter problems • in addition to single-photon experiments

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

NUMERICAL EXPERIMENTS • Use solvers to explore advanced dynamics • Higher-order problems not tractable by hand • Demo Lab 7

Slide 26

Slide 26 text

FINAL THOUGHTS and a call to action

Slide 27

Slide 27 text

• “Pythonize” your favorite course textbook • post notebooks or code you develop • be descriptive so we can find it TRY IT #foo

Slide 28

Slide 28 text

KEY POINTS • Use real-world frameworks • Re-create examples to reinforce what students see in other references • Don’t be afraid to give fully-worked examples • Encourage tinkering

Slide 29

Slide 29 text

THANK YOU • PyCon logo and banner were designed by Beatrix Bodó • Pacific Univ., Murdock Trust, RCSA, NSF logos used with permission • Jupyter & QuTip open source projects • Lab photos Courtesy of M. Beck @ Whitman College • 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