qilisdk.ml.datasets.santa_fe_laser

Classes

SantaFeLaser

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.Dataset

Santa 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 to 10.0.

  • rho (float) – Pump parameter \(\rho\). Defaults to 28.0.

  • beta (float) – Inversion relaxation rate \(\beta\). Defaults to 8/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 to 0.01.

  • sample_every (int) – Sub-sampling stride. Defaults to 5.

  • washout (int) – Integration steps discarded as transient. Defaults to 1000.

  • horizon (int) – Prediction horizon in sampled steps. Defaults to 1.

  • seed (int | None) – Unused; the system is deterministic. Defaults to None.

Llença:

ValueError – If dt or sample_every is 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 first washout steps, and then sub-sampling every sample_every` steps. The resulting series is split into ``inputs and targets, where targets is the same series shifted forward by horizon.

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 both inputs and targets are shaped (npoints, 1).

Tipus de retorn:

DatasetSample

Llença:

ValueError – If npoints is not positive.