Download README.md from shanto268/PlanarCapacitanceModel: direct link, hf CLI and curl.
- Browser
- Download file 7.05 kB
-
https://huggingface.co/spaces/shanto268/PlanarCapacitanceModel/resolve/refs%2Fpr%2F1/README.md
- Command line
-
hf download hf://spaces/shanto268/PlanarCapacitanceModel@refs/pr/1/README.md
-
curl -L -o README.md https://huggingface.co/spaces/shanto268/PlanarCapacitanceModel/resolve/refs%2Fpr%2F1/README.md
title: Planar Capacitance Model
emoji: 🔌
colorFrom: blue
colorTo: gray
sdk: docker
app_port: 7860
app_file: app.py
pinned: false
short_description: 'Maxwell capacitance of planar layouts: QCap models'
hf_oauth: true
thumbnail: >-
https://huggingface.co/spaces/shanto268/PlanarCapacitanceModel/resolve/main/assets/qcap_og.png
Planar Capacitance Model
The model of our paper QCap: a physics-corrected graph neural network for the capacitance matrix of any planar superconducting device layout, trained on all 45,771 designs of our Q3D dataset, the test designs included. Upload a GDS layout and get the full Maxwell capacitance matrix of every conductor in it. Because the model has seen the test designs, it has no held-out score of its own. Its held-out accuracy, from the same model trained without the test designs, is in the paper.
- Paper docsite: lfl-lab.github.io/SQuADDS/qcap, with the explainer videos and the tutorials
- Paper: lfl-lab.github.io/SQuADDS/ml-paper/paper
- Code: github.com/LFL-Lab/SQuADDS
- Data: Q3D dataset and synthetic dataset, part of the SQuADDS datasets
- Models: QCap models (QCap, QCap-Lite and QCap-Fast), part of the SQuADDS models
- API: SQuADDS ML inference API
- Point of contact: Sadman Ahmed Shanto
How to use it
- Try a bundled example, or sign in with Hugging Face and upload your own GDS file.
- Pick the ground layer and the conductor layer (1/0 and 1/10 by default). If both are on one layer, the Space finds the ground and shows its pick on a numbered image for you to confirm.
- Choose a model and a substrate, and press Predict. You get the matrix in fF, self terms included.
Models
| model | how it works | error on 39 new layouts, % (MAE / RMSE, fF) | median time |
|---|---|---|---|
| QCap (default) | the extrapolated prior from two coarse method-of-moments solves, corrected by the networks | 1.05 (0.132 / 0.188) | 1.1 s |
| QCap-Lite | the same recipe on two coarser solves | 2.044 (0.258 / 0.348) | 0.56 s |
| QCap-Fast | a learned prior replaces the solves, then the networks correct it | 3.175 (0.583 / 0.824) | 0.24 s |
The 39 layouts are generated rings with a neighbour (3 or 4 conductors) that no part of any model saw in training. On them the extrapolated prior alone scores 1.765 % (MAE 0.275 / RMSE 0.376 fF). Times are on two CPUs of an Intel Xeon E5-2640 v4 cluster node.
QCap-Fast is for quick screening of the component families it was trained on. Use QCap otherwise.
API
The same endpoints work over gradio_client or REST (/gradio_api/call/<name>).
import os
from gradio_client import Client, handle_file
c = Client("shanto268/PlanarCapacitanceModel", oauth_token=os.environ["HF_TOKEN"]) # counts as you for the daily limit
r = c.predict(handle_file("layout.gds"), "1/0", "1/10", 0, "Si (cryogenic, training)", 11.45, 350, "QCap",
api_name="/predict_gds")
print(r["names"], r["matrix_fF"], r["timing_s"]["total_s"])
model is QCap, QCap-Lite or QCap-Fast (any case). When ground and conductors share a layer, pass the ground's piece numbers as the last argument (ground_pieces, for example "1" or "1,4") if the automatic pick is wrong.
Limits of this demo
The examples run without sign-in. Sign in with Hugging Face to run your own layout: 10 predictions per day (UTC), for layouts with fewer than 70 conductors, ground included. A repeat of a result you already have does not count. The API follows the same rules: anonymous calls run the bundled examples only, and a call made with oauth_token counts as you. To run many layouts, larger ones or designs you would rather not upload, run the same models on your own computer with SQuADDS: Run it on your own computer.
Privacy
Uploaded layouts are processed in memory and held there only while the Space runs, to answer repeat requests. Nothing is written to permanent storage, and no file names or geometry are logged or kept. To enforce the daily limit, your Hugging Face username and your network address are turned into keyed hashes, held in memory and cleared at the end of the UTC day. They are never stored or logged. We keep only daily totals (runs per model and per layout size, refusals by reason, errors, response times and the number of distinct users that day) to understand how the demo is used. Hugging Face keeps ordinary web access logs under its own policy.
Citation
If you use SQuADDS or QCap in your work, please cite:
- S. Shanto et al., "SQuADDS: A validated design database and simulation workflow for superconducting qubit design," Quantum 8, 1465 (2024), doi:10.22331/q-2024-09-09-1465.
- S. A. Shanto, S. Das and E. Levenson-Falk, "QCap: a physics-corrected graph neural network for the capacitance matrix of any planar superconducting device layout," arXiv:2611.22057 (2026).
@article{Shanto2024squaddsvalidated,
doi = {10.22331/q-2024-09-09-1465},
url = {https://doi.org/10.22331/q-2024-09-09-1465},
title = {{SQ}u{ADDS}: {A} validated design database and simulation workflow for superconducting qubit design},
author = {Shanto, Sadman and Kuo, Andre and Miyamoto, Clark and Zhang, Haimeng and Maurya, Vivek and Vlachos, Evangelos and Hecht, Malida and Shum, Chung Wa and Levenson-Falk, Eli},
journal = {{Quantum}},
issn = {2521-327X},
publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}},
volume = {8},
pages = {1465},
month = sep,
year = {2024}
}
@misc{Shanto2026planarcapacitance,
title = {{QCap}: a physics-corrected graph neural network for the capacitance matrix of any planar superconducting device layout},
author = {Shanto, Sadman Ahmed and Das, Saikat and Levenson-Falk, Eli},
year = {2026},
eprint = {2611.22057},
archivePrefix = {arXiv},
primaryClass = {quant-ph},
url = {https://arxiv.org/abs/2611.22057}
}