docs: add AI-friendly visualization guidance to context - #243
Conversation
jack-champagne
left a comment
There was a problem hiding this comment.
looks good, approved conditional on the removal of the nit above. thank you for your contribution @jfust3 !
|
|
||
| # ## Quick Reference for AI-Generated Plotting Code | ||
| # | ||
| # If you are asking an AI coding assistant to generate Piccolo visualization code, | ||
| # give it this rule of thumb: use Piccolo's high-level plotting helpers first, | ||
| # then fall back to Makie primitives only for custom layouts. The most common | ||
| # calls are: | ||
| # | ||
| # ```julia | ||
| # using Piccolo | ||
| # using CairoMakie | ||
| # | ||
| # traj = get_trajectory(qcp) | ||
| # | ||
| # # Physical pulse waveform reconstructed from the solved problem | ||
| # fig = plot_pulse(qcp; bounds = true, components = [:du, :ddu]) | ||
| # | ||
| # # Raw optimization variables, useful for debugging the NLP state | ||
| # fig = plot(traj, [:u, :du, :ddu]) | ||
| # | ||
| # # Quantum dynamics along the trajectory | ||
| # fig = plot_unitary_populations(traj) # for UnitaryTrajectory problems | ||
| # fig = plot_state_populations(traj) # for KetTrajectory problems | ||
| # ``` | ||
| # | ||
| # For Bloch and Wigner helpers, also load `QuantumToolbox`: | ||
| # | ||
| # ```julia | ||
| # using QuantumToolbox | ||
| # fig = plot_bloch(traj; index = traj.N) | ||
| # fig = plot_wigner(traj, traj.N; xvec = -3:0.1:3, yvec = -3:0.1:3) | ||
| # ``` | ||
| # | ||
| # The root [`llms.txt`](https://github.com/harmoniqs/Piccolo.jl/blob/main/llms.txt) | ||
| # file repeats these patterns in a compact form for coding agents and editor | ||
| # assistants. | ||
|
|
||
| # Inspect the resulting fidelity: |
There was a problem hiding this comment.
I don't think this should be just AI-agent focused, can write in neutral tone. We have a button on our docs pages that allows people to easily copy and paste this into their agents of choice.
There was a problem hiding this comment.
Addressed — I updated the wording to keep it neutral rather than AI-agent-specific. git diff --check passes on the follow-up commit.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Updated the wording to remove the AI-agent-specific phrasing and keep it neutral. Validation: |
Summary
src/visualizations/CONTEXT.md, matching maintainer feedback on docs: add AI-friendly visualization guidance #232.llms.txtfile from the earlier submission.Validation
git diff --checkCloses #61
Supersedes #232