Thursday, March 30, 2023

Chatbot Study Help

While ChatGPT doesn’t actually understand or know chemistry the way humans do, can it still help students in some way? Since my first chat, I’ve come up with two possibilities to leverage the generative capabilities of GPT: study guides and test questions. These are two things that students regularly ask for. So, if a professor is unwilling to provide them, maybe ChatGPT will oblige. (I have been revamping my G-chem study guides this semester.)

 

I asked GPT: “Can you help me put together a study guide for my General Chemistry 1 class? What should I know or know how to do to prepare for the final exam?” It came up with a bulleted list that mirrored much of what we cover in G-Chem 1 (atomic structure, chemical bonding, chemical reactions, gas laws, periodic trends) although it added some G-Chem 2 topics as well. Here’s one of the items:

 

GPT: Periodic Trends.

·      Atomic Radius

·      Ionization Energy

·      Electron Affinity

·      Electronegativity

 

And it added a nice study tip:

 

GPT: In addition to understanding these concepts, make sure to practice solving problems related to each topic. You can find practice problems in your textbook, online, or from your professor. Good luck with your studies!

 

To drill down, I asked: “Under Periodic Trends, could you be more specific as to what I should be able to do or explain.” It does a nice job. Here’s the first item as an example:

 

GPT: Atomic Radius

·      Understand what atomic radius is and how it changes across a period and down a group.

·      Be able to explain the factors that influence atomic radius (such as the number of electron shells, effective nuclear charge, and shielding effect).

·      Be able to predict which element has a larger atomic radius in a given pair of elements.

 

I asked GPT to provide me a sample question that covers the three things on the list for Atomic Radius. (I did not choose Ionization Energy or Electron Affinity because they are trickier.)

 

GPT: Explain how atomic radius changes across a period and down a group, and identify the factors that influence atomic radius. Using this information, predict which element has a larger atomic radius in each of the following pairs:

a.     Cl or S

b.     Ca or Sr

c.      O or F

Here’s my partly erroneous response: “As the number of protons increases, it pulls the valence electrons closer to it. For this reason, atomic radius should decrease going across a period since the number of protons increases. For the same reason, atomic radius should decrease going down a group because the number of protons increases. Applying it to the pairs: (a) Cl will be smaller than S, (b) Sr will be smaller than Ba, and (c) O will be smaller than F.”

 

GPT encourages me (Great effort!) and agrees with my initial response. Then it tells me I got (a) and (c) correct and (b) wrong.

 

GPT: For part (b), your answer is not correct. Sr has a larger atomic radius than Ca. This is because Sr is located below Ca in the same group, and as we move down a group, the atomic radius increases due to the addition of new energy levels.

 

I ask GPT to help explain what adding new energy levels means, and I ask more clarifying questions when it brings up new terminology (such as shielding). It does a decent job in its responses. Then things go awry. I ask it to help me use shielding in a better response for (b).

 

GPT: to improve your answer to (b), you could say that Sr has a larger atomic radius than Ba because, even though they both have the same number of energy levels, the valence electrons in Sr experience less effective nuclear charge than the valence electrons in Ba due to increased shielding. Therefore, Sr has a larger atomic radius than Ba.

 

Eeeeks! The original question was Sr vs Ca. Now Ba gets thrown in, and the answer is wrong. I say I’m confused because Ba is below Sr on the periodic table. GPT apologizes and corrects itself. We do some back and forth on when to use shielding in an argument and it gets things half right and half wrong.

 

Then I go back to an earlier problem and say: “Earlier you said I was correct when I said O was smaller than F, but now I think I might be wrong. Was I wrong earlier?” GPT assures me that I was right but spouts a nonsensical explanation. After some back and forth it corrects itself apologetically. We then go through some examples that include cations and anions, and I essentially see the same thing half-right, half-wrong explanations.

 

In a new chat, I decided to try a different tact on a different topic: “I need practice with stoichiometry in my chem class. Exam coming up. Can you help generate a practice question for me? (Just the question no answer please.)”

 

