> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Characteristic Functions

> Load probability density functions of financial, physical, and heavy-tail distributions into quantum states using characteristic functions.

## Supported Characteristic Functions

Haiqu SDK supports loading probability density functions from **characteristic functions (CFs)** directly into quantum states. Many distributions — across finance, physics, queuing theory, and heavy-tail modelling — are most naturally specified through their CF $\phi(u) = \mathbb{E}[e^{iuX}]$ because their PDF has no closed form or is analytically intractable.

Load the PDF of any supported distribution via its characteristic function using:

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="cf_name",  # characteristic function name (e.g. "heston_cf")
    num_qubits=8,
    interval_start=-3,
    interval_end=3,
    # model-specific parameters — see each section below
    **kwargs
).result()
```

The functions are organized into three branches:

| Branch                          | Models                                                                                                                                                    |
| :------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AJD (Affine Jump-Diffusion)     | `heston_cf` → `bates_cf` → `svjj_cf` → `dps_cf` (each extends the previous)                                                                               |
| Lévy-OU (OU subordinator clock) | `bns_cf`                                                                                                                                                  |
| Pure Lévy (Lévy–Khintchine)     | `holtsmark_cf`, `landau_cf`, `cgmy_cf`, `meixner_cf`, `linnik_cf`, `variance_gamma_cf`, `bilateral_gamma_cf`, `compound_poisson_cf`, `levy_khintchine_cf` |

***

## AJD Branch

The AJD (Affine Jump-Diffusion) branch models $\log S_T$ as Heston stochastic volatility with optional independent jump sources. `dps_cf` is the most general model; all others are obtained by zeroing parameters.

### Heston Model

**Name in SDK:** `heston_cf`  |  **Citation:** [Heston (1993)](https://doi.org/10.1093/rfs/6.2.327)  |  **PDF support:** $(-\infty,\, \infty)$

The industry-standard stochastic volatility model. Its mean-reverting variance process captures the volatility smile without jumps, is analytically tractable, and calibrates efficiently to vanilla option surfaces — making it the natural first choice for equity and foreign exchange derivatives.

$\phi(u) = \exp\bigl(iu\log S_0 + C(u) + D(u)\,v_0\bigr)$

The Riccati coefficients $C$ and $D$ are solved in the numerically stable form of [Albrecher et al. (2007)](https://www.researchgate.net/publication/228664682_The_Little_Heston_Trap). Define the intermediate quantities

$\xi = \kappa - \rho\sigma\, iu, \qquad d = \sqrt{\xi^2 + \sigma^2(u^2 + iu)}, \qquad g = \frac{\xi - d}{\xi + d}$

then

$C(u) = (r-q)\,iu\,T \;+\; \frac{\kappa\theta}{\sigma^2}\left[(\xi - d)\,T - 2\ln\frac{1 - g\,e^{-dT}}{1 - g}\right]$

$D(u) = \frac{\xi - d}{\sigma^2}\cdot\frac{1 - e^{-dT}}{1 - g\,e^{-dT}}$

$C$ captures the cumulative drift and mean-reversion cost over $[0,T]$; $D$ is the sensitivity of the log-CF to the current variance $v_0$, decaying toward zero as the variance mean-reverts to $\theta$.

| Parameter | Type    | Constraints        | Description                |
| :-------- | :------ | :----------------- | :------------------------- |
| `S0`      | `float` | $S_0 > 0$          | Spot price                 |
| `v0`      | `float` | $v_0 > 0$          | Initial variance           |
| `T`       | `float` | $T > 0$            | Time to maturity in years  |
| `r`       | `float` | $r \in \mathbb{R}$ | Risk-free rate             |
| `q`       | `float` | $q \in \mathbb{R}$ | Continuous dividend yield  |
| `kappa`   | `float` | $\kappa > 0$       | Mean-reversion rate        |
| `theta`   | `float` | $\theta > 0$       | Long-term variance         |
| `sigma`   | `float` | $\sigma > 0$       | Volatility-of-volatility   |
| `rho`     | `float` | $\rho \in (-1, 1)$ | Asset–variance correlation |

<Note>
  The Feller condition $2\kappa\theta > \sigma^2$ ensures the variance process $v_t$ remains strictly positive. If violated, $v_t$ can hit zero and the characteristic function may become numerically unreliable.
</Note>

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="heston_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    S0=100.0,   # initial asset price
    v0=0.04,    # initial variance
    T=1.0,      # time to maturity (years)
    r=0.05,     # risk-free rate
    q=0.0,      # dividend yield
    kappa=2.0,  # mean-reversion rate
    theta=0.04, # long-run variance
    sigma=0.3,  # vol-of-vol
    rho=-0.7,   # asset-variance correlation
).result()
```

