AmplitudeAmplificationFromStatePreparation function

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.AmplitudeAmplification

Package: Microsoft.Quantum.Standard

Amplitude amplification by oracles for partial reflections.

function AmplitudeAmplificationFromStatePreparation (phases : Microsoft.Quantum.AmplitudeAmplification.ReflectionPhases, stateOracle : Microsoft.Quantum.Oracles.StateOracle, idxFlagQubit : Int) : (Qubit[] => Unit is Adj + Ctl)

Input

phases : ReflectionPhases

Phases of partial reflections

stateOracle : StateOracle

Unitary oracle $A$ that prepares start state

idxFlagQubit : Int

Index to flag qubit

Output : Qubit[] => Unit is Adj + Ctl

An operation that implements amplitude amplification by oracles that are implemented by partial reflections.

Remarks

This imposes stricter conditions on form of the start and target states than in AmplitudeAmplificationFromPartialReflections. It is assumed that the target state is marked by $\ket{1}_f$. It is assumed that \begin{align} A\ket{0}_{f}\ket{0}_s= \lambda\ket{1}_f\ket{\text{target}}_s + \sqrt{1-|\lambda|^2}\ket{0}_f\cdots, \end{align} In most cases, flagQubit and auxiliaryRegister are initialized in the state $\ket{0}_{f}\ket{0}_s$.