A computer code for simulating the amplification of ultrashort mid-infrared laser pulses in CO2 amplifiers and their propagation through arbitrary optical systems is described. The code is based on a comprehensive model that includes an accurate consideration of the CO2 active medium and a physical optics propagation algorithm, and takes into account the interaction of the laser pulse with the material of the optical elements. The application of the code for optimizing an isotopic regenerative amplifier is described.