Skip to content

Commit 27058af

Browse files
committed
Add new Quantikz rendering modules for visualization
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
1 parent 072d871 commit 27058af

File tree

4 files changed

+1493
-0
lines changed

4 files changed

+1493
-0
lines changed

cirq-core/cirq/vis/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@
2828
from cirq.vis.density_matrix import plot_density_matrix as plot_density_matrix
2929

3030
from cirq.vis.vis_utils import relative_luminance as relative_luminance
31+
32+
from cirq.vis.circuit_to_latex_quantikz import CircuitToQuantikz
33+
from cirq.vis.circuit_to_latex_render import render_circuit

0 commit comments

Comments
 (0)