Skip to content

Fixes for 0.5.1: SQUID loop qubits (#34), list-valued design parameters (#4) - #76

Merged
shanto268 merged 1 commit into
masterfrom
fix/issues-0.5.1
Nov 17, 2026
Merged

shanto268 merged 1 commit into
masterfrom
fix/issues-0.5.1

Conversation

@shanto268

Copy link
Copy Markdown
Collaborator

Fixes for the open 0.5.1 issues, plus two small items found on HPC. The issues are left open on purpose; they are closed by hand after the release.

SQUID loop qubits (#34)

TransmonCross(style="SQUID_LOOP_Dolan") instantiated SQUID_LOOP_Dolan, a name that was never imported or defined, so the build failed with name 'SQUID_LOOP_Dolan' is not defined. The class is SquidLoopDolan in squadds/components/jjs.py; qubits.py now imports and builds it with the options it already prepared.

Checking the other style paths turned up three more problems, also fixed:

  • The JJ_Dolan and SQUID_LOOP_Dolan styles created their junction sub-component on every make(), so design.rebuild() / gui.rebuild() failed with "Q1_JJ_Dolan already exists" unless overwrite_enabled was set. The sub-component is now updated and rebuilt in place.
  • In the default style the junction line was rotated and then the unrotated line was translated, so the junction ignored orientation.
  • The docstring named the single-junction style 'Dolan_JJ'; the style is 'JJ_Dolan' (its options dict is Dolan_JJ).

Tutorial 5 gets a note showing the SQUID_LOOP_Dolan options (and that each of the two junctions should be sized for 2*LJ), and the FAQ has a matching entry. tests/test_transmon_cross_styles.py builds both Dolan styles in a headless design at three orientations with and without JJ_flip, checks the sub-component, its junction polygons and junction lines (1 or 2) sit at the end of the south arm, checks rebuilds, checks the default junction follows the orientation, and checks an unknown style is rejected.

List-valued design parameters (#4)

The sweep functions already expanded lists, through an internal helper, but a list could not reach AnsysSimulator.simulate(), and there was no documented way to turn list-valued options into designs. Now:

  • squadds.simulations.expand_design_options(options) returns one design dict per combination of list-valued leaves (cartesian product). Leaves with the same name and the same list are swept together, so claw_length in both the qubit and the cavity options keeps one value per design. Tuples stay constant, empty lists raise, and options without lists return a copy.
  • run_sweep / run_qubit_cavity_sweep use it.
  • AnsysSimulator.simulate() expands list-valued design options (design_options, design_options_qubit, design_options_cavity_claw) and returns one result per design, so update_design_parameters(claw_length=["150um", "200um"]) followed by simulate() runs both. A design without lists returns a single result, as before.
  • FAQ example in Getting Started, a mention in the MCP simulation playbook, and tests for the helper and for simulate().

Also

  • Tutorial 16 set WORKERS = min(8, os.cpu_count()), which under Slurm or a container counts the node's CPUs instead of the job's allocation (a 4-CPU job started 8 processes and peaked at 16.1 GiB of 16 GiB). It now uses os.sched_getaffinity(0) where available, capped at 8, and the markdown says so.
  • colorama joins the dev extra (one terminal-output test skipped without it), with uv lock.

Release notes: three lines under "Unreleased". PR #74 adds its own "Unreleased" section; whichever merges second merges the two.

Local checks: full suite pytest -m "not integration" 682 passed; pre-commit clean on all files; Sphinx build succeeds with no new warnings.

…rs (#4)

- TransmonCross style "SQUID_LOOP_Dolan" instantiated an undefined name; it now builds SquidLoopDolan. Junction
  sub-components are updated in place on rebuild, the default junction follows the qubit orientation, and the
  docstring names the "JJ_Dolan" style correctly. Tutorial 5 documents the SQUID options. Tests build every style
  headlessly.
- expand_design_options turns list-valued design options into one design per combination (shared parameters swept
  together). The sweeps use it and AnsysSimulator.simulate returns one result per design. FAQ entry and tests.
- Tutorial 16 sizes its worker pool from the CPUs the job may use (sched_getaffinity), not the node's core count.
- colorama in the dev extra.
@shanto268
shanto268 merged commit 2a0bcc4 into master Nov 17, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant