I wasn’t going to do the MAB. Then this happened

A marking and assessment boycott is ongoing at the University of Nottingham. The post below, written by an anon colleague, was sent to all UoN UCU members this morning.

Full disclosure: I wasn’t going to do the marking and assessment boycott.

My reasons were many, and they included the following:

  • I don’t teach many Finalists, mainly first years. My participation in the Mab achieves not a great deal.
  • I don’t want the University to take my money; I want my money for me.
  • Also re money: I am probably being made redundant. A couple months’ pay takes on a greater significance in this context.
  • My students this year have been through enough. From finding out in the middle of the semester that their department is closing and their lecturers being made redundant, to being invited to a meeting in which their bags were searched and they were told that the university would rather welcome ‘higher tariff’ students, they have been through enough nonsense. Do I want to risk contributing to any more disruption to their year?
  • And also, I really quite fancy actually marking their work.

I genuinely want to reward those students who turned up and did well. The thought of them getting some derived mark, based on their performance in, what, January? – when every good teacher knows that the rate of learning and accomplishment on a project is not the same at the end as it is near the beginning or the middle – is unappealing.

So I wasn’t going to do the MAB.

And then I changed my mind.

It wasn’t just the redundancy letter, and it wasn’t seeing the shock on the faces of colleagues who were seeing the pool numbers and understanding the implications for the first time. No, it was that Wednesday 13th May, the day full of meetings. The FN2 presentation that was riddled with errors (‘Oh, that’s actually wrong on there’, muttered the presenter when reading off the slide, as if encountering it for the first time).

It was also things like seeing that not only are Modern Languages degrees going, the Language Centre is apparently now going too. We had always been assured that, yes, we are still a global university, and no, we are not destroying language provision in the East Midlands. We are keeping the Language Centre. We are keeping the Language Centre. This was always the response from above to concerns voiced by supporters. Now it seems that this is no longer the case. It was seeing how management had, apparently, changed their mind on that one. (See? See how easy it is to change one’s mind?)

And it was the suggestion, from the presenter, that we all ‘Take the time’ to digest all this and take it all in. (‘Take the time’?)

Coming out of the day of meetings, I overheard two colleagues talking about the MAB. ‘I just hope everyone does it this time’, I heard a friend say.

And by that stage, I knew I was going to do the MAB:

  • No, I don’t teach Final year students but I can still participate in the MAB.
  • If colleagues are losing money on my behalf, then I don’t want the money either. I can earn more money later. I will gladly accept an unpaid sabbatical.
  • Actually, my students understand. I have been pleasantly surprised by the number of students who have reached out to say thank you for the work we did this year, and who took the opportunity to say how sorry they are about what’s happening. (Many students have gone above and beyond. To the students who curated the Endangered Species exhibition to draw attention to programme closures: thank you! To the students who have asked their lecturers not to mark their work – thank you.) The students, who are aware of what’s going on, do get it.
  • And our branch has a track record of getting things done, and doing them well. The summer when there was that big push against casualisation was the summer the university created a number of permanent jobs to ward off the bad press. The summer when we got our pensions back and everyone got a £500 bonus. Branch action contributed to nudging those things along.

What the last few weeks really have shown me is that what’s happening now is bigger than my job, bigger even than the jobs of everyone doing the MAB. We don’t need to take action for our own sakes. But we want to act with integrity, and this is a chance for that. And it’s a reminder that it’s never too late to change your mind.

Stop calling it slop

The piece below was published by Times Higher Education last week. I’m making it available here so as to release it into the wild from confinement behind the paywall. I should also note that the payment for the article will be donated to the UCU Hardship Fund for staff on strike at the University of Nottingham.

AI writing is instantly recognisable, we are told — soulless, dispassionate, and devoid of the spark that marks genuine thought. Historian Jonathan Rees, in Academe this spring, calls it “bland, unspecific, pedestrian prose.” Journalist and UCL academic Sarfraz Manzoor, in a recent piece for The Independent, concluded that an AI article his students read was “competent but forgettable.” Scroll through r/professors on any given day and you will find dozens, if not hundreds, of colleagues enthusiastically nodding along and complaining bitterly about students submitting work that any fool can see was written by a machine.

Outside of academia, the dismissal has become so culturally embedded that Merriam-Webster named “slop” — defined as digital content of low quality produced by artificial intelligence — its Word of the Year for 2025.

I have used AI routinely in my research, teaching, and outreach for the past two years, and, in my experience, these confident, oft-repeated claims are wrong — wrong about the quality, wrong about the creativity, and wrong about the ease with which AI writing can supposedly be detected. Yes, there are of course real, compelling problems: the very genuine risk that students outsource thinking they should be doing themselves, the environmental costs of running these systems, and the danger that familiarity breeds credulity — that students accept AI output without the critical scrutiny they would apply to any other source.

But “it’s all slop” is simply not a critique. It is a lazy reflex that lets us avoid a more uncomfortable conversation. So let me add to that discomfort. More than half of this article was written by Anthropic’s Claude Sonnet 4.6. See if you can tell the output of the carbon-based neural net from that of its silicon-based counterpart. Feel free to make your case in the comments section below (or, for those who are resolutely old-school and are reading this in print rather than pixels, in a letter to the editor) — which parts are mine and which were written by Claude? (A word of warning: counting em-dashes will not help you. I have been liberally scattering them across my writing long before any algorithm or architecture was trained to do the same.)

The most threadbare — or, perhaps I should say, sloppiest — version of the anti-AI argument is that large language models are little more than sophisticated search engines (“uber-browsers”), regurgitating their training data verbatim. The evidence strongly suggests otherwise — a 2024 study found that LLM reasoning is “unlike retrieval, and more like a generalisable strategy that synthesises procedural knowledge.” In other words, it doesn’t fetch answers. It applies a method that is often uncomfortably close to how a human researcher synthesises and extends knowledge.

I have seen this at first hand in both research and teaching. In a recent paper, we needed to translate a specialised mathematical expression from the literature into working code. I cut-and-pasted the relevant equation directly into Claude (as a low-resolution screenshot) and received working code within seconds. That code does not exist online. It was essentially reasoned – for a given definition of “reasoned” — into existence. The simulations of molecular diffusion in the same paper involved a more iterative, back-and-forth process with the LLM — but one that I believe many academics would recognise as collaborative problem-solving — and reduced work that would previously have taken days, if not weeks, to a matter of hours.

This is where the discomfort really deepens. Writing and debugging those codes would previously have been exactly the kind of task I would have set a PhD researcher or upper-level undergraduate project student — meaningful precisely because wrestling with the mathematics builds physical intuition. My mantra as a physics undergraduate was simple: “if I can’t code it, I don’t understand it.” That principle is not merely under pressure. It is dead in the water. The necessary pain of the learning process — and, crucially, its reward — has been short-circuited. And the reasoning capabilities that make this possible extend well beyond code generation.

When I fed ChatGPT one of our undergraduate quantum physics exam papers verbatim — no rewording, no restructuring, no assistance — it not only scored 95%, but at one point reasoned its way toward an answer that was better than those found in some textbooks, steered along much as I might nudge a PhD student in a viva. That is not a search engine. That is something considerably more unsettling — and considerably more interesting. Whatever it is, slop it is not.

Quantum computing: one universe is more than enough

The collapsed version, for those with limited bandwidth : Forget the sci-fi of parallel universes. Quantum computing works by controlling wave interference.


Coming up on five years ago — back in the strange suspended time of the pandemic years, in what now sometimes feels like a parallel universe of its own — Computerphile uploaded a video on the theme of superposition and its role in quantum computing. I posted an accompanying blog piece, Superposition without the superstition.

Except, as it turned out, we never really got round to the quantum computing bit. Oops.

As mustavogaia2655 pointedly notes in the comments under the video:

Quite right, musta (if I may). You got us bang to rights.

So when my UoN colleague Mike Pound, a popular Computerphile regular, got in touch recently to suggest that a joint Computer Science-Physics approach to the quantum-computing machinery behind Shor’s algorithm could be fun, I jumped at the chance.

This post, and the upcoming Computerphile video it accompanies, are our somewhat belated response to musta’s suggestion above. Our aim is to strip quantum computing down to its bare essentials to show how, at heart, it works simply by choreographing the interference of waves. And we do it with only A-level/high-school mathematics — essentially, just complex numbers and spinning arrows (although there’s also a light sprinkling of |\text{kets}\rangle.)

When Sean uploads the video, I’ll post it here. What follows is a more detailed exploration (with interactive demos to boot) of the QC foundations we outline in the video.

But before we get to the computing, we need to clear away some of the clutter…

Of worlds and woo

My long-standing issues with quantum mysticism — and why we can’t pin all the blame on the likes of Deepak Chopra, Gwyneth Paltrow, Rhonda Byrne et al. — have been ventilated at length here, there, and elsewhere. The condensed version is this: we physicists have to take some of the blame too.

No, that’s too kind. Some of us have to take most of the blame.

But even if we leave aside the more grievous offenders — “QUANTUM PHYSICS proves that YOU shape the UNIVERSE”, says PHYSICIST1 — there remains a subtler and more pervasive problem. Quantum mechanics, and QC in particular, are too often presented in a way that obscures the underlying physics not only for broad popular-science audiences, but for undergraduates and postgraduates too.

Quantum computing is almost invariably presented as an exercise in abstract linear algebra, with the nuts and bolts — the mechanics — of the measurements pushed into the background or left out altogether. That is perfectly understandable if your goal is to engineer the logical operations. But it is not, to my mind, the most powerful way to build physical intuition — particularly in a pop sci context — because it tends to hide the fundamental mechanism at work: we are manipulating the amplitudes and phases of waves.

That’s it.

Really.

At heart, all quantum computing does is choreograph and control waves.

This is not to say that quantum mechanics is easy, that its foundations are tidy, or that the experiments are straight-forward. They most definitely are not — quantum computing implementations are astonishing feats of ultrahigh-precision experimental control. And, conceptually, the measurement problem is still a prickly thorn in the side. (As Mateus Araújo put it so memorably, “Born got quantum theory to work using wire and bubble gum.“)

But the core structure and dynamics of the theory are linear (at least until measurement interjects), and that linearity does a huge amount of heavy lifting. Linear, in this context, means the mathematics behaves like a simple Excel spreadsheet formula2: scale the input and the output scales directly with it; combine several entries, and their separate contributions simply add up. Compared with turbulence, chaos, fluid flow, nonlinear optics, or very many other areas of classical physics, much of the basic mathematics of standard quantum mechanics is linear and therefore surprisingly teachable3.

Hilbert space is not a place

The trouble starts when the formalism is allowed to float free of the physics. Hilbert space — the home of all that linear algebra — is a core part of the mathematical framework of quantum theory. But it’s still only a book-keeping tool. Just like we don’t walk around with big ugly arrows sticking out of our chest indicating which direction we’re walking (and how fast), neither does the quantum world come equipped with state vectors hanging off every atom, molecule, and sub-atomic particle.

Kets are not physical objects in their own right.

Matrices aren’t measurements.

Hilbert space is not a place.

No amount of linear algebra, however sophisticated, can by itself tell us which interpretation of quantum mechanics is “really” true. And yet repeatedly we encounter the suggestion — explicit or implicit — that Hilbert space somehow exists “out there”, and that the mathematical structure itself should be granted ontological status.

In other words, the map is being mistaken for the territory. And once that step is taken, it becomes all too easy to talk about branches, worlds, and vast universal wavefunctions as though these were empirical discoveries rather than interpretive gloss on a formalism that, by itself, provides no such thing.

That is bad enough in the context of undergrad/postgraduate education. But in an age when scientists — and science itself — are increasingly distrusted, it is much worse than a question of pedagogical choices. It encourages, and amplifies, exactly the wrong instinct in a society riven with mis/disinformation bollocks: empirical evidence is secondary to a good story. The talented science writers Philip Ball, John Horgan, and Sabine Hossenfelder have each compellingly, and repeatedly, made this point4.

So I’m going to take a different path (out of the many available). Not “Here is a matrix; it acts on another matrix”, but: What do we actually do? What knobs do we turn? What pulses do we apply? What phase builds up? What gets measured?

If I can’t build it, I don’t understand it.”

We are about to go from an explanation of Shor’s modular exponentiation strategy to “How does a quantum Fourier transform extract a period?” via “How does quantum logic work?” Since that’s rather a lot to digest in one sitting, I have broken the explanation up into five collapsible “quanta”.

(Yes, that pun is bloody awful. Apologies.)

Large-number factorisation is a remarkably lopsided problem. Multiplying two large prime numbers together is easy; being handed the answer and asked to recover the two primes is, for a classical computer and a large enough number, much harder (to dramatically understate the case). That imbalance is the basis of RSA encryption, one of the workhorses of internet security: it is easy to make a public number by multiplying two secret primes, but, for large numbers (e.g. 2048-bit values) it’s effectively impossible, for all practical purposes, for an outsider to reverse the process and recover them.

That was the comfortable assumption, at least, until 1994, when Peter Shor showed that a quantum computer could attack the problem in a radically different way. Shor’s algorithm was revolutionary because it demonstrated that a sufficiently large, fault-tolerant quantum computer could, in principle, undo the imbalance and factor large numbers efficiently. And that’s why the phrase “quantum computing breakthrough” tends to leave cryptographers in a rather perturbed state.

