Skip to content

Modernize against current scqubits (env pin + Circuit.from_yaml_string)#21

Open
kochjens wants to merge 1 commit into
mainfrom
fix-stale-env-and-circuit-deprecation
Open

Modernize against current scqubits (env pin + Circuit.from_yaml_string)#21
kochjens wants to merge 1 commit into
mainfrom
fix-stale-env-and-circuit-deprecation

Conversation

@kochjens

Copy link
Copy Markdown
Member

Two small fixes so the examples track current scqubits.

environment.yml

  • Bump scqubits==2.0 -> scqubits>=4.3. The pin was years out of date; anyone building the conda environment from this file got an ancient library that does not match the notebooks.
  • Add ipyvuetify (GUI / explorer demos) and qutip-qip (the demo_qutip_* notebooks import it). Neither is pulled in transitively for conda users.

This file is not used by CI — CI installs scqubits from git and uses workflow-requirements.info — but it is what local users and Binder rely on.

demo_customcircuit.ipynb

Replace the deprecated scq.Circuit(zp_yaml, from_file=False, ...) call with the named constructor scq.Circuit.from_yaml_string(zp_yaml, ...). from_file is deprecated as of scqubits 4.3.2 (currently on scqubits main); --nbval-lax does not fail on the resulting DeprecationWarning, so it would otherwise go unnoticed. Source line only — execution count and cached outputs are unchanged.

Test plan

  • CI (pytest --nbval-lax against scqubits main) passes.

- environment.yml: bump scqubits 2.0 -> >=4.3 (the pin was years
  out of date); add ipyvuetify and qutip-qip, which the GUI and
  qutip demo notebooks need and which conda does not pull in
  transitively from scqubits.
- demo_customcircuit.ipynb: replace the deprecated
  scq.Circuit(zp_yaml, from_file=False, ...) call with
  scq.Circuit.from_yaml_string(zp_yaml, ...). from_file is
  deprecated as of scqubits 4.3.2. Source only; execution count
  and cached outputs unchanged.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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