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 explains the Oblivious Amplitude Amplification algorithm (OAA) [2], which can be used as a building block in algorithms such as Hamiltonian simulations. We start with a short recap, then show how to use it in conjunction with the Linear Combination of Unitaries (LCU) algorithm.
Ref. [1] shows how to use the Grover operator to amplify a specific state. In detail, given a unitary A to prepare a state ∣ψ⟩:A∣0⟩=∣ψ⟩=a∣ψ0⟩+1−a2∣ψ1⟩and a unitary Rψ1 to implement a reflection over the state ψ1:Rψ1(a∣ψ0⟩+1−a2∣ψ1⟩)=a∣ψ0⟩−1−a2∣ψ1⟩We want to decrease the amplitude of ψ1 to be∣ψ0⟩, ∣ψ1⟩ define a two-dimensional subspace where the applications of the Grover operator are effectively rotations. To do that we also need to do a reflection about the initial state ∣ψ⟩:Sψ=AR0A†where R0 is a reflection about the ∣0⟩ state.The rotations can be used to take the initial vector ∣ψ⟩ closer to ∣ψ0⟩.
As you might have noticed, the amplification requires the “recipe” A for the preparation of ψ, and uses it to perform the reflection around the initial state.In certain scenarios, such as in Hamiltonian simulations, we might not be able to create the initial state or it is very inefficient. Specifically, we look at a (s,l,0)-block-encoding W of a matrix U:W∣0l⟩∣ψ⟩=s1∣0l⟩U∣ψ⟩+1−s21∣ϕ⟩(For detailed explanations of block-encodings and Hamiltonian simulations, see this demo.)We want to amplify the amplitude of the state that is in the block, i.e., ∣0l⟩U∣ψ⟩.This sometimes can be done in post-selection, but if we use W more than once in the algorithm, then the amplitude to sample the “good” states exponentially decreases.It turns out, however, that if U is unitary, then we can reflect about the initial state W∣0l⟩∣ψ⟩ for any ∣ψ⟩ using the operator WRW† where R=(I−2∣0l⟩⟨0l)∣⊗I, which is analogous to the reflection about the zero state.Then we get the same effective 2D picture! So, to get ∣0l⟩U∣ψ⟩ with probability ∼1, roughly ∼s Grover iterations are needed.
Here we take the matrix A=H0⊗H1=2X0+Z0⊗2X1+Z1 and block-encode it using LCU, creating the matrix UA. In general, though LCU is a combination of unitaries, the result is not necessarily unitary. In this specific example, the matrix A is unitary, and so the encoding can be amplified using oblivious amplitude amplification.
First show that the sampled state after the application of UA is in the wanted block only in 41 of the cases, meaning that in this case s=2.The input ∣ψ⟩ to UA is a randomly sampled vector of normalized amplitudes.
Now we wrap UA with the oblivious amplitude amplification scheme. It is almost like regular Grover, except that it does not take the initial state preparation to the Grover operator. Also, the Grover diffuser only works on the block qubits. (We take advantage of the language capturing mechanism.)The block_oracle (R in the used notation) operates on the block qubits and checks that they are in the wanted block (i.e., equal to the state ∣00⟩).The W operator is represented by the function block_encoding.As the original total amplitude of the “good states” is 21, exactly one Grover iteration will amplify the amplitude to
It was proven that when U is close to unitary, it is still possible to amplify (using the same operators) and get a good approximation.This is termed “Robust Oblivious Amplitude Amplification” [3].This is usually the case in Hamiltonian simulation when the LCU reprsents a truncated series which is only an approximation of the unitary e−iHt.