My first session with “Skype a Scientist”

A few months ago I signed up for Skype a Scientist, a service that connects scientists with classrooms around the world so students have a chance to meet a real scientist. Today I had my first session with a 7th grade IB class in Bangkok, Thailand. It was a lot of fun! I introduced myself and my field and talked a little bit about what it’s like being a scientist, then I answered questions from the students for the remaining time. There were all sorts of questions from “What challenges did you overcome to become a computational physicist?” to “Is the Earth’s magnetic field changing?”

If you’re a fellow scientist or a teacher who wants to skype a scientist you can sign up on their website: https://www.skypeascientist.com/ The commitment is small (you can sign up to do just one session) and there’s no need to prepare a lecture. I had a blast and I’m looking forward to more skype sessions!

Book Review: Weapons of Math Destruction

Title: Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy
Author: Cathy O’Neil
My rating: 4.5/5

Many of my classmates from grad school have found jobs as data scientists, others have become Wall Street quants. PhD physicists are often hired for these data science/big data jobs because we have the statistical and computer programming skills for the job. As more and more quantitative (or otherwise computable) data becomes available, algorithms and data science are becoming an ever more important part of our lives. Rather than ask, “is this a good thing?”, perhaps the better question is “what are the downsides?”

This is exactly the question that O’Neil addresses in Weapons of Math Destruction: What happens when these algorithms go wrong? She defines WMDs by three qualities: opacity, scale and damage. Opacity refers to the secrecy surrounding the algorithm and underlying data, Scale is widespread use, and damage are the consequences when the algorithm goes wrong. She covers a wide array of examples in clear, nontechnical language.

One reason to use algorithms in place of human judgement is that humans have a well-established reputation for bias. A common misconception is that algorithms, because they are mathematical are free of bias. O’Neil points out that algorithms reflect the biases (and ignorance) of their creators and the limitations of the underlying data. Perhaps the most striking example here is sentencing algorithms, which attempt to replace biased human judgement with impartial mathematics. In practice, these algorithms reproduce the same racial biases because the data that feeds them–arrest records, zip codes, etc, are themselves full of racial bias.

O’Neil also provides an excellent analysis of the effects of algorithms on our public discourse, where they enable microtargeting: delivering different messages to different potential voters based on detailed electronic dossiers of each. This tool is deliberately opaque, allowing campaigns to “pinpoint vulnerable voters and target them with fear-mongering campaigns… At the same time, they can keep those ads away from the eyes of voters likely to be turned off (or even disgusted) by such messaging”.

Algorithms aren’t going anywhere. We are steaming full speed towards a future where machines increasingly supplement and even supplant human judgement in vast areas of our lives, from hiring decisions to driving. This era is full of both promise and peril. Thus, it is essential understand the dangers of weapons of math destruction and how we can protect ourselves from them. O’Neil is remarkably successful in addressing both of these questions and she manages to do so without resorting to technical language. This book is essentially the algorithm analog to Daniel Kahneman’s excellent catalog of the failures of human judgement, Thinking Fast and Slow. Weapons of Math Destruction is essential reading for anyone living in the modern era, but especially scientists seeking to apply their mathematical tools outside of their discipline.

Find it on: Goodreads, or Amazon

My dissertation won a Springer Thesis Award

I’m thrilled to announce that my dissertation “Magnetic field effects in low-dimensional quantum magnets” has been selected for a Springer Thesis Award and will be published by Springer. The manuscript is still in production (currently scheduled for publication November 27), but the listing is live on Springer’s website now.* Thanks again to my PhD advisor, Anders Sandvik and my committee, Rob Carey, Shyam Erramilli, Claudio Chamon and David Campbell as well as my department chair Andrei Ruckenstein. A special thanks to David for nominating my dissertation for this award.

*Let me know if you want to read it.

What is condensed matter physics?

Below is a lightly-edited excerpt from Ch. 1 of my dissertation in which I describe my field in the broadest possible terms. My dissertation is currently in production for publication in the “Springer Theses” series.


