From Brewer:
Q.S Quantum sufficit. Two letters appended to prescriptions, and meaning as much as
is required to make the pills up. Thus,after giving the drugs in minute proportions, the
apothecary is told to “mix these articles in liquorice q.s”

Also used in chemistry in directions for preparing reagents, to indicate final volume.