A 4 megaton thermonuclear warhead can be crammed into shockingly little space and weight, the question is whether the antimatter containment device can be smaller and lighter.
However, the real benefit to using anti-matter in munitions would be as a catalyst, not necessarily as a primary source of energy.
Consider a conventional multi-stage thermonuclear weapon, conventional explosives compress a fission primary bomb which goes off and serves as an x-ray light-bulb inside a radiation channel to provide ablative compression of the fusion secondary which, with the aid of a fission bomb "spark plug" ignites a self-sustaining fusion reaction. If you had significant quantities of anti-matter available you could change this design significantly. In the simplest design you could replace the primary with perhaps a single gram or less of anti-matter. Saving significant amounts of weight and also possibly allowing for much smaller thermonuclear weapons. More so, it may be possible with anti-matter to completely remove the need for fissile components in thermonuclear warheads. This could be useful in civilian applications (in an Orion drive spacecraft, for example).