Quantum error correction of systematic errors using a quantum search framework