### Bates Model

**Name in SDK:** `bates_cf`  |  **Citation:** [Bates (1996)](https://doi.org/10.1093/rfs/9.1.69)  |  **PDF support:** $(-\infty,\, \infty)$

Extends Heston with independent log-normal price jumps, capturing the steep short-maturity skew that pure diffusion cannot reproduce. The standard model for equity index options where crash risk matters.

$\phi_{\text{Bates}}(u) = \phi_{\text{Heston}}(u) \cdot \exp\Bigl(\lambda T\bigl(e^{iu\mu_j - \frac{1}{2}\sigma_j^2 u^2} - 1 - iu\bar\mu\bigr)\Bigr)$

where $\bar\mu = e^{\mu_j + \frac{1}{2}\sigma_j^2} - 1$ is the martingale drift correction that keeps $e^{(r-q)T}S_0$ as the forward price.

**Additional parameters** (inherits all Heston parameters):

| Parameter | Type    | Constraints            | Description                 |
| :-------- | :------ | :--------------------- | :-------------------------- |
| `lam`     | `float` | $\lambda \geq 0$       | Jump intensity (jumps/year) |
| `mu_j`    | `float` | $\mu_j \in \mathbb{R}$ | Mean of log-jump $\ln(1+k)$ |
| `sigma_j` | `float` | $\sigma_j > 0$         | Std of log-jump $\ln(1+k)$  |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="bates_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    S0=100.0, v0=0.04, T=1.0, r=0.05, q=0.0,
    kappa=2.0, theta=0.04, sigma=0.3, rho=-0.7,
    lam=0.5,      # jump intensity (jumps/year)
    mu_j=-0.05,   # mean log jump size
    sigma_j=0.1,  # std of log jump size
).result()
```

### SVJJ Model

**Name in SDK:** `svjj_cf`  |  **Citation:** [Duffie, Pan & Singleton (2003)](https://doi.org/10.1111/1468-0262.00164), [Eraker (2003)](https://doi.org/10.1111/1540-6261.00566)  |  **PDF support:** $(-\infty,\, \infty)$

Extends Bates with independent exponential variance jumps, allowing volatility to spike discretely alongside price crashes. Empirically important for fitting the joint dynamics of the spot and VIX surfaces around market stress events.

$\phi_{\text{SVJJ}}(u) = \phi_{\text{Bates}}(u) \cdot \exp(c_{vj})$

where $D(u,s)$ is the Heston $D$ coefficient evaluated at remaining time $s$ rather than the full maturity $T$:

$D(u,s) = \frac{\xi - d}{\sigma^2}\cdot\frac{1 - e^{-ds}}{1 - g\,e^{-ds}}$

The variance-jump contribution integrates the moment-generating function of an exponential jump against this time-varying coefficient:

$c_{vj} = \lambda_v \int_0^T \left[\frac{1}{1 - \mu_v D(u,s)} - 1\right] ds$

The integrand is the CGF of one exponential($1/\mu_v$) variance jump evaluated at $D(u,s)$; the integral is evaluated in closed form.

**Additional parameters** (inherits all Bates parameters):

| Parameter | Type    | Constraints        | Description                       |
| :-------- | :------ | :----------------- | :-------------------------------- |
| `lam_v`   | `float` | $\lambda_v \geq 0$ | Variance jump intensity           |
| `mu_v`    | `float` | $\mu_v > 0$        | Mean of exponential variance jump |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="svjj_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    S0=100.0, v0=0.04, T=1.0, r=0.05, q=0.0,
    kappa=2.0, theta=0.04, sigma=0.3, rho=-0.7,
    lam=0.5, mu_j=-0.05, sigma_j=0.1,
    lam_v=0.3,  # variance jump intensity
    mu_v=0.05,  # mean of exponential variance jump
).result()
```