The first step in Shor’s algorithm is, however, not even quantum at all. It’s an astoundingly elegant, purely classical, change of perspective: turn factoring into period finding. Instead of trying to pull the hidden primes directly out of a large number, we construct a repeating modular-arithmetic pattern and ask how often it repeats, i.e. what’s the underlying frequency? And once the problem has been recast into finding frequencies, physicists perk up. We’re then in the well-trodden domain of Monsieur Fourier.

But more on Fourier later. First, we need to get to grips with Shor’s strategy.

Remainders of the day

Let’s say we want to factorise a number N. We’re going to start small and choose N = 15. (Yes, that’s hardly a formidable mathematical challenge — particularly if we can remember our times tables — but it serves as an illuminating toy example of Shor’s algorithm in action.) The idea is to pick an integer a that has no common factor with N (other than the trivial 1), then look at the sequence

f(x)=ax mod Nf(x)=a^x~\text{mod}~N

as x increases (0,1,2,3….). We’re going to choose a = 2 for this example.

The “mod” means modulo arithmetic; we simply divide through by N and take the remainder. The crucial insight is this: because of the modulo arithmetic, the outputs must eventually repeat. The key quantity is the period r: the number of steps it takes before the sequence cycles back to the start. Once we know that period, the factors can be extracted with a little ordinary arithmetic.

Here’s how it works for N = 15, a =2:

x2x2x mod 15
011
122
244
388
4161
5322
6644
71288

So, the sequence is 1, 2, 4, 8, 1, 2, 4, 8, 1, 2, 4, 8…. It repeats every four values. In other words r = 4.

Now the neat bit. Since the period is 4 we know that

241(mod 15)2^4 \equiv 1 \qquad (\text{mod}~15)

(The three-bar equals sign just means “equivalent to”. In other words, 242^4 (i.e. 16), is the same as 1 in modulo-15 arithmetic, as is 28,212,216,2202^8, 2^{12}, 2^{16}, 2^{20} …etc…)

This means that

2410(mod 15)2^4-1\equiv 0 \qquad (\text{mod}~15)

But

241=(221)(22+1)=3×52^4-1=(2^2-1)(2^2+1) = 3 \times 5

And there are our factors.

The rhythm in the algorithm

For factorising 15, all of this is, of course, almost farcically unnecessary. We hardly need Peter Shor to tell us that 15 = 3 × 5. But the example captures the essential trick: don’t attack the factors directly, find a period instead. That change of viewpoint is the first key step — and it is entirely classical. Not a qubit in sight.

Now imagine we have a 2048-bit number N = pq, where p and q are prime. (See footnote5 for an example of a 2048-bit number. It’s a bit of a beast.) We’re given N. Our task is to find p and q. Unlike our 15 = 5 x 3 example, this one is not something that can be trivially tackled by observation. But exactly the same recipe applies:

  • Randomly pick a number a that doesn’t share a factor with N. (If it does share a factor, congratulations. You can have the rest of the day off.)
  • Now look at the sequence
f(x)=ax mod Nf(x)=a^x~\text{mod}~ N

where x is once again zero or a positive integer: 0, 1, 2, 3…

Because it’s modulo arithmetic, the sequence must repeat at some point. We just don’t know when. For a 2048-bit number, trying to find that period by simply brute-force stepping through values of x, one at a time, is hopeless. In the hard cases relevant to cryptography, the period can be astronomically large. A single laptop core would not merely be slow, it would take many times the age of the universe to find r using a sequential trial-and-error approach of that type. Even recruiting a billion cores would not turn a brute-force search into something tractable; in this context a billion cores are essentially just as useless as pen and paper, or, indeed, stone tablet and chisel.

This is not to say that all classical approaches are so crude — classical number theory has many far smarter tools than blind stepping. But for the period-finding route at the heart of Shor’s algorithm, direct sequential search is exactly the bottleneck the quantum part is designed to avoid. The reason that the quantum part of Shor’s algorithm is so powerful is that it does not search for the period one step at a time. As we’ll see, it instead extracts the period as a frequency.

  • Once we know r, the rest is algebra. If it turns out that r is an odd number, we sigh, choose another value of a, and start again. When r is even, we do exactly what we did above for N = 15:
ar1=(ar/21)(ar/2+1)a^r-1=(a^{r/2}-1)(a^{r/2}+1)

The left-hand side is divisible by N, so there is a good chance that the two bracketed terms contain the hidden factors of N between them. To extract them, we compute

gcd(ar/21,N)\text{gcd}(a^{r/2}-1, N)

and

gcd(ar/2+1,N)\text{gcd}(a^{r/2}+1, N)

where “gcd” means “greatest common divisor”. (This is a fast operation even on a classical computer; it’s the period-finding step that’s the monumentally time-consuming bit). If the gods of number theory are smiling, these greatest common divisors are neither 1 nor N, but the prime factors we’re looking for.

So, in a nutshell, Shor’s modular-exponentiation strategy transforms the factoring problem into a period-finding problem. We no longer ask, “What are the factors of NN?” directly. Instead we ask, “How many steps do we need to go before this modular pattern repeats?” In other words, what’s its period? Or, equivalently (and crucially when it comes to quantum computing), what’s its frequency? How often does the pattern repeat?

Period and frequency are two sides of the same coin. The period tells us the spacing between repeats; the frequency tells us how many repeats fit into a given stretch.

Long period, low frequency. Short period, high frequency.

And this is where the ubiquitous Fourier transform makes its entrance. Pass a repeating pattern (or even a non-repeating pattern) to an FT and it tells you which frequencies are present. Importantly, no weird quantum trickery is required — this is a purely classical concept and technique. Fourier analysis6 has been with us since the (very) early 19th century and is a cornerstone of classical physics, engineering, signal processing, image analysis, acoustics, studio recording, optics, crystallography, medical imaging…; everything from the subatomic to the cosmological. Anywhere there are signals, shapes, oscillations, waves, or patterns, Fourier is there (implicitly or explicitly).

The central idea is beautifully simple (and I’ve banged on at length about its elegance and ubiquity before): a complicated pattern can be broken down into simpler waves. The Fourier transform tells us how much of each wave — each frequency — is needed to build the pattern. Or, in slightly more mathematical language, a very large class of functions can be built as a summation of much simpler basis functions, un(x)u_n(x) (where nn is just a label telling us which of the functions in the basis set we mean):

g(x)=ncnun(x)g(x)= \sum_n c_n u_n(x)

The coefficients cnc_n tell us how much of each basis function is needed. Change the coefficients, and we change the mixture. Change the basis functions, and we change the mathematical “ingredients” we are using to build g(x)g(x). In Fourier analysis, those basis functions are sines, cosines, or a combination of both. (And it doesn’t just have to be a one-dimensional function — two, and higher, dimensions are equally amenable to Fourier treatment.)

That summation – the “big sigma” sign — in the equation above is the very definition of superposition: a linear sum of basis functions to create a more complicated function. Despite all the “Wow! Quantum! Heads And Tails At The Same Time! Amaaazing!” hyperbole, there’s nothing at all weird, wacky, mystical, or magical about superposition. Nothing. Classical physics, in markedly ordinary settings, does superposition all the time: harmonics combine to give texture and character to voices, musical notes, and sounds in general; ripples overlap on the surface of a pond, lake or ocean; radio, WiFi, and mobile-phone signals superpose all around us; and every image we see is formed from light waves whose fields can add, overlap, and interfere.

As we’ll soon see, quantum mechanics certainly has its weird moments. But superposition isn’t the source.

Fourier analysis earns its stripes

The simplest place to see all this in action is not in a stream of modular-arithmetic values, but in a picture. Imagine a set of evenly spaced stripes: dark, light, dark, light, repeating across the page. Actually, you don’t have to tax your imagination. Here’s something you may recognise…

The distance from one bright stripe to the next in the zebra crossing is the period of the pattern. The number of bright-dark cycles packed into a given distance is its (spatial) frequency (aka wavenumber). Same information, two entirely complementary (and conjugate) descriptions.

To initially keep the Fourier picture as clean as possible, we’ll start not with a traditional stark black-and-white zebra crossing, but with a softened version: a smooth sinusoidal variation from dark to light and back again: one pure sine wave (i.e. a single Fourier component.) Then our “sum” has only one term:

g(x)=c1u1(x)g(x)=c_1 u_1(x)

where

u1(x)=sin(2π 1l x)=sin(2πxl)u_1(x)=\sin (2\pi~\color{red}\frac{1}{l}\color{black}~x) = \sin\left(\frac{2\pi x}{l}\right)

For our zebra-crossing example, x is the distance across the crossing: 0 on the left edge, increasing in value to a maximum (i.e. the width of the crossing). The l symbol represents the period of the pattern. More importantly in the context of quantum computing is the associated (spatial) frequency, 1/l (which I’ve highlighted in red.) If, for example, the zebra crossing dark-light pattern repeated every 1 m, then the frequency is simply 1/m (in words, “one (period) per metre”); if the period were instead 50 cm, then the frequency is 2/m (or 2 m-1; two per metre).

That’s x and 1/l covered. That just leaves the 2π2\pi in the equation for u1(x)u_1(x) to explain. The frequency, 1/l, tells us how many cycles fit into one metre. But the sine function does not count in cycles; it counts in radians. A sine wave completes one full cycle when its argument changes by 2π radians (or 360360^\circ in the entirely arbitrary 4,000-year-old angle convention bequeathed to us by the Babylonians7.) So we multiply by 2π to convert from cycles per metre to radians per metre.

The quantity 2π×1l2\pi \times \frac{1}{l} is called the angular frequency and tells us how quickly the phase of the sine wave changes as we move along x. The phase is simply where we are in the sine wave’s cycle: peak, valley, zero-crossing, or somewhere in between. If 1/l = 1/m, the wave goes through one full cycle per metre, so its phase changes by 2π radians per metre. If 1/l = 2/m, the phase changes twice as fast: 4π radians per metre.

The Fourier transform takes the period of the zebra-crossing image and converts it to a representation in spatial frequency; it’s exactly the same information, just in a much more compact, and generally easier-to-interpret form (particularly for patterns rather more complicated than a zebra-crossing, like, for example, this). Undergraduate physicists spend a lot of time studying reciprocal space for precisely this reason. (There’s a beautiful relationship between crystal structure, Fourier transforms, reciprocal lattices, diffraction, and the famed double-slit experiment that I unfortunately don’t have space to explore here.)

Superposition without the superstition, revisited

Here’s a demo that puts the maths in a more visual and tangible format. We start with one Fourier component — i.e. one sine wave. Change the stripe period (unit: pixels) via the slider below and note how a smaller value shifts the spike in the Fourier spectrum to a higher frequency (and, of course, vice versa).

Now move the top slider to “2” to add another Fourier component.

Congratulations. You’ve just carried out superposition. (And I’m willing to bet a substantial sum that, in doing so, you observed precisely zero empirical evidence that a new branch of the universe appeared, decoupled, and went off on its merry way.)

You’ve now got a linear summation, i.e. a superposition, of two basis functions:

g(x)=c1 sin(2πxl)+c3 sin(6πxl)g(x)=c_1~\sin\left(\frac{2\pi x}{l}\right)+c_3~\sin\left(\frac{6\pi x}{l}\right)

Nothing mystical. Just a sum of two functions. Superposition.

(“Why c3 and not c2?”, you might ask. “And for that matter, why 6πx/l ?” Very good questions. See 8 for the gory detail. However, you can comfortably bypass that for now — it really is a footnote in the explanation of quantum computing essentials. All you need to recognise is that a superposition is just a sum of functions.)

By moving the “Fourier components” slider in the demo to the right you increase the number of terms, n, in the summation,

g(x)=ncnun(x)g(x)=\sum_n c_nu_n(x)

For our zebra-crossing case, our basis function “ingredients” are

un(x)=sin(n2πxl)u_n(x)=\sin\left(\frac{n2\pi x}{l}\right)

Note the argument of that sine function. As we increase the value of n, the sine wave oscillates back and forth in space at a higher rate. This in turn means that as we add more Fourier components, the image of the zebra-crossing sharpens up; those higher spatial frequency components vary more quickly in space. Conversely, if we remove high frequency Fourier components from an image, we’ll tend to blur it, or, at worst, reduce it to a featureless, ill-defined, uncertain blob9.

Fourier transforms don’t just convert between spatial period and spatial frequency. They’re routinely used in a vast array of contexts in physics, chemistry, biology, medicine, engineering, and computing — including, in particular, quantum computing — to decompose a waveform into its component frequencies. It’s exactly the same idea: change the representation from one domain to another. Period becomes frequency. And this is precisely the strategy that Shor’s algorithm exploits.

But, as mentioned in passing above, sine functions aren’t the only ingredient we can have for Fourier series and transforms. Cosines also oscillate, of course. Wouldn’t it be helpful if we could combine both sine and cosine representations into a single, more compact form of Fourier analysis? Fortunately, a powerful mathematical identity discovered — or should that be invented? — in the eighteenth century allows us to do just that.

Although some mathematicians may quibble — and there’s nothing a mathematician likes more than quibbling, in my experience — the following compact little gem is routinely described as the most beautiful equation10 in the world (…or possibly the universe (or multiverse, if you really must)) :

eiπ+1=0e^{i\pi}+1=0

Here’s how Keith J Devlin, professor emeritus at Stanford, has described that mathematical objet d’art (which is due to the 18th century Swiss polymath Leonhard Euler):

…like a Shakespearean sonnet that captures the very essence of love, or a painting that brings out the beauty of the human form that is far more than just skin deep, Euler’s equation reaches down into the very depths of existence.

