Skip to main content
Functions:
NameDescription
qpe_flexible[Qmod Classiq-library function].
qpe[Qmod Classiq-library function].

qpe_flexible

qpe_flexible(
unitary_with_power: QCallable[CInt],
phase: QArray[QBit]
) -> None
[Qmod Classiq-library function] Implements the Quantum Phase Estimation (QPE) algorithm, which estimates the phase (eigenvalue) associated with an eigenstate of a given unitary operator UU. This is a flexible version that allows the user to provide a callable that generates the unitary operator UkU^k for a given integer kk, offering greater flexibility in handling different quantum circuits using some powering rule. Parameters:
NameTypeDescriptionDefault
unitary_with_powerQCallable[CInt]A callable that returns the unitary operator UkU^k given an integer kk. This callable is used to control the application of powers of the unitary operator.required
phaseQArray[QBit]The quantum variable that represents the estimated phase (eigenvalue), assuming initialized to zero.required

qpe

qpe(
unitary: QCallable,
phase: QNum
) -> None
[Qmod Classiq-library function] Implements the standard Quantum Phase Estimation (QPE) algorithm, which estimates the phase (eigenvalue) associated with an eigenstate of a given unitary operator UU. Parameters:
NameTypeDescriptionDefault
unitaryQCallableA callable representing the unitary operator UU, whose eigenvalue is to be estimated.required
phaseQNumThe quantum variable that represents the estimated phase (eigenvalue), assuming initialized to zero.required