The First Federation era Dragonfly Class Ship used relatively large amounts of antimatter stored in powerful Penning Traps to achieve high acceleration
There have been many different systems used to contain antimatter throughout the ages. The most common has always been the magnetic bottle, capable of maintaining any charged amat as long as it remains powered. One subtype of magnetic containment is the Penning Trap, which uses a strong homogeneous axial magnetic field to confine particles radially and a quadrupole electric field to confine the particles axially. In the Federation Age Dragonfly class ship the antimatter is contained in numerous Penning Traps, each designed to contain the antimatter safely even under rapid acceleration, and to eject the antimatter safely if failure occurs. (see failure safety modes)
Other varieties include laser-pressure containment, utilizing at least six split beams of laserlight striking the amat, keeping it pinned in the target zone, or (single or double layer) buckminsterfullerine sequestered amat.
The latter has become one of the standard methods of packaging amat for warheads and other explosive effects. Buckminsterfullerine has a repulsive effect in its core called a 'electron repulsion zone' which keeps atoms (whose outermost layers are, of course, electrons) centred within the cavity. With sufficient force, the buckminsterfullerine can either crack or inertially loose containment of the amat, leading to a matter/antimatter reaction that can easily be chained through other buckminsterfullerines.
With a double layer of buckminsterfullerines (one encaspulating the other, which in turn encapsulates the antimatter), the shock absorptivity without unplanned detonation is exponentially higher than with a single layer of buckminsterfullerine encapsulating the antimatter. However, this drops the effective antimatter percentage of the payload from 1/240th to (depending on configuration) as low as 1/100,000,000th of the payload mass.
Failure Safety Modes
1) Stationary or coast mode: The storage containers are set up so that the antimatter is held by magnetic, electric or light pressure containment, the storage array is rotated so that if containment fails on any single module the amat will 'fall' out of the bottom of the container and be flung away. Careful placement of rotating storage arrays is required to prevent such an event from firing the amat at a nearby facility/ship.
2) On a vessel under acceleration, the containers are the same as above, but amat storage is oriented so that the bottom of each container is pointed 'down' as determined by the acceleration. If containment fails, the amat immediately falls out and gets left behind by the ship.
When containment fails on a ship of this kind the drive is shut off very rapidly when containment fails (so that the released antimatter does not react with the exhaust).
3) As an additional safety measure amat storage is generally modularised so that so that containment failure in one part doesn't result in loss of all containment.