Functions for sanitize and preprocessing  Quantum config.