The “P” in PhD stands for Programmer.

I’ve been looking at future careers recently, and one general piece of advice I had for most of the careers I’m interested in involve showing rather than telling people about my skills. I definitely consider programming one of my best skills (I’m self-taught and I speak 5 languages to different degrees of competence), so how do I show people my coding projects?

I’ve actually written thousands of lines of code for my PhD, most of which is throwaway, but it would be nice to show some of my more generally approachable projects. To that end, I’ve started up my GitHub account and started uploading things which I think are interesting. The first project I’ve picked out is a very recent thing I wrote called Hwavfn.m. It’s a toolbox designed to let a Matlab user visualise the Hydrogen wavefunction. It doesn’t stop there: you can actually use it to look at how superpositions of wavefunctions behave.

This is a representation of the electron orbiting a Hydrogen atom - The "hotter" parts of the image are where it is more likely to be found if you were to observe it. This is the ground state of the Hydrogen atom - it would look like this "normally", until you do something to it. This state is known as the "1s" state for historical reasons.

This is a representation of the electron orbiting a Hydrogen atom – The “hotter” parts of the image are where it is more likely to be found if you were to observe it. This is the ground state of the Hydrogen atom – it would look like this “normally”, until you do something to it. This state is known as the “1s” state for historical reasons.

This type of program is significant to my PhD, which revolves around controlling atoms which behave a lot like Hydrogen (they are known as Rydberg states), and demonstrating that I can control the shape and size of their wavefunctions in quite a sophisticated way. I use the toolbox to visualise the kinds of things I can do to the atoms, as shown in the picture below.

This is a much more complicated state of the Hydrogen atom - I have put it in a superposition of the 1s, 2p+, and 2p- states (which all have different shapes). The cool thing is that I can make real atoms do this, and they are not in *either* of the states, they are in *all the states at once*.

This is a much more complicated state of the Hydrogen atom – I have put it in a superposition of the 1s, 2p+, and 2p- states (which all have different shapes). The cool thing is that I can make real atoms do this, and they are not in *either* of the states, they are in *all the states at once*.

What’s most cool about my usage of this package though, is that I can use it to simulate what the atom looks like over time. When you make a complicated state like the one above, it actually changes its appearance over time. If I leave the state in the picture above for a few picoseconds, you are more likely to find the electron in a completely different location!

The Hydrogen atom in the same mixture of 1s, 2p+, and 2p-, but this time left for a few picoseconds. It's showing something which Physicists refer to as an "interference" behaviour. I'm effectively showing the effects of the electron - a *particle* - behaving like a *wave*. Isn't that cool?

The Hydrogen atom in the same mixture of 1s, 2p+, and 2p-, but this time left for a few picoseconds. It’s showing something which Physicists refer to as an “interference” behaviour. I’m effectively showing the effects of the electron – a *particle* – behaving like a *wave*. Isn’t that cool?

Anyway, I have digressed a bit. I will be developing my toolbox to be a bit more user friendly (as well as refactoring some code and making some of the things you have to edit a bit less dumb). I expect that it can be used as an interesting teaching tool for showing what Hydrogen wavefunctions look like; for showing how superpositions work and what the results of the Time Dependent Schrödinger Equation look like. It’s quite exciting!

I’m expecting to update the package weekly, and hopefully I’ll achieve my goals for it in the next month or two. Currently it’s in the “practical but ugly” state which I had to leave it for work, and I’m looking forward to making a much better job of it over time.

Advertisements

About stoove

A physicist, researcher, and gamesman. Likes to think about the mathematics and mechanics behind all sorts of different things, and writing up the thoughts for you to read. A competent programmer, enjoys public speaking and mechanical keyboards. Has opinions which might even change from time to time.
This entry was posted in General Science, Maths, Physics, Research Blogging and tagged , , , , , , , . Bookmark the permalink.

4 Responses to The “P” in PhD stands for Programmer.

  1. unceasingtoe says:

    The ultimate “cool thing to show” for this piece of code would be a gif of that state evolving with time ;P

    • stoove says:

      It would, but there’s an interesting thing about that. Because of the requirements of the calculation (you have to do it in full 3D), it will take about three minutes to render each gif frame. It’s for that reason that I haven’t actually written any code to do that yet.

      That also means that it’s not such a high priority for an end-user!

  2. Pingback: Thesis Countdown (part 15) | UNconstant

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s