GPT: If 5.00 grams of calcium reacts completely with excess hydrochloric acid, how many grams of calcium chloride will be produced?

 

That’s a good start. I ask for a hint to help me get started, and it obliges with an appropriate and helpful hint. I then claim to be stuck: “Okay, I'm trying to write the equation: Ca + HCl --> CaCl2 but where does the H go?” GPT responds correctly that H2 gas is released as a byproduct and provides a correctly balanced chemical equation. I then provide a wrong answer. Then, impressively, it tells me the detailed correct steps I should follow to do the calculation. And even better at the end it says…

 

GPT: “So, without giving away the full answer, I would suggest you to follow these steps to solve the problem. Let me know if you have any further questions!”

 

It might be getting the hang of this hint-providing approach. I tell it another wrong answer and things go awry when it tells me in an encouraging tone that I’m correct but suggests I check my sig figs. I say “Oh wait, I made a calculator error” and proceed to give it the correct answer. GPT confuses itself, probably because I used the word “error” and tells me I’m wrong. It then methodically works out the problem and gets the same answer I did.

 

I follow-up asking for a harder question that requires me to “know limiting reactant and %yield”. GPT obliges. Good question. Wrong answer because it picks the wrong limiting reactant, misled by me. When the resulting yield is over 100%, it suggests that there may be error or inefficiency in the reaction. I ask for some examples and it provides a plausible list. I try asking for a harder question with different reaction stoichiometry and GPT chokes on balancing chemical reactions.

 

In a new chat, I try a different topic: “I have a quiz coming up on intermolecular forces in chem. Could you tell me what are the main things I need to know?” GPT generates the key points and does a very nice job at the G-Chem level even though I didn’t mention General Chemistry in the prompt. I ask it to generate three different questions to test different aspects of intermolecular forces. The questions are reasonable although two are essentially multiple choice. Not surprisingly, it can defend the correct answers to the multiple choice questions well. And it goes awry with the question that requires explanation. At one point it makes a claim that correlates hydrogen bonds to atom size when I ask follow-up questions about the explanations. I ask it for harder questions. Once again, reasonable questions, but if pressed for answers, GPT spouts partial nonsense.

 

When I ask GPT to help me make the main points of intermolecular forces memorable with a poem, it obliges in a whimsical ditty that’s better than anything I could come up with. The poem has meter and rhyme. But it doesn’t help with knowing the relative strengths of the forces. So I ask for another poem that incorporates these, and it obliges with five stanzas – the fifth being a summary. I claim the poem is too long and ask it for a “memonic [sic] or memory aid”. Here’s the response:

 

GPT: Dancing Elephants Don't Hug Intensely. Each letter in the phrase represents one type of intermolecular force, in order from weakest to strongest:

·      Dispersion forces

·      Dipole-dipole interactions

·      Hydrogen bonding

·      Ion-dipole interactions

 

I’m not sure where the Elephants come from but the image in my mind is stark. Hard to unforget! Not sure if I’ll remember the mnemonic.

 

Here’s my summary thus far: GPT can generate reasonable study guides. By asking it for more details and “what should I be able to do?”, one can get a pretty good comprehensive guide. GPT can generate a variety of test questions. By specifically providing categories to explicitly include complexity into the question, one can generate decent mock exam questions. I tell my students this is a good skill when preparing for an exam, and that doing so in groups is even better. I could conceive of an exercise that gets students to think about what should go into a good exam question and have them use GPT as an aid. The study guide points can be fed back into the test question generation process.

 

But asking GPT for help answering questions is where things become problematic. It provides plausible sounding answers but there’s no check when nonsense is generated. I think it’s useful for students to see this too. I find it interesting to read GPT’s responses because sometimes it reminds me of a student who crams information without understanding and then does a data dump. Except GPT is much smoother sounding than the student. Perhaps it can lead to a helpful discussion on what they should look out for when they use GPT, and what it means to actually understand something. Maybe it will help students be more reflective and ask themselves if they really know something or if their knowledge is just plausible-GPT-like. I regularly tell students that they should speak or write out explanations, and that the act of doing so helps with self-clarification. If seeing GPT in action helps them with such metacognitive awareness, that’s probably a good thing.

Wednesday, March 29, 2023

Study Guide Feedback

Last week, which marked the middle of the semester, I asked my G-Chem 2 class for feedback on my new study guides. I’m teaching the Honors section this semester so it’s a small class. The averages on the two midterms are the highest I’ve had, and my exams have not gotten any easier (nor harder), in my opinion. So it may be that the students are being helped tremendously by the new study guide format. But more likely, they are being helped a bit, and they are already very strong students. Furthermore, size-wise this is one of the smallest classes I’ve taught. The students are engaged and ask good clarifying questions in class. All this to say that a number of factors are contributing to the strong student performance, and it’s not just the study guides.

 

Here are the four questions I asked, a summary of the students’ feedback, and some of my thoughts in response.

 

Q1: How have you been using the study guide? (Be detailed and honest, please!)

 

Some students are using this the way I intended after each class. Others are only using them as an exam crops up. One student mentioned going through them once a week (covering three class periods each time). Since the responses are anonymous, I don’t know if there’s any correlation between performance on exams and how the study guides are used. Two students explicitly mentioned using them to prepare for the pop-quizzes. One student mentioned working with others on it to clarify different ideas and answers. One splits up the conceptual questions from the “test yourself” problems, looks at the first group more regularly and then does the problems close to the exam as sort of a practice-test. All these are good uses. Two students noted that they had not used it much but think they would like to use it more.

 

I’m happy that the majority of the students are using the study guides at least semi-regularly and seem to be benefiting from them. I was expecting the varied use, and I don’t see that as a problem. In my drop-in (office) hours, I’ve been able to encourage the students to use the guides more regularly, and several students regularly come by to clarify their answers to the study guide even if there isn’t an exam coming up. That’s been a good thing. I purposefully didn’t give answers (other than numerical ones) to the questions to encourage students to come in and talk through their answers with me.

 

Q2: What in the study guide have you found helpful?

 

By far the “test yourself” questions were what students found most helpful. They also used it as a summary of the key points of each class. The students commented that they liked being able to see more examples of how I ask questions, in contrast to the online homework that is more limited in terms of conceptual pieces. A couple of students mentioned liking the “real-world applications” that accompanied some of the questions. I admit that I’m haphazard. Sometimes I come up with an interesting question, and sometimes I don’t. Depends on how much time I have to work on it. I expect to improve the guides over time. One student specifically mentioned that my format of asking questions (rather than making a statement) to reinforce important conceptual points was helpful. Many of them also used the study guide to organize the key takeaways from each class meeting. By and large, the range of responses covered what I expected.

 

Q3: What in the study guide could be improved?

 

Students wanted more detailed answers and worked solutions step-by-step. I was expecting this response even though I gave the rationale for why I wasn’t providing detailed answers. Students wanted to check if they were on the “right track”. I wanted them to do that check with me, rather than reading (and potentially parroting without understanding) a written answer I provide to a conceptual question. Also, because there is often more than one way to answer a question, I don’t want students to get overly narrow in the way they tackle problems or answer questions. At the moment, I’m sticking with my plan not to provide detailed answers and see how things go, although I might be convinced otherwise. The main reason is that the current approach encourages students to drop-in and talk chemistry, and I think this really helps them learn better more so than reading off whatever answers I might provide. (I do worked examples step-by-step in class, and the textbook also does this.)

 

