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 ϕ(u)=E[eiuX] because their PDF has no closed form or is analytically intractable.Load the PDF of any supported distribution via its characteristic function using:
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 AJD (Affine Jump-Diffusion) branch models logST as Heston stochastic volatility with optional independent jump sources. dps_cf is the most general model; all others are obtained by zeroing parameters.
Name in SDK:heston_cf | Citation:Heston (1993) | PDF support:(−∞,∞)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.ϕ(u)=exp(iulogS0+C(u)+D(u)v0)The Riccati coefficients C and D are solved in the numerically stable form of Albrecher et al. (2007). Define the intermediate quantitiesξ=κ−ρσiu,d=ξ2+σ2(u2+iu),g=ξ+dξ−dthenC(u)=(r−q)iuT+σ2κθ[(ξ−d)T−2ln1−g1−ge−dT]D(u)=σ2ξ−d⋅1−ge−dT1−e−dTC captures the cumulative drift and mean-reversion cost over [0,T]; D is the sensitivity of the log-CF to the current variance v0, decaying toward zero as the variance mean-reverts to θ.
Parameter
Type
Constraints
Description
S0
float
S0>0
Spot price
v0
float
v0>0
Initial variance
T
float
T>0
Time to maturity in years
r
float
r∈R
Risk-free rate
q
float
q∈R
Continuous dividend yield
kappa
float
κ>0
Mean-reversion rate
theta
float
θ>0
Long-term variance
sigma
float
σ>0
Volatility-of-volatility
rho
float
ρ∈(−1,1)
Asset–variance correlation
The Feller condition 2κθ>σ2 ensures the variance process vt remains strictly positive. If violated, vt can hit zero and the characteristic function may become numerically unreliable.
Name in SDK:bates_cf | Citation:Bates (1996) | PDF support:(−∞,∞)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.ϕBates(u)=ϕHeston(u)⋅exp(λT(eiuμj−21σj2u2−1−iuμˉ))where μˉ=eμj+21σj2−1 is the martingale drift correction that keeps e(r−q)TS0 as the forward price.Additional parameters (inherits all Heston parameters):
Name in SDK:svjj_cf | Citation:Duffie, Pan & Singleton (2003), Eraker (2003) | PDF support:(−∞,∞)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.ϕSVJJ(u)=ϕBates(u)⋅exp(cvj)where D(u,s) is the Heston D coefficient evaluated at remaining time s rather than the full maturity T:D(u,s)=σ2ξ−d⋅1−ge−ds1−e−dsThe variance-jump contribution integrates the moment-generating function of an exponential jump against this time-varying coefficient:cvj=λv∫0T[1−μvD(u,s)1−1]dsThe integrand is the CGF of one exponential(1/μv) variance jump evaluated at D(u,s); the integral is evaluated in closed form.Additional parameters (inherits all Bates parameters):
Name in SDK:dps_cf | Citation:Duffie, Pan & Singleton (2003) | PDF support:(−∞,∞)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.ϕDPS(u)=ϕSVJJ(u)⋅exp(ccorr)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 JS∣Jv∼N(μj+ρjJv,σj2) and a variance jump Jv∼Exp(1/μv):ccorr=λc∫0T[c−μvD(u,s)K−1−iuμˉc]dswith K=eiuμj−21σj2u2, c=1−μviuρj, and μˉc=eμj+21σj2/(1−ρjμv)−1. The integral is evaluated in closed form.Additional parameters (inherits all SVJJ parameters):
Parameter
Type
Constraints
Description
lam_c
float
λc≥0
Correlated jump intensity
rho_j
float
ρj∈R
Sensitivity of mean price jump to variance jump size
Name in SDK:bns_cf | Citation:Barndorff-Nielsen & Shephard (2001) | PDF support:(−∞,∞)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.ϕ(u)=exp(iulogS0+iu(r−q)T+A(u)+B(u)σ02)Here u∈R is the Fourier argument, i.e. ϕ(u)=E[eiulogST].B(u,s) — sensitivity to the initial variance σ02, obtained by integrating the OU impulse-response function against the standard risk-neutral price–variance loading (β=−21 baked in). Here s is the remaining time, so B(u,s) evaluated at s=T gives the full-horizon coefficient:B(u,s)=−2λu2+iu(1−e−λs)As s→∞, B→−(u2+iu)/(2λ); the initial variance is “forgotten” at rate λ.A(u) — cumulative contribution from the subordinator’s Lévy measure, obtained by integrating the log-Laplace exponent ΨZ of the subordinator along the shifted B-curve:A(u)=∫0TΨZ(B(u,s)+iuρ)dsThe additive iuρ inside ΨZ is the direct jump leverage: it correlates price jumps with variance jumps instantaneously. Set ρ=0 to disable this channel. The Lévy time-change factor λ 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:ΨZ(θ)=−aln(1−bθ)This integral has no closed form in general and is evaluated by numerical quadrature (controlled by parameter n).
Parameter
Type
Constraints
Description
S0
float
S0>0
Initial asset price
sigma0_sq
float
σ02>0
Initial variance σ2(0)
T
float
T>0
Time to maturity
r
float
r∈R
Risk-free rate
q
float
q∈R
Dividend yield
lam
float
λ>0
OU mean-reversion rate
rho
float
ρ∈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 λ time-change factor from the paper)
Name in SDK:cgmy_cf | Citation:Carr, Geman, Madan & Yor (2002) | PDF support:(−∞,∞)A four-parameter pure-jump Lévy model that nests Variance Gamma (Y→0) and approaches Brownian motion as Y→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.ϕ(u)=exp(CΓ(−Y)[(M−iu)Y−MY+(G+iu)Y−GY])
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∈(0,2), not integer
Order of asset activity
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()
cgmy_cf raises ValueError if Y is outside (0,2) or is an integer (pole of Γ(−Y)).
Name in SDK:variance_gamma_cf | Citation:Madan, Carr & Chang (1998) | PDF support:(−∞,∞)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.ϕ(u)=(1−iθνu+21σ2νu2)−1/ν
Name in SDK:meixner_cf | Citation:Schoutens (2001) | PDF support:(−∞,∞)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.ϕ(u)=eiμu(cosh(2αu−iβ)cos(β/2))2δ
Parameter
Type
Constraints
Description
alpha
float
α>0
Scale
beta
float
β∈(−π,π)
Skewness
delta
float
δ>0
Shape
mu
float
μ∈R
Location shift (default 0)
meixner_cf raises ValueError if beta is outside (−π,π).
Name in SDK:holtsmark_cf | Citation:Holtsmark (1919) | PDF support:(−∞,∞)Special case S(3/2,0,γ,δ). 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.ϕ(u)=exp(iuδ−γ3/2∣u∣3/2)Parameters (alpha=1.5, beta=0 fixed):
Name in SDK:landau_cf | Citation:Bulyak (2022) | PDF support:(−∞,∞)Special case S(1,1,γ,δ) — 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.ϕ(u)=exp(iuδ−γ∣u∣[1+iπ2sgn(u)ln∣u∣])Parameters (alpha=1, beta=1 fixed):
Name in SDK:linnik_cf | Citation:Klebanov (1985) | PDF support:(−∞,∞)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 ϕ(u)=(1+∣u∣α)−1.ϕ(u)=1−Ψstable(u)1where Ψstable(u)=lnϕstable(u) is the Lévy exponent of the underlying stable distribution (not the stable CF itself).
Name in SDK:bilateral_gamma_cf | Citation:Küchler & Tappe (2019) | PDF support:(−∞,∞)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.ϕ(u)=(b+−iub+)a+(b−+iub−)a−
Name in SDK:compound_poisson_cf | Citation:Gao (2022) | 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.ϕ(u)=exp(λ(ϕX(u)−1))
Parameter
Type
Constraints
Description
lam
float
λ>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")
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 instead.