Add ghost gates and useful constants.