This dissertation is in the field of condensed matter physics, which in the most informal sense possible, could be described as ‘the study of stuff that is not especially hot nor moving especially fast’  [1]. A more formal (but no less vague) definition is ‘the study of the behavior of large collections of interacting particles’ [2]. The haziness of this definition is appropriate since condensed matter is a very broad field encompassing the study of almost all everyday matter including liquids, solids and gels as well as exotic matter like superconductors. Condensed matter physics is a tool for answering questions like: Why are some materials liquids? Why are others magnetic? What sorts of materials make good conductors of electricity? Why are ceramics brittle? Our understanding of condensed matter physics underlies much of modern technology; some prominent examples include ultra-precise atomic clocks, transistors [3], lasers, and both the superconducting magnets and the superconducting magnetometers used for magnetic resonance imaging (MRI). Condensed matter physics overlaps with the fields of magnetism, optics, materials science and solid state physics.

Condensed matter physics is concerned with the behavior of large collections of particles. These particles are easy to define: they will sometimes be atoms or molecules and occasionally electrons and nuclei; condensed matter is almost never concerned with any behavior at higher energy scales (i.e. no need to worry about quarks). The key word in the definition is large. Atoms are very small, so any macroscopic amount of matter has a huge number of them, somewhere around Avogadro’s number: 1023. Large ensembles of particles display emergent phenomena that are not obvious consequences of underlying laws that govern the behavior of their microscopic components. In the words of P.W. Anderson:

The ability to reduce everything to simple fundamental laws does not imply the ability to start from those laws and reconstruct the universe. …hierarchy does not imply that science X is “just applied Y.” At each stage entirely new laws, concepts, and generalizations are necessary, requiring inspiration and creativity to just as great a degree as in the previous one. Psychology is not applied biology, nor is biology applied chemistry. [4]

Emergent phenomena are not merely difficult to predict from the underlying microscopic laws, but they are effectively unrelated. At the most extreme scale, no one would argue that consciousness is somehow a property of standard model particles, or that democracy is a state that could ever be described in terms of quantum field theory. Here I will focus on two such emergent phenomena: phase transitions, where symmetries of the underlying laws are spontaneously violated and behavior is independent of microscopic details, and quasiparticles, an almost infinite variety of excitations of many-body states of matter that bear no resemblance to the ‘real’ particles that make up the matter itself [5].

The most interesting problems tend to involve systems with interactions. To highlight the importance of interactions, let us first consider the case of noninteracting particles. The canonical example here is the ideal gas, which is composed of classical point-like particles that do not interact with each other. Because they do not interact, the motion of the particles is independent; if we want to know the energy of any particle, it is easy to calculate from its speed (E = mv22). The behavior of the whole system can be described by an ensemble of independent single particles. When the particles are interacting things are very different. Instead of an ideal gas, let us consider a gas of classical electrons interacting via the Coulomb force 1∕r. For two electrons the equations of motion can be solved analytically, but in a solid there are 1023 electrons (for all practical purposes, we can round 1023 up to infinity). To write down the energy of of one of them, we must account for the position of every single other electron. Thus the energy of just one electron is a function of 3N variables. Even with just three particles, analytic (pen and paper) solutions are impossible in most cases. An analytic solution for the motion of 1023 electrons is impossible, and “it’s not clear that such a solution, if it existed, would be useful” [6]. This is many-body physics. Instead of following individual particles, we describe their collective motion and the resulting emergent phenomena such as quasiparticles and phase transitions. Consider waves crashing on the beach. It would be foolish to try to understand this phenomenon by following the motion of all the individual water molecules. Instead, we can treat the water as a continuous substance with some emergent properties like density and viscosity. We can then study the waves as excitations the ground state of the water (the state without waves).

[1] This definition distinguishes condensed matter from particle physics (the other broad subdiscipline of physics), which is the ‘study of really hot and really fast-moving objects.’
[2] In practice, condensed matter tends to be the term used to describe physics that does not fit into one of the smaller, more well-defined subdisciplines like high-energy physics or cosmology.
[3] Both transistors and atomic clocks are essential to cellular telephones and satellite navigation systems like GPS.
[4]This quote is taken from “More is different” Science 177, 393 (1972) by P.W. Anderson , an excellent refutation of reductionism and discussion of emergent phenomena written in a manner that should be accessible to non-physicists.
[5] I hope to post non-technical descriptions of phase transitions and quasiparticles at some point in the future.
[6] Chaikin and Lubensky, 1998, p. 1

uni10 Hackathon

