Friday, 7 February 2025

ascii2spec

As students of physics will know,  atomic and nuclear states are labelled using a sequence of letters that has a historical derivation from a time before the underlying physics was fully understood.  Thus the sequence of letters s, p, d, f, g, h, i, j, k, ... correspond to angular momentum values of 0, 1, 2, 3, 4, 5, 6, 7, 8, ... . The letters are known as spectroscopic notation.

Sometimes in computer codes it is nice to make the translation between the letter and the number.  Some new-fangled languages such as Python have things like "dictionaries" which let you do mappings between arbitrary data types.  In God's own language, Fortran, no such thing exists, but enterprising coders could use judicious if statements or something like that to do the mapping. 

However, there is already a well-known mapping between letters and numbers called ASCII which Fortran knows about.  Here is a little screen grab from a website ascii-code which shows the mapping for lower-case letters

 

Perhaps unsurprisingly, the mapping between the base-10 numbers ("Code" in the table) and the characters does not agree with the spectroscopic notation from physics.  Still,  mathematics provides a nice way of mapping some numbers onto some other numbers, known as a "function".  So, a real programmer would simply determine that function and use it to do the mapping.  

Here, then, is a function which takes an ascii code from the sequence above and returns the corresponding value of angular momentum:


 and a graphical view of the function, with blobs plotted at the values which correspond to the letters. 

you're welcome


Thursday, 6 February 2025

Teaching Quantum Algorithms

It's Thursday of week 1 of the second semester of our academic year and I've just given my first lecture of a new module that covers quantum algorithms.  I've been teaching here for more than 20 years, but it's a rare thing to be teaching a new module, to have the fun (and fear) of designing and writing and then delivering a set of material.  I must say, it was with a little trepadation that I prepared for the first lecture today.  I knew there would be students of various different academic backgrounds.  For example, some are on our one year MSc course in Applied Quantum Computing, which does not have an undergraduate physics degree as a prerequisite, while others are in their final year of our undergrad Physics programme and will have seen plenty of quantum mechanics so far. 

Having giving the first lecture and run the first tutorial class (back to back in an overall 3h session) I feel quite relieved to have got started and been able to do the best part of teaching - to have the students there and be able to interact with them and get a sense of how well they understand what is going on.  

I'm actually teaching two brand-new courses this semester, with the first lecture of the other one happening tomorrow.  I'm now looking forward to that one.  It's on quantum simulation, so not a million miles away from today's lecture, but a bit more niche, and only for Master's students. 

The obligatory photo I like to include with each post is rendered difficult because I didn't take a photo of my class... which is probably wise as I don't think it's very easy to get freely-given consent to take and share a photo in such a situation, so here is a screen shot of my development environment for this module.  I am writing the lecture notes in a Jupyter notebook, so that I can intersperse code examples when necessary.  I am seeing this error message a lot probably because I am trying to load up the notebook from different computers from the same location on a shared drive, and some file locking issue is happening.  Alas.  



Saturday, 1 February 2025

RIP Roger Barrett 25.01.2025

I heard from a colleague today the sad news of the death of Roger Barrett on 25<sup>th</sup> January 2025.  When I arrived at the University of Surrey in 2000 Roger was I think, by that time, already an emeritus member of staff, but still active, and preent in the Department. In this post from last month, I included a picture taken at a 2003 event we held at Surrey, and it features Roger:

Roger is second from the left in the front row, sitting between Qiang Zhao (now at Beijing Institute for High Energy Physics) and Jim Al-Khalili, himself now an emeritus professor. 

Other more qualified people will hopefully write a bit more of a biographical reminiscence of Roger.  His scientific interests when I knew him were in higher energy physics than I worked in, but I know his background was in the lower-energy nuclear physics common to the Surrey group.  He co-authored a book with Daphne Jackson on "Nuclear Sizes and Structure", published by Oxford University Press.  Like all other member of the nuclear group at Surrey, I was gifted a copy of this book, many others of which graced the shelves of our offices.  Here I am pretending to read it, but really posing for a photo of me  holding it:

 
After Roger stopped coming into the Department I'd often bump into him in the town Waitrose where we both would go to get a copy of the Guardian and a cup of coffee, and I used to catch up with him, passing on news of the Department.  I hadn't bumped into him for a few years now, and I understand his health had declined in the years leading up to his death.

Wednesday, 29 January 2025

A postscript from Glasgow

Though I returned from the Glasgow meeting I posted about a couple of times last week, I thought I'd write one more post to highlight that I took the opportunity to meet up with my PhD student Isaac, who has been living in Glasgow and working remotely from there for a while.  He has submitted his thesis now and awiting the viva.  He gave me the good news that he will start as a postdoc in Glasgow, at least on a rather short term position, but giving him a little space to do something new and look for a longer-term position.  

I took the opportunity to take a picture of him standing next to the poster I prepared:



Wednesday, 22 January 2025

Sauchiehall Street

During my visit to Glasgow, I have stayed in a hotel on Sauchiehall Street, which extends from being one of the main shopping streets in the city centre, to the University area in the West End.  It is a street that features in our family lore, because my parents lived there in separate flats when they were young:  My mum because she had left home nearby and was working around there, while my dad, who is from London, had gone through training with the BBC and had been posted to their outpost in the West End of Glasgow.  They met at a party hosted by one of their friends, and the rest is history - or at least means that I am now writing this message.

 Here's a view down the street.  The flat with the "For Rent" board outside is where my dad lived.  My mum's old flat is just about visible somewhere  where the stone changes from red to brown.  My hotel is in the first block of the brown buildings.