### DPS Model (most general AJD)

**Name in SDK:** `dps_cf`  |  **Citation:** [Duffie, Pan & Singleton (2003)](https://doi.org/10.1111/1468-0262.00164)  |  **PDF support:** $(-\infty,\, \infty)$

Extends SVJJ with a third correlated jump source: simultaneous price and variance jumps whose sizes are statistically dependent. All narrower AJD models are special cases obtained by zeroing parameters.

$\phi_{\text{DPS}}(u) = \phi_{\text{SVJJ}}(u) \cdot \exp(c_{\text{corr}})$

where $D(u,s)$ is defined as in the SVJJ section, and the correlated-jump contribution accounts for the joint distribution of a price jump $J_S \mid J_v \sim \mathcal{N}(\mu_j + \rho_j J_v,\, \sigma_j^2)$ and a variance jump $J_v \sim \mathrm{Exp}(1/\mu_v)$:

$c_{\text{corr}} = \lambda_c \int_0^T \left[\frac{K}{c - \mu_v D(u,s)} - 1 - iu\bar\mu_c\right] ds$

with $K = e^{iu\mu_j - \frac{1}{2}\sigma_j^2 u^2}$, $c = 1 - \mu_v\, iu\,\rho_j$, and $\bar\mu_c = e^{\mu_j + \frac{1}{2}\sigma_j^2}/(1 - \rho_j\mu_v) - 1$. The integral is evaluated in closed form.

**Additional parameters** (inherits all SVJJ parameters):

| Parameter | Type    | Constraints             | Description                                          |
| :-------- | :------ | :---------------------- | :--------------------------------------------------- |
| `lam_c`   | `float` | $\lambda_c \geq 0$      | Correlated jump intensity                            |
| `rho_j`   | `float` | $\rho_j \in \mathbb{R}$ | Sensitivity of mean price jump to variance jump size |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="dps_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    S0=100.0, v0=0.04, T=1.0, r=0.05, q=0.0,
    kappa=2.0, theta=0.04, sigma=0.3, rho=-0.7,
    lam=0.5,   mu_j=-0.05, sigma_j=0.1,   # independent price jumps
    lam_v=0.3, mu_v=0.05,                  # independent variance jumps
    lam_c=0.2, rho_j=0.5,                  # correlated jumps
).result()
```

| Model       | Zeroed parameters                        |
| :---------- | :--------------------------------------- |
| `svjj_cf`   | `lam_c=0`, `rho_j=0`                     |
| `bates_cf`  | `lam_c=0`, `rho_j=0`, `lam_v=0`          |
| `heston_cf` | `lam_c=0`, `rho_j=0`, `lam_v=0`, `lam=0` |

***

## Lévy-OU Branch

### BNS Model

**Name in SDK:** `bns_cf`  |  **Citation:** [Barndorff-Nielsen & Shephard (2001)](https://www.jstor.org/stable/2680596)  |  **PDF support:** $(-\infty,\, \infty)$

Drives variance through a non-Gaussian Ornstein–Uhlenbeck process subordinated to a Lévy process (e.g. Gamma). This produces heavier tails than Heston and naturally accommodates the empirically observed non-Gaussian distribution of variance increments, making it particularly suited to energy and commodity markets.

$\phi(u) = \exp\bigl(iu\log S_0 + iu(r-q)T + A(u) + B(u)\,\sigma^2_0\bigr)$

Here $u \in \mathbb{R}$ is the Fourier argument, i.e. $\phi(u) = \mathbb{E}[e^{iu\log S_T}]$.

**$B(u,s)$** — sensitivity to the initial variance $\sigma^2_0$, obtained by integrating the OU impulse-response function against the standard risk-neutral price–variance loading ($\beta = -\tfrac{1}{2}$ baked in). Here $s$ is the remaining time, so $B(u,s)$ evaluated at $s = T$ gives the full-horizon coefficient:

$B(u,s) = -\frac{u^2 + iu}{2\lambda}\left(1 - e^{-\lambda s}\right)$

As $s \to \infty$, $B \to -(u^2+iu)/(2\lambda)$; the initial variance is "forgotten" at rate $\lambda$.

**$A(u)$** — cumulative contribution from the subordinator's Lévy measure, obtained by integrating the log-Laplace exponent $\Psi_Z$ of the subordinator along the shifted $B$-curve:

$A(u) = \int_0^T \Psi_Z\bigl(B(u,s) + iu\rho\bigr)\, ds$

The additive $iu\rho$ inside $\Psi_Z$ is the direct jump leverage: it correlates price jumps with variance jumps instantaneously. Set $\rho = 0$ to disable this channel. The Lévy time-change factor $\lambda$ from the paper is absorbed into the subordinator parameters $a$ and $b$ rather than appearing explicitly outside the integral.

For the Gamma subordinator with shape $a$ and rate $b$:

$\Psi_Z(\theta) = -a\ln\left(1 - \frac{\theta}{b}\right)$

This integral has no closed form in general and is evaluated by numerical quadrature (controlled by parameter `n`).

| Parameter      | Type    | Constraints           | Description                                                                               |
| :------------- | :------ | :-------------------- | :---------------------------------------------------------------------------------------- |
| `S0`           | `float` | $S_0 > 0$             | Initial asset price                                                                       |
| `sigma0_sq`    | `float` | $\sigma_0^2 > 0$      | Initial variance $\sigma^2(0)$                                                            |
| `T`            | `float` | $T > 0$               | Time to maturity                                                                          |
| `r`            | `float` | $r \in \mathbb{R}$    | Risk-free rate                                                                            |
| `q`            | `float` | $q \in \mathbb{R}$    | Dividend yield                                                                            |
| `lam`          | `float` | $\lambda > 0$         | OU mean-reversion rate                                                                    |
| `rho`          | `float` | $\rho \in \mathbb{R}$ | Direct jump leverage; correlates price and variance jumps instantaneously (default `0.0`) |
| `subordinator` | `str`   | `"gamma"`             | Subordinator type — currently `"gamma"` only                                              |
| `a`            | `float` | $a > 0$               | Gamma shape (absorbs the $\lambda$ time-change factor from the paper)                     |
| `b`            | `float` | $b > 0$               | Gamma rate                                                                                |
| `n`            | `int`   | $n \geq 1$            | Quadrature steps for $A(u)$ (default `200`)                                               |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="bns_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    S0=100.0,
    sigma0_sq=0.04,  # initial variance σ²(0)
    T=1.0,
    r=0.05, q=0.0,
    lam=2.0,         # OU mean-reversion rate
    rho=-0.5,        # direct jump leverage
    subordinator="gamma",
    a=1.0,           # Gamma shape
    b=10.0,          # Gamma rate
    n=200,           # quadrature steps
).result()
```

<Note>
  Only the `'gamma'` subordinator is currently supported. Increase `n` for higher precision at longer maturities.
</Note>

***

## Pure Lévy Processes

### CGMY / Tempered Stable

**Name in SDK:** `cgmy_cf`  |  **Citation:** [Carr, Geman, Madan & Yor (2002)](https://www.jstor.org/stable/10.1086/338705)  |  **PDF support:** $(-\infty,\, \infty)$

A four-parameter pure-jump Lévy model that nests Variance Gamma ($Y \to 0$) and approaches Brownian motion as $Y \to 2$. The fine-structure index $Y$ directly controls whether the process has finite or infinite variation, making CGMY the go-to model for studying jump activity in high-frequency return data.

$\phi(u) = \exp\bigl(C\,\Gamma(-Y)\bigl[(M - iu)^Y - M^Y + (G + iu)^Y - G^Y\bigr]\bigr)$

| Parameter | Type    | Constraints                 | Description                               |
| :-------- | :------ | :-------------------------- | :---------------------------------------- |
| `C`       | `float` | $C > 0$                     | Overall jump activity                     |
| `G`       | `float` | $G > 0$                     | Exponential decay rate for negative jumps |
| `M`       | `float` | $M > 0$                     | Exponential decay rate for positive jumps |
| `Y`       | `float` | $Y \in (0, 2)$, not integer | Order of asset activity                   |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="cgmy_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    C=1.0,  # overall jump activity
    G=5.0,  # decay for negative jumps
    M=8.0,  # decay for positive jumps
    Y=0.5,  # fine-structure index ∈ (0, 2), not an integer
).result()
```

<Note>
  `cgmy_cf` raises `ValueError` if `Y` is outside $(0, 2)$ or is an integer (pole of $\Gamma(-Y)$).
</Note>

| Special case | Distribution                      |
| :----------- | :-------------------------------- |
| $Y \to 0$    | [Variance Gamma](#variance-gamma) |
| $Y \to 2$    | Brownian motion                   |
| $G = M$      | Symmetric CGMY                    |

***

### Variance Gamma

**Name in SDK:** `variance_gamma_cf`  |  **Citation:** [Madan, Carr & Chang (1998)](https://engineering.nyu.edu/sites/default/files/2018-09/CarrEuropeanFinReview1998.pdf)  |  **PDF support:** $(-\infty,\, \infty)$

Brownian motion with drift time-changed by a Gamma process. Produces semi-heavy tails and controllable skewness with only three parameters, making it both parsimonious and analytically convenient for calibration to vanilla options across strikes and maturities.

$\phi(u) = \left(1 - i\theta\nu u + \tfrac{1}{2}\sigma^2\nu\, u^2\right)^{-1/\nu}$

| Parameter | Type    | Constraints             | Description                            |
| :-------- | :------ | :---------------------- | :------------------------------------- |
| `sigma`   | `float` | $\sigma > 0$            | Brownian component volatility          |
| `nu`      | `float` | $\nu > 0$               | Variance rate of the Gamma time-change |
| `theta`   | `float` | $\theta \in \mathbb{R}$ | Brownian drift (skewness control)      |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="variance_gamma_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    sigma=0.2,   # Brownian volatility
    nu=0.1,      # Gamma variance rate
    theta=-0.1,  # Brownian drift
).result()
```