I had a great time at the uni10 hackathon at National Tsing-Hua University last weekend. Members of the Ying-Jer Kao (NTU) and Pochung Chen (NTHU) groups presented the updates on the development of the uni10 tensor network library. Also in attendance were developers from industry (and SOLVCON) and the local python user community.

My LaTeX Setup

When I write almost anything related to physics, I use LaTeX. For the uninitiated, LaTeX (pronounced lah-tek or lay-tek, anything but lay-teks) is a markup language widely used in the physics community because it allows authors to create automatically-formatted manuscripts complete with beautifully typeset equations, footnotes, references, figures, captions and more. If this doesn’t sound like something you need, then you can go ahead and skip this post. But if you’re a physicist, you should be using LaTeX. The learning curve is a bit steep, but well worth the efforts. Since college I have used LaTeX for all my technical writing including papers, my dissertation, and ongoing notes on my work. There is no shortage of guides to learning and using LaTeX which I will not try to replicate here. Instead, I will offer a few remarks on how I use LaTeX in my work and some of the tips and tricks I’ve learned over the years.

My setup

Since I am a lifelong Apple fanboy, I do all my work on a Mac. My preferred TeX editor is TeXShop, but I don’t have strong opinions about it, it’s just what I know. The LaTeX distribution for macOS is called MacTeX. The full MacTeX installer is over 3.2 gb, and most of that is for obscure packages and languages that I’ll never need, so I use the smaller installer called BasicTeX, which is only 78 mb. BasicTeX does not include all the packages I need, but it includes a package manager tlmgr that can be used to download any additional packages using the command:

sudo tlmgr install PackageName

BibTeX

For producing my bibliography I use BibTeX, an extension of LaTeX. The beauty of BibTeX is that you need never again concern yourself with the formatting or ordering of your citations because BibTeX does that all automatically. If you want to cite a paper, simply go to the journal’s website, download the bibtex snippet that goes with the paper, copy and paste it into your .bib file, and cite it using the \cite{} command.

Git

One of the best decisions I ever made in my scientific career was to start using git for tracking changes to my papers. Git is open-source version tracking software usually used for programming. It is often used with cloud services like github, but you can also run git locally on your computer. TeX source code is just like any other source code, so you can use git with it just like you would for C++. Using git means that I can always recover my manuscript to a previous state, and I can maintain multiple versions of the same manuscript using branches. I used this feature heavily in my dissertation when I had to prepare two different versions, one for the BU library and one for Springer.

As a writer, it is always a challenge to “murder your darlings,” i.e. delete text that no longer makes sense, no matter how lovingly it was crafted. Whenever I set out to do this, there’s always a voice in the back of my head saying “but what if you want this later?” Using Git is a great way to silence that voice because I know I can always get it back, even if I never end up needing to.

A few tips for Git + LaTeX:

  • Write each sentence in your .tex file on its own line. This makes tracking your changes easier.
  • Don’t commit your PDF, at least not every time. Git is not as efficient at keeping track of changes to PDFs and your repo may end up requiring a lot of storage space.
  • Don’t track the auxiliary files generated by tex like .aux, .log, etc.
  • You can also collaborate on papers using a private git repo on a service like github.

A few of my favorite LaTeX packages

All these can be downloaded through texlive manager. The links below are just for finding the documentation.

  • REVTeX: APS’s LaTeX package that automatically formats documents in the style of each of their journals.
  • cleveref: A package that automatically inserts the appropriate text just as “Fig.” or “Eq.” in front of your figure and equation references. Just replace
    Fig. \ref{f:someFig}

    with

    \cref{f:someFig}
  • braket: Effortless Dirac bra and ket notation.
  • hyperref: Automatically turns all your citations, footnotes, equation references, etc, into hyperlinks to the appropriate place in your PDF. A must-have for big documents, especially those with a table of contents.
  • amsmath: Among other things, includes the align environment, which is essentially a drop-in replacement for the equation environment that makes it easy to format multi-line equations.
  • latexdiff: A program that takes two tex source code files and outputs a source file that highlights the changes between the two versions, showing new text in blue and striking through deleted text. This is much easier to read than directly comparing the tex source files. On the command line execute:
    latexdiff oldVersion.tex newVersion.tex > difs.tex

    You can then compile difs.tex as you would any other tex file.

How do you use tex? What are you favorite packages and styles? I’m always looking to learn more.