qdk_chemistry.algorithms.amplitude_amplification.qpe_subspace module

QDK/Chemistry good state oracle marking a QPE phase register.

class qdk_chemistry.algorithms.amplitude_amplification.qpe_subspace.AmplitudeAmplificationOracleFactory[source]

Bases: AlgorithmFactory

Factory class for creating amplitude amplification good state oracle instances.

__init__()[source]

Initialize the AmplitudeAmplificationOracleFactory.

algorithm_type_name()[source]

Return the algorithm type name as amplitude_amplification_oracle.

Return type:

str

default_algorithm_name()[source]

Return qdk_qpe_subspace as the default algorithm name.

Return type:

str

class qdk_chemistry.algorithms.amplitude_amplification.qpe_subspace.QPESubspaceMarking(energy_lower_bound=math.nan, qpe_circuit_builder=None)[source]

Bases: Algorithm

Build a good state oracle that flags the eigenspace above an energy bound.

The nested qpe_circuit_builder estimates the phase of the register handed to the oracle, a flag is flipped when that phase lands in a bin whose energy is at least energy_lower_bound, and the estimation is undone. No state preparation is used: the register already holds the state under test.

This reflects about the marked eigenspaces only when the estimation is exact, that is when every eigenphase of that state is a multiple of \(2^{-n}\) for the builder’s num_bits \(n\). Off a bin the phase register comes back spread rather than to \(|0\rangle\), leaking part of the state into the ancillas the oracle releases.

Parameters:
__init__(energy_lower_bound=math.nan, qpe_circuit_builder=None)[source]

Initialize the QPE subspace marking oracle.

Parameters:
  • energy_lower_bound (float) – Lowest energy the marked subspace may hold.

  • qpe_circuit_builder (AlgorithmRef | None) – Optional algorithm reference for the phase estimation to mark.

type_name()[source]

Return the algorithm type name as amplitude_amplification_oracle.

Return type:

str

name()[source]

Return the algorithm name as qdk_qpe_subspace.

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.qpe_subspace.QPESubspaceMarkingSettings[source]

Bases: Settings

Settings for the QPE subspace marking oracle.

__init__()[source]

Initialize the settings for the QPE subspace marking oracle.