Grover's Algorithm amplifies the amplitude of "good" states, as judged by an oracle.𝑈 𝑓 | ۧ 𝑥 = -1 𝑓(𝑥) | ۧ 𝑥 .What if goodness is on a non-Boolean scale?𝑈 𝜑 | ۧ 𝑥 = 𝑒 𝑖𝜑 𝑥 | ۧ 𝑥 , where cos 𝜑(𝑥) signifies goodness (lower is better).Grover's algorithm will fail.But non-Boolean amplitude amplification will work!Background: Data analysis at HEP colliders proceeds via the comparison of real experimental data to data simulated under various theory models.One of the stages of the simulation pipeline is the confinement of colored partons into colorless particles.Color reconnection is a heuristic idea used in the modeling of this confinement.Quantum circuit for the non-Boolean Amplitude Amplification Algorithm Measurement probabilities of states | ۧ 𝟎 , …, | ۧ 𝟐𝟓𝟓 after K=1, 2, and 3 iterations of non-Boolean amplification, for 𝝋 𝒙 = 𝒙 𝟐𝟓𝟓 𝝅 𝟒 .Lower values of cos 𝝋(𝒙) have been preferentially amplified.
Grover's Algorithm amplifies the amplitude of "good" states, as judged by an oracle.𝑈 𝑓 | ۧ 𝑥 = -1 𝑓(𝑥) | ۧ 𝑥 .What if goodness is on a non-Boolean scale?𝑈 𝜑 | ۧ 𝑥 = 𝑒 𝑖𝜑 𝑥 | ۧ 𝑥 , where cos 𝜑(𝑥) signifies goodness (lower is better).Grover's algorithm will fail.But non-Boolean amplitude amplification will work!Background: Data analysis at HEP colliders proceeds via the comparison of real experimental data to data simulated under various theory models.One of the stages of the simulation pipeline is the confinement of colored partons into colorless particles.Color reconnection is a heuristic idea used in the modeling of this confinement.Quantum circuit for the non-Boolean Amplitude Amplification Algorithm Measurement probabilities of states | ۧ 𝟎 , …, | ۧ 𝟐𝟓𝟓 after K=1, 2, and 3 iterations of non-Boolean amplification, for 𝝋 𝒙 = 𝒙 𝟐𝟓𝟓 𝝅 𝟒 .Lower values of cos 𝝋(𝒙) have been preferentially amplified.
Consider a Boolean function χ:X→{0,1} that partitions set X between its good and bad elements, where x is good if χ(x)=1 and bad otherwise. Consider also a quantum algorithm A such that A∣0⟩=∑x∈Xαx∣x⟩ is a quantum superposition of the elements of X, and let a denote the probability that a good element is produced if A∣0⟩ is measured. If we repeat the process of running A, measuring the output, and using χ to check the validity of the result, we shall expect to repeat 1/a times on the average before a solution is found. *Amplitude amplification* is a process that allows to find a good x after an expected number of applications of A and its inverse which is proportional to 1/a, assuming algorithm A makes no measurements. This is a generalization of Grover's searching algorithm in which A was restricted to producing an equal superposition of all members of X and we had a promise that a single x existed such that χ(x)=1. Our algorithm works whether or not the value of a is known ahead of time. In case the value of a is known, we can find a good x after a number of applications of A and its inverse which is proportional to 1/a even in the worst case. We show that this quadratic speedup can also be obtained for a large family of search problems for which good classical heuristics exist. Finally, as our main result, we combine ideas from Grover's and Shor's quantum algorithms to perform amplitude estimation, a process that allows to estimate the value of a. We apply amplitude estimation to the problem of *approximate counting*, in which we wish to estimate the number of x∈X such that χ(x)=1. We obtain optimal quantum algorithms in a variety of settings.
Abstract This laboratory work presents a practical implementation of Grover’s search algorithm using the Qiskit framework. The material is based on educational resources developed by the International Quantum Center at CERN (Switzerland) and is intended to provide hands-on experience with amplitude amplification and oracle-based quantum search. In Laboratory Work No. 7, participants construct Grover’s algorithm step by step. The implementation begins with defining a function that initializes the quantum registers and prepares the initial stage of the circuit. The output qubit associated with the oracle is set to the state ∣1⟩|1\rangle∣1⟩ to enable phase inversion through the phase kickback mechanism. Hadamard gates are then applied to create a uniform superposition over the search space. The oracle is designed to mark the target state by applying a phase shift, effectively flipping the sign of the amplitude corresponding to the solution. This is followed by the diffusion operator (inversion about the mean), which amplifies the probability amplitude of the marked state. The Grover iteration—composed of the oracle and diffusion operator—is repeated an optimal number of times to maximize the probability of measuring the correct result. The laboratory exercise emphasizes the principles of quantum amplitude amplification, circuit modularization, oracle construction, and measurement-based verification. By executing the algorithm on simulators and cloud-accessible quantum hardware, participants observe the quadratic speedup of Grover’s algorithm compared to classical linear search methods. This practical guide bridges theoretical understanding of quantum search with executable quantum circuits, reinforcing the operational aspects of quantum algorithm design within modern quantum computing
We present a family of quantum amplitude amplification algorithms that interleave ordinary Grover rotations with tunable weak measurements in loops. A successful measurement yields the target state and stops the algorithm, while after a failure, the loop resumes from the post-measurement state without restarting. We express the leading costs in expected Grover iterations as p→0. For a known target probability p, an exact weak measurement-conditioned loop for states near the angle π/4 uses (π/8+1/4+o(1))/p iterations, improving on the standard Grover constant π/4 and on optimised restart Grover, and matching the corresponding infimum in our continuous-angle analysis. When only a lower bound 0<p0≤p<1/2 is available, a discrete Lyapunov equation gives the exact expected oracle cost for every fixed measurement strength and a closed-form optimal strength. Using the strength selected from p0, the expected number of Grover iterations is at most 221(p1+p01), where the expected cost decreases as the actual p increases, and gives the leading constant 1/2 at the promise boundary p=p0. For completely unknown p, we identify measurement strength κ(t)=Θ(1/t) as the critical scale within the regular schedules considered here and analyse κb(t)=min{1/2,b/t}. For each fixed b>2, we rigorously derive a closed-form Gamma-function expression C(b) giving (C(b)/2+o(1))/p expected iterations. Numerical minimisation of this explicit expression gives b≈5.2 and C(b)/2≈1.01. The results show that weak measurements preserve the Θ(1/p) search scale while adding an explicit fixed-point control mechanism and provable oracle savings.
Quantum Amplitude Amplification (QAA), the generalization of Grover's algorithm, is well-positioned for combinatorial optimization and is particularly promising for Quadratic Unconstrained Binary Optimization (QUBO) problems. QAA is appealing due to its ability to drive the quantum system to a target state, yielding the globally optimal solution with probability over 90+%. However, realizing QAA for application-scale optimization currently exceeds quantum hardware capacity, which is further compounded by unresolved algorithmic challenges regarding the choice of free parameters. In this study, we address these issues by utilizing a realistic traffic flow QUBO problem to investigate the implementation of QAA as a heuristic solver. Specifically, allowing the diffusion operator parameter to take non-π values expands the capabilities of QAA. This unlocks a new multiple-shot, low-iteration strategy that aims for a high cumulative probability rather than maximizing the probability of a single basis state. Using 25-qubit simulations, our results demonstrate that heuristic QAA addresses two of the main challenges cited in previous studies. Firstly, heuristic QAA works even at a single iteration, reducing circuit depth by orders of magnitude compared to standard QAA. And secondly, we show that the problem-dependent parameters necessary for reaching optimal algorithmic performance can be reliably approximated with minimal upfront classical computing overhead.
Abstract This guide is based on the IBM Quantum course Phase Estimation and Factoring and focuses on Grover’s algorithm, a quantum algorithm for unstructured search problems that provides a quadratic speedup over classical approaches. In an unstructured search problem, we are given a function (often represented as an oracle) that marks one or more “correct” solutions among NNN possible candidates. A classical algorithm requires on the order of O(N)O(N)O(N) evaluations in the worst case. In contrast, Grover’s algorithm finds a solution using only O(N)O(\sqrt{N})O(N) oracle queries. This quadratic improvement implies: The quantum algorithm requires roughly the square root of the number of operations needed classically. Any classical algorithm for unstructured search must have cost at least quadratic relative to Grover’s quantum procedure. Core Idea of the Algorithm Grover’s algorithm relies on: Preparation of a uniform superposition (typically using Hadamard gates). An oracle that marks valid solutions via phase inversion. The Grover diffusion operator, which amplifies the probability amplitude of the marked states through interference. By repeatedly applying the Grover operator, the amplitude of the desired solution grows while others diminish, allowing measurement to reveal the correct answer with high probability. Practical Considerations Despite its theoretical elegance and wide applicability, the quadratic speedup of Grover’s algorithm is unlikely to yield near-term practical advantage. Modern classical hardware operates at extremely high clock rates and is vastly more mature than current quantum devices. For problem sizes accessible to today’s quantum computers, classical systems remain dominant. However, history shows that even sub-quadratic classical improvements — such as: Fast Fourier Transform (FFT) Efficient sorting algorithms like quicksort and mergesort have had transformative practical impact. The crucial distinction is that Grover’s algorithm depends on fundamentally different hardware — quantum processors — which are still in early development. Long-Term Perspective As quantum hardware advances in qubit count, coherence time, and error correction, Grover’s quadratic advantage may become practically significant for: Cryptographic key search Optimization heuristics Combinatorial search problems Amplitude amplification subroutines in broader quantum algorithms Through hands-on experimentation on IBM Q, this lesson demonstrates how theoretical amplitude amplification translates into executable quantum circuits, reinforcing the relationship between interference, probability amplitudes, and computational complexity.
Quantum Amplitude Amplification (QAA), the generalization of Grover's algorithm, is capable of yielding optimal solutions to combinatorial optimization problems with high probabilities. In this work we extend the conventional 2-dimensional representation of Grover's (orthogonal collective states) to oracles which encode cost functions such as QUBO, and show that linear cost functions are a special case whereby an exact formula exists for determining optimal oracle parameter settings. Using simulations of problem sizes up to 40 qubits we demonstrate QAA's algorithmic performance across all possible solutions, with an emphasis on the closeness in Grover-like performance for solutions near the global optimum. We conclude with experimental demonstrations of generalized QAA on both IBMQ (superconducting) and IonQ (trapped ion) qubits, showing that the observed probabilities of each basis state match our equations as a function of varying the free parameters in the oracle and diffusion operators.