A method and system for delivering a pharmaceutical gas to a patient. The method and system provide a known desired quantity of the pharmaceutical gas to the patient independent of the respiratory pattern of the patient. The preferred pharmaceutical gases are CO and NO, both of which are provided as a concentration in a carrier gas. The gas control system determines the delivery of the pharmaceutical gas to the patient to result in the known desired quantity (e.g. in molecules, milligrams or other quantified units) of the pharmaceutical gas being delivered. Upon completion of that known desired quantity of pharmaceutical gas over a plurality of breaths, the system can either terminate any further delivery of the pharmaceutical gas or can activate an alarm to alert the user that the known quantity has been delivered. The system also has alarm functions to alert the user of possible malfunctions of the system.