***

### Meixner Process

**Name in SDK:** `meixner_cf`  |  **Citation:** [Schoutens (2001)](https://www.eurandom.tue.nl/reports/2001/002-report.pdf)  |  **PDF support:** $(-\infty,\, \infty)$

An infinite-activity pure-jump Lévy process with a closed-form characteristic function built from hyperbolic cosines. Its four parameters independently control scale, skewness, tail heaviness, and location, giving excellent flexibility for fitting option smiles while remaining computationally efficient.

$\phi(u) = e^{i\mu u}\left(\frac{\cos(\beta/2)}{\cosh\left(\tfrac{\alpha u - i\beta}{2}\right)}\right)^{2\delta}$

| Parameter | Type    | Constraints             | Description                  |
| :-------- | :------ | :---------------------- | :--------------------------- |
| `alpha`   | `float` | $\alpha > 0$            | Scale                        |
| `beta`    | `float` | $\beta \in (-\pi, \pi)$ | Skewness                     |
| `delta`   | `float` | $\delta > 0$            | Shape                        |
| `mu`      | `float` | $\mu \in \mathbb{R}$    | Location shift (default `0`) |

<Note>
  `meixner_cf` raises `ValueError` if `beta` is outside $(-\pi, \pi)$.
</Note>

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="meixner_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    alpha=0.3,  # scale α > 0
    beta=-0.5,  # skewness β ∈ (-π, π)
    delta=1.0,  # shape δ > 0
    mu=0.0,     # location (default 0)
).result()
```

***

### Holtsmark Distribution

**Name in SDK:** `holtsmark_cf`  |  **Citation:** [Holtsmark (1919)](https://doi.org/10.1002/andp.19193641503)  |  **PDF support:** $(-\infty,\, \infty)$

Special case $S(3/2,\,0,\,\gamma,\,\delta)$. Originally derived to model the gravitational field of a random stellar ensemble; its infinite variance makes it a powerful model for extreme-event phenomena in plasma physics and anomalous diffusion.

$\phi(u) = \exp\bigl(iu\delta - \gamma^{3/2}|u|^{3/2}\bigr)$

**Parameters** (`alpha=1.5`, `beta=0` fixed):

| Parameter | Type    | Constraints             | Description |
| :-------- | :------ | :---------------------- | :---------- |
| `gamma`   | `float` | $\gamma > 0$            | Scale       |
| `delta`   | `float` | $\delta \in \mathbb{R}$ | Location    |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="holtsmark_cf",
    num_qubits=8,
    interval_start=-5, interval_end=5,
    gamma=1.0,
    delta=0.0,
).result()
```

***

### Landau Distribution

**Name in SDK:** `landau_cf`  |  **Citation:** [Bulyak (2022)](https://arxiv.org/abs/2209.06387)  |  **PDF support:** $(-\infty,\, \infty)$

Special case $S(1,\,1,\,\gamma,\,\delta)$ — maximally right-skewed with a heavy right tail. Originally models ionisation energy loss of charged particles in thin matter layers; in data science it appears as a model for right-skewed count data and timing jitter.

$\phi(u) = \exp\Bigl(iu\delta - \gamma|u|\Bigl[1 + i\,\tfrac{2}{\pi}\,\text{sgn}(u)\ln|u|\Bigr]\Bigr)$

**Parameters** (`alpha=1`, `beta=1` fixed):

| Parameter | Type    | Constraints             | Description |
| :-------- | :------ | :---------------------- | :---------- |
| `gamma`   | `float` | $\gamma > 0$            | Scale       |
| `delta`   | `float` | $\delta \in \mathbb{R}$ | Location    |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="landau_cf",
    num_qubits=8,
    interval_start=-2, interval_end=10,
    gamma=1.0,
    delta=0.0,
).result()
```

***

### Linnik / Geometric Stable

**Name in SDK:** `linnik_cf`  |  **Citation:** [Klebanov (1985)](https://doi.org/10.1137/1129104)  |  **PDF support:** $(-\infty,\, \infty)$

The law of a geometric sum of i.i.d. stable random variables. Heavier-tailed than the corresponding stable law, making it useful for modelling waiting times in queuing, anomalous diffusion, and financial durations. The symmetric case simplifies to $\phi(u) = (1 + |u|^\alpha)^{-1}$.

$\phi(u) = \frac{1}{1 - \Psi_{\text{stable}}(u)}$

where $\Psi_{\text{stable}}(u) = \ln\phi_{\text{stable}}(u)$ is the Lévy exponent of the underlying stable distribution (not the stable CF itself).

| Parameter | Type    | Constraints             | Description            |
| :-------- | :------ | :---------------------- | :--------------------- |
| `alpha`   | `float` | $\alpha \in (0, 2]$     | Stability index        |
| `beta`    | `float` | $\beta \in [-1, 1]$     | Skewness (default `0`) |
| `gamma`   | `float` | $\gamma > 0$            | Scale (default `1`)    |
| `delta`   | `float` | $\delta \in \mathbb{R}$ | Location (default `0`) |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="linnik_cf",
    num_qubits=8,
    interval_start=-5, interval_end=5,
    alpha=1.5,  # stability index ∈ (0, 2]
    beta=0.0,   # skewness (default 0)
    gamma=1.0,  # scale (default 1)
    delta=0.0,  # location (default 0)
).result()
```

***

### Bilateral Gamma

**Name in SDK:** `bilateral_gamma_cf`  |  **Citation:** [Küchler & Tappe (2019)](https://arxiv.org/abs/1907.09857)  |  **PDF support:** $(-\infty,\, \infty)$

Decomposes log-returns into independent positive and negative Gamma jump components, each with its own shape and rate. This asymmetric structure naturally captures the empirical observation that upward and downward moves in asset prices have different statistical properties.

$\phi(u) = \left(\frac{b_+}{b_+ - iu}\right)^{a_+}\left(\frac{b_-}{b_- + iu}\right)^{a_-}$

| Parameter | Type    | Constraints | Description               |
| :-------- | :------ | :---------- | :------------------------ |
| `a_p`     | `float` | $a_+ > 0$   | Positive-jump Gamma shape |
| `b_p`     | `float` | $b_+ > 0$   | Positive-jump Gamma rate  |
| `a_m`     | `float` | $a_- > 0$   | Negative-jump Gamma shape |
| `b_m`     | `float` | $b_- > 0$   | Negative-jump Gamma rate  |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="bilateral_gamma_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    a_p=2.0, b_p=10.0,  # positive-jump Gamma shape and rate
    a_m=1.5, b_m=8.0,   # negative-jump Gamma shape and rate
).result()
```

***

### Compound Poisson Process

**Name in SDK:** `compound_poisson_cf`  |  **Citation:** [Gao (2022)](https://doi.org/10.1017/S0269964822000195)  |  **PDF support:** depends on jump type (see table below)

A finite-activity pure-jump process — the simplest possible jump model. Ideal for modelling rare, large events such as sovereign defaults, catastrophe losses, or earnings announcements, where the assumption of a finite number of jumps per unit time is realistic.

$\phi(u) = \exp\bigl(\lambda(\phi_X(u) - 1)\bigr)$

| Parameter    | Type    | Constraints             | Description                                                                |
| :----------- | :------ | :---------------------- | :------------------------------------------------------------------------- |
| `lam`        | `float` | $\lambda > 0$           | Jump intensity (jumps/year)                                                |
| `phi_x_type` | `str`   | —                       | Jump distribution: `"gaussian"`, `"exponential"`, `"gamma"`, or `"stable"` |
| `alpha`      | `float` | see sub-table           | Shape for `"gamma"`; stability index for `"stable"`                        |
| `beta`       | `float` | see sub-table           | Rate (`"exponential"`/`"gamma"`) or skewness (`"stable"`)                  |
| `gamma`      | `float` | $\gamma > 0$            | Scale (required for `"stable"`)                                            |
| `delta`      | `float` | $\delta \in \mathbb{R}$ | Location (required for `"stable"`)                                         |

| `phi_x_type`    | Required kwargs                   | Constraints                              | $\phi_X(u)$                                 | PDF support           |
| :-------------- | :-------------------------------- | :--------------------------------------- | :------------------------------------------ | :-------------------- |
| `'gaussian'`    | *(none — fixed to $N(0,1)$)*      | —                                        | $e^{-u^2/2}$                                | $(-\infty,\, \infty)$ |
| `'exponential'` | `beta`                            | $\beta > 0$                              | $\beta\,/\,(\beta - iu)$                    | $[0,\, \infty)$       |
| `'gamma'`       | `alpha`, `beta`                   | $\alpha > 0$, $\beta > 0$                | $\bigl(\beta\,/\,(\beta - iu)\bigr)^\alpha$ | $[0,\, \infty)$       |
| `'stable'`      | `alpha`, `beta`, `gamma`, `delta` | $\alpha \in (0, 2]$, $\beta \in [-1, 1]$ | $\phi_{S(\alpha,\beta,\gamma,\delta)}(u)$   | $(-\infty,\, \infty)$ |

```python theme={null}
data_loading_gate = haiqu.distribution_loading(
    distribution_name="compound_poisson_cf",
    num_qubits=8,
    interval_start=-3, interval_end=3,
    lam=2.0,
    phi_x_type="gamma",
    **kwargs
).result()
```

<Tip>
  * **Model selection**: Start with `heston_cf` for equity derivatives; extend to `bates_cf` or `dps_cf` if short-maturity skew or volatility jumps are under-fitted.
  * **Fidelity**: circuit fidelity depends on `num_qubits` and the fraction of PDF mass within `[interval_start, interval_end]` — increase `num_qubits` or widen the interval to improve it.
  * **SciPy distributions**: For standard distributions (Normal, Beta, Gamma, …) use [Distribution Loading](/core_features/data_loading_dist) instead.
</Tip>
