Introduction | Usage | Installation | Contribution
Qubit-Discovery is a set of software tools to perform gradient-based optimization of superconducting circuits using the SQcircuit Python package, with a special focus on qubit design. It provides a Python package, qubit-discovery, implementing loss functions and optimization algorithms, and a set of scripts using it in a reproducible workflow for parallelized optimization runs.
With these tools, superconducting circuits can be optimized over the values of their elements for metrics such as decoherence time, anharmonicity, qubit frequency, or other user-defined targets.
A description of the theory and example application (employing the provided scripts) is provided in the following paper:
Taha Rajabzadeh, Alex Boulton-McKeehan, Sam Bonkowsky, David I. Schuster, Amir H. Safavi-Naeini, A General Framework for Gradient-Based Optimization of Superconducting Quantum Circuits using Qubit Discovery as a Case Study, arXiv:2408.12704 (2024), https://arxiv.org/abs/2408.12704.
The qubit-discovery package provides the basic ingredients for running optimization with SQcircuit. The losses subpackage implements functions to evaluate qubit metrics (anharmonicity, decoherence time, …) and utilities to build loss functions out of them. The optim subpackage implements optimization algorithms (SGD, BFGS, and other PyTorch optimizers), utilities to set truncation numbers, and a qubit sampler.
See the notebooks in the tutorials directory for instructions on how to use these features.
-
QD_transmon-optim.ipynbprovides a quick demo on how to usequbit-discoveryto optimize the$T_2$ time, qubit frequency, and anharmonicity of a transmon, in only a few lines of code. -
QD_overview.ipynbgives an introduction to the core functionality of the package. -
QD_advanced-features.ipynbshows the advanced features and customization possible.
The scripts directory provides a set of programs which can be used to automate multiple optimization runs via the following workflow:
- Execute
optimize.pyin parallel with different seeds, which correspond to distinct intialization points. - Collate the results of the different runs using
plot_records.py. - Output the details of the best-performing circuits with
circuit_summary.pyandplot_analysis.py.
For a detailed description of this workflow, see parallel_optimization.md.
To install the qubit-discovery package, download from PyPI:
pip install qubit-discovery
To use the provided scripts, first install qubit-discovery with scripting support:
pip install qubit-discovery[scripts]
Then clone the Qubit-Discovery repository and run the scripts with Python >= 3.9.
We welcome contributions to the develoment of Qubit-Discovery! Please feel free to fork the repository and send pull requests, or file bug reports on the issues page. All code contributions are acknowledged in the contributors' section below.