Skip to content

Conversation

dstrain115
Copy link
Collaborator

Feature(vis): Enhance circuit_to_latex_render and GIF creation

This PR introduces cirq.vis.render_circuit and create_gif_from_ipython_images.

The functionality is showcased and described here: in this Jupyter notebook https://drive.google.com/file/d/1KXQjBmQ9rNUjZHJ6QuGolthLN19_K9yK/view?usp=drivesdk (colab: https://colab.sandbox.google.com/drive/1KXQjBmQ9rNUjZHJ6QuGolthLN19_K9yK)

Notes on render_circuit:

  • Performs upfront checks for pdflatex and pdftoppm executables. Issues informative warnings and disables relevant functionality if they are not found, preventing unexpected failures.
  • If pdflatex fails and an output_tex_path is specified, the problematic .tex file is copied to the specified path for easier user inspection.

Note: this is a fork of PR #7354

Feature(vis): Enhance circuit_to_latex_render and GIF creation

This PR introduces cirq.vis.render_circuit and create_gif_from_ipython_images.

The functionality is showcased and described here: in this Jupyter notebook
https://drive.google.com/file/d/1KXQjBmQ9rNUjZHJ6QuGolthLN19_K9yK/view?usp=drivesdk
(colab: https://colab.sandbox.google.com/drive/1KXQjBmQ9rNUjZHJ6QuGolthLN19_K9yK)

Notes on render_circuit:
* Performs upfront checks for pdflatex and pdftoppm executables. Issues informative warnings and disables relevant functionality if they are not found, preventing unexpected failures.
* If pdflatex fails and an output_tex_path is specified, the problematic .tex file is copied to the specified path for easier user inspection.

Note: this is a fork of PR quantumlib#7354
@github-actions github-actions bot added the size: XL lines changed >1000 label Jul 30, 2025
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.55%. Comparing base (072d871) to head (bd74988).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7544    +/-   ##
========================================
  Coverage   97.54%   97.55%            
========================================
  Files        1099     1103     +4     
  Lines       99191    99592   +401     
========================================
+ Hits        96755    97155   +400     
- Misses       2436     2437     +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dstrain115
Copy link
Collaborator Author

Pushed changes to #7354

@dstrain115 dstrain115 closed this Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XL lines changed >1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant