Modernize against current scqubits (env pin + Circuit.from_yaml_string)#21
Open
kochjens wants to merge 1 commit into
Open
Modernize against current scqubits (env pin + Circuit.from_yaml_string)#21kochjens wants to merge 1 commit into
kochjens wants to merge 1 commit into
Conversation
- 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.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small fixes so the examples track current scqubits.
environment.ymlscqubits==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.ipyvuetify(GUI / explorer demos) andqutip-qip(thedemo_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.ipynbReplace the deprecated
scq.Circuit(zp_yaml, from_file=False, ...)call with the named constructorscq.Circuit.from_yaml_string(zp_yaml, ...).from_fileis deprecated as of scqubits 4.3.2 (currently on scqubitsmain);--nbval-laxdoes not fail on the resultingDeprecationWarning, so it would otherwise go unnoticed. Source line only — execution count and cached outputs are unchanged.Test plan
pytest --nbval-laxagainst scqubitsmain) passes.