Microsoft.Quantum.AmplitudeAmplification namespace


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

Please see for the API documentation for the Modern QDK.

This namespace contains functions and operations for performing amplitude amplification.


Oblivious amplitude amplification with partial reflections is the most general form of amplitude amplification implemented here.

This is called through the operation AmpAmpObliviousByReflectionPhases.

This has two registers: ancillaRegister and systemRegister.

This accepts two oracles for these reflections of type ReflectionOracle which act only on the ancillaRegister register.

This accepts an oracle special to oblivious amplitude amplification of type ObliviousOracle which acts jointly on both register.

The input state to ancillaRegister is assumed to be the unique $-1$ eigenstate of the first reflection operator $I - 2\ket{s}\bra{s}$.

Reflections about a target quantum state are often implemented by assuming access to an oracle that prepare that state from the computational basis $\ket{0\cdots 0}$.

Our convention for these oracles requires two registers: a single-qubit flagQubit register, and a register for everything else on the ancillaRegister register.

The oracle of type StateOracle acts jointly on both registers to create the target state flagged by $\ket{1}$ in the flagQubit register with some real amplitude.

The reflection ReflectionOracle about the this flag state is generated by the operation TargetStateReflectionOracle.

The reflection ReflectionOracle about the input state to ancillaRegister is generated by the inverting StateOracle and then reflecting about $\ket{0\cdots 0}$ with ReflectionStart().

The oracle of type DeterministicStateOracle acts on the qubitState registers to create the target state exactly with no flag.

AmpAmpObliviousByOraclePhases is a version of oblivious amplitude amplification that accepts oracles StateOracle and ObliviousOracle instead of reflections.

Note that amplitude amplification is a special case of oblivious amplitude amplification where ObliviousOracle is the identity operator, and there are no system qubits i.e. systemRegister is empty.

This is called through the operation AmpAmByReflectionPhases and AmpAmpByOraclePhases.

The phases for partial reflections in the standard case of Grover search is provided by the function AmpAmpPhasesStandard.

For instance, we have the following dependencies: AmpAmpByOracle -> AmpAmpByOraclePhases -> AmpAmpObliviousByOraclePhases -> AmpAmpObliviousByReflectionPhases.


Name Summary
AmpAmpRUSByOracle > [!WARNING]
ApplyAmplitudeAmplification Applies amplitude amplification on a given register, using a given set of phases and oracles to reflect about the initial and final states.
ApplyFixedPointAmplification Fixed-Point Amplitude Amplification algorithm
ApplyObliviousAmplitudeAmplification Oblivious amplitude amplification by specifying partial reflections.


Name Summary
AmpAmpByOracle > [!WARNING]
AmpAmpByOraclePhases > [!WARNING]
AmpAmpByReflectionPhases > [!WARNING]
AmpAmpObliviousByOraclePhases > [!WARNING]
AmpAmpObliviousByReflectionPhases > [!WARNING]
AmpAmpPhasesFixedPoint > [!WARNING]
AmpAmpPhasesStandard > [!WARNING]
AmpAmpRotationToReflectionPhases > [!WARNING]
AmplitudeAmplificationFromPartialReflections Amplitude amplification by partial reflections.
AmplitudeAmplificationFromStatePreparation Amplitude amplification by oracles for partial reflections.
FixedPointReflectionPhases Computes partial reflection phases for fixed-point amplitude amplification.
ObliviousAmplitudeAmplificationFromPartialReflections Returns a unitary that implements oblivious amplitude amplification by specifying for partial reflections.
ObliviousAmplitudeAmplificationFromStatePreparation Oblivious amplitude amplification by oracles for partial reflections.
ReflectionStart Constructs a reflection about the all-zero string 0...0〉, which is the typical input state to amplitude amplification.
RotationPhasesAsReflectionPhases Converts phases specified as single-qubit rotations to phases specified as partial reflections.
StandardAmplitudeAmplification Standard Amplitude Amplification algorithm
StandardReflectionPhases Computes partial reflection phases for standard amplitude amplification.
TargetStateReflectionOracle Constructs a ReflectionOracle about the target state uniquely marked by the flag qubit.

User-defined types

Name Summary
ReflectionPhases Phases for a sequence of partial reflections in amplitude amplification.
RotationPhases Phases for a sequence of single-qubit rotations in amplitude amplification.