projects
- Constraint Satisfaction Solver
A from-scratch constraint-satisfaction engine in Java and Spring Boot, exposed over a REST API. Backtracking search with AC-3 preprocessing, forward checking, and pluggable variable-ordering heuristics (MRV, degree, conflict-directed Dom/WDeg). Models N-Queens, Sudoku, and graph coloring over a generic constraint framework, with a min-conflicts local-search path that places 1,000 queens in about 15 ms and a live search visualization streamed over WebSockets.
- Quantum Circuit Simulator
A quantum circuit simulator built from scratch on NumPy, with a state-vector and density-matrix engine that uses no Qiskit, cross-verified against Qiskit to 1e-9 fidelity across every gate and 30 randomized circuits. FastAPI backend, React and Three.js frontend with a drag-and-drop circuit builder, Bloch sphere, and live histograms. Implements Grover, Deutsch-Jozsa, teleportation, QFT, phase estimation, VQE for the H2 ground state, QAOA, and error-correcting codes. A tensor-contraction gate kernel took one 10-qubit gate layer from 18.8 s to 2 ms.
- Programming Language Compiler (Bagl)
A compiler in OCaml for Bagl, a statically-typed functional language with first-class tensors and automatic differentiation. Handwritten lexer, recursive-descent parser, and Hindley-Milner type inference (union-find unification, level-based let-polymorphism) extended with a static tensor-shape type system that catches dimension mismatches at compile time. grad rewrites scalar functions into derivatives and tensor losses into reverse-mode gradients before inference, so a gradient-descent model trains entirely in the language, shape-checked end to end. Lowers to a control-flow-graph IR with optimization passes, a bytecode VM, a language server for editor diagnostics, and the whole compiler built to 147 KB of JavaScript for the in-browser playground.
- Enterprise Document Management System
Full-stack desktop + web app for managing official government correspondence. Built with .NET 9 (ASP.NET Core API, Blazor Server, Avalonia desktop client), SQLite, and JWT auth. Features multi-stage document workflows, Arabic OCR via a 2B-parameter vision-language model (Qari), digital signatures, full-text search, and bilingual Arabic/English support with RTL layout. Runs entirely on LAN with no cloud dependency.