…the very depths of existence.” That’s quite the accolade. But the version of Euler’s equation above is really only the special, t-shirt-and meme-ready case. It comes from a more general relation, known as Euler’s formula, which tells us what happens when the angle is not fixed at π radians (aka 180 degrees), but allowed to be any angle ϕ\phi:

eiϕ=cos(ϕ)+isin(ϕ)e^{i\phi}=\cos(\phi)+i \sin(\phi)

In other words, the famous “most beautiful equation” is essentially one particularly photogenic scene from a much larger mathematical production. And, if you’ll allow me to strain the cliched movie metaphor beyond breaking point, the imaginary number, i, plays a starring role. (Ouch. I’ll get me coat…)

Real and imaginary. It’s complex.

Euler’s formula is not some exotic piece of quantum sorcery (not least because it predates QM by about two hundred years). It’s simply part of the standard physics vocabulary when it comes to waves, rotations, oscillations, and periodic motion. Anywhere sines and cosines turn up — sound, light, electromagnetic waves, vibrations, and, of course, quantum mechanics — Euler is lurking somewhere in the background (usually shoulder-to-shoulder with Fourier.)

Let’s not worry about how the formula is mathematically derived — there are a few neat approaches — and instead focus on a simple graphic that captures just how those cornerstones of mathematical physics, e, i, cos, and sin, are interrelated. (There’s a physicist-friendly Old MacDonald joke lurking in there somewhere, but I’ll spare you.)

The x-axis in the interactive figure embedded at the foot of this section is labelled Re, for real. We’re all — scientist or not — on very familiar terms with real numbers because these represent quantities we can measure: length, voltage, energy, momentum, the eye-wateringly high price of a hot beverage that almost, but not quite, tastes entirely unlike tea, the airspeed velocity of an unladen swallow, etc… Quantum mechanics may be weird, but it’s not that weird: when we measure something, the result must still be a real number.

I make this point, obvious though it may seem, because the y-axis is instead labelled Im. That’s short for imaginary. Imaginary numbers are some multiple of i, the square root of -1. And while i is a fascinating and powerful addition to our mathematical lexicon, it’s most definitely not something we can measure directly. No device, no matter how clever, is going to return 1\sqrt{-1} as a reading on its display.

So, you might ask, why introduce i at all? Why make things more complex? Because although imaginary numbers are not themselves measurement outcomes, they are extraordinarily useful throughout the physical sciences, mathematics, and engineering when it comes to keeping track of quantities that rotate, oscillate, and interfere. Their real utility, however, comes when we combine them with real numbers. A complex number, often represented by the letter z, does just that: it packages a real part and an imaginary part together into a single object: z = x+ iy. And this, it turns out, is a mathematical object that is particularly at home in the quantum world11.

Talking ’bout a revolution

A more quantum-friendly way to write a complex number, thanks to Euler’s formula above, is this:

z=reiϕz=re^{i\phi}

All we’ve done here is translate from one representation to another. It’s exactly the same complex number, z, just written in a different way. It’s like giving directions to the same place in two different forms: Go 7 km east, then 7 km north (“7 + 7i“) versus Go north-east for about 10 km. The destination hasn’t changed, only the directions. And, thanks to Pythagoras, Euler, and a bit of basic trigonometry, the translation from one set of directions to the other is straightforward.

In the interactive graphic below, the blue line below is what we call a phasor. It’s got a length r (which we call the modulus). So, from Trig 101,

x=rcos(ϕ)y=rsin(ϕ),x=r\cos(\phi) \qquad y=r \sin(\phi),

where x is the distance along the real axis, y is the distance along the imaginary axis, and ϕ is the angle that the phasor makes with the real axis (which we call the phase or phase angle. Hence, phasor. As distinct from phaser.)

This modulus-phase form, z=reiϕz=re^{i\phi}, is not just an alternative notation to z=x+iyz=x+iy. As we’ll soon see, it’s core to developing an understanding of just how quantum computers work.

For the demo below, use the phase-angle slider, or the ±ϕ\pm\phi buttons, to rotate the arrow around the complex plane. As you change ϕ\phi, note how the projections onto the real and imaginary axes vary as rcosϕr\cos\phi and rsinϕr\sin\phi. The modulus slider changes the length of the phasor, rr, so both projections grow or shrink with it. This simple act of rotating and scaling phasors is exactly what a Fourier transform exploits: it lines up, adds, and cancels arrows to reveal frequencies. (And if these little rotating arrows feel familiar to some of you, that is no accident: this way of thinking is very much in the spirit of Feynman’s QED: The Strange Theory of Light and Matter.)

The classical Fourier transform, discretely

Euler’s formula gives us a pleasingly compact way to write oscillations. Instead of carrying around separate sine and cosine terms, we can package them into a single complex exponential. This is not just mathematical tidiness for the sake of it; when it comes to the Fourier domain, the complex exponential form is exceptionally powerful.

As we’ve seen, a Fourier transform determines how much of each repeating component is present in a signal, image, waveform, or pattern. Written in complex form, those components are not just sine waves. They are a combination of sines and cosines. They’re phasors.

For a discrete signal — that’s a list of values rather than a continuous curve (think of a column of values in a spreadsheet) — the Fourier transform becomes the discrete Fourier transform12, or DFT:

Fk=n=0N1fnei2πkn/NF_k=\sum_{n=0}^{N-1} f_n e^{-i2\pi kn/N}

In words, a list of values

f0,f1,f2,f3,....f_0, f_1, f_2, f_3, ….

is turned into another list:

F0,F1,F2,F3,...F_0, F_1, F_2, F_3, …

The first list is the original data. It could represent essentially anything — brightness along a line (as in our zebra-crossing example), a microphone signal, voltage values from a detector, an MRI scan, or a list of numbers from a modular-arithmetic pattern. The second list is the Fourier-transformed data. As we’re about to see, it tells us how much of each frequency is present.

If you’ve not encountered Fourier analysis before, don’t panic. That equation above may look daunting at best, and downright intimidating at worst, but it’s nowhere near as tricky as it first seems. And we’ve already covered all the maths you need to understand it earlier in this post. In any case, we can’t cut corners here. The discrete Fourier transform is not only the heart of the QC implementation of Shor’s algorithm, it also contains, in miniature, some of the core ideas behind quantum logic.

