Tutorials¶
The tutorials are five Jupyter notebooks in examples/tutorials/. Each one takes a chip through the whole Quantcore
loop, one small step at a time: PDK, layout, DRC, lumped model (LOM), FEM jobs, results back into the LOM, feedback,
and fab export. Take them in order the first time. Tutorial 0 builds a one-qubit chip from nothing. Tutorials 1 to 3
rebuild existing chips with the library and the Quantcore PDK. Tutorial 4 runs the loop as a loop on two coupled qubits.
The notebooks are saved with their outputs, so you can read them (and these pages) without running anything. The pages here describe those saved outputs and do not rerun anything.
What each one teaches¶
Tutorial |
What you build |
What you learn |
Needs AEDT? |
Run time |
|---|---|---|---|---|
One Xmon, a λ/4 readout and a feedline |
The PDK, live KLayout, DRC, netlist, LOM, one sim group with three FEM jobs, feedback, fab export |
Only to re-solve |
about 1 min; with |
|
A legacy nine-qubit test chip with a direct pair and a tunable-coupler triple |
Rebuilding an existing chip in the PDK, |
Only to re-solve |
about 1 min with the kept FEM results; with |
|
IBM’s five-qubit chip: two triangles joined by λ/2 buses |
Pocket transmons, buses and tees, J by avoided crossing, stage 1 on a subset and stage 2 on the whole netlist, rendering into AEDT without solving |
Only to re-solve or render |
about 2 to 3 min; with |
|
Two 17-qubit surface-code chips from one generator |
A generator-built chip, airbridges at crossings, per-qubit LOM with its feedline, LOM against a paper’s table |
Only to re-solve or render |
about 3 to 5 min |
|
Two coupled Xmons with two readouts on one feedline |
LOM-first synthesis, a LOM loop, FEM minus LOM as feedback, revision 1, “I want f_q1 = X” |
Only to re-solve |
about 2 to 4 min; with |
Run times are the ones in examples/tutorials/README.md (a workstation with 31 GB RAM). With the default
RUN_FEM = False no notebook starts AEDT: the FEM cells read the kept results in examples/tutorials/fem/.
Other notebooks and example files that sit directly in examples/ are listed on Other examples.
Open and run them¶
Start Jupyter in the
qcdconda environment, from the repository root:conda activate qcd jupyter lab examples/tutorials/00_quickstart_klive_and_pdk.ipynb
Run the cells from the top. The first code cell finds the repository root and loads the helper module
examples/tutorials/_tut.py(T), which holds the tables, snapshots and the FEM round trip.Read each markdown cell before its code cell: it says what the step does and what to look for.
Each notebook is self-contained, so you can also open any one of them on its own.
Live KLayout or headless¶
By default the notebooks are live: every add, route and set is rebuilt and sent to KLayout over KLive
(localhost:8082), so you watch the chip grow. KLAYOUT_GUI = True (the default, next to LIVE) opens the KLayout
window with the Quantcore plugin at the first build if it is not running. See KLive for how
scripts drive KLayout.
For no window, set QCC_LIVE=0 before starting Jupyter. Every build then writes build/<name>.oas plus its
.qcc.json sidecar, and the pictures are headless KLayout renders with the GUI colours. Without KLayout installed the
notebooks fall back to headless on their own. The saved outputs of the tutorials come from headless runs.
The switches at the top¶
Every notebook has a settings cell near the top:
Switch |
Meaning |
|---|---|
|
Redraw KLayout on every change; open the window if needed. |
|
|
|
|
|
Fast test settings for every job: minutes, not converged. |
|
Stage 1 simulates a subset of the chip; stage 2 puts its values in the whole LOM. |
|
Solve again even when a kept result of the same job exists. |
The kept FEM results¶
With RUN_FEM = False, every “bring it back” cell reads results.json and job.json from
examples/tutorials/fem/<job>/. That is why the FEM tables in the notebooks have numbers without AEDT. Each kept
result prints “the kept results were solved for another revision of this job (design hash or settings differ); they
are shown as they are”. The library changed after the solve; the values are real, but a new solve would differ a
little. RESOLVE = True solves again.
The kept results were solved with the fast settings, so most are not converged (the notebooks print the pass count and the last Δ). Judge them as trends, not as final values.
Note
RUN_FEM = True needs AEDT 2024 R1 or later, installed and licensed. The notebooks never close an AEDT window they
did not start. See Simulation for the job folders and the solver settings.
Where the files go¶
What |
Where |
|---|---|
The designs the tutorials save |
|
Snapshots |
|
Solved FEM results |
|
Builds, jobs, revisions |
|
Progress for the dashboard |
|
Two FEM stages¶
Every tutorial runs its FEM part the same way, and the LOM is always the whole netlist:
Stage 1, the subset check.
SIM_SUBSETpicks(qubit, readout)pairs. Each becomes a small box that is rendered and solved on its own. The notebook shows FEM values only: convergence, the raw C-matrix, eigenmodes, S21 notches, and the FEM-filled capacitances next to their estimates. If they look sane, go on.Stage 2, the whole LOM. The subset values are filled into the whole netlist; every other branch keeps its component estimate. The LOM runs on that netlist, is compared with the FEM, and feeds the next revision.
See the flow for the whole loop and the LOM for how far to trust the estimates.