# ottomp/wind-forecasting-quantum architecture

> Architecture diagram of the GitHub repository ottomp/wind-forecasting-quantum, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ottomp/wind-forecasting-quantum
- Repository: https://github.com/ottomp/wind-forecasting-quantum

## Overview

This is a research codebase for short-horizon multivariate weather forecasting with a quantum neural network, with analysis capabilities documented for comparison against an MLP. The principal workflow prepares weather inputs and multi-hour targets, trains and evaluates forecasts, then reports metrics and prediction plots. The experiment script is the orchestration layer; model, dataset, and statistics modules provide supporting runtime behavior. Some experiment code is omitted, so links to unsampled stages are shown only where the excerpt or README supports them.

Main entry points: [`experiments-public.py`](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py) (Experiment runner), [`utils/models.py`](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py) (Quantum network), [`data/WeatherForcasting_DATA.csv`](https://github.com/ottomp/wind-forecasting-quantum/blob/main/data/WeatherForcasting_DATA.csv) (Weather data), [`utils/circuits.py`](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/circuits.py) (Entangling circuits)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_forecast["Forecast workflow"]
  node_experiment["Experiment runner"]
  node_prepare["Forecast preparation"]
  node_split_scale["Split and scale"]
  node_dataset["Batch dataset<br/>[datasets.py]"]
  node_training["Model training"]
  node_early_stop["Early stopping<br/>[models.py]"]
  node_prediction["Test prediction"]
end

subgraph group_quantum["Quantum model"]
  node_quantum_model["Quantum network<br/>[models.py]"]
  node_quantum_circuit["Quantum circuit<br/>[models.py]"]
  node_classical_head["Classical output<br/>[models.py]"]
  node_circuit_variants["Entangling circuits<br/>[circuits.py]"]
end

subgraph group_evaluation["Evaluation and reporting"]
  node_uncertainty["Error intervals<br/>[statistics.py]"]
  node_metrics["Forecast metrics<br/>[statistics.py]"]
  node_distribution_test["Distribution test<br/>[statistics.py]"]
  node_plots["Forecast plots"]
  node_mlp_baseline["MLP comparison"]
end

subgraph group_research["Research resources"]
  node_weather_data["Weather data"]
  node_analysis_outputs["Analysis outputs"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs"| node_experiment
node_experiment -.->|"loads"| node_weather_data
node_experiment -->|"prepares"| node_prepare
node_weather_data -.->|"supplies inputs"| node_prepare
node_experiment -->|"splits and scales"| node_split_scale
node_experiment -->|"creates datasets"| node_dataset
node_experiment -->|"constructs"| node_quantum_model
node_quantum_model -->|"executes"| node_quantum_circuit
node_quantum_model -->|"projects outputs"| node_classical_head
node_experiment -->|"trains"| node_training
node_training -->|"checks stopping"| node_early_stop
node_experiment -->|"predicts"| node_prediction
node_experiment -->|"computes intervals"| node_uncertainty
node_experiment -->|"analyzes forecasts"| node_metrics
node_experiment -->|"tests distributions"| node_distribution_test
node_experiment -->|"plots forecasts"| node_plots
node_experiment -->|"writes results"| node_analysis_outputs
node_experiment -.->|"compares models"| node_mlp_baseline
node_circuit_variants -.->|"alternative circuits"| node_quantum_model

click node_weather_data "https://github.com/ottomp/wind-forecasting-quantum/blob/main/data/WeatherForcasting_DATA.csv"
click node_experiment "https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py"
click node_prepare "https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py"
click node_split_scale "https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py"
click node_dataset "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/datasets.py"
click node_quantum_model "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py"
click node_quantum_circuit "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py"
click node_classical_head "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py"
click node_circuit_variants "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/circuits.py"
click node_training "https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py"
click node_early_stop "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py"
click node_prediction "https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py"
click node_uncertainty "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/statistics.py"
click node_metrics "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/statistics.py"
click node_distribution_test "https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/statistics.py"
click node_plots "https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py"
click node_analysis_outputs "https://github.com/ottomp/wind-forecasting-quantum/tree/main/analysis"
click node_mlp_baseline "https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_experiment,node_prepare,node_split_scale,node_dataset,node_training,node_early_stop,node_prediction toneBlue
class node_quantum_model,node_quantum_circuit,node_classical_head,node_circuit_variants toneAmber
class node_uncertainty,node_metrics,node_distribution_test,node_plots,node_mlp_baseline toneMint
class node_weather_data,node_analysis_outputs toneRose
class node_researcher toneIndigo
```

## Components

### Forecast workflow

- [Experiment runner](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py): `experiments-public.py`
- [Forecast preparation](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py): `experiments-public.py`
- [Split and scale](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py): `experiments-public.py`
- [Batch dataset](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/datasets.py): `utils/datasets.py`
- [Model training](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py): `experiments-public.py`
- [Early stopping](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py): `utils/models.py`
- [Test prediction](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py): `experiments-public.py`

### Quantum model

- [Quantum network](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py): `utils/models.py`
- [Quantum circuit](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py): `utils/models.py`
- [Classical output](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/models.py): `utils/models.py`
- [Entangling circuits](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/circuits.py): `utils/circuits.py`

### Evaluation and reporting

- [Error intervals](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/statistics.py): `utils/statistics.py`
- [Forecast metrics](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/statistics.py): `utils/statistics.py`
- [Distribution test](https://github.com/ottomp/wind-forecasting-quantum/blob/main/utils/statistics.py): `utils/statistics.py`
- [Forecast plots](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py): `experiments-public.py`
- [MLP comparison](https://github.com/ottomp/wind-forecasting-quantum/blob/main/experiments-public.py): `experiments-public.py`

### Research resources

- [Weather data](https://github.com/ottomp/wind-forecasting-quantum/blob/main/data/WeatherForcasting_DATA.csv): `data/WeatherForcasting_DATA.csv`
- [Analysis outputs](https://github.com/ottomp/wind-forecasting-quantum/tree/main/analysis): `analysis`

### Other components

- **Researcher**

## Connections

- Researcher → Experiment runner: runs (evidence: `README.md`)
- Experiment runner → Weather data: loads
- Experiment runner → Forecast preparation: prepares (evidence: `experiments-public.py`)
- Weather data → Forecast preparation: supplies inputs
- Experiment runner → Split and scale: splits and scales (evidence: `experiments-public.py`)
- Experiment runner → Batch dataset: creates datasets (evidence: `experiments-public.py`)
- Experiment runner → Quantum network: constructs (evidence: `experiments-public.py`)
- Quantum network → Quantum circuit: executes (evidence: `utils/models.py`)
- Quantum network → Classical output: projects outputs (evidence: `utils/models.py`)
- Experiment runner → Model training: trains (evidence: `experiments-public.py`)
- Model training → Early stopping: checks stopping (evidence: `experiments-public.py`)
- Experiment runner → Test prediction: predicts (evidence: `experiments-public.py`)
- Experiment runner → Error intervals: computes intervals (evidence: `experiments-public.py`)
- Experiment runner → Forecast metrics: analyzes forecasts (evidence: `experiments-public.py`)
- Experiment runner → Distribution test: tests distributions (evidence: `experiments-public.py`)
- Experiment runner → Forecast plots: plots forecasts (evidence: `experiments-public.py`)
- Experiment runner → Analysis outputs: writes results (evidence: `experiments-public.py`)
- Experiment runner → MLP comparison: compares models (evidence: `README.md`)
- Entangling circuits → Quantum network: alternative circuits
