And not some big space gun a mile wide, I'm talking more like "could you pack a nanogram of antihydrogen into a shotgun shell or rifle casing and fire a bullet with it?"
A few conditions and assumptions:
The gun is made from futuristic polymers, alloys, metamaterials or whatever that would allow the barrel to survive a fifteen megajoule explosion from the inside
The shooter is similarly cybernetically augmented to withstand the kick of the gun
The gun must remain effective and combat-ready (i.e. if the initial reaction destroys the bullet before it fires it fails)
The gun must be practical enough to warrant use. It doesn't matter if it's super expensive or needlessly flamboyant so long as it's still just as effective/more effective than normal firearms (otherwise what's the point?)
Could it be done? Could a sidearm that uses antimatter as a propellant work on the battlefield as a hypervelocity weapon? Or would it simply be too suicidal/too prohibitive compared to a normal gun that uses chemical or electromagnetic propellant?