Software Portfolio
AI-QuantumMechanic
The source code is available on GitHub.
AI-QuantumMechanic is a prototype LLM agent that solves graduate-level quantum mechanics problems through tool orchestration rather than memorization. Instead of generating equations directly, the agent delegates every symbolic and numerical computation to verified tools and references results through opaque registry keys it cannot forge, ensuring a verifiable chain of provenance for each derivation step.
Architecture:
- Three-node LangGraph state machine powered by Anthropic's Claude Sonnet: reasoning → tool execution → validation.
- The reasoning node decides whether to invoke a tool or present a final answer; the tool execution node dispatches to the appropriate handler; the checker node validates the result and provides feedback for retries if needed.
Tool Suite (20+ operations):
- Symbolic math (SymPy): algebra, calculus, ODE solving with automatic boundary-condition handling, quantum operators, Fourier transforms, and special-function evaluation.
- Numerical compute (SciPy/NumPy): root finding, ODE integration with automatic higher-order-to-first-order system decomposition, quadrature, and wavefunction normalization.
- Equation catalog: a read-only reference of standard physics equations whose raw expressions are hidden from the LLM and accessible only through tool calls.
- Plotting: Matplotlib-based generation of publication-quality wavefunction and probability-density figures.
Anti-Hallucination Mechanism:
- Every tool result is stored in a dual registry (symbolic expressions and numerical arrays) under opaque, auto-incrementing keys. The agent must reference these keys—not raw formulas—when calling subsequent tools.
- A strict input validator rejects any compound expression the LLM tries to inject directly, guaranteeing that every expression in the derivation has a verifiable computational origin.
Validation System:
- Expression sourcing: verifies that every mathematical expression in the final answer traces back to a tool result.
- Normalization: confirms wavefunctions satisfy ∫|ψ|² = 1 across multiple coordinate systems.
- Physical sanity: checks energy signs, probability non-negativity, and energy-level ordering.
Demonstrated Capabilities:
- Infinite square well — fully analytical solution with boundary conditions and normalization.
- Quantum harmonic oscillator — analytical solution with special functions and quantization conditions.
- Finite square well — hybrid analytical/numerical approach with boundary matching and numerical integration.
Technologies: LangGraph, Anthropic SDK (Claude Sonnet), SymPy, SciPy, NumPy, Matplotlib, pytest.
AI-Risk
The source code is available on GitHub, and the trained model weights are on Hugging Face.
AI-Risk is an end-to-end machine learning pipeline that fine-tunes Qwen 2.5 7B Instruct to play the strategic board game Risk. Rather than relying on hand-crafted heuristics, the model learns to make strategic decisions about troop reinforcement and attack selection, outputting structured JSON responses preceded by chain-of-thought reasoning.
Training Pipeline:
- Data collection: ~27,000 turn entries generated from 1,000 games (500 BetterAI + 500 ChronAI heuristic agents) via the PyRisk game engine.
- Supervised fine-tuning (SFT): 200 steps with QLoRA (4-bit NF4 quantization), learning rate 2e-5, teaching the model correct JSON formatting and basic strategy.
- GRPO reinforcement learning: two rounds of Group Relative Policy Optimization (50 steps each, up to 8 generations per prompt) with a custom reward function weighting 25% format correctness and 75% strategic quality.
Reward Function:
- Reinforcement scoring: JSON validity, troop concentration penalties, border-territory preference, and continent-completion incentives.
- Attack scoring: JSON validity, index-range validation, troop-ratio quality assessment, activity bonuses, and continent-targeting rewards.
Results (20-game benchmark against two StupidAI opponents, where StupidAI is a PyRisk baseline bot that makes entirely random moves with no strategy):
- Gemini Flash Lite (zero-shot): 0% win rate, 1% fallback rate, 0.777 average reward.
- Qwen base (no fine-tuning): 5% win rate, 14% fallback rate, 0.774 average reward.
- Qwen SFT: 15% win rate, 5% fallback rate, 0.813 average reward.
- Qwen GRPO v2: 30% win rate, 7% fallback rate, 0.796 average reward.
- Qwen GRPO v3 (final): 30% win rate, 5% fallback rate, 0.813 average reward.
Technologies: Transformers, TRL (GRPO), PEFT/QLoRA, bitsandbytes, PyRisk, Weights & Biases, Google Colab (H100 GPU).
FlavorBuilder
The package is available on PyPI and GitHub.
FlavorBuilder is a unified Python framework for model building with finite flavor symmetries in particle physics. It integrates group-theory computations via GAP with model-building tools for constructing and analyzing flavor models. This package serves as a core component supporting our work in arXiv:2506.08080 [hep-ph]. It contains the subpackages PyDiscrete and Model2Mass.
PyDiscrete is a Python reimplementation of the Mathematica package Discrete that enables group-theory computations via GAP. It extracts group properties and character tables, and computes Kronecker products and Clebsch–Gordan coefficients. See the tutorial notebook
TutorialPyDiscrete.ipynbincluded in the GitHub repository for more details.Model2Mass provides symbolic and numerical tools for constructing Lagrangians, deriving mass matrices, and computing phenomenologically relevant quantities for BSM flavor models with finite flavor symmetry.
References and Citations:
1. GAP library: The GAP Group. GAP – Groups, Algorithms, and Programming, Version 4.14.0, https://www.gap-system.org (2024).
2. Discrete: Mathematica Discrete by Martin Holthausen and Michael A. Schmidt, arXiv:1111.1730.
3. FlavorPy: A. Baur, "FlavorPy", Zenodo, 2024, doi: 10.5281/zenodo.11060597.
4. NuFit data: If you use the NuFit experimental data in FlavorPy, please also cite:
I. Esteban, M. C. González-García, M. Maltoni, T. Schwetz, and A. Zhou, The fate of hints: updated global analysis of three-flavor neutrino oscillations, JHEP 09 (2020), 178, arXiv:2007.14792 [hep-ph], https://www.nu-fit.org.
5. Our work: J. B. Baretz, M. Fieg, V. Ganesh, A. Ghosh, V. Knapp-Perez, J. Rudolph, and D. Whiteson, Towards AI-assisted Neutrino Flavor Theory Design, arXiv:2506.08080 [hep-ph].Credit: The PyDiscrete subpackage is partly a Python translation of the Mathematica package Discrete by Martin Holthausen and Michael A. Schmidt.
