qilisdk.ml.datasets.santa_fe_laser
Classes
Santa Fe laser time series (equation-based version). |
Module Contents
- class SantaFeLaser(*, sigma: float = 10.0, rho: float = 28.0, beta: float = 8.0 / 3.0, initial_state: tuple[float, float, float] = (1.0, 1.0, 1.0), dt: float = 0.01, sample_every: int = 5, washout: int = 1000, horizon: int = 1, seed: int | None = None)[font]
Bases:
qilisdk.ml.datasets.dataset.DatasetSanta Fe laser time series (equation-based version).
The original Santa Fe Time Series Competition Data Set A is a recording of the chaotic intensity pulsations of a far-infrared \(\mathrm{NH_3}\) laser. To instead generate this data on the fly rather than just using points points, this class reproduces the same qualitative dynamics from first principles using the single-mode Lorenz–Haken laser equations:
\[\dot{E} = \sigma (P - E), \quad \dot{P} = E (\rho - N) - P, \quad \dot{N} = E P - \beta N,\]where \(E\) is the field amplitude, \(P\) the polarization and \(N\) the population inversion. The measured quantity is the laser intensity \(I \propto E^2\), which reproduces the behaviour of the Santa Fe recording.
Configure a Santa Fe laser generator.
- Paràmetres:
sigma (
float) – Field relaxation rate \(\sigma\). Defaults to10.0.rho (
float) – Pump parameter \(\rho\). Defaults to28.0.beta (
float) – Inversion relaxation rate \(\beta\). Defaults to8/3.initial_state (
tuple[float,float,float]) – Initial(E, P, N)state. Defaults to(1.0, 1.0, 1.0).dt (
float) – Internal integration step. Defaults to0.01.sample_every (
int) – Sub-sampling stride. Defaults to5.washout (
int) – Integration steps discarded as transient. Defaults to1000.horizon (
int) – Prediction horizon in sampled steps. Defaults to1.seed (
int | None) – Unused; the system is deterministic. Defaults toNone.
- Llença:
ValueError – If
dtorsample_everyis not positive.
- generate(npoints: int) qilisdk.ml.datasets.dataset.DatasetSample[font]
Integrate the laser equations and build an intensity prediction sample.
This produces a single time series of length
npoints + horizon, discarding the firstwashoutsteps, and then sub-sampling everysample_every` steps. The resulting series is split into ``inputsandtargets, wheretargetsis the same series shifted forward byhorizon.- Paràmetres:
npoints (
int) – Number of time steps to produce.- Retorna:
- The DataSetSample containing the inputs and targets.
The output is a
horizon-step-ahead prediction task, so bothinputsandtargetsare shaped(npoints, 1).
- Tipus de retorn:
- Llença:
ValueError – If
npointsis not positive.