A Verified Differentiable NEGF Stack for Quantum-Transport Device Inverse Design
Shreyus Goutham Kumar — Quantum and Nano Devices (QuaNaD) Laboratory, Department of Electronics and Communication Engineering, PES University – Electronic City Campus, Bengaluru, India ORCID 0000-0002-4713-5362
This repository contains everything needed to reproduce every figure, table and numerical claim in the manuscript. It is the aggregator: the two component codebases are included as git submodules, pinned at the exact commits used for the submitted results.
The NEGF formalism answers "here is a device, what does it do?". Design needs the opposite: "here is the behaviour I want, what device gives it?" This work makes a self-consistent NEGF solver differentiable so that gradient descent can answer the inverse question — and then refuses to take the optimiser's word for anything. Every design is re-graded by an independently validated classical solver, and every number printed in the paper is asserted by a script against archived campaign data.
git clone --recursive https://github.com/QuaNaD-Lab-PESU/diff-negf-journal.git
cd diff-negf-journal
pip install -r requirements.txt
python verify/check_claims.pyThat last command re-derives the paper's headline numbers from committed data and fails loudly if any of them has drifted. It takes about a minute.
If you cloned without --recursive, the components/ directories will be
empty. Fix with git submodule update --init --recursive.
diff-negf-journal/
├── paper/ manuscript source, figures, compiled PDF
├── verify/check_claims.py single entry point: runs all verification steps
├── requirements.txt four third-party packages, nothing exotic
└── components/
├── diff-negf/ Layer I — coherent transport, verified + differentiable
└── diff-negf-synaptic/ Layer II — self-consistent Poisson–NEGF, synaptic design
Each component carries its own src/, data/ (archived campaign results),
figures/, and a src/verify.py that asserts that component's claims.
verify/check_claims.py runs each component's verify.py, then checks that
every claim made in the paper is covered by at least one executed step. Claims
are keyed to manuscript sections, so a reviewer can go from a number on the page
to the assertion that guards it.
python verify/check_claims.py --list # every claim, its section, its owning step
python verify/check_claims.py --quiet # run everything, print only the verdictExpected result: all steps pass, and every claim checkable on the platform is
asserted. One claim — the Kwant cross-check — is reported as SKIPPED on Windows,
because Kwant has no Windows wheel (see Reproducing the Kwant cross-check).
On a clean clone in a fresh virtual environment this reports
7 steps ok, 1 skipped, 0 failed; 17/18 manuscript claims asserted.
The component-level verify.py scripts also regenerate every figure from
committed data, so a mismatch between a plotted figure and the archived numbers
cannot survive a verification run.
The rule enforced throughout: no link in the chain is asserted. Forward accuracy is measured against closed-form solutions and independent solvers; derivatives are measured against finite differences; surrogate generalisation is measured on splits deliberately built to be out-of-family; and designs are graded by a solver that took no part in producing them. Where a check could not be run, it is reported as skipped rather than quietly dropped.
The core stack is deliberately small:
numpy>=1.24 matplotlib>=3.7 torch>=2.0 cma>=3.3
Verified in a clean interpreter with nothing else installed. SciPy is not required. Two studies need separate environments, both isolated on purpose:
Toolkit cross-check (AIHWKit). The published wheel has a binary
compatibility defect: it declares torch>=2.9.1 but requires symbols
introduced in 2.10, and silently misreads tensor metadata under torch>=2.13.
The verified working pin is
aihwkit==1.1.0 torch==2.12.0 torchvision==0.27.0
There are no Windows wheels; use Linux or Colab. The notebook used for the
paper's results, including its executed copy with outputs, is in
components/diff-negf-synaptic/src/.
Kwant cross-check. Kwant requires conda and numpy<2, so it does not
coexist with the main environment. Create a separate conda env, or use the
hosted notebook. check_claims.py reports this claim as SKIPPED rather than
passing it silently.
Verification (~1 minute) checks archived results. Regenerating those results
from scratch takes longer — the self-consistent campaigns and the dephasing
sweep are minutes each, the inverse-design campaigns longer. Each component's
src/ contains the campaign scripts, named by the gap they close (s1_, s3_,
s4_, s6_, …); every one writes its output into data/ in the same format
the verifier reads.
Two notes for anyone re-running:
- The self-consistent fixed point is mildly environment-sensitive. The Anderson mixing path depends on the host LAPACK, and this system admits nearby fixed points, so a from-scratch run can differ from the archived potentials at the few-tenths-of-a-percent level. The physics conclusions are insensitive to this: the dephasing study reproduces to four printed digits across machines despite a 0.28 % spread in the underlying potentials. Verification tolerances are set accordingly and documented at the assertion.
- Campaign scripts are the slow path by design. Nothing in the fast verification route depends on re-running them.
If you use this code, please cite the archived release: 10.5281/zenodo.21923107
The Layer I codebase has its own DOI: 10.5281/zenodo.21510020
MIT — see LICENSE. Manuscript text and figures are the author's;
the code is free for reuse with attribution.
Shreyus Goutham Kumar — shreyasgouatham@pes.edu