Let's say that we need a nuke that can fit into a very small space while also providing a very large boom.
Now, the US's B-41 nuclear bomb was quite mass-efficient indeed; it put out 22 petajoules, or 5.2 megatons, per metric ton of mass, and was, as Wikipedia so succinctly put it, "the most efficient known thermonuclear weapon in terms of yield to actual weight". But is it possible to make a nuke that's even more mass-efficient?
Moreover, how small can you make a high-yield nuke in terms of physical dimensions? I want to fit mine down a borehole and crack the cap over a supervolcano, so it's got to be long, thin, and powerful (jokes at my expense). But can you make a nuclear bomb long and thin enough to fit down something like the Kola Superdeep Borehole, or even one that's inside of a foot in diameter and still in the megaton range? The B-41 was more than four feet across, for instance, and while the W-54 used for the "Davy Crockett" and Special Atomic Demolition Munition was 11 inches in diameter, it also had a yield of somewhere between 0.01 and 1 kilotons, with a commonly accepted one of 20 tons of TNT. That's nowhere near enough to blow through, say, Yellowstone's magma plug.
Remember, this hypothetical skinny nuke is allowed to be long; just not wide.
Assume a Teller–Ulam device with a yield of 1 gigaton, whose mechanism of operation is detonating one fission bomb, followed by increasingly large fusion detonations that are set off by the previous fusion detonation. In other words, it's an arbitrarily large multi-stage device.
If I had to guess, the problem is the diameter of the fission primary, since Ivy Mike used a liquid deuterium nuclear fuel, and liquid deuterium, is, well, a liquid; despite needing cooling equipment, it can be fit into pretty much any shape; the fuel of the second stage is less of a problem. I'm not well-educated on this, though.