Fix long code lines in tutorials flagged in #5239#5338
Open
henryzou50 wants to merge 2 commits into
Open
Conversation
Wrap code lines exceeding 88 characters and shorten overly wide text outputs in three tutorials flagged in #5239: - compilation-methods-for-hamiltonian-simulation-circuits: split a 154-char benchpress URL with implicit string concatenation, wrap a long comment, and break long print f-strings into fragments (printed text unchanged) - ai-transpiler-introduction: wrap long comments and print f-strings; replace the printed full qubit-count list with a range summary ("from 6 to 25") and update the stored outputs to match - sml-classification: build the dataset URLs from a base_url variable interpolated into the wget commands; pretty-print the job metadata dicts with pprint so the ~260-char output lines wrap at 80 chars (stored outputs regenerated from the same data) A follow-up commit will rerun dc-hex-ising to restore its missing output images.
Contributor
|
One or more of the following people are relevant to this code:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
abbycross
approved these changes
Jul 8, 2026
6 tasks
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.
Summary
Addresses the content-side problems from #5239 by fixing code lines longer than 88 characters and overly wide text outputs in three tutorials. All changes pass
squeaky --check, and where outputs were touched they were regenerated deterministically from the same data, so code and stored outputs remain consistent.compilation-methods-for-hamiltonian-simulation-circuits
min_qubits/max_qubitsvariables and split long
P(|00...0>)print f-strings into fragments(printed text unchanged)
ai-transpiler-introduction
sml-classification
base_urlvariable interpolated into the!wgetcommands (verified the interpolation produces the identical URL)pprintso the ~260-charresource_usagedict outputs wrap at 80 chars. Note this is likely what rendered badly online; stored outputs were regenerated by runningpprinton the same dictsTo do in this PR
dc-hex-isingto restore its missing output images