Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

phases of FixedPointReflectionPhases #616

Open
vivienlonde opened this issue Aug 25, 2022 · 0 comments
Open

phases of FixedPointReflectionPhases #616

vivienlonde opened this issue Aug 25, 2022 · 0 comments
Labels
Kind-Bug Something isn't working Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package.

Comments

@vivienlonde
Copy link

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
FPAA_diagnostics

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.

@vivienlonde vivienlonde added the Kind-Bug Something isn't working label Aug 25, 2022
@msoeken msoeken added the Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package. label Sep 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Kind-Bug Something isn't working Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package.
Projects
None yet
Development

No branches or pull requests

2 participants