There were a couple of comments about my questions (be they conceptual or “test yourself”) being vaguely worded. A student says: “… makes it hard if you are trying to pin-point what you don’t understand”. This makes sense. If you don’t know the material very well, which will be true for a learner, then I could see how I need to be more careful or clearer when I phrase my conceptual questions or points. Just because it’s clear in my head when I write a question doesn’t mean that it won’t be misinterpreted by the student who thinks I’m asking for something else. (I also see this on exams where a student writes an answer to a question I haven’t asked, although much less so for this strong Honors class.) Anyway, this tells me that I need to spend a bit more time thinking about how I’m phrasing things in the study guide. I hope that several more iterations will improve this.

 

Q4: What could I do as the instructor to help students use the study guide more effectively?

 

Several students mentioned that more reminders to use the study guides would be helpful! One mentioned having a short guide of “how best to use the study guides”. I talked about this in class, but have little verbiage on my course website – I should include more verbiage and that might help. One suggested that “students may be more incentivized to use the study guide if they knew that the quiz questions were being pulled from the study guide or if test questions were likely to mirror those that are on the study guides”. That’s a good idea. I had mentioned the second, but not the first. I could emphasize this point more.

 

One student mentioned that the study guides could be intimidating because it looks like there’s so much material. Very true. Turns out there is a lot of material in chemistry to learn. I’m using the current “daily” format to break it into small chunks. In a previous iteration, the study guides were more voluminous and even more intimidating. (The present students don’t know what the previous iterations looked like; one student mentioned being curious about “how the setup is different or changed from previous semesters”.)

 

Several students thought nothing needed to be changed. So I’m doing at least some things right. Here’s one student’s response to the question: “Nothing! They are extremely useful in that they emphasize the most important elements of each lecture session. I believe that [the professor] has provide all of the tools for success and it is up to students to determine how they will utilize these tools throughout the course.”

 

Overall, I think the study guides are doing what I’d like them to do. The issue of whether to provide more “answers” will continue to be in tension with my pedagogical goals and what I believe best serves student learning even if students think a different approach will work better. Sometimes I take what they say to heart and make a change. Sometimes I don’t make a change. Regardless, it’s good to get the feedback.

Sunday, March 26, 2023

Much Ado About Nothing

Why is there something rather than nothing? That’s the existential question asked by Jim Holt in his book Why Does the World Exist? Holt interviews philosophers, physicists and theologians and summarizes their positions while mixing in his own thoughts. I will admit that some parts of the book feel like a drag. Perhaps I don’t appreciate the finer points of philosophy. I find the language-wrangling tedious and wonder if the arguments all turn on sleight-of-word. The sense I get is that it might be much ado about nothing.

 


The idea of Nothing, however, is interesting. I don’t really know what nothing is. No thing, I suppose. The chemist in me thinks of atoms and the void. Without the void, you can’t differentiate things. But is the void nothing? I’m not sure. Quantum vacuum isn’t quite the colloquial use of the word nothing; the vacuum has structure. Mathematically, the empty set is still a set. I’m not sure I can imagine nothing. The closest experience I might have had was under general anaesthesia. I remember nothing.

 

I’ve heard of, or read bits and pieces from, most of the folks that Holt brings up. So I wasn’t surprised by what I read, with one exception. I had not heard of the philosopher Adolf Grunbaum, who thinks that there’s nothing surprising about existence – of our world and more. Grunbaum thinks the question of why there is something rather than nothing meaningless at best, and worse – it sucks up time and energy that could be spent pondering something more worthwhile.

 

Essentially Grunbaum thinks that just because nothingness seems simple conceptually, doesn’t mean it should be given special priority. Nor should it be assigned any significant probability. He argues that simple ideas aren’t necessarily truer than more complicated ones, and uses the example of Thales (who thought water was the fundamental element) versus Mendeleev (who brought some order to the many elements that make up the periodic table). As a chemist, I can say with some authority that the elements are idiosyncratic when you take a closer look. Yes, you can talk about broad trends and the beauty of the periodic table as an organizing principle. But when you zoom in, the elements are an unruly bunch of chameleons, adapting to different environments in different ways. That’s one of the fascinating things about chemistry. The more I learn, the more idiosyncracy I discover.

 

