Phase-matched amplitude amplification (source code)

= Phase-matched amplitude amplification

Phase-matched amplitude amplification replaces the two sign-flip reflections by selective phase rotations. Choosing their phases from the known initial overlap can rotate the state exactly onto the target even when an integer number of ordinary Grover rotations would overshoot it.