Abstract A while loop tests a termination condition on every iteration. On a quantum computer, such measurements perturb the evolution of the algorithm. We define a while loop primitive using weak measurements, offering a trade-off between the perturbation caused and the amount of information gained per iteration. This trade-off is adjusted with a parameter set by the programmer. We provide sufficient conditions that let us determine, with arbitrarily high probability, a worst-case estimate of the number of iterations the loop will run for. As an example, we solve Grover’s search problem using a while loop and prove the quadratic quantum speed-up is maintained.
Abstract A while loop tests a termination condition on every iteration. On a quantum computer, such measurements perturb the evolution of the algorithm. We define a while loop primitive using weak measurements, offering a trade-off between the perturbation caused and the amount of information gained per iteration. This trade-off is adjusted with a parameter set by the programmer. We provide sufficient conditions that let us determine, with arbitrarily high probability, a worst-case estimate of the number of iterations the loop will run for. As an example, we solve Grover’s search problem using a while loop and prove the quadratic quantum speed-up is maintained.
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.
A simpler quantum counting algorithm based on amplitude amplification is presented. This algorithm is bounded by O(sqrt(N/M)) calls to the controlled-Grover operator where M is the number of marked states and N is the total number of states in the search space. This algorithm terminates within log(sqrt(N/M)) consecutive measurement steps when the probability p1 of measuring the state |1> is at least 0.5, and the result from the final step is used in estimating M by a classical post processing. The purpose of controlled-Grover iteration is to increase the probability p1. This algorithm requires less quantum resources in terms of the width and depth of the quantum circuit, produces a more accurate estimate of M, and runs significantly faster than the phase estimation-based quantum counting algorithm when the ratio M/N is small. We compare the two quantum counting algorithms by simulating various cases with a different M/N ratio, such as M/N > 0.125 or M/N < 0.001.
Grover's algorithm searches an unstructured database of N entries, finding a marked element in time O(N). The algorithm was later generalised to amplitude amplification. The original algorithm succeeds with probability close to one and needs to run for a number of iterations chosen ahead of time. We discuss an implementation of amplitude amplification that, instead, runs for a number of iterations unspecified a priori and only halts on success. We prove that this approach maintains the quadratic speed-up of the original quantum algorithm. The key component is a feedback loop controlled by a weak measurement that allows limited monitoring of the evolution of the quantum state.
Grover’s algorithm leverages quantum computing to efficiently locate solutions in unstructured search spaces, outperforming classical approaches. Since Grover’s algorithm requires prior knowledge of the number of solutions (M) within a search space of size N, previous studies assume M is estimated beforehand and focus on identifying all solutions. Here, we propose a two-step process that integrates both the estimation of M and the discovery of the solutions, optimizing the interactions between the two steps. To enhance efficiency, the estimation step captures as many solutions as possible, leaving the discovery step to focus on the remaining ones. To ensure accuracy, the discovery step continues searching until the probability of finding additional solutions becomes sufficiently low. We implemented and evaluated our methods, showing that over 80% of solutions were found during the estimation phase, allowing the discovery phase to conclude earlier, while identifying over 99% of solutions on average. In theory, the process requires NM × log(M) Grover’s iterations in the worst case, but in practice, it typically terminates after iterations proportional to N. We expect that our methods will be applicable to various search problems and inspire further research on efficiently finding all solutions.
A goal of the emerging field of quantum control is to develop methods for quantum technologies to function robustly in the presence of noise. Central issues are the fundamental limitations on the available information about quantum systems and the disturbance they suffer in the process of measurement. In the context of a simple quantum control scenario-the stabilization of nonorthogonal states of a qubit against dephasing-we experimentally explore the use of weak measurements in feedback control. We find that, despite the intrinsic difficultly of implementing them, weak measurements allow us to control the qubit better in practice than is even theoretically possible without them. Our work shows that these more general quantum measurements can play an important role for feedback control of quantum systems.