I’ve also been influenced by reading Robert Rosen who makes the argument that the seemingly special simple things that we scientists like to use as our models don’t match complex reality. The models are impoverished mathematically and insufficiently generic. We prioritize the simple, because that’s what we can grasp, but complexity lurks in all the side effects that materialize because our models are too simple. Since I’m partial to this idea, I’m sympathetic to Grunbaum’s argument that the question of existence might simply be much ado about nothing. The practical-bent chemist in me is more interested in what I can do with these atoms of existing matter, and it’s hard for me to see the value in caring about the concept of nothingness. So, while Holt’s book apparently garnered a top-ten in the New York Times book review, I think it might be much ado about nothing.

 

P.S. Ed Yong’s book, which made the 2022 top ten, is however well worth reading!

Wednesday, March 22, 2023

First Chat with GPT

The release of GPT-4, which has been hailed as a significant improvement over GPT-3 prompted me to finally create an account and see what the hoopla is all about. I haven’t stretched for a Plus upgrade, so maybe I’m still on an older not-the-latest-and-greatest version. Not sure what’s behind the curtain. But I’ll work with what I have.

 

First, I wanted to check if GPT knew anything about me so I asked if it could provide information on Hufflepuff Hippo, and whether it gets anything from my blog. GPT is very polite, and seems to have no info on me.

 

GPT: I'm sorry, but I don't have any information about a "Hufflepuff Hippo." Could you please provide more context or clarify what you're referring to so that I can better assist you?

 

You’ve likely heard about GPT getting things wrong. That’s because it’s about pattern-matching and prediction, so that’s not a surprise. Then again, isn’t part of how humans learn also through pattern-matching and then testing predictions? We don’t know exactly how that works, and it’s likely not the whole story. In any case, since I study the origin of life, I wanted to see what GPT knew about it so I asked it to give me the main theories for the origin of life and rank them. GPT assiduously avoided trying to rank them and kept repeating that there is no scientific consensus. Here’s one of several similar responses when I tried asking in different ways to coax it to give its best guess based on the available evidence.

 

GPT: As an AI language model, I cannot provide a definitive answer to which theory is the most plausible as there is no scientific consensus on the origin of life. Each theory has its strengths and limitations, and the scientific community continues to explore and test multiple hypotheses to better understand how life emerged on Earth. The origin of life is a complex and multifaceted topic that involves many interdisciplinary fields, including chemistry, biology, geology, and astronomy, and it remains an active area of research.

 

So I tried a different tact and asked it about the weaknesses of each theory. GPT duly listed a number of them in general terms, which seemed reasonable. Here’s one of them:

 

GPT: It is challenging to explain how complex organic molecules could have formed under the conditions of the primitive Earth, as the atmosphere was likely reducing rather than oxidizing.

 

I followed up by asking: “Why is it challenging to explain how complex organic molecules could have formed under the conditions of the primitive Earth, as the atmosphere was likely reducing rather than oxidizing? Isn't it easier to synthesize complex organic molecules under reducing conditions?”

 

GPT: You are correct that reducing conditions can be favorable for the synthesis of organic molecules, but the challenge with explaining the origin of life under reducing conditions is that the early Earth's atmosphere was likely different from the present-day atmosphere. The primitive Earth's atmosphere was likely composed of gases such as methane, ammonia, hydrogen, and water vapor, rather than the oxygen-rich atmosphere we have today. Under these conditions, it is still unclear how complex organic molecules, such as amino acids and nucleotides, could have formed. One of the main issues is that the reducing atmosphere would not have provided the necessary oxygen to drive the formation of these molecules. Additionally, some of the most plausible mechanisms for the formation of organic molecules, such as the Miller-Urey experiment, have been challenged in recent years, suggesting that the conditions of the primitive Earth may have been more complex than previously thought.

 

