qdk_chemistry.algorithms.amplitude_amplification.amplitude_amplification module

QDK/Chemistry amplitude amplification.

class qdk_chemistry.algorithms.amplitude_amplification.amplitude_amplification.AmplitudeAmplification[source]

Bases: Algorithm

Build an amplitude-amplified circuit.

Each round flips a flag on the good subspace and reflects about the prepared state, taking probability \(a\) to \(\sin^2((2k+1)\arcsin\sqrt{a})\) after \(k\) rounds. That falls again past the first maximum, so pick rounds from an estimate of \(a\).

Reference: L. Lin, Lecture Notes on Quantum Algorithms for Scientific Computation, arXiv:2201.08309, Chapter 2.

__init__()[source]

Initialize amplitude amplification.

type_name()[source]

Return the algorithm type name as amplitude_amplification.

Return type:

str

name()[source]

Return the algorithm name as qdk_base.

Return type:

str

run(*args, **kwargs)

Run the algorithm with the provided arguments.

This method wraps the internal _run_impl method to provide a consistent interface for executing the algorithm.

Parameters:
  • args – The arguments required to run the algorithm.

  • kwargs – The keyword arguments required to run the algorithm.

Returns:

The results of the algorithm

Return type:

Any

class qdk_chemistry.algorithms.amplitude_amplification.amplitude_amplification.AmplitudeAmplificationFactory[source]

Bases: AlgorithmFactory

Factory class for creating AmplitudeAmplification instances.

__init__()[source]

Initialize the AmplitudeAmplificationFactory.

algorithm_type_name()[source]

Return the algorithm type name as amplitude_amplification.

Return type:

str

default_algorithm_name()[source]

Return qdk_base as the default algorithm name.

Return type:

str

class qdk_chemistry.algorithms.amplitude_amplification.amplitude_amplification.AmplitudeAmplificationSettings[source]

Bases: Settings

Settings for amplitude amplification.

__init__()[source]

Initialize the settings for amplitude amplification.