Unifying quantum verification and error-detection: theory and tools for optimisations | Synapse