The response is interesting. GPT says I’m correct. Then it provides information about the primitive atmosphere from the point of view of the Miller-Urey experiment. But then it errs by saying that “the reducing atmosphere would not have provided the necessary oxygen to drive the formation of these molecules.” That’s backward. GPT thinks that oxygen is needed to drive chemical reactions, which is true when you’re burning fuels for example, but it’s not generally true.  After more back and forth where I give it more info, I remark: “It sounds like I'm giving you the relevant information rather than the other way around. Is that what's happening here?” GPT responds very politely again about what it can do and how it will try its best to be of help.

 

I’m curious whether it can generate chemical reactions, so I ask: “Can you provide a chemical equation for this experiment that shows how amino acids were formed?” GPT demurs by saying the Miller-Urey experiment doesn’t provide this, so then I ask: “Do you provide chemical equations for any chemical reactions?” GPT is measured in its response.

 

GPT: Yes, as an AI language model, I can provide chemical equations for various chemical reactions. However, the level of detail and complexity of the equations will depend on the specific reaction and the information available. If you have a specific reaction in mind, feel free to ask me, and I will do my best to provide you with a relevant chemical equation.

 

Now let’s try it out based on info from the answers GPT had provided. I ask: “How would CH4, NH3, H2O and H2 lead to an amino acid such as glycine? Could you provide a chemical equation?” GPT provides a bunch of text that I’m not showing here that repeats things you might find from a Wikipedia page, but it also obliges with the following:

 

GPT: Here is an example of a chemical equation that shows one possible pathway for the synthesis of glycine from CH4, NH3, H2O, and H2:

·      CH4 + NH3 + 2O2 → HCN + 3H2O

·      HCN + H2O + NH3 → glycine + CO2

 

Me: “The second equation isn't balanced. Could you balance it for me?”

 

GPT: I apologize for the error in the previous equation. Here's the balanced equation for the formation of glycine from HCN, water, and ammonia: HCN + NH3 + H2O → NH2CH2COOH

 

Me: “Um, it's still not balanced. There are different numbers of atoms of different elements on each side.”

 

GPT: I apologize again for the mistake. Here's the fully balanced equation for the Strecker synthesis of glycine from HCN, water, and ammonia: HCN + NH3 + 2H2O + O2 → NH2CH2COOH + CO2

 

Notice how O2 now shows up as a reactant. And it’s still not balanced and GPT doesn’t actually understand why. But to its credit it did pull up the chemical formula of glycine. GPT can balance simpler reactions and it can tell me the predicted products for HCl or H2SO4 reacting with NaOH. How much chemistry does GPT know? I’m not sure. OpenAI claims that GPT-4 performs much better on the AP-Chemistry exam than its predecessor among other things (see graph below from OpenAI’s website touting GPT-4).

 


Why does GPT behave the way it does? I’ve read a number of articles over the last couple of months about this, and the one I like the most that’s also a quick read is Tim Harford’s “Why chatbots are bound to spout BS”. I like his point that GPT aims at sounding plausible. When pressed for details, that’s when it can deliver nonsense. Its aim is neither truth nor falsity. It says it’s trying to be helpful. Is being plausible helpful? I suppose that depends. I’ll quote the last few sentences of Harford’s article because they’re a good reminder.

 

These simple chatbots [ELIZA and others] did enough to drag the humans down to their conversational level. That should be a warning not to let the chatbots choose the rules of engagement.

 

Harry Frankfurt cautioned that the bullshitter does not oppose the truth, but “pays no attention to it at all. By virtue of this, bullshit is a greater enemy of the truth than lies are.” Be warned: when it comes to bullshit, quantity has a quality of its own.

 

That being said, I think I will go chat some more with GPT. I have some ideas of how I might be able to leverage it as a classroom tool but I’ll need to do more tests to figure out what it can do well and what it can’t. Onward!

Tuesday, March 21, 2023

Knowledge Base