It is worth taking this slowly, because the type of phase manipulation underpinning the classical DFT is exactly what quantum computing exploits: arrange phases so that contributions matching the underlying pattern reinforce, while incompatible contributions cancel away. And because quantum registers naturally deal in amplitudes and relative phases, the DFT algorithm is exceptionally well matched to the way quantum computers actually process information. It’s all wave manipulation, remember. (And yes, that also goes for the QC platform being developed right now by your smarter doppelgänger in Universe #ZZ9-2112-42-plural-Z-alpha.)

Clocking the frequency

When we introduced the zebra crossing, frequency was explained, as is traditional, in terms of “cycles per metre” or “cycles per pixel”. But there’s a complementary, equally valid, phasor-based way to think about frequency that is core to how the DFT operates: one cycle of a wave is one full turn of a phasor, so frequency is simply how fast the phasor rotates as we move across the wave, pattern, or signal. Higher frequency means a larger phase step from one point to the next.

The DFT is built around this simple idea. For each possible frequency kk, it multiplies the input by a phasor whose phase varies in the opposite direction. If kk matches the input frequency, the phase variation is captured correctly and all the resulting phasors point the same way. If kk doesn’t match, some phase variation remains and the phasors cancel when summed. The result? A peak right at the frequency of the input pattern/signal13.

Before we dissect the DFT equation symbol by symbol, however, let’s first use a demo to see what it’s doing. (After all, a (moving) picture paints 210 words, give or take). We’ve set this up in a way that is very similar to the quantum computing architecture, but right now it remains completely classical — not a qubit in sight.

In the demo below, the upper register — which is nothing more than a list of input values — contains 25 samples of a single complex exponential. It’s a simplified, phasor-friendly version of the initial smooth zebra-crossing pattern and it looks like this:

fn=ei2πmn/Nf_n=e^{i2\pi mn/N}

Before passing this to the DFT, let’s make sure we understand what fn represents.

For the zebra crossing, we described our basis sine function in terms of the continuous variable, x: un(x)=sin(n2πfx)u_n(x)=\sin(n2\pi f x), where x was the distance across the crossing. For the complex exponential input to the DFT, we instead have a list of values — at the risk of belabouring the point, it’s a discrete, not a continuous, function. The n tells us which entry in the list we’re looking at — again, it helps to think of a column of values in a spreadsheet — while N is the total number of entries in that list.

So n/Nn/N simply tells us how far through the list we are (just like x in the zebra crossing example told us how far across the crossing we were).

If n=0n=0, we are at the start.

If n=N/2n=N/2, we are halfway through.

The idea is straightforward: n/Nn/N is the discrete version of “position across the pattern”.

The frequency is set by the value of m, which we’re going to set to 4. For all that follows it’s helpful to think of frequency in terms of the number of full phase cycles across the register. In addition to having four cycles across the register, we can also have a phase offset. This is nothing more than a constant additional phase that affects all phasors equally; instead of the first value in the register (i.e. f0) having a phase of 0, we add a phase angle that rotates the phasor away from being aligned with the positive x-axis direction.

Shift the input phase slider at the top of the demo below back and forth and you’ll see the associated phase variation sweep across the input register — you’re just shifting the peaks and the troughs along. (Make sure to reset the input phase offset to zero before continuing.)

The lower register shows what happens for a specific frequency kk. To reiterate (because it’s absolutely central to the entire story): the DFT works by multiplying the input by a phasor whose phase varies in the opposite direction (due to the negative sign in the exponent in the DFT equation). Move the “DFT test frequency” slider and note that when k4k \neq 4, i.e. when the frequency does not match that of the input, some phase variation remains: the little yellow phasors point in different directions and cancel .

But when k=4k=4, the DFT output has captured — well, “reverse-captured” — the phase variation in the input. All the yellow phasors then point the same way, so the output – the sum of those phasors, courtesy of the big sigma, \sum , in the DFT equation — is large. The DFT has found the frequency of the input pattern.

However, the DFT does not only tell us which frequency is present. Each value of FkF_k is a phasor, so it has both a length and a phase angle. The length is the modulus of the complex number, denoted mathematically as |Fk||F_k| ; it shows how much of frequency k is present. (We’ll have more to say on moduli soon.)

On the other hand, the phase angle tells us, perhaps unsurprisingly, the phase of that frequency component — where it sits in its cycle. You can see that in the demo by moving the “input phase offset” slider. When k=4k=4, the yellow DFT phasors still line up, but they all line up in a different direction. The frequency has not changed; only the overall phase of that component has shifted.

Arrows to algebra

To save you having to scroll up, here’s the DFT expression again:

Fk=n=0N1fnei2πkn/NF_k=\sum_{n=0}^{N-1} f_n e^{-i2\pi kn/N}

(Before going any further, I’ll just note that the summation, \sum, runs from 0 to N-1, because we label the first point in the input data list as #0, rather than #1. The coding community is very used to this convention.)

We’re going to dissect the DFT operation as briefly as possible, and connect the math(s) to the demo.

Here, once more, is our input:

fn=ei2πmn/Nf_n=e^{i2\pi mn/N}

Let’s now plug that expression for fn into the DFT formula:

Fk=n=0N1ei2πmn/Nei2πkn/NF_k=\sum_{n=0}^{N-1} e^{i2\pi mn/N} e^{-i2\pi kn/N}

Multiplying exponentials means that we simply add the exponents, like this:

Fk=n=0N1ei2π(mk)n/NF_k=\sum_{n=0}^{N-1} e^{i2\pi (m-k)n/N}

Now this is rather neat, because if we have m = k, i.e. we’ve matched the input frequency, the exponent becomes 0 (due to the (m-k) term). So the value of the DFT for that particular frequency is simply:

Fk=n=0N1e0F_k=\sum_{n=0}^{N-1} e^0

And any number raised to the power of 0 is 1. So we have 1+1+1+1+…. for a total of N values, i.e. the total number of values in the input data list. Adding up all those ones gives us a big spike in the DFT at a frequency that matches that of the input data. Moreover, 1 is a purely real number. This is why the DFT output phasors in the demo all align along the horizontal for k = 4 (and for an input phase offset of 0.)

For other values of k, the exponent doesn’t become 0, the phasors don’t align, and when they’re added together via the big sigma, \sum, they cancel out. So the DFT returns zero for all other frequencies.

This is an idealised example involving a single pure complex exponential with an integer frequency. DFTs of real signals are never quite so tidy. But the core concept and strategy remains exactly the same. Loop through different frequencies, k. Those that match a frequency in the input pattern will capture the phase variation in the input signal to a much greater extent, and appear as a peak in the DFT.

To be Shor

We’ve just Fourier-transformed a clean complex exponential: a signal whose phasor rotates by the same amount from one sample to the next. That was the simplest possible way to see how Fourier analysis detects a frequency. But Shor’s algorithm, as implemented on a quantum computer, does not simply hand the quantum Fourier transform a smooth sine wave. Nor does the quantum modular-exponentiation unit — let’s call it the quMEU — pass the modular sequence 1,2,4,8,1,2,4,8,… directly to the Fourier-transform machinery.

That would be a perfectly valid Fourier transform. But it is not the transform we need.

We’re going to stay classical for just a little while longer, because we can get surprisingly close to the quantum version of Shor’s algorithm without yet introducing a qubit. The key next step is that we stop thinking of the modular values 1,2,4,8,… as sample values in a signal or waveform and change our perspective a little.

In the standard version of Shor’s algorithm, the quMEU has two registers at its output: one still carrying the input value xx, and a second carrying the modular-output axmodNa^x\bmod N.

(How the quMEU actually carries out the modular exponentiation quantum mechanically is a post for another day — unless Sean is keen on a Computerphile video that makes the combined extended editions of The Lord of the Rings trilogy seem like a YouTube short. For now, we’ll treat it as a black box.)

What matters for us is not the machinery inside the quMEU, but what it provides as output. For our N =15, a=2 example, we use a four-bit input register, because we are considering x=0 to x=15 (i.e. sixteen (24) different values). The modular outputs are also each less than 16 in value, so we can write them as four-bit labels too. Classically, the quMEU’s output can therefore be represented by the following two-register table:

xinput registeroutput register: 2xmod15000000001100010010200100100300111000401000001501010010601100100701111000810000001910010010101010010011101110001211000001131101001014111001001511111000 \begin{array}{c|c|c} x & \text{input register} & \text{output register: }2^x \bmod 15 \\ \hline 0 & 0000 & 0001 \\ 1 & 0001 & 0010 \\ 2 & 0010 & 0100 \\ 3 & 0011 & 1000 \\ 4 & 0100 & 0001 \\ 5 & 0101 & 0010 \\ 6 & 0110 & 0100 \\ 7 & 0111 & 1000 \\ 8 & 1000 & 0001 \\ 9 & 1001 & 0010 \\ 10 & 1010 & 0100 \\ 11 & 1011 & 1000 \\ 12 & 1100 & 0001 \\ 13 & 1101 & 0010 \\ 14 & 1110 & 0100 \\ 15 & 1111 & 1000 \end{array}

Each input-register value is simply the corresponding value of xx written in binary across four bits; the output-register values are just 1,2,4,8,1,2,4,8,1,2,4,8,1,2,4,8,\ldots also written in binary. At this point our toy example is almost too small for its own good. Once the table is printed in front of us, the period in the output register is easy to spot by eye. But this is not the situation the algorithm is built for. We do not need Peter Shor’s strategy to factorise 15; we are simply using N=15, a=2N=15,\ a=2 to expose the nuts and bolts of the approach. In a real quantum-computing architecture there is, of course, no printed table to inspect.

So we should resist the temptation to solve the toy problem by staring at it. Instead, we now use the method that scales, and that — as we’ll see — is fully compatible with quantum mechanics. Focus on one possible output-register value, say,

00100010

Now, go down the list of input positions in the table above, starting at the top, and put a “1” if there’s a match with the 0010 output value, and a “0” if there isn’t a match. This is what you get:

0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,00, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0

This is essentially our zebra crossing again: a regular pattern of bright and dark slots. Let’s get its DFT.

The demo below takes the representative output-register value 0010 and shows how its corresponding input pattern is analysed by a DFT. For each test frequency kk, the DFT equation is implemented phasor-by-phasor. (The “Step” button increments by a single phasor each time). Most values of kk make the contributing phasors point in different directions, so they cancel and the corresponding DFT output — the sum of all the 16 contributing phasors — for that value of k stays as zero.

For k=0,4,8,k=0, 4, 8, and 12,12, however, the contributing phasors line up, so a non-zero output phasor appears. Pressing “Scan k” saves your fingers some work and automatically builds the Fourier spectrum slot by slot, making the peaks at 0,4,8,120,4,8,12 appear for exactly the same phasor-alignment reason we saw in the earlier DFT demo for the single complex exponential input.

The demo performs the DFT in the most transparent possible way: step through each test frequency kk, add the corresponding phasors, and watch the peaks appear. The quantum Fourier transform will not do this by looping through kk in the same classical way. But, as we’ll soon see, it is also not the case that the whole QFT magically falls out of the aether into our lap because “superposition”. The quantum version still has to be engineered from carefully controlled operations that move amplitudes and, critically, shift phases.

Before we finally get to the QC implementation of Shor’s algorithm, here’s one last illustration of the central importance of phase — not just in quantum mechanics, but in classical waves, images, and the universe of patterns all around us.

When Schrödinger’s cat meets Fourier’s best friend

The DFT output is not just a list of frequency peaks. As is clear from the examples above, each Fourier component is a phasor, with both a length and an angle. The next demo is a small act of Fourier vandalism designed to show just how much that angle matters.

We take the Fourier transforms of the two images below and swap the phasor information around: lengths (i.e. moduli) from one image, angles (i.e. phases) from the other.

Cat image source; K9 image source

The sliders in the demo below control how much we mix the phases or moduli of one image with those of the other. Note that K9 — for it is he — materialises when the phases are shifted towards K9, even though the moduli are still taken from the cat image. By contrast, changing the moduli while keeping the cat phases retains our infamous feline friend.

In many areas of physics and engineering, we very often use what’s called a power spectrum: instead of considering the full Fourier phasor, we keep only the square of its length, Fk2|F_k|^2. (It is called a power spectrum because, for many physical signals, the power carried by a wave is proportional to the square of its amplitude.) This is enormously useful — physicists are very fond indeed of their power spectra — but throws away all the phase information. And often that is not just a choice. Sometimes, the power spectrum is all we can measure; the phase is out of our reach.

The K9-cat hybrid demo shows what can be lost when we keep the lengths and discard the angles. Peter Coles makes the same point in a more colourful cosmological setting in his highly recommended What the Power Spectrum Misses post: sharp structure depends on Fourier components adding coherently in the right places and cancelling elsewhere, and that coherence lives in the phases.

And this is why we’ve taken an extended (pre)amble through classical Fourier space before venturing into the quantum world. The very same ingredients are at the heart of quantum computing: phasors, moduli and phase angles, interference, and cancellation. We’re going to see that, in quantum mechanics, the phasors represent the complex amplitudes of quantum states: lengths set the measurement probabilities, phase angles decide how the amplitudes interfere. Change the phases, and you change what reinforces, what cancels, and therefore what is likely to be measured.

Quantum computing, at heart, is the controlled engineering of that interference: use amplitudes and phases so that structure and patterns become visible in the measurement statistics.

Now let’s finally see how.

At this point, we’ve already done the majority of the mathematical work needed to make sense of quantum computing. Not all of it — probability, measurement, and interference still have to be explained— but the rotating phasor picture is at the core throughout. We now need to connect that mathematical picture to something physical. What does the spinning arrow represent in a quantum computing architecture? And what’s it got to do with quantum logic operations?

Grounded and excited

Let’s collapse the discussion down to the simplest possible case. Imagine a single atom with two energy levels — low vs high, or, in more physicsy language, ground vs excited — that we decide to use as our quantum bit. Better still, imagine a single charged atom: an ion. Because it’s charged, we can hold it in place using carefully arranged electric fields in an ultrahigh vacuum chamber. We can isolate it from much of the surrounding world, prod it with lasers and microwaves, and read out its state using light. And this is not just a physicist’s pipe dream: trapped ions are one of the leading quantum computing platforms.

We’re going to label the lower-energy state as |0\ket{0} and the higher-energy state as |1\ket{1}. Those symbols are kets, and they come from Dirac notation — a compact, no-frills mathematical language describing quantum states, as introduced, appropriately enough, by the terse and taciturn Paul Dirac. (For much, much more on kets, bras, brakets, and Dirac notation in general see Chapter 6 of these notes and references therein.)

Throughout this post, however, we won’t require any of the mathematical machinery of Dirac notation other than kets. And, importantly, a ket is nothing more than a label; |0\ket{0} means “the (ground) state we are calling zero”, and |1\ket{1} means “the (excited) state we are calling one”. We could just as easily label them as |😐⟩ and |🤩⟩. The ket is not the ion, any more than the word “Nottingham” is the city; it is the mathematical label we use for a physical state of the ion. Map, not territory.

The detailed physics of these two states also doesn’t matter when it comes to getting a grip on the core principles underpinning quantum computing. (If you’re innately detail-focussed, however, see this comprehensive review of trapped-ion QC. And if you want a shorter summary of the key differences between our simplified demo and a real experiment, see this note.) What matters is that the system has two well-defined possibilities: |0\ket{0} and |1\ket{1}. These are our basis functions.

Odds and arrows

We’re now at the point where all that effort put into understanding phasors comes into its own; the rotating arrows are going to be our quantum book-keepers. A two-state ion is not described by a simple tick-box saying “ground” or “excited”. Instead, each possibility has an amplitude attached to it. An amplitude is a weighting coefficient: it tells us how much of a particular basis state “ingredient” goes into the mixture. For our ion, c0c_0​ weights the 0\ket{0} ingredient, and c1c_1​ weights the 1\ket{1} ingredient:

|ψ=c0|0+c1|1\ket{\psi}=c_0 \ket{0}+c_1\ket{1}

You may not be totally surprised to hear at this stage that the amplitudes c0 and c1 are complex numbers; they can therefore be drawn as phasors. Because energy and frequency are two sides of the same coin in quantum mechanics (tied together by the Planck relation E=hf, where h is Planck’s constant), those phasors are not frozen in time, however. They rotate. And they rotate at different rates due to the difference in energy of the |0\ket{0} and |1\ket{1} states, as shown in the demo below…

Don’t worry for now about the “Control frame” button. All will become clear(er) soon. (I hope.) For now, stick with “Raw phase”. The rotating phasors represent c0c_0 and c1c_1. The “Superposition mix” slider changes the relative lengths of those two phasors; the bars underneath show the corresponding measurement probabilities. Longer phasor means larger probability; zero-length phasor means that outcome will not appear.

The probability of a measurement outcome is given by the square of the phasor’s length. This is the infamous Born rule.

Why the square of the length? That is a great — and deceptively deep — question. There are long-standing arguments about just why probabilities in quantum mechanics should take this form. (See the first couple of paragraphs of this paper for a flavour of the extent of the debate.) But exactly how best to understand the origin of the Born rule depends on how one thinks about quantum states, measurement, and probability itself.

For our purposes, we can be more pragmatic. The rule is simple to apply and spectacularly well tested: square the length of the phasor to get the probability.

If the ion is definitely in the ground state (i.e. the “Superposition mix” slider is all the way to the left), then the phasor for 0\ket{0} has length 1, while the phasor for 1\ket{1} has length zero. Measure the ion, and we find that it’s in the 0\ket{0} state with 100% probability. No mystery. Likewise, if the ion is definitely in the 1\ket{1} state (i.e. “Superposition mix” slider all the way to the right), we get 1\ket{1} every time.

But what’s essential to realise is that even though the probabilities are 100% one way or the other, the phasor in each case is not static — it’s continually revolving. (Even after we make a measurement.)

Moreover, the two phasors do not stay aligned in the “Raw phase” picture. Because the two basis states have different energies, their phasors tick round at different rates. The result is a constantly changing relative angle between c0c_0​ and c1c_1. That relative angle will soon matter, because quantum operations are not just about changing the lengths of these arrows — they are also about setting the phase angles so that amplitudes reinforce or cancel in precisely the right way.

The “Control frame” button shows the same state using a more useful clock. It’s a bit like filming a runner using a camera moving alongside them at exactly the same speed. To someone standing on the pavement, the runner is racing past; to the camera operator moving at the same speed, the runner appears nearly stationary, and the interesting motions are the smaller changes relative to that moving viewpoint. The same trick is happening here. Instead of watching the background phase rotation, we subtract it away and keep track only of the phases that matter for control. The phasors have not stopped being quantum objects; we have simply changed viewpoint. In that frame, the arrows sit still until we deliberately change them. This is the book-keeping frame we will use when we start building quantum logic.

So far, though, all of this has been about the mathematical book-keeping: phasors are just our representation, our model, of how the quantum states evolve. We now need to turn to the nuts and bolts of the quantum mechanics — after all, that’s the central theme of this post. How do we make a measurement? Indeed, what is a measurement in this context?

A light in the black

In the demos below, we’re going to borrow the measurement strategy directly from real ion-trap experiments. Shine a laser tuned to the right frequency on the ion and one state scatters light, making the ion “light up”; conversely, the other state does not lead to scattering and the ion remains dark. For the purposes of the demo, we’re going to associate 1\ket{1} with the bright outcome and 0\ket{0} with the dark outcome.

A measurement in this case is a straightforward experimental question: does the ion light up or not? Sometimes that answer is certain: if the ion is prepared in one of the measurement states, the result is fixed. Prepared in one measurement state, the ion scatters lots of light and appears bright; prepared in the other, it remains dark.

For a superposition, however, the amplitudes give probabilities, not a guaranteed result from any single run. So we repeat the same preparation and measurement many times; the pattern of bright and dark outcomes reveals the probabilities encoded in the amplitudes.

So we repeat the same preparation…” This is crucial. When we measure, we force the superposition to yield one definite outcome: bright or dark, 1\ket{1} or 0\ket{0}. It is no longer in the original superposition; measurement has collapsed it onto one of the two measurement states. So we go back to the start and repeat. Many, many times. Prepare the superposition, measure, reset, prepare it again, measure it again — over and over, rinse and repeat. The accumulated pattern of bright and dark outcomes across those repeated runs reveals the probabilities encoded in the amplitudes.

The demo below mimics a simplified version of a real trapped-ion measurement. We shine light on the ion and collect scattered photons with a detector. If the ion is in the bright state, it scatters lots of photons. If it is in the dark state, it scatters very few. But real detectors are not perfect. Even when the ion is dark, the detector may still register the occasional stray photon: background light, electronic noise, or what experimentalists call dark counts. So we set a threshold (the dotted vertical line in the shots vs counts histogram). Below that threshold, we call the result dark; above it, we call it bright.

Start with the pulse-duration slider at zero. (We’ll see the relevance of this slider very soon, but for now just ignore it.) We start with the ion in the ground state, |0\ket{0}. Each time we measure the ion — each “shot” — the detector records a number of photon counts. The histogram shows how often each count value occurs across repeated shots. Repeat that preparation-and-measurement cycle a few times and the histogram will build up only on the low-count side of the threshold. Then press “Measure 100 times” (which does what it says on the tin). The ion remains dark across all those repeated measurements; it’s 100 percent in the |0\ket{0} state.

Now let’s start to prod the ion. The slider controls how long we apply a microwave pulse tuned to the energy gap between the two states. A relatively short pulse — 1.0 microsecond, say — nudges the ion only slightly away from the ground state; a slightly longer pulse pushes its overall quantum state further towards the excited state. (Why? Bear with me.)

Increase the pulse duration (first to 2, then 3, then 4 μs) and measure again. (Make sure you hit the “Reset” button before you change the pulse duration each time in order to wipe the slate clean.) At the shortest pulse times, bright outcomes appear only occasionally. As the duration is increased, they become much more likely. The tempting hypothesis is then “longer pulse means higher probability of brightness (i.e. of being in the excited state)” But keep going and the evidence does not support that picture…

Try a pulse duration of 5 microseconds. Bright.

Now try 10 microseconds. Dark.

Now 15 microseconds. And we’re back to bright.

What’s happening here?

Rabi, set, glow

Let’s do what every good physicist should do in a situation like this: make more systematic and carefully controlled measurements. That’s what the demo below does — it sweeps the pulse duration from 0 to 60 microseconds in steps of 250 nanoseconds (a quarter of a microsecond) and determines the probability of “bright”, i.e. the ion being in the excited state. As you can see, the probability oscillates back and forth as a function of pulse duration.

Those wonderful wiggles are called Rabi oscillations. To reiterate, the microwave pulse is tuned to the energy gap between 0\ket{0} and 1\ket{1}. As the duration of the pulse is increased, the ion’s quantum state moves from dark towards bright, then back towards dark again. The pulse is not steadily driving the ion into the excited state; it is instead causing a reversible cycle. It is actively controlling the complex amplitudes that determine the relative contributions of |0\ket{0} and |1\ket{1} to the superposition. That is why the bright probability rises, falls, and rises again.

This is the bare minimum we require for quantum logic. Once Rabi oscillations appear on demand, we have the fundamental physical ingredient needed for a qubit logic gate: we can prepare and control superpositions of two qubit states.

Now try moving the decoherence slider. The distinct Rabi wiggles decay away. This is what happens when the qubit is no longer sufficiently isolated from its surroundings. Stray fields, vibrations, thermal motion, background radiation, imperfect control pulses — all of these can leak information into the environment, scrambling the carefully controlled phase relationship between the 0\ket{0} and 1\ket{1} amplitudes.

That loss of phase coherence is deadly for quantum computing. The entire objective — just as was the case for the DFT — is to make phasors (i.e. complex amplitudes) reinforce or cancel in precisely the right way. If the surrounding world is allowed to keep “poking” the qubit, those phase relationships wash out, the phasors get nudged back and forth uncontrollably, the interference disappears, and all quantum logic goes with it. This is why quantum-computing experiments so often involve ultrahigh vacuum, extreme cooling, vibration isolation, magnetic shielding, and a gobsmacking amount of experimental fuss and bother.

We will now set decoherence back to zero, leave it there, and continue to work in the quantum-mechanical equivalent of the perfect frictionless vacuum beloved of school and undergraduate physics. Entirely unrealistic, yes, but exactly what we need while we learn the machinery of QC. (For a recent readable and fascinating overview of the very many challenges still facing the development of real quantum computers, see this.)

In tune and in time: pulsing on resonance

In a previous demo we had a fictitious “Superposition mix” slider that allowed us to set the lengths of the c0c_0 and c1c_1​ phasors directly. In the real world, the superposition mixture is controlled by applying a microwave pulse for a carefully chosen time. As we’ve seen with Rabi oscillations, a short pulse moves a little amplitude from 0\ket{0} towards 1\ket{1} , a longer pulse moves more, and a still longer pulse tips the balance back again. The pulse length is therefore the experimental handle on the phasor lengths, and thus directly controls the measurement probabilities.

The π/4\pi/4, π/2\pi/2, 3π/43\pi/4, and π\pi labels in the demo below — essentially a tweak of our previous “Superposition mix” simulation — represent microwave pulses (tuned again to the 01\ket{0}\leftrightarrow\ket{1} transition) with different durations. A π\pi pulse is timed to move the ion all the way from 0\ket{0} to 1\ket{1}, giving the maximum bright probability. A π/2\pi/2 pulse lasts half as long and produces an equal mixture of 0\ket{0} and 1\ket{1}. A π/4\pi/4 pulse is shorter again and tips the superposition mixture more heavily towards the |0\ket{0} state, while a 3π/43\pi/4 pulse leans the other way and incorporates more of the |1\ket{1} state in the mix. So the labels are really stopwatch settings: carefully calibrated pulse lengths expressed as angles around the clock face.

We now have the complete control toolbox we need. In the next, and final, section we’re going to come full circle — a complete 2π2\pi radians — and return to Shor’s algorithm, this time from the quantum perspective.

A note on the simplified demo vs real-world trapped-ion QC

The bright/dark readout and the microwave control pulses described above capture the essential mechanisms, but some corners have been cut (and some liberties have been taken) to make the explanations easier to follow for those who aren’t steeped in QC architectures and algorithms. Qubit gates use microwave pulses tuned to the |0⟩↔|1⟩ transition; readout uses a separate optical laser tuned to a completely different transition involving a third, short-lived auxiliary energy level. The frequency difference between the microwave and optical regimes of the electromagnetic spectrum is so large that the two processes are very much distinct — which is exactly what we want: control pulses that don’t accidentally trigger a measurement, and readout lasers that don’t accidentally drive gate operations. We’ve also adopted the convention that |1⟩ is the bright state, which is the reverse of the standard experimental arrangement, where it’s the ground state |0⟩ that couples to the readout laser and fluoresces.

These are simplifications and a convention choice, but the underlying mechanisms — resonant driving of transitions, phase accumulation, interference, and fluorescence-based binary readout — are those used in real trapped-ion quantum computing.

We have finally assembled all the pieces we need. We know how Shor’s algorithm converts factorisation into a period-finding problem. We’ve seen how Fourier analysis turns repeated, periodic structure into peaks in the frequency spectrum. We know how complex numbers are represented by phasors, how phasors encode amplitudes and phases, how measurement turns amplitudes into probabilities, and how resonant pulses let us move amplitude between quantum states. We have also switched into the “control-frame” view, where we’ve shifted our frame of reference and the phasor engineering is much easier to see.

Now let’s put those pieces together to see how a quantum Fourier transform finds the period in a modular exponentiation sequence.

Registering a superposition

Up to this point, our ion has been a one-qubit system: two possible basis states, 0\ket{0} and 1\ket{1}, with a complex amplitude (i.e. a phasor) associated with each. Shor’s algorithm needs a register: several qubits treated as one combined object. With four qubits, each qubit can be either 0 or 1, so the register has sixteen possible basis states, which we write like this:

|0000,|0001,|0010, ... ,|1111\ket{0000},\ket{0001}, \ket{0010},~…~, \ket{1111}

These are just four-bit labels. Read as ordinary binary numbers, they correspond to 0, 1, 2, …, 15 in decimal. The state 0000\ket{0000} simply means “all four qubits are in their 0 state.” It is the four-qubit version of starting from 0\ket{0} in the single-qubit demos. A four-qubit register gives us the sixteen slots we need for the input value, xx, in our N=15, a=2N=15,\ a=2 Shor example.

Our first job is to spread amplitude evenly over the register, i.e. to set up an equal superposition of all sixteen basis states. We do that with the π/2\pi/2 pulses we have already met: a π/2\pi/2 pulse on a single qubit produced an equal superposition of 0\ket{0} and 1\ket{1}. However, we want to extend the superposition beyond a single qubit so that it spans the four-qubit register. Like this:

|0000+|0001+|0010+ ... +|1111\ket{0000}+\ket{0001}+\ket{0010}+~…~+\ket{1111}

Press the Pulse button in the demo below to sequentially go through the steps in engineering the superposition. We start in 0000\ket{0000}, with all the amplitude in a single register state: all qubits are in their ground state. In order to establish the superposition — and, more generally, to do quantum logic with more than one qubit — we need to have a mechanism to address individual bits. One way is to apply a weak variation in magnetic field across the register.

Each ion then sits in a slightly different magnetic field, which shifts its 01\ket{0}\leftrightarrow\ket{1} energy gap slightly. That gives the four qubits slightly different resonant frequencies, ω0,ω1,ω2,ω3\omega_0,\omega_1,\omega_2,\omega_3 so that each can be addressed separately. But addressing one qubit does not mean affecting only one basis state. This is key. As we’ll see, a pulse tuned to one qubit acts on that bit wherever it appears across the whole register.

(Note that in a “raw phase” frame, each qubit phasor rotates at a slightly different rate. If we tried to track relative differences in phase in this frame, our heads would be spinning along with the phasors. The demo is therefore drawn in a “control” frame: we account behind the scenes for the microwave frequency associated with each qubit and show only the amplitudes and phases we are actively controlling.)

Pressing the Pulse button applies a π/2\pi/2 pulse to whichever qubit is currently selected (via the choice of microwave frequency). The first pulse splits the original 0000\ket{0000} amplitude across the two register states associated with the first qubit, i.e. we have the following state:

12(|0000+|0001)\frac{1}{\sqrt{2}}\left(\ket{0000}+\ket{0001}\right)

(where, to reiterate, we’re setting the relative phase differences to zero for the starting state.) The second pulse acts on the next bit and thus spreads the amplitude over four states.

Why four states? Why does acting on the second qubit produce a superposition involving a mix of all four states, instead of producing two distinct superposition states — one for the first qubit, one for the second? Good question. This one has a straightforward answer (…and nary a mention of bubble gum or wire).

Before applying the second pulse, the register is already in a superposition of two states. Ignoring the relative probabilities of different states for now, consider the effect of the second microwave pulse on both “components” of the superposition state. It does this (momentarily forgetting about factors of 1/21/\sqrt{2} and the like):

|0000|0000+|0010\ket{0000} \rightarrow \ket{0000} +\ket{0010}

and

|0001|0001+|0011\ket{0001} \rightarrow \ket{0001} +\ket{0011}

In other words:

12(|0000+|0001)12(|0000+|0001+|0010+|0011)\frac{1}{\sqrt{2}}\left(\ket{0000}+\ket{0001}\right) \rightarrow \frac{1}{2}\left(\ket{0000} +\ket{0001}+\ket{0010}+\ket{0011}\right)

(The factor of 1/2 arises because we have equal probability for each basis state: (1/2)2 = 1/4. )

Now take that four-state superposition and apply the next microwave pulse. Using the same logic as above, we’ll end up with a superposition of eight basis states. Application of the fourth and final microwave pulse produces the sixteen-state superposition we need:

|ψ=14|x\ket{\psi}=\frac{1}{4}\sum \ket{x}

where the summation is over all basis states. (Note that (1/4)2 = 1/16).

The key point here is that we are not preparing the sixteen amplitudes one by one. We are using bitwise pulses: each pulse addresses one qubit, but acts across the whole register.

Into (and out of) the quMEU

Our carefully prepared sixteen-state superposition is now passed to the quMEU (which, you’ll remember, stands for Quantum Modular Exponentiation Unit.) The inner machinations of the quMEU are most definitely a saga for another day. What matters for our quantum Shor story is what the quMEU outputs.

The quMEU deals with not just one, but two four-qubit registers. The first is the superposition we prepared in the previous section: all sixteen possible input values, x = 0 to 15, represented as four-bit states. The second register starts blank, which in four-qubit notation means 0000\ket{0000}. Before the quMEU acts, the combined two-register state is

14(|0000+|0001+|0010+ ... +|1111)|0000\frac{1}{4}\left(\ket{0000}+\ket{0001}+\ket{0010}+~…~+\ket{1111}\right)\ket{0000}

The first bracket is the input register. The 0000\ket{0000} at the end of the line is the blank output register, waiting to be filled with the modular-exponentiation result. The quMEU leaves the first register alone and writes the modular-exponentiation result into the second register. For example, if we consider the basis state in the input superposition that represents the number 2, i.e. |0010\ket{0010}, then the operation of the quMEU is this:

|0010|0000|0010|0100\ket{0010}\ket{0000}\rightarrow \ket{0010}\ket{0100}

because 22 mod 15 = 4, i.e. 0100 in binary. In general, the quMEU does this:

|x|0000|x|2x mod 15\ket{x}\ket{0000}\rightarrow\ket{x}\ket{2^x~\text{mod}~15}

The first register still holds a superposition of all sixteen values of x, while the second carries the corresponding modular-output value for each component of that superposition. The two registers are therefore correlated: input values 0, 4, 8, 12 are paired with output 0001; input values 1, 5, 9, 13 are paired with output 0010; and so on. This is the quantum version of the classical two-register table we built earlier, and it looks like this:

After the quMEU, the two registers are not merely sitting side by side with independent superpositions. The value in the second register is correlated with the value in the first register, so the overall two-register state cannot be written as a product of the first and second registers. This is entanglement.

Entanglement often gets wrapped up in unnecessary mysticism in pop sci accounts of quantum physics. Here it simply means that the two registers are correlated and cannot be treated as independent. The second register does not carry a value unrelated to the first; it carries the modular-output value associated with each first-register component.

To keep the discussion of the quantum Fourier transform as clear and simple as possible, let’s imagine we’ve made a measurement of the second register and got 00100010. This means that the first register is immediately reduced to the values that were paired with 00100010, i.e. 1,5,9,131,5,9,13. All the other components are removed by the measurement, because they were correlated with different output-register values. So the first register is reduced to

12(|0001+|0101+|1001+|1101)\frac{1}{2}\left(\ket{0001}+\ket{0101}+\ket{1001}+\ket{1101}\right)

Now let’s put the quantum Fourier transform to work.

Fourier, quantised

There is just one final aspect of π/2\pi/2 pulses that we need to understand before the QFT is unleashed. Previously, they were used to construct a superposition:

|ψ=14|x\ket{\psi}=\frac{1}{4}\sum \ket{x}

But a π/2\pi/2 pulse behaves differently when both states it connects already contain amplitude. Earlier, when we used π/2\pi/2 pulses to build our sixteen-state superposition, each pulse was effectively pushing amplitude into an empty state. For example, starting from 0\ket{0}, a π/2\pi/2 pulse produces a balanced mixture of 0\ket{0} and 1\ket{1}. In that situation, it is natural to think of the pulse as “creating superposition.”

But that is only half the story. A π/2\pi/2 pulse also works essentially in reverse: it can take amplitude from two connected states and recombine it. If both states already contain phasors, the pulse mixes those phasors together. Where they are aligned, the result is reinforcement. Where they have opposite phase, the result is cancellation.

So, in the QFT stage, the π/2\pi/2 pulse is not simply creating “more superposition.” It is recombining amplitude that is already present in the register.

In the simplest phase convention, and if we consider only one qubit, the pulse does this:

|012(|0+|1)\ket{0}\rightarrow \frac{1}{\sqrt{2}}\left(\ket{0}+\ket{1}\right)

but it also does this,

|112(|0|1)\ket{1}\rightarrow \frac{1}{\sqrt{2}}\left(\ket{0}- \ket{1}\right)

So if amplitude is already present in both states, the two contributions are added into one output and subtracted into the other. That is where the reinforcement and cancellation come from.

This same add-and-subtract logic is what Fourier analysis has been doing all along. The classical and quantum versions differ in implementation, but not in the underlying idea: arrange phasors so that some combinations reinforce and others cancel.

The classical DFT we looked at before explicitly looped through each frequency kk and summed up phasors at each step. If those phasors aligned, we had a peak in the DFT; if not, we had cancellation and no output in the DFT.

The QFT does not — indeed, cannot — loop through kk in that way, however. Instead, the possible kk values are output states of the QFT register, and the pattern of reinforcement and cancellation is imposed by applying the correct sequence of pulses and “wait” events (during which the phase evolves, i.e. the phasors rotate).

The demo below is, I’ve got to stress, definitely not a complete simulation of a full QFT circuit. It is a stripped-down version designed to show the essential mechanism: mixing pulses recombine amplitudes, waiting allows phases to evolve, and measurement samples the surviving output state.

The QFT of course does not know the period in advance. It is simply the Fourier recipe implemented in quantum form. When that recipe acts on a periodic input, the matching frequency components reinforce, while the others cancel. The answer is not built into the procedure; it emerges from the interference.

Start by pressing the “Step” button. Each press advances one stage of the stripped-down QFT logic. Don’t worry for now just how the pulse/wait events work – we’ll get to that. Instead, focus on the evolution of the row of phasors: some disappear as their contributions cancel, while others survive. When the “Measure once” and and “Measure 100 times” buttons become active at the end of the pulse-wait-pulse sequence, use them to sample the QFT output. (Our tried-and-trusted bright/dark strategy again). A single measurement gives one definite four-bit result; repeated measurements build up the peaks statistically. (But, as before, each time we make a measurement, the entire system has to be reset.)

On the face of it, there’s rather a lot going on in that sequence. But it’s much simpler than it at first seems. There are just two types of action: apply a microwave pulse or do nothing. That’s it. Granted, we have to do nothing for just the right amount of time (so that the phasors we have selected rotate by the correct amount), but it really is just a sequence involving nothing more than those those two actions. (Well, apart from the “Reverse Bits” step at the end, and that only involves reading out the bits in the reverse order when interpreting the result.)

Before we break down the operation of the QFT, however, let’s first explain the output. We have spikes at k = 0, 4, 8, and 12 (in my universe, at least; hopefully this holds true in yours too). Why those values?

To understand the output, we’ll use exactly the same phasor logic as for the classical DFT. For each possible Fourier output FkF_k, the phasor angle is set by

exp(i2πkn16)\exp\left(-i\frac{2\pi kn}{16}\right)

For our 1, 5, 9, 13 input we only have four phasors in the 16-bit register that have non-zero amplitude (i.e. non-zero phasor length):

|0001,|0101,|1001,|1101,\ket{0001}, \ket{0101}, \ket{1001}, \ket{1101},

and they each have a phasor length of 1/2. That’s what’s shown in the first row in the diagram below…

The expression for the discrete Fourier transform in this case is this:

Fk=n=015fnei2πkn/16F_k=\sum_{n=0}^{15} f_n e^{-i2\pi kn/16}

where the fnf_n are our input values, the summation runs over all sixteen states (n=o to n=15), and k is the Fourier output index, or, in other words, the frequency.

For the input we’re considering here, i.e.

|ψ=12(|0001+|0101+|1001+|1101),\ket{\psi}=\frac{1}{2}\left(\ket{0001}+\ket{0101}+\ket{1001}+\ket{1101}\right),

the fnf_n values in the expression for the DFT are very simple indeed:

f1=f5=f9=f13=12f_1=f_5=f_9=f_{13}=\frac{1}{2}

or, in qubit/binary notation:

f0001=f0101=f1001=f1101=12f_{0001}=f_{0101}=f_{1001}=f_{1101}=\frac{1}{2}

and the other twelve values of fnf_n are all zero.

For the first row in the schematic above, k = 0. That means that the exponential term in the expression for the DFT is also very simple indeed. It’s exp(0) = 1. Hence, the DFT output for k = 0, i.e. F0, is simply 1/2+1/2+1/2+1/2 = 2.

It’s a little bit more algebraically tedious, but conceptually exactly the same, to calculate the output of the DFT for other values of k. For those values, the exponential term doesn’t conveniently reduce to 1. Instead, we have a phasor angle defined by the the value of 2πkn/162\pi kn/16; those angles are shown in the diagram above.

If the phasors all point in different directions such that their sum equals zero, as is the case for k=1, 2, and 3 in the diagram, then the DFT output is correspondingly zero.

If the phasors all point in the same direction (or close to the same direction), as is the case for k =4, then their sum is not zero and we get a peak in the DFT.

The same pattern then repeats (because phasors are cyclical): k=5,6,7k=5,6,7 cancel; k=8k=8 lines up again; k=9,10,11k=9,10,11 cancel, and k=12k=12 lines up again. So the QFT output has peaks at

k=0,4,8,12k=0, 4, 8, 12

The k=0k=0 peak is what’s known as the “DC term” in traditional Fourier analysis. For a pure sine wave, or pure complex exponential (like we looked at before in the context of the classical DFT and zebra crossings), the average value across one cycle is zero. There is therefore not a peak at k=0. However, if we add an offset to the sine wave to push it up or down the y-axis, then its mean value across one cycle (i.e. one period) will no longer be zero, and we’ll see a peak at k=0. (You can explore this here.)

Similarly, our input register,

|ψ=12(|0001+|0101+|1001+|1101),\ket{\psi}=\frac{1}{2}\left(\ket{0001}+\ket{0101}+\ket{1001}+\ket{1101}\right),

has a non-zero average across the n=0 to n=15 states of the register; four slots have amplitude 1/2, while the rest have none. So the appearance of the k=0 peak in the spectrum doesn’t tell us anything other than the mean value of the input is not zero. That’s not particularly helpful when it comes to finding the period emerging from Shor’s algorithm.

The useful period information comes instead from the location of the next peak. The k=4k=4 Fourier peak corresponds to four complete phasor cycles across the sixteen-slot register, so one cycle has a period of 16/4 = 4.

In other words, the period, r, is 4.

Bingo. The QFT has found the period!

The peaks at k=8k=8 and k=12k=12 are harmonics: higher-frequency versions of the same repeating pattern. We also saw this earlier with the zebra-crossing DFT: once a fundamental spacing is present, frequencies that fit two, three, or more cycles into the same repeat can also appear. Here, k=4k=4 is the fundamental component; k=8k=8 and k=12k=12 are its harmonics. They are useful confirmation of the period-four pattern, but the lowest non-zero peak gives us the period directly.

For our toy N = 15, a = 2 model, we of course knew already that the period was 4. But for a 2048-bit number, eyeballing the modular-exponentiation pattern is not an option. The QFT turns hidden periodicity into measurable peaks, and those peaks provide the information needed to recover the period.

That’s the QFT output deciphered. We can, in principle, stop here: the hidden period has been converted into measurable Fourier peaks. But if you want to see the machinery under the bonnet, open the section below. That is where we follow the trimmed pulse sequence — mix, mix, mix, wait, mix, reverse bits, measure — step by step. Readers who lack an infinite supply of parallel realities in which to outsource their reading can safely skip ahead to the closing section.

Fortunately, there is nothing new here in terms of the nuts and bolts of the implementation of the quantum operations. We have already seen how resonant microwave pulses change amplitudes, how phases evolve while we wait, and how measurement turns amplitudes into probabilities. The QFT is built from those same ingredients. All we’ve done is choreograph those steps in the right way: pulse, wait, pulse, measure.

The QFT is not doing a different Fourier transform than its classical DFT counterpart. The QFT is doing exactly the same phasor addition as the classical DFT, just in a different way — it reorganises the algorithm into bitwise interference steps that a quantum architecture can physically implement.

For our simplified input state, there are six steps. (In a real QFT circuit there can be many, many more.) Let’s step through them…


Step 1. Mix q3. The first π/2\pi/2 pulse acts on the leftmost qubit, q3q_3​. (As before, we do this by selecting the microwave frequency that addresses that particular qubit.) The pulse does not inspect the register. Nor does it affect any other bits. It simply mixes the q3=0q_3=0 and q3=1q_3=1 parts of the state as we described above, producing constructive and destructive interference.

Recall that our starting state is

|ψ=12(|0001+|0101+|1001+|1101),\ket{\psi}=\frac{1}{2}\left(\ket{0001}+\ket{0101}+\ket{1001}+\ket{1101}\right),

Two of those basis states have q3=0q_3=0:

|0001,|0101\ket{0001}, \qquad \ket{0101}

and two have q3=1q_3=1

|1001,|1101\ket{1001}, \qquad \ket{1101}

The pulse acts only on q3q_3. It does not change the other three bits. So, in this particular four-term superposition, the amplitude of 0001\ket{0001} mixes with the amplitude of 1001\ket{1001}, because those two states differ only in q3q_3. The same applies to 0101\ket{0101} and 1101\ket{1101}.

For the |0001\ket{0001} and |0101\ket{0101} pair, the contributions add in the 0001\ket{0001} output and subtract in the 1001\ket{1001} output. So 0001\ket{0001} survives while 1001\ket{1001} cancels. The same thing happens for the |1001\ket{1001} and |1101\ket{1101} pair: 0101\ket{0101} survives while 1101\ket{1101} cancels.

The result is therefore

12(|0001+|0101)\frac{1}{\sqrt{2}}\left(\ket{0001}+\ket{0101}\right)

No measurement has happened; the amplitudes have been recombined by the pulse, causing interference and, therefore, cancellation of two basis states.

Step 2. Mix q2. Same drill. The next mix acts on the second bit from the left. It recombines

|0001|0101\ket{0001} \leftrightarrow\ket{0101}

Again the phasors are aligned, so one output reinforces and the other cancels. The state becomes simply

|0001\ket{0001}

This may look as if the QFT has “found” something already, but it hasn’t. It’s just blindly following the recipe, and it’s not finished yet.

Step 3. Mix q1. Same drill yet again. Now the mix acts on q1q_1. This time only one of the connected states has amplitude, so the pulse spreads the amplitude into a superposition:

|000112(|0001+|0011)\ket{0001}\rightarrow \frac{1}{\sqrt{2}}\left(\ket{0001}+\ket{0011}\right)

This is the familiar π/2\pi/2 pulse behaviour we saw earlier: when one side is empty, the pulse creates a balanced superposition.

Step 4. Wait. The classical DFT has two ingredients. First, each input contribution is multiplied by a phase factor,

exp(i2πkn16)\exp\left(-\frac{i2\pi kn}{16}\right)

Then those phase-shifted contributions are added. In the QFT, the (precisely timed) waits supply the phase factors: they allow for selected phasors to rotate by controlled amounts.

During the “wait”, we’re not just taking our hands off the experimental kit and expecting that an infinite number of quantum pixies in an infinite number of parallel universes will do the calculation for us while we go get a coffee. Like everything else in a quantum computer, the wait step is a precisely choreographed operation.

In an ion-trap QC, the ions are coupled together through their shared motion: like tiny coupled pendula, the chain has collective vibrational modes. Those vibrational modes have their own energy spacings, different from the 01\ket{0}\rightarrow\ket{1} energy gap of an individual qubit. So a pulse that couples to the shared motion is not simply the same pulse used to flip a qubit; it is tuned differently.

A suitably chosen pulse sequence can use one of those shared modes as a connection between qubits. For a controlled phase step, the interaction is allowed to act for just long enough — again, through carefully timed control pulses — so that one selected component of the quantum state picks up an extra phase.

In a full QFT circuit there would be several such waits, because different pairs of qubits need different controlled phase shifts. In our stripped-down demo, most of the waits don’t do anything because the earlier mix steps have already cancelled the states on which they would act. Applying a phase to zero amplitude changes nothing: 0×exp(i2πkn/16)=0,0 \times \exp(-i2\pi kn/16) = 0, regardless of the precise value of the phase factor!

So for our particular 1,5,9,131,5,9,13 input, only one wait remains relevant. After the q1q_1 mix (Step 3), we have

|ψ=12(|0001+|0011)\ket{\psi}=\frac{1}{\sqrt{2}}\left(\ket{0001}+\ket{0011}\right)

Those two basis states differ in their value of q1. The wait step creates a relative phase between the two states (because we sit back — momentarily — and just let the phase evolve), so after the wait we have

|ψ=12(|0001+i|0011)\ket{\psi}=\frac{1}{\sqrt{2}}\left(\ket{0001}+i\ket{0011}\right)

That’s a phase shift of π/2\pi/2 ; the phasor arrow for the n = 3 basis state, i.e. |0011\ket{0011}, has rotated by 90 degrees so that it’s fully aligned with the imaginary axis.

Step 5: Mix q0​. The final mixing pulse acts on the rightmost bit. It recombines and spreads the two existing components into four:

|ψ=12(|0000|0001+i|0010i|0011)\ket{\psi}=\frac{1}{2}\left(\ket{0000}-\ket{0001}+i\ket{0010}-i\ket{0011}\right)

At this point, the QFT has already done its job: the frequency has been found. What remains is bit-order bookkeeping. The standard QFT circuit naturally produces its output bits in the reverse order from the way we normally write binary numbers. We usually label the input as q3q2q1q0q_3q_2q_1q_0​, with q3q_3​ as the most significant (i.e. highest value) bit. The raw QFT output is effectively ordered as q0q1q2q3q_0q_1q_2q_3. So we reverse the bit string before interpreting the result.

Step 6. Measure. The final phasor bank is still a quantum superposition. We do not see all four surviving outputs in a single run. One measurement gives one four-bit result — 00000000, 01000100, 10001000, or 11001100 — corresponding to k=0,4,8,k=0,4,8, or 1212. Run the same circuit many times, and the histogram builds up at exactly those four positions. That is the same bright/dark measurement logic we used earlier, now applied to the QFT output register.


Summing up

Assuming that your attention didn’t collapse several thousand words back, we’ve reached the end of this hybrid tutorial-rant. Having worked through the basic steps underpinning the QFT, I am now even more irked by the “electrons splitting the calculation across an infinite number of parallel realities” trope than I was at the start. Hopefully, you are too.

Hilbert space can certainly help us with the book-keeping. But the experiments don’t happen in Hilbert space: the kets didn’t factor N=15 by themselves, and the matrices didn’t instantaneously transmit the period from some multiverse-spanning server farm. The QFT implements exactly the same Fourier logic as its classical DFT cousin: rotate phasors, sum them, and see what survives. What matters is the controlled physical evolution of amplitudes via phases, pulses, waits, interference, and measurement. This is the nuts-and-bolts of quantum logic — the mechanics of quantum mechanics.

And it all happened in this universe.

Acknowledgments: Anthropic’s Claude Opus 4.5 was used iteratively as a coding assistant to help generate and refine the interactive simulations in this post. The physics explanations, design choices, and final edits are my own. I would also like to thank my colleague Adam Gammon-Smith for his feedback and suggestions for improvement of the post.


1 That particular title was invented. Here’s one that wasn’t: “WELCOME TO THE PLURIVERSE. Forget the multiverse — there’s only one reality, but we all help create it.” That guff was plastered across the front cover of a recent New Scientist. Sweet suffering Schrödinger. I tried to not look too closely as I walked past the newspaper/ magazine stand in the local CoOp, groceries in hand. Believe me, I tried to leave it be. I really did. But it’s just as Tim Minchin put it — I was like a rabbit suddenly trapped in the blinding headlights of vacuous crap. Extraordinary claims require extraordinary evidence? Tsk, that’s so last century.

2 …and we shall not speak of Excel again.

3 …which is why assertions/proclamations like “If you think you understand quantum mechanics, you don’t“, “Quantum mechanics makes absolutely no sense“, and, worst of all, “In order to understand quantum physics, you have to throw all sense of logic out of the window” can be a wee bit irksome for those of us who teach the subject. They do not make quantum mechanics seem profound; they make it seem utterly incoherent. Worse, they prime students — and anyone with an interest in the subject — to give up on understanding quantum mechanics before they have even begun. Is it any wonder many find the subject forbidding, when they have been told in advance that not understanding it is somehow the correct response? (And I am not absolving myself of blame here. I’ll hold my hands up to trotting out the “If you think you understand…” line in some of the QM lectures I’ve given over the years.)

4 A small irony here is that Dr. Hossenfelder has herself become increasingly comfortable with a style of science communication that privileges audience-baiting narrative over careful, nuanced analysis. Never mind the evidence, look at the view counts — her message clearly connects and resonates (and, of course, remunerates). And that’s what really matters when it comes to 21st century science communication, right?

5 Here’s an example of a 2048-bit number:

21253290651969443082580156575368505972691556698983134151815776178595046032856612935758081930344219009140826134738303355725319732871134982427366186879352244487828845974244727657442026676878286812650930087546615592668302117139298181132868706811518731586419556784490492504766411947548771493198790473058187028024569279952573280637556246606355217463411895942790190674734276790347252496037923435704470468984293147238727741437436295350825567538225810219142482179755936166274058940412138629090135790784066102072920384775012264213554134281345826663766144691780775197559055656685916315366892549770157642189478867913325763665421.

6For a primer on Fourier analysis, see Chapter 2 of these notes.

7 Why is a complete revolution 360 degrees? Why not 100? Or, for that matter, why not 42? Or 2112? The Babylonian 360-degrees-in-a-circle convention is exactly that — a convention. So we use a rather less arbitrary, rather more sensible angular measure: the radian.

Imagine walking around the edge of a circle whose radius is r. Start at some point on the circumference, with a line drawn from you back to the centre of the circle. As you walk, that line sweeps out an angle. Now walk a distance along the circumference equal to the radius, rr. The angle swept out by the line is defined to be one radian (which is about 57o). If you continue walking until you’ve gone all the way round the circle — a 360 degree journey, as beloved of corporate performance reviews — you travel the full circumference, 2πr\pi r. Since one radian corresponds to an arc length of rr, that full journey sweeps out 2πr/r=2π\pi r/r=2\pi radians.

8 We are building a square-wave-like stripe pattern. If we were to directly calculate the Fourier series of that pattern (see Chapter 2 of this), we’d find that a symmetric square wave contains only odd harmonics. That is why the next term is labelled c3c_3, not c2c_2​. The argument 6πx/l6\pi x/l is just 3×2πx/l3 \times 2\pi x/l: three times the fundamental frequency. So c3sin(6πx/l)c_3 \sin(6\pi x/l) is just the third harmonic, with coefficient c3c_3.

9 And, not coincidentally, Fourier transforms are directly related to the Heisenberg uncertainty principle.

10Technically, it’s an identity rather than an equation. (Let it go, mathematicians, let it go.)

11Schroedinger fought long and hard to remove i from quantum mechanics: “What is unpleasant here, and indeed directly to be objected to, is the use of complex numbers” (see Section 1.4.4 of these notes (and references therein)). QM can be formulated without complex numbers, but as Vlatko Vedral puts it so well at the end of this piece: “You can write them down whichever way you like, but it’s unavoidable that they have to multiply exactly as though they were complex numbers.

12Of course, every function on a computer is a discrete list of values, not analytically continuous. (As I used to tell the undergrads when I taught The Quantum World, there are no Dirac delta-functions in the real world. (Nor in Hilbert space, for that matter.)) The Fourier transform of the zebra crossing was therefore already a DFT in disguise. However, the function was explained in terms of continuous variables because that connects better with secondary/high school maths. (See? Physicists can quibble too.)

13 Over the ~ thirty years I’ve lectured at Nottingham, I taught Fourier transforms in a number of different contexts (including The Quantum World). I’ve always thought of an FT as an overlap integral: we’re calculating the overlap with a basis function at a particular frequency. To my embarrassment, the “get the phase variation to match” perspective of the demo is not really something I’d considered very much (if at all) until I started to think about Shor’s algorithm and the quantum FT for the Computerphile video. When it comes to QC, this “find the correct phase variation” perspective is much more helpful than the overlap integral mindset. At least for my addled brain.

Inhuman Resources

I’ve stolen the title for this post, and the cartoon below (© Private Eye), from Peter Coles’ most recent post on the bleak situation for Physics & Astronomy at Nottingham. A massive thank you to Peter for his series of posts highlighting the cluelessness and callousness of senior management here at UoN.


The cartoon is especially timely given that the ~ 2600 of us here at UoN whose jobs are at risk received the email below (and this) yesterday. Nauseatingly, even the provision of “support” for staff during the redundancy process has been outsourced to an external consultancy company.

Senior university management are paid very substantial salaries to manage the institution and its people. Imagine if academic staff outsourced core aspects of our own roles — teaching preparation, lecture delivery, assessment, and the “student experience” — to external consultancy firms, with the costs charged back to our Schools while we continued to draw our salaries. Quite rightly, this would be regarded as a complete abdication of responsibility. Yet precisely this type of outsourcing and consultancy culture has become normalised within university management.

I submitted an FOI request seeking details of the university’s expenditure on external consultancy support. The request was rejected because, apparently, it would take too much time and effort to supply the requested information.

Another FOI request, this time targeted on a specific company, has been submitted. I’ve even provided the company number to make things as straight-forward as possible. I’ll keep you posted as to UoN’s response.


From: BR-HRFN2Support <BR-HRFN2Support@nottingham.ac.uk>
Sent: 18 May 2026 14:43
To: Philip Moriarty (staff) <philip.moriarty@nottingham.ac.uk>
Subject: Future Nottingham 2 – Supporting you during change

Dear Professor Philip Moriarty,

Following on from our announcements last week, the University will be providing a wide range of support to all colleagues who have been informed that their roles are being placed at risk of potential redundancy.   

As part of this, I’d like to invite you to participate in our Supporting you during change programme, which we are providing in partnership with our career management partners, Right Management. It’s been designed to help you consider the proposed changes that have been announced and to help you plan for what you may wish to do next. 

The programme will involve two 90-minute webinars (delivered on Microsoft Teams) and access to an online career platform, attached is an overview of the programme which provides further details together with a short video outlining what you can expect and how it can help.

We will also be running short, online awareness sessions between 21 May to 28 May, where we will explain more about the programme, what to expect and the benefit to you. If you would like to join one of these sessions, please click on the following link to access our booking system Understanding the FN2 career support offer.

If you want to take up a place on the programme now, you can simply click on this link and fill in the form, FN2: Supporting you during change programme sign up which you’ll also find in the attached overview. Please sign up for this programme before 01 June at 17:00 to secure your place.

Once you’ve registered, we will pass your details to Right Management, who will email you directly to set up your access to the Career Platform and share proposed dates for your “Personal Change and Resilience” and “Owning your Career” webinars.

In addition to this, we would like to remind you that a range of wellbeing resources and support services are available to you. These include confidential advice, mental health support, development activities and practical guidance, which can be accessed via the Future Nottingham 2 HR SharePoint pages.  

Yours sincerely

Destroying the academic dream

The powerful and inspiring piece below was posted by the UoN branch of the UCU yesterday. I’m reposting it here so that it’s available to those who are not UCU members.

When I was a kid, I wanted to be a footballer. Then, around age twelve, I realised I was crap at football. So instead, I decided I wanted to be an academic. Sad and nerdy, I know — but that was my dream.

It wasn’t easy. Academic jobs are bloody hard to come by. I had to finish top of my degree, survive a PhD that was one of the toughest things I ever did, then spend years bouncing around postdoc positions, moving countries every couple of years, unable to settle down. And my partner had to do the same. I was pushing thirty with no security, while my friends were buying houses and starting families.

All of it for the dream of one day getting a permanent academic post. When I finally did, my partner just cried.

Because she knew what it meant. We could finally settle down, just like everyone else.

I love my job. I love teaching, doing research, and being part of a community that creates knowledge. But if I lose this job — I’m screwed. Academic jobs are rare. You don’t just walk into another one. For most of us, redundancy means the end of the dream. The end of a career we’ve spent decades building.

A lucky few might find another post, but not in Nottingham. Probably not even in the UK. Those who do will see their families once a month, if that.

This is what redundancy means for academics. It’s not just losing a job — it’s losing your identity, your community, your way of life.

That’s why I’m asking everyone to fight for my job, my life — and I promise to fight for yours.

Why We Take Action

To strike or take part in a MAB is one of the most generous things you can do.

I love teaching my subject because it’s a brilliant subject. At least that’s how I see it. And I hate telling my students I won’t be in class or that I won’t be marking their exams. I don’t want to lose salary. But I’m putting that aside because I’m fighting for something bigger — for the soul of this university.

I’m striking so that no one’s academic dream is crushed by managerial ideology. I’m striking for our students — not just those here now, but those who’ll come here in five or ten years’ time. They deserve to be taught by staff who feel safe, secure, and valued — not by ghosts in shiny new buildings.

Because that’s the vision of our senior management: more buildings, fewer people.

“The University is Skint” — Really?

I’ve heard some colleagues say, “Why are you bothering? There’s a national funding crisis. The university’s skint. There’s nothing we can do.”

Bollocks.

Even though we threw tens of millions down the toilet with the failed castle meadow campus vanity project we remain one of the richest universities in the country. Yes, there are problems with how higher education is funded — of course there are — but make no mistake: redundancies are a choice.

The Vice-Chancellor admitted this. Our leaders are chasing after a crazy 9% surplus. The VC herself said that the sector operates between 3% and 6%.

So when UCU calls for reducing the surplus target to 3% or 4%, that’s not radical. That’s common sense. It’s about £16 million a year that could be used to keep staff in work and give students the support they need.

But she won’t do it.

Why? Because like so many Vice-Chancellors, she dreams of shiny new buildings — paid for with lost livelihoods. Buildings in which students will be taught by ghosts — ghosts of the staff whose passion and dedication were thrown away on a bonfire of redundancies.

And for what? For a neoliberal fantasy? For a gong and a place in the House of Lords?

People Before Buildings

At a number of town halls, the VC has spoken about “excellence.” Someone asked her how she defined it. Her answer, and I paraphrase: “I know it when I see it.”

I mean, wow.

Is this the kind of critical thinking steering our university into the abyss?

Shame.

I want an employer who puts people before buildings. An employer who will negotiate meaningfully with trade unions instead of just paying lip service. An employer who puts the education of students before managerial ideology. An employer who protects the livelihoods of the people who make this university what it is.

We need to stand together — for our colleagues, for our students, and for the future of the University of Nottingham.

Save our jobs. Save our university!

UoN unveils Strategic Holistic Accountability Model for senior leadership

After listening carefully to staff concerns about accountability, transparency and the apparent absence of consequences at senior level, the University of Nottingham is pleased to announce the Strategic Holistic Accountability Model, a new framework designed to embed a culture of excellence in senior leadership governance.

SHAM will support the delivery of excellence in leadership by demonstrating that senior leaders are appropriately accountable within the institutional framework agreed by senior leadership, as defined by the Board Oversight and Governance for University Strategy model. In doing so, long-established norms of institutional leadership excellence will be safeguarded.

The Vice-Chancellor, who has repeatedly emphasised the importance of accountability, graciously agreed to be the first senior leader reviewed under the pilot process.

Pilot Accountability Reflections: Outcomes, Developments, and Yardsticks

The review panel comprised leading members of the University Executive Board, including several directly associated with the Castle Meadow Campus project. This was widely welcomed as ensuring that the review was informed by those with direct understanding of the decisions under consideration, enabling a self-consistent and well-contextualised interpretation of outcomes aligned with institutional priorities.

The Chair of the panel described the resulting review methodology as both “robustly self-informed” and “appropriately insulated from hindsight.”

Staff Lived Experience

The panel welcomed the Vice-Chancellor’s recent Town Hall clarification regarding the historic “compact” between staff and the University:

“I understand that the compact you felt about working for a university has now been broken. You know, the compact where… you had a secure job for life in a comfortable environment with a low workload.”

Panel members congratulated the Vice-Chancellor on her correction of a persistent misunderstanding within the sector, agreeing that widespread reports of sustained 50–80 hour working weeks were entirely consistent with a low workload when understood within a modern, delivery-focused and outcomes-aligned institutional framework.

The sector’s reliance on discretionary labour, routinely extending far beyond contracted hours, was further welcomed as a significant institutional strength, enabling current levels of activity without the unnecessary constraint of formal workload limits, and as evidence of a mature and high-performing organisational culture, for which the Vice-Chancellor was also commended.

Estates Strategy and Capital Investment

The panel highlighted the University’s £80 million investment in the Castle Meadow project, noting its significance as a major strategic estates initiative of a type unmatched in the UK higher education sector. Particular value was attributed to the insight brought by panel members directly involved in its development and delivery.

While reviewing the Vice-Chancellor’s ongoing management of the project, the panel highlighted the institution’s agile approach to post-acquisition strategy. Earlier reflections that “as we’ve now bought this campus, we need to find a good use for it” were cited as indicative of a flexible, opportunity-led model of capital deployment unburdened by extensive financial modelling or detailed analysis. The Vice-Chancellor was commended for maintaining continuity in this approach.

Student Engagement

The panel warmly welcomed the Vice-Chancellor Q&A sessions as a wholly positive example of student engagement in practice. The introduction of enhanced security measures, including bag searches prior to entry, was commended as helping to place students at ease and create a reassuring environment for constructive dialogue, aligned to UoN’s institutional values. Panel members noted that these arrangements reduced the risk of unstructured contributions and ensured that the student voice could be expressed within clearly defined and appropriately controlled parameters, supporting students in developing a clearer understanding of the Vice-Chancellor’s strategic vision.

Rankings and Reputation

The panel also commended the Vice-Chancellor for her continued emphasis on the University’s performance in the QS rankings, noting the strategic advantage of a system in which institutional standing is shaped through targeted engagement with professional networks. This was recognised as a highly efficient mechanism through which universities could enhance their position by actively encouraging participation in reputation surveys, without unnecessary reliance on underlying teaching or research outcomes.

Panel members further observed that traditional academic expectations of methodological rigour and objectivity were of diminishing relevance in this context, with one noting that “the ability of institutions to mobilise their networks to recognise excellence provides a sufficiently robust basis for evaluation.”

The panel recommended that the Vice-Chancellor’s focus on league table performance be further strengthened through the formalisation of a peer engagement framework, Bilateral Academic Collaboration and Knowledge-Sharing through Collegial Recognition And Trusted CHannels, to be rolled out as part of the next QS reputation management process.

Summary of Outcomes and Strategic Forward Positioning

The panel concluded that the Vice-Chancellor had demonstrated strong and consistent leadership across all areas of review, with no material issues identified. The process was widely regarded as a valuable exercise in reinforcing accountability, confirming that existing arrangements remain effective and appropriately aligned with institutional priorities.

No further action is required.

UoN Irony Meter Implodes


A colleague who attended a recent UoN Bullying & Harassment workshop — focussed on prevention, rather than practice, I should clarify — forwarded the slide below, presented (as a handout) at the event. It lists the key aspects of one of UoN’s core values: openness. (If you’re unaware of just how the UoN values were determined, it was quite a process.)


I really wish I could find the original source of the ironymeter gif above. My apologies to whoever made it and released it into the wild.

In quantum physics, ChatGPT thinks outside the box just a little too much.

Back in January 2023, in the Dark Ages of LLM/AI evolution, we tasked ChatGPT with answering GCSE, A-level, and undergraduate questions on a variety of physics topics. At the time, I said that, in future, we could exploit ChatGPT (and associated technologies) in education as follows:

“We embed it in teaching sessions to highlight its fallibility, to give students salutary lessons as to how badly wrong ChatGPT can get things, and, more importantly, to act as a springboard to provoke discussion and debate.”

How quaintly naïve.

Three years on, the existential problem for education at all levels is obvious: ChatGPT now too rarely gets things wrong1. In a paper that is fascinating and fantastically worrying in equal measure, Kevin Pimbblet and Lesley Morrell, of the University of Hull, tasked ChatGPT-4 (during Nov. ’23 to Feb. ’24) with doing a UK Physics degree course. All of it2.

The bottom line: GPT-4 obtained a “final rounded grade” of 65%. A solid 2:1. And that was back in February 2024 — generations ago in the context of AI evolution.

If you’re a student or teacher of physics, it’s well worth downloading Pimbblet and Morrell’s (open access) paper and reading it in its entirety. One of the aspects of the paper that struck me was just how well GPT-4 did on quantum mechanics and computing. Regarding the latter, PM write:

“On the computational side, ChatGPT …. performs superlatively well in both the in-semester assessment (..) and a longer-term in-semester project (..), both based around quantum mechanics and modelling particles in various scenarios such as the creation of a Hamiltonian matrix. We feel justified in giving ChatGPT 100% for this component.

When it came to quantum mechanics outside of the computational elements, ChatGPT’s performance was comparably impressive, scoring 85% in the Intermediate Quantum Mechanics exam. This has also been my experience: ChatGPT is rather accomplished as a quantum mechanic (at least when it comes to undergraduate-level problems and concepts). Hardly that surprising, given that online physics forums, which of course form part of its training set, are awash with questions/debates/arguments about fundamental QM principles and concepts.

Given that I taught the first semester of our Year 2 The Quantum World module for a number of years, I was keen to revisit the spirit of Hull’s pedagogical experiment here in Nottingham—this time using the most recent version of ChatGPT freely available as of Dec. 2025 and with a few modest changes to the methodology. That exercise forms the basis of the latest upload from Sixty Symbols, released today…

We fed ChatGPT a recent Quantum World examination paper verbatim. Unlike the approach taken by Pimbblet and Morrell—who adopted what they described as a “maximal cheating” strategy, allowing themselves to modify questions for clarity, split them into smaller sub-components, and expand upon the model’s answers—we submitted the paper entirely “raw.” We did not reword, restructure, or otherwise assist GPT in any way. It was left to stand on its own.

See how GPT performed in the video above. (No spoilers!)

Boxing clever

In the accompanying “extras” video, I mention that one particular aspect of ChatGPT’s performance struck me as especially intriguing and that I’d go into a little more detail here at the blog. It relates to the very first question on the paper:

I asked this in the exam because we covered it a number of times in the Quantum World lecture/in-person sessions. I find that it’s a helpful way of hammering home that a good mental model of the quantum particle in a box is, um, not a particle rattling around in a box (at least not until we approach the n \rightarrow \infty limit).

ChatGPT gives the right answer, “No”, but for (some of) the wrong reasons. And the reasons it gives are in line with those provided by quite a number of QM textbooks and sets of lecture notes available online…

It’s the second part of the answer here that’s the core issue. Each energy eigenfunction simply cannot be written as a superposition of two momentum eigenstates with momenta \pm \hbar k_n. That’s only possible in the limit of an infinitely extended sine wave, i.e. in the limit n \rightarrow \infty. To highlight this, I asked ChatGPT to provide an interactive JavaScript demo3. (Use the slider to change the quantum number.)

Here it’s clear that the momentum density is not simply a pair of Dirac delta functions. Owing to the truncation of the sine function at the walls of the well, the Fourier spectrum is instead a broad function of wavevector. As the value of n increases, the spectrum evolves ever closer towards two sharp peaks, but it’s only in the limit of n \rightarrow \infty that we can expect a momentum probability distribution that comprises two Dirac delta-function spikes at p=\pm \hbar k_n. (A nice way of thinking of this is via the convolution theorem…but that’s a subject for another post.)

What’s impressive — and, frankly, a little unsettling — is that after giving the wrong answer, ChatGPT was able to reason its way towards the right one. Initially it went round in circles, but with the right nudges — much as I would nudge a student in, say, a PhD viva — it eventually “thought” its way inside the box and produced an answer that was better than those found in some textbooks. Those advocating a renewed push back towards online examinations may want to reflect on that.


1. OK, there’s this. But I wouldn’t be too comforted or reassured by ChatGPT’s cluelessness in this context. Expecting ChatGPT to successfully contextualise images within its architecture is rather like expecting someone to hum a song’s melody having seen only the lyrics.

2. Well, apart from the lab work. Just wait until robotics catches up…

3 …which it spat out first time with no bugs, within seconds. The only minor modification I added was to zero-pad the array to improve the k-space resolution.

Reblog: Now you REALLY need to leave X (and so does your employer…)

I’m reblogging this post from In The Dark. Peter Coles characteristically pulls no punches…

“If you don’t leave a social media platform when you find out that it endorses and encourages abusive exploitation of children then you are supporting that behaviour and helping to promote it. There is no grey area here in this. Staying on X is morally indefensible. It is the Epstein Island of social media. “

What will it take for universities to grow a backbone, stop cravenly following the herd, and accept that there are societal obligations more important than attracting the largest “market share”? Pathetic.

Bill and Hank’s Excellent Xmas Adventure

To help you out of that post-Christmas dinner stupor, here’s William Shatner and Henry Rollins’ frankly otherworldly take on a festive classic. It’s a performance determined to take musical entertainment to the outer limits.

Neither Shatner nor Rollins has ever let melody get in the way of their creative ambitions. Running true to form, Bill Shatner doesn’t so much sing as explain the song, while Hank bellows his words with the intensity of a man convinced that a one-horse open sleigh is a clear and present danger.

So pour yourself some Christmas cheer, engage warp speed, and boldly go where no carol should.

A Merry Trekmas to all!



…and remember, kids: if you don’t want to end up on Santa’s naughty list next year, always ask yourself one simple question — what would Henry Rollins do?