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:
AlgorithmFactoryFactory class for creating amplitude amplification good state oracle instances.
- class qdk_chemistry.algorithms.amplitude_amplification.qpe_subspace.QPESubspaceMarking(energy_lower_bound=math.nan, qpe_circuit_builder=None)[source]
Bases:
AlgorithmBuild a good state oracle that flags the eigenspace above an energy bound.
The nested
qpe_circuit_builderestimates the phase of the register handed to the oracle, a flag is flipped when that phase lands in a bin whose energy is at leastenergy_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:
energy_lower_bound (float)
qpe_circuit_builder (AlgorithmRef | None)
- __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.
- 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