# sunilgentyala/qnhs-research-2026 architecture

> Architecture diagram of the GitHub repository sunilgentyala/qnhs-research-2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sunilgentyala/qnhs-research-2026
- Repository: https://github.com/sunilgentyala/qnhs-research-2026

## Overview

QNHS is a research simulation suite evaluating a proposed quantum-neuromorphic hardware substrate, not a deployed device or application. The main workflow runs the energy, Q-STDP, MTJ-device and surface-code models and reports projected metrics; extended experiments add noisy state preparation, network learning, uncertainty and security studies. The README documents further experiment capabilities that are visible in the tree but whose implementation or wiring was not sampled, so those are represented without speculative call chains.

Main entry points: [`run_all_simulations.py`](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/run_all_simulations.py) (Core runner), [`run_extended_experiments.py`](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/run_extended_experiments.py) (Extended runner), [`simulations/network_learning.py`](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/network_learning.py) (Network learning), [`simulations/energy_model.py`](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/energy_model.py) (Event energy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Simulation workflows"]
  node_main_runner["Core runner"]
  node_extended_runner["Extended runner"]
  node_results["Extended results"]
end

subgraph group_learning["Quantum learning"]
  node_qstdp["Q-STDP synapse"]
  node_network["Network learning"]
  node_reprep["Noisy re-preparation<br/>[reprep_noise.py]"]
  node_coherent["Coherent hold<br/>[coherent_hold.py]"]
  node_poisoning["Poisoning study<br/>[poisoning.py]"]
end

subgraph group_hardware["Device and energy"]
  node_mtj["MTJ device"]
  node_energy["Event energy<br/>[energy_model.py]"]
  node_uncertainty["Energy uncertainty"]
  node_sampling["Sampling pool<br/>[sampling_pool.py]"]
end

subgraph group_analysis["Reliability and security"]
  node_surface["Surface code"]
  node_trng["MTJ random generation<br/>[mtj_trng.py]"]
  node_threat["Threat model<br/>[threat_model.md]"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs"| node_main_runner
node_researcher -->|"runs"| node_extended_runner
node_main_runner -->|"runs model"| node_energy
node_main_runner -->|"simulates learning"| node_qstdp
node_main_runner -->|"runs model"| node_mtj
node_main_runner -->|"runs analysis"| node_surface
node_extended_runner -->|"evaluates noise"| node_reprep
node_extended_runner -->|"runs networks"| node_network
node_extended_runner -->|"samples energy"| node_uncertainty
node_extended_runner -->|"writes results"| node_results
node_network -->|"uses distributions"| node_reprep
node_energy -->|"uses device parameters"| node_mtj

click node_main_runner "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/run_all_simulations.py"
click node_extended_runner "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/run_extended_experiments.py"
click node_results "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/results/extended_results.json"
click node_qstdp "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/qstdp_simulation.py"
click node_network "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/network_learning.py"
click node_reprep "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/reprep_noise.py"
click node_coherent "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/coherent_hold.py"
click node_poisoning "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/poisoning.py"
click node_mtj "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/mtj_resistance_model.py"
click node_energy "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/energy_model.py"
click node_uncertainty "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/energy_uncertainty.py"
click node_sampling "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/sampling_pool.py"
click node_surface "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/surface_code_analysis.py"
click node_trng "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/mtj_trng.py"
click node_threat "https://github.com/sunilgentyala/qnhs-research-2026/blob/main/security/threat_model.md"

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_main_runner,node_extended_runner,node_results toneBlue
class node_qstdp,node_network,node_reprep,node_coherent,node_poisoning toneAmber
class node_mtj,node_energy,node_uncertainty,node_sampling toneMint
class node_surface,node_trng,node_threat toneRose
class node_researcher toneIndigo
```

## Components

### Simulation workflows

- [Core runner](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/run_all_simulations.py): `run_all_simulations.py`
- [Extended runner](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/run_extended_experiments.py): `run_extended_experiments.py`
- [Extended results](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/results/extended_results.json): `results/extended_results.json`

### Quantum learning

- [Q-STDP synapse](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/qstdp_simulation.py): `simulations/qstdp_simulation.py`
- [Network learning](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/network_learning.py): `simulations/network_learning.py`
- [Noisy re-preparation](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/reprep_noise.py): `simulations/reprep_noise.py`
- [Coherent hold](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/coherent_hold.py): `simulations/coherent_hold.py`
- [Poisoning study](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/poisoning.py): `simulations/poisoning.py`

### Device and energy

- [MTJ device](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/mtj_resistance_model.py): `simulations/mtj_resistance_model.py`
- [Event energy](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/energy_model.py): `simulations/energy_model.py`
- [Energy uncertainty](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/energy_uncertainty.py): `simulations/energy_uncertainty.py`
- [Sampling pool](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/sampling_pool.py): `simulations/sampling_pool.py`

### Reliability and security

- [Surface code](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/surface_code_analysis.py): `simulations/surface_code_analysis.py`
- [MTJ random generation](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/simulations/mtj_trng.py): `simulations/mtj_trng.py`
- [Threat model](https://github.com/sunilgentyala/qnhs-research-2026/blob/main/security/threat_model.md): `security/threat_model.md`

### Other components

- **Researcher**

## Connections

- Researcher → Core runner: runs
- Researcher → Extended runner: runs
- Core runner → Event energy: runs model
- Core runner → Q-STDP synapse: simulates learning
- Core runner → MTJ device: runs model
- Core runner → Surface code: runs analysis
- Extended runner → Noisy re-preparation: evaluates noise
- Extended runner → Network learning: runs networks
- Extended runner → Energy uncertainty: samples energy
- Extended runner → Extended results: writes results
- Network learning → Noisy re-preparation: uses distributions
- Event energy → MTJ device: uses device parameters
