Logo Lanfrica

Marzuq-sci/Africa-Quantum-Revolution

Domain:

environment and energy

Record type:

project
Creator:
Mar
Host:
# Q‑Energic: Quantum‑Inspired Microgrid Optimization using Variational Neural Annealing This repository contains the code and figures for two papers that apply **Variational Neural Annealing (VNA)** to microgrid site selection: 1. **Pan‑African Microgrid Optimization** – continental‑scale formulation with 5,000 candidate clusters. 2. **Ethiopian NEP 2.0 Case Study** – a 50‑site national electrification problem, including the “Price of Equity” analysis. The VNA framework uses an autoregressive neural network to simulate quantum annealing, escaping local minima and achieving ground states that classical heuristics cannot reach. --- ## 📚 Theoretical Background ### From Ising Models to QUBO The Ising model is the language of both classical optimization and quantum computing: $$ H = -\sum_{\langle i,j\rangle} J_{ij} \sigma_i \sigma_j - \sum_i h_i \sigma_i $$ A QUBO problem is an equivalent formulation with binary variables $x_i \in \{0,1\}$: $$ E(\mathbf{x}) = \mathbf{x}^T Q \mathbf{x} $$ Constraints become quadratic penalties. ### Variational Neural Annealing (VNA) VNA replaces the physical quantum annealing process with an autoregressive neural network $p_\theta(x)$. It minimizes the variational free energy: $$ F(\theta,\beta) = \mathbb{E}_{x\sim p_\theta}[E(x)] - \frac{1}{\beta} H(p_\theta) $$ As $\beta \to \infty$, the network converges to the ground state. The RNN structure enables exact sampling and power‑law convergence, bypassing the logarithmic plateaus of simulated annealing. --- ## 🔬 Pan‑African Microgrid Optimization We consider a set of 5,000 candidate microgrid clusters across Africa. Each site has: - construction cost $C_i$, - population served $P_i$, - energy generation capacity $E_i$ (TWh/day). Given a total budget $B$ and a target population $M$, the QUBO objective is: $$ \begin{aligned} Q(x) = &\sum_i C_i x_i - \alpha \sum_i P_i x_i - \gamma \sum_i E_i x_i \\ &+ \theta \left(\sum_i C_i x_i - B\right)^2 + \lambda \left(M - \sum_i P_i x …

Languages