Use this file to discover all available pages before exploring further.
View on GitHub
Open this notebook in GitHub to run it yourself
This demo shows how to use the QSVT framework for search problems; specifically, implementing fixed-point amplitude amplification (FPAA).With FPAA, we do not know in advance the concentration of solutions for the search problem, but we want to sample a solution with high probability. In contrast, for the original Grover search algorithm, too many iterations might ‘overshoot’ the mark.The demo is based on the paper Grand unification of quantum algorithms.Given ∣s⟩ the initial state and ∣t⟩ the ‘good’ states, we get an effective block encoding of a one-dimensional matrix A=∣t⟩⟨s∣.Given that a=⟨s∣t⟩>0, we want to amplify a.The signal operator U here is I (and also U†).Now we implement two projector-rotations: one in the '∣s⟩' space and one in the '∣t⟩' space; each one around the given state, giving phase to the specific state.
We start with the general QSVT framework definition. It accepts a unitary that block-encodes a matrix together with projector-controlled phase functions, which rotate the state around each of the subspaces where the matrix is encoded.The qsvt function accepts 3 different functions:
Block Encoding function: the one for which the singular values are transformed. In this case, the block encoding is trivial, and is just the Identity.
Domain projector-controlled-CNot: a function that identifies subspace in the domain of the block encoding (i.e the columns of the block encoding). In our case it is an identifier for the initial state ∣s⟩.
Image projector-controlled-CNot: a function that identifies subspace in the image of the block encoding (i.e the rows of the block encoding). In our case it is an identifier for the target state ∣t⟩.
So we get a 1x1 block encoded matrix, which will be transformed using a polynomial that approximates the sign function, so that all inputs will be amplified to approximately
We need an even degree polynomial since we need to “finish” our sequence in the image space of our unitary.
Here for demonstration purpose we assume that the initial state has at least MIN_OVERLAP=0.1 with the target state (in probability). So we approximate the constant function (a scale of 0.95 is used for stability), and we only care about the interval [MIN_OVERLAP, 1].