Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
The notebook shows how to construct the following state: ψ=x0x1earZr|\psi\rangle = \sum_{x_0}^{x_1}\sqrt{\frac{e^{-ar}}{Z}}|r\rangle Z=x0x1earZ = \sum_{x_0}^{x_1}\sqrt{e^{-ar}} The methodology is to load the state on the full range of states, then use exact amplitude amplification to leave only the wanted part: image.png

Exponential State Preparation on the Full Interval

output

Exp State on a Specific Interval with Exact Amplitude Amplification

Output:
Output:
output

Adjusting If a Single Grover is Not Enough

If the desired range does not hold enough amplitude, it is enough to load the end of the range (for a positive EXP_RATE) or the beginning of the range (for a negative EXP_RATE), then finish with a modular adder:
Output:
This fraction of good states is not enough for a single Grover iteration to amplify to
  1. So, first load the same sized interval at the end of the range:
Output:
output

Verifying the Results