  Amplitude amplification is a central tool used in Grover's quantum search
algorithm and has been used in various forms in numerous quantum algorithms
since then. It has been shown to completely eliminate one-sided error of
quantum search algorithms where input is accessed in the form of black-box
queries. We generalize amplitude amplification for two-sided error quantum
algorithm for decision problems in the familiar form where input is accessed in
the form of initial states of quantum circuits and where arbitrary projective
measurements may be used to ascertain success or failure. This generalization
allows us to derive interesting applications of amplitude amplification for
distinguishing between two given distributions based on their samples,
detection of faults in quantum circuits and eliminating error of one and
two-sided quantum algorithms with exact errors.
