Skip to main content
Functions:

amplitude_amplification

amplitude_amplification(
reps: CInt,
oracle: QCallable[QArray[QBit]],
space_transform: QCallable[QArray[QBit]],
packed_qvars: QArray[QBit]
) -> None
[Qmod Classiq-library function] Applies the Amplitude Amplification algorithm; Prepares a state using the given space_transform function, and applies reps repetititions of the grover operator, using the given oracle functions which marks the “good” states. Parameters:

exact_amplitude_amplification

exact_amplitude_amplification(
amplitude: CReal,
oracle: QCallable[QArray[QBit]],
space_transform: QCallable[QArray[QBit]],
packed_qvars: QArray[QBit]
) -> None
[Qmod Classiq-library function] Applies an exact version of the Amplitude Amplification algorithm, assuming knowledge of the amplitude of the marked state. The function should be applied on the zero state, and it takes care for preparing the initial state before amplification using the space_transform. Based on the algorithm in Quantum state preparation without coherent arithmetic. Assuming the space_transform creates a state ψ=aψ{good}+{1a}ψ{bad}|\psi\rangle = a|\psi_\{good\}\rangle + \sqrt\{1-a\}|\psi_\{bad\}\rangle, given a as the amplitude argument, the function will load exactly the state ψ{good}|\psi_\{good\}\rangle. Note: if the amplitude argument is not exact, the resulting state will not be exactly ψ{good}|\psi_\{good\}\rangle, and there will be additional internal auxilliary of the function that is not released correctly. Parameters: