Skip to content

PL2 Docs: inspecting_circuits.rst - #10468

Open
isaacdevlugt wants to merge 3 commits into
pl2-docs-landingfrom
pl2-docs-inspecting-circuits
Open

isaacdevlugt wants to merge 3 commits into
pl2-docs-landingfrom
pl2-docs-inspecting-circuits

Conversation

@isaacdevlugt

@isaacdevlugt isaacdevlugt commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview: Inspecting circuits

Split from pennylane2-docs-using-pennylane. Work authored with the help of an AI assistant (Claude Code).

Description of the Change:

  • Rewrites inspecting_circuits.rst for qjit-compiled programs: runtime printing with catalyst.debug.print, Python callbacks with catalyst.debug.callback, and the compiled IR via mlir/mlir_opt.
  • Removes the tools that do not work with program capture: draw/draw_mpl, Snapshot/snapshots, breakpoint and debug_*, CircuitGraph and commutation_dag.
  • Removes the resource examples (specs, track, analyze, estimate). These move to a dedicated resource profiling page in PL2 Docs: resource_profiling.rst #10473, which is based on this PR.
  • Enables doctests for inspecting_circuits.rst.

Possible Drawbacks:

No circuit drawing for compiled programs yet: qp.draw_graph currently fails on any parametrized gate (e.g. qp.RX(x, 0)) with PennyLane 0.46.0.dev156 and Catalyst 0.16.0.dev145.

Related GitHub Issues:

sc-136581

🤖 Generated with Claude Code

Split from pennylane2-docs-using-pennylane. Work authored with the help of an AI assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.rst with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

The specs, track, analyze and estimate examples move to a dedicated
resource profiling page.

Assisted-by: Claude
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the tape-based tools (draw/draw_mpl, snapshots, breakpoint,
CircuitGraph, commutation_dag), which do not work with capture, with
runtime printing, callbacks and the compiled IR. Restore the page in
the "Using PennyLane" toctree.

Assisted-by: Claude
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@isaacdevlugt
isaacdevlugt marked this pull request as ready for review November 20, 2026 20:02
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.

2 participants