I finished reading How to Educate a Citizen by E. D. Hirsch, a well-known voice of experience in the world of education. (I’ve read a number of his papers over the years.) This recent book echoes many themes from his earlier work. It’s a swan song reminding the American people that having a shared knowledge-based curriculum is crucial especially at the early levels of primary school. Acquiring more knowledge content then pays dividends as children go to secondary school and beyond. It’s a Matthew effect: To those who have more, they acquire even more. To those that don’t, the gap widens.

 


I’m a proponent of a knowledge-rich curriculum that spells out what students need to know and that sequences the material coherently. This is crucial in chemistry because you can only get to more advanced material if you’ve mastered the basics. There is broad agreement among chemistry educators what these basics should be. At the college level, the content knowledge and its depth are relatively uniform for general chemistry and organic chemistry from one institution to another. Yes, there are some differences, but there is often at least 80% similarity (our rule-of-thumb for deciding whether a similar course from another university will be accepted for transfer credit).

 

Hirsch stresses the importance that this knowledge be common to all students. The commonality of language and concepts allows people from different walks of life to potentially engage in meaningful conversation. There is a shared basis of knowledge that facilitates the communication. When I came to the U.S. as an international student, although I spoke English competently, I did not share similar cultural touchstones with almost everyone else. (I was the only person from my country.) So I observed, asked questions (usually timidly) and started to learn. This is probably why, when I meet people, I often ask them about their background, their family, what it was like for them growing up, and so on.

 

In my home country, I went through what Hirsch would call a Core Knowledge curriculum (that he favors). I honestly don’t recall very much of what I learned if you asked me “What did you learn that sticks out to you?” But in the flow of conversation, things that I learned a long time ago, bubble up when the appropriate context presents itself. With the appropriate triggers, I would likely be a fount of information. It helps that I enjoy learning and I read voraciously as a child. (There was no TV, and I was very blessed to have access to a wide range of reading material – something that cannot be taken for granted where I grew up.)

 

Coming to college in the U.S. was my exposure to a palette-style smorgasbord education. There wasn’t much of a common curriculum, although there were distribution requirements (pick one from Group A, pick one from Group B, etc). I’ve since experienced the pros and cons of setting up a common curriculum. One of the major advantages of the common curriculum is that it provides a shared language of discourse that can pay dividends in subsequent courses. Another advantage is that it strengthened community through that shared experience, even when it was struggling through said experience.

 

Are there things that I think an educated person should know about chemistry? I’d say some Atomic Theory and Chemical Bonding, making a connection between the microscopic and the macroscopic, the Periodic Table as an organizing principle, and what make chemical reactions “go” (i.e., the role that energy plays in chemical reactions). I think students should recognize common vocabulary: that sodium chloride (NaCl) is table salt and that its properties stem from it being an “ionic compound”. I think these basics can be covered at the secondary school level, i.e., I don’t think all students need to take chemistry in college if they’ve seen it before. Then again, the students who take college chemistry (at my institution) have mostly seen some chemistry (albeit at a more rudimentary level). Those that didn’t see any in secondary school are unlikely to take it in college. The Matthew Effect again.

 

Having a knowledge base allows you to appreciate things that would otherwise seem opaque. I’m currently reading some short stories by William Gibson in a genre classified as cyberpunk. It’s not a genre I’m familiar with, and I don’t read much fiction in general or sci-fi in particular. Gibson throws you right into the action, and if you don’t have the vocabulary or various knowledge touchstones, you simply can’t follow the story. There’s no way I would have understood Gibson’s work when I was a teenager. (Back then, I made one attempt to read Asimov’s Foundation and understood very little.) But now, with a knowledge base or more depth and breadth, I thoroughly enjoyed Hinterlands. It’s a superb piece of storytelling that stretches the mind while it immerses you in the feeling of the main protagonist. And it helped that I knew what cargo cult meant. Being able to enjoy things outside of my domain is why I occasionally read about art or poetry. There is no way I could have known how much I could appreciate without acquiring the knowledge base.

Sunday, March 12, 2023

Szilard Engine

I’m reading Quantum Steampunk by the theoretical physicist Nicole Yunger Halpern. It’s a book about the intersection of quantum mechanics, information theory, and thermodynamics. It’s also aimed at a broad audience, and couched thematically as steampunk. I have little experience with steampunk as a genre – a setting that imagines modern (seemingly magical) technology within the Victorian steam-engine era. I do have some experience with quantum mechanics and statistical thermodynamics since I teach these topics regularly. I have some but not extensive knowledge about information theory.

 


Quantum Steampunk lays the foundation of its three pillars in descriptive terms and evocative examples. You will not find a lot of equations, but you will find some beautifully illustrated figures evoking the Victorian era that Halpern utilizes to help explain the concepts. I was familiar with many of her examples, but one that jumped out at me was the quantum version of the Szilard engine.

 

We discuss Maxwell’s Demon in my statistical thermodynamics class and the possible relation between entropy and information. The Szilard engine is a thought experiment that pushes the idea behind Maxwell’s Demon a little further. Essentially you start with a box with a few gas particles zooming around. Then place a movable partition that bisects the box such that there are more particles on one side than the other, ideally with all the gas particles on one side and none in the other. (This is easier to do with fewer gas particles in the box to begin with.) If your partition is mechanically attached to something that can do work, then as the gas particles on one side push against the partition, the partition moves and you can extract work from the engine.

 

In a two-particle system, your chances of placing the partition in the middle of the box such that both particles are on one side is fifty percent. This Szilard engine can do work. The other half of the time, you’ll trap one on either side, and there is no net work done. A washout. But the quantum version is where things get interesting, and I had not pondered this until reading Halpern’s book. If your two particles are fermions, you always get the washout (Pauli Exclusion Principle!) but if your two particles are bosons, then because of indistinguishability, there’s a one-third chance you get the washout and a two-thirds chance you have a working Szilard engine. It’s an example of where quantum particles can do more thermodynamic work than classical particles. Pretty cool!

 

I enjoyed Halpern’s description of how quantum computing is different from today’s “classical” computing (which does not fundamentally use superposition). She writes in a way that makes the strange nature of quantum mechanics a little more accessible. I say a little more, because (1) no one really understands quantum mechanics, and (2) given I have some background, her writing felt accessible to me but I’m not sure if a non-scientist would agree. Halpern follows-up her Szilard engine description with the Landauer eraser and thus makes the connection to information and entropy. Or I should say entropies. Turns out there a lot of different ways to define entropy. (My students get a sense of this in my classes at a simple level, and we do briefly discuss Shannon entropy.)

 

Thus, the second thing that jumped out at me was Halpern’s discussion on what she calls “one-shot thermodynamics”. I had not heard about this before. It’s been a while since I’ve talked to a hardcore theoretical physicist so maybe that’s why I was ignorant about it. In classical thermodynamics, we rely on averages. When there are zillions (say, Avogadro’s number, applicable to the chemist) of particles in a system behaving “randomly”, then you will pretty much get the average whenever you make a measurement. That’s because that “average” is maximally probably and overshadows all other configurations. Furthermore, if we assume the system is ergodic, that gives us all sorts of other useful mileage which I won’t get into. But what if you just have a small number of particles in your system? Then things get interesting because there’s a small but practically accessible probability that you could extract thermodynamic work which you wouldn’t dream possible in a larger “classical” system. This becomes relevant in quantum systems, and is an example where quantum mechanics allows you to “bend around the Second Law of Thermodynamics” (in Halpern’s words).

 

I’m not sure what to do with my newfound knowledge yet. Much of it is still theoretical although Halpern provides one example in chemistry related to cis-trans isomerism. I haven’t read the relevant papers. This made me think about adding a discussion of the Szilard engine to my P-Chem class and branch a little bit into information theory. I used to do a little more Shannon entropy in the early days but then I found it confused the students on exams, and I’ve since cut back on it. Maybe I should reintroduce the topic given that A.I. and quantum computing are now widespread ideas that most people have at least heard about and might be curious to learn more. So many interesting things. So little time!