View on GitHub
Open this notebook in GitHub to run it yourself
prepare_exponential_state function
creates a state with exponentially decreasing amplitudes. Namely,
the probability for a state representing an integer is
where is the rate, and is a normalization factor.
If in the number of qubits, then
Function: prepare_exponential_state
Arguments:
rate: CRealq: QArray[QBit]