Since the civilization of Star Trek TNG had replication devices based on the transporter technology, would they be able to replicate antimatter and thus have an essentially infinite supply of energy? This would also make a nasty weapon.
The replication system is capable of turning one form of matter into another but it's not capable of creating antimatter.
These devices [replicators] dematerialize a measured quantity of raw material in a manner similar to that of a standard transporter. Unlike a standard transporter, however, no molecular imaging scanners are used to derive analog pattern data of the original material. Instead, a sophisticated quantum geometry trans-formational matrix field is used to modify the matter stream to conform to a digitally stored molecular pattern matrix.
In an emergency situation, the Enterprise is capable of extracting anti-matter from deuterium and other volatile elements. This is, however, extraordinarily wasteful of this matter and produces only microscopic amounts of fuel, sufficient to limp home after losing their onboard supply of antimatter, but not nearly enough to run the ship on an ongoing basis
The antimatter generator resides on Deck 42, surrounded by other elements of the WPS. It consists of two key assemblies, the matter inlet/conditioner (Ml/C), and the quantum charge reversal device (QCRD). The entire generator measures some 7.6 x 13.7 meters, and masses 1400 metric tonnes. It is one of the heaviest components, second only to the warp field coils. The Ml/C utilizes conventional tritanium and polyduranide in its construction, as it handles only cryogenic deuterium and similar fuels.
This is necessary to produce the power amplification required to hold collections of subatomic particles, reverse their charge, and collect the reversed matter for storage in the nearby anti-matter pods. The technology that has given rise to the QCRD is similar to that of the transporter, SIF, IDF, and other devices that manipulate matter on the quantum level. The conversion process sees the inlet of normal matter, stretched out into thin rivulets no more than 0.000003 cm across. The rivulets are pressure-fed into the QCRD under magnetic suspension, where groups of them are chilled to within 0.001 degree of absolute zero, and exposed to a short-period stasis field to further limit molecular vibration. As the stasis field decays, focused subspace fields drive deep within the subatomic structure to flip the charges and spins of the "frozen" protons, neutrons, and electrons. The flipped matter, now antimatter, is magnetically removed for storage. The system can nor¬mally process 0.08 m3/hr
A slight wrinkle comes in the form of Nog's replicating mines in DS9. These comprise a matter/antimatter warhead and a cloaking device. When one is destroyed another is replicated in place by its neighbours. No description is given as to where the antimatter is coming but this can (theoretically) be explained by having each warhead contain more antimatter than is required. This could then be transported to the warhead by its neighbours as needed. This, theoretically would put an upper limit on the number of warheads that can be created by the minefield but given the truly microscopic amounts of antimatter needed for a warhead, that upper limit could be enormous.