How exactly do they tweak the 'yield' on nuclear weapons?

There are some tactical nuclear weapons (such as nuclear torpedoes, depth charges, surface to air missiles, and artillery shells) which had a variable yield on them. This leads me to believe the amount of fissile material in the weapon doesn’t change, but they can flip a switch or something to alter how big of an explosion the weapon makes.

How do they do this?! :confused:

I’ll admit it seems very clever considering tactical nuclear weapons seem to be rather overkill in the first place. But I’m curious as to how exactly they do it.

Modern implosion weapons use a neutron generator tube to produce a burst of neutrons to initiate the chain reaction. This replaces the old “urchin” initiator used in early implosion weapons. The yield can be tweaked by changing the timing and magnitude of the electric pulse sent to the neutron generator.

My WAG is that the switch changes the timing of the implosion charges, so the implosion is a bit imperfect thus less fissible material goes kaboom.