The view behind me is somewhat more impressive, with Kelvingrove museum and art gallery, Kelvingrove Park, and the University.



Tuesday, 21 January 2025

At the Quantum Technologies for Fundamental Physics meeting in Glasgow


I'm in Glasgow for a community meeting as part of the Quantum Technologies for Fundamental Physics (QTFP) programme.  I'm a PI (principal investigator) of one of the grants awarded in the programme, working in the use of quantum technolgies (quantum computers in my case) for fundamental physics (nuclear physics).  We've just been through a several-year cycle of the first round of these grants and this meeting is designed in part, I think, to wrap up this first round.  

The meeting has opened up with a welcome message, suggesting that we'd be hearing from each of the projects for updates. That's not the case, as they rejected my offer to talk on my project (and no doubt others) but I think there are talks on all the "major" projects on the core part of the funding scheme as originally envisioned.   A lot of the progress reported seems to be carrying on what people are already doing and relabelling it as "quantum technology" as a way of leveraging money, with some token efforts to actually make some innovative developements along new quantum lines, which is a shame, and I suspect that the original QTFP vision was rather too narrow.   One might hope, at least, that the work will lead to exciting developments in quantum technologies that have wider benefits beyond a straight continuation of the UK particle physics community.  And yes, it looks like they might, and that may be a benefit from the projects. 

Last week at the Quantum Simulation and Quantum Walks conference I asked a Scotland-based researcher if I'd see her at this QTFP meeting.  She ruefully reported that she felt excluded from it, as it seemed to her to mainly be a narrow way for detector technologists to further their pet projects without really reaching out to a wider quantum community (and she, as I, did not hear about the scheme to begin with as it was not aimed at us). Well, so far, it does seem that way to me.  But I hope there will be something that's really made new connections between (sub-)fields to open up new possibilities.  I will report back if so.

Here's a picture of me walking past the main old building at the University, on my way to the very helpful print shop who had printed the poster that I wrote last week in Italy and sent to them here.  I didn't get assigned a talk but I will show a poster in the poster session tomorrow.

edit: Oh, I should perhaps point out that the organisers of the QTFP programme set up a special edition of the journal New Journal of Physics to showcase results from the various projects.  Here is the contribution from my project, and here is the list of (only six) papers in the collection that show off the scheme.

edit 2: The third talk, on the QSimFP project, is impressive - it brings together a diverse range of expertise to do interesting and novel things with analogue quantum simulators to study things like black holes.  They have a large collaborations with a good number of experimentalists, a good number of theorists, a good split between quantum tech expertise and fundamental physics.  They have really taken the right approach to how the idea of "QTFP" should be enacted.


Friday, 17 January 2025

December book: Bayesian Optimization by Peng Liu

December's book in the book-a-month project is Bayesian Optimisation by Peng Liu.  You won't have seen it in the photo I took for the original post where I said I'd start working through my books in a semi-meaningful way, because I got the book after that post.  I succumbed to a mailshot from Springer offering a selection of books for £15 each - falling into some kind of trap of thinking that they must be good value at £15 each when the list price is much higher (£55 in this case).  Perhaps Springer also knows that I see books as positional goods, too, and knew I would crumble.  

Well, I felt like learning more about Bayesian Optimisation would be a good thing, and hence bought the book and started reading.  Setting aside the intellectual quality of the book for a moment, what struck me is that it is a very badly designed and made book.  All the £15 books I got were sent to a print-on-demand service, and the quality is a bit variable.  One arrived with the pages not properly cut.  The Liu book, did not suffer that, but it very much gives the impression that it was not designed to exist in hard copy.  The margins are ragged, there are mis-sized figures with poor resolution, and a lot of blank space at the bottom of pages since a figure follows on the next page and there wasn't enough room to put it at the bottom of the partly-empty pages.  All things that would not happen in a professionally-designed book.  Still, ultimately it is the intellectual content that is important.   How did that shape up?

Well, I have not read the whole thing, but read through the first half, starting with the first chapter giving an overview of the topic, chapter 2 on Gaussian processes and chapter 3 on "Bayesian decision theory and expected improvement".  I think it is fair to say that I got the gist of chapter 1, made sense of little bits of chapter 2, and found chapter 3 incomprehensible.  I'm not even sure how to describe why I didn't understand it, because I don't even have enough understanding to do that.  In the end it just felt like word spaghetti as every noun as it moved through the book seemed to pick up more adjectives "eventual multistep lookahead marginal gain".  I think if there were (more) specific examples to work through, it would have helped.  Chapter 2 did have one, although it was a rather abstract example, and that did aid understanding a bit.

I can't help but feel I am at fault - too dim - to understand the book, and that may be the case, but it's also possible that I should be able to make sense of a book about this kind of technical subject given my prior experience.  If only I had learned anything from it, I might be able to calculate which of these two positions is the most likely. 

Anyway.  I'm afraid I can't recommend it, though I may revisit if and when I learn the topic from some other source to see if I can retrospectively make sense of it from the position of already knowing the material.

Some pictures:

Me holding the book

An example of empty space because
a figure is coming up on the next page