Add the figures the example programs produce - #29
Merged
Conversation
`np.argmax` on an `xarray.DataArray` raises `ValueError: dimensions ('freq',)
must have the same length as the number of data dimensions, ndim=0`, so the
line the qubit spectroscopy page gives for recovering `f01` did not run. The
docs checker parses Python fences but never executes them, which is why it got
through. It takes `.values`.
Four pages shape their mock response as `sin(pi * gain / 2) ** 2` and describe the result as a Rabi oscillation, but over a gain of 0 to 1 that is a quarter period: the curve rises and flattens exactly at the last sweep point, never turning over. The pi-pulse amplitude the pages say the sweep calibrates is not readable off it, and `execution.md` labels the plot "a noisy Rabi oscillation" in a comment. Dropping the halving gives a full period with a maximum at 0.5 V, which is the `IQDrag(amplitude=0.5, ...)` the same pages already resolve `"pi_pulse"` to, so the curve peaks where the calibration data says it should.
The example pages described their results in dims and shapes and left the reader to picture the curve. Nine of them now show it. The figures are generated rather than drawn: `build_example_plots.py` holds each page's program, runs it on the reference platform, and renders the result, so the picture and the code above it cannot disagree. The CZ chevron runs at the size the page prints, a 101 by 101 grid at 1000 shots, which is 20 million model samples and around six minutes. Each figure is written twice, once per site theme, onto surfaces that match Material's `default` and `slate` exactly, and the pages embed the pair with the `#only-light` / `#only-dark` fragments the stylesheet keys on `data-md-color-scheme`. The sequential ramp runs away from the surface in both themes, so the marks that carry the data are the ones standing furthest off the page rather than the empty regions. `checking-a-program.md` gets none, because it runs nothing.
AI AnalysisOupsie! Looks like something went wrong on our end. |
|
❌ The last analysis has failed. |
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.
The example pages described their results in dims and shapes and left the reader to picture the curve. Nine of them now show it, and the tenth,
checking-a-program.md, gets none because it runs nothing.The figures are generated rather than drawn.
.claude/skills/qprogram-docs/scripts/build_example_plots.pyholds each page's program, runs it on the reference platform, and renders the result, so a plot cannot drift from the code printed above it; the docs change checklist now names it as a step. The CZ chevron runs at the size its page prints, a 101 by 101 grid at 1000 shots, which is 20 million model samples and around six minutes.Each figure is written twice, once per site theme, onto surfaces matching Material's
defaultandslateexactly, and the pages embed the pair with the#only-light/#only-darkfragments the stylesheet keys ondata-md-color-scheme. The dark variant is its own render with its own colour steps rather than a light figure behind a filter, and the sequential ramp runs away from the surface in both themes so the marks carrying the data stand furthest off the page rather than the empty regions.Running the programs turned up two things the pages had wrong, each fixed in its own commit ahead of the figures.
qubit-spectroscopy.mdgaveint(np.argmax(magnitude))for recoveringf01, which raises on anxarray.DataArray. The docs checker parses Python fences but never executes them, so it got through review and CI. It takes.values.Four pages shaped their mock response as
sin(pi * gain / 2) ** 2and called the result a Rabi oscillation, but over a gain of 0 to 1 that is a quarter period: the curve rises and flattens exactly at the last sweep point, so the pi-pulse amplitude the pages say the sweep calibrates cannot be read off it. Dropping the halving gives a full period peaking at 0.5 V, which is theIQDrag(amplitude=0.5, ...)those same pages already resolve"pi_pulse"to.