Skip to content

Exponential State Preparation

The ExponentialStatePreparation function creates a state with exponentially decreasing amplitudes. Namely, the probability for a state representing an integer \(n\) is

\[ P\left(n\right) = \frac{1}{Z} e^{-\lambda n} \]

where \(\lambda\) is the rate, and \(Z\) is a normalization factor. If \(q\) in the number of qubits, then

\[ Z = \sum_{n=0} ^{n = 2^q - 1} e^{-\lambda n} = \frac{1 - e^{-\lambda 2^q}}{1 - e^{-\lambda}} \]

Syntax

Function: ExponentialStatePreparation

Parameters:

  • num_qubits: int
  • rate: float
{
  "function": "ExponentialStatePreparation",
  "function_params": { "num_qubits": 5, "rate": 0.1 }
}
from classiq import Model
from classiq.builtin_functions import ExponentialStatePreparation

model = Model()
params = ExponentialStatePreparation(num_qubits=5, rate=0.1)
model.ExponentialStatePreparation(params)