This repository was archived by the owner on Jan 12, 2024. It is now read-only.
phases of FixedPointReflectionPhases #616
Labels
Kind-Bug
Something isn't working
Pkg-Standard
Issue relates to the Microsoft.Quantum.Standard package.
Describe the bug
FixedPointReflectionPhases returns phases to amplify the <0| _ |0> block of a StateOracle whereas the Q# documentation states that a StateOracle encodes information in its <1| _ |0> block: StateOracle documentation
To Reproduce
Here is a minimal not working example and a proposed fix : testFPAA
Expected behavior
The AboutTarget phases should be the opposite of their current value - see testFPAA.
Screenshots

Additional context
It's a consistency issue between FixedPointReflectionPhases and the StateOracle type. Since other functions of the AmplitudeAmplification libraries (such as StandardAmplitudeAmplification and ObliviousAmplitudeAmplification) also use the <1| _ | 0> convention, I suggest to keep this convention and change the AboutTarget phases of FixedPointReflectionPhases. Indeed changing everything to the <0| _ | 0> convention would be more work and would be confusing for e.g. StandardAmplitudeAmplification.
Note that in the current implementation of FixedPointReflectionPhases, ReflectionPhases are computed from RotationPhases (see here). To find the transformation on RotationPhases that corresponds to taking the opposite of AboutTarget ReflectionPhases, it may be useful to think of RotationPhases as a kind of partial sums of ReflectionPhases (and therefore ReflectionPhases are a kind of discrete derivative of RotationPhases). See here for exact formulas.
The text was updated successfully